wmi_unified.h 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130
  1. /*
  2. * Copyright (c) 2010-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @addtogroup WMIAPI
  28. *@{
  29. */
  30. /** @file
  31. * This file specifies the WMI interface for the Software Architecture.
  32. *
  33. * It includes definitions of all the commands and events. Commands are messages
  34. * from the host to the target. Events and Replies are messages from the target
  35. * to the host.
  36. *
  37. * Ownership of correctness in regards to WMI commands
  38. * belongs to the host driver and the target is not required to validate
  39. * parameters for value, proper range, or any other checking.
  40. *
  41. * Guidelines for extending this interface are below.
  42. *
  43. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  44. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  45. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  46. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  47. * if necessary. Do not use the programming language's bit field definition.
  48. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  49. * variables. Use these macros for set/get of these fields. Try to use this to
  50. * optimize the structure without bloating it with A_UINT32 variables for every lower
  51. * sized field.
  52. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  53. * already 4-byte aligned by virtue of being a A_UINT32 type.
  54. * 6. Comment each parameter part of the WMI command/event structure by using the
  55. * 2 stars at the begining of C comment instead of one star to enable HTML document
  56. * generation using Doxygen.
  57. *
  58. */
  59. #ifndef _WMI_UNIFIED_H_
  60. #define _WMI_UNIFIED_H_
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #include <wlan_defs.h>
  65. #include <wmi_services.h>
  66. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  67. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  68. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  69. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  70. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  71. #define WMI_MAX_CHAINS 8
  72. /* The WLAN_MAX_AC macro cannot be changed without breaking
  73. WMI compatibility. */
  74. /* The maximum value of access category */
  75. #define WLAN_MAX_AC 4
  76. /*
  77. * These don't necessarily belong here; but as the MS/SM macros require
  78. * ar6000_internal.h to be included, it may not be defined as yet.
  79. */
  80. #define WMI_F_MS(_v, _f) \
  81. (((_v) & (_f)) >> (_f##_S))
  82. /*
  83. * This breaks the "good macro practice" of only referencing each
  84. * macro field once (to avoid things like field++ from causing issues.)
  85. */
  86. #define WMI_F_RMW(_var, _v, _f) \
  87. do { \
  88. (_var) &= ~(_f); \
  89. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  90. } while (0)
  91. #define WMI_GET_BITS(_val,_index,_num_bits) \
  92. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  93. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  94. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  95. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  96. } while (0)
  97. /**
  98. * A packed array is an array where each entry in the array is less than
  99. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  100. * For example, if each entry in the array is 11 bits, then you can stuff
  101. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  102. * The first 2 11-bit values will be stored in the first A_UINT32,
  103. * and the last 2 11-bit values will be stored in the second A_UINT32.
  104. */
  105. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  106. (((num_entries) / (32 / (bits_per_entry))) + \
  107. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  108. #define WMI_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  109. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  110. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  111. {
  112. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  113. A_UINT32 uint_index = (entry_index / entries_per_uint);
  114. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  115. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  116. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  117. return (arr[uint_index] >> start_bit_in_uint) &
  118. ((1 << bits_per_entry) - 1);
  119. }
  120. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  121. A_UINT32 bits_per_entry, A_UINT32 val)
  122. {
  123. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  124. A_UINT32 uint_index = (entry_index / entries_per_uint);
  125. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  126. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  127. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  128. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  129. arr[uint_index] |=
  130. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  131. }
  132. /** 2 word representation of MAC addr */
  133. typedef struct _wmi_mac_addr {
  134. /** upper 4 bytes of MAC address */
  135. A_UINT32 mac_addr31to0;
  136. /** lower 2 bytes of MAC address */
  137. A_UINT32 mac_addr47to32;
  138. } wmi_mac_addr;
  139. /** macro to convert MAC address from WMI word format to char array */
  140. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  141. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  142. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  143. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  144. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  145. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  146. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  147. } while (0)
  148. /** macro to convert MAC address from char array to WMI word format */
  149. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  150. (pwmi_mac_addr)->mac_addr31to0 = \
  151. (((c_macaddr)[0] << 0) | \
  152. ((c_macaddr)[1] << 8) | \
  153. ((c_macaddr)[2] << 16) | \
  154. ((c_macaddr)[3] << 24)); \
  155. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  156. } while (0)
  157. /*
  158. * The below function declarations are for implementations on some
  159. * platforms of the above macros, but in function form, to save code
  160. * memory by avoiding macro-inlining of a non-trivial amount of code.
  161. * These function versions of the above macros may not be available
  162. * on all host and target platforms.
  163. */
  164. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  165. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  166. /*
  167. * wmi command groups.
  168. */
  169. typedef enum {
  170. /* 0 to 2 are reserved */
  171. WMI_GRP_START = 0x3,
  172. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  173. WMI_GRP_PDEV, /* 0x4 */
  174. WMI_GRP_VDEV, /* 0x5 */
  175. WMI_GRP_PEER, /* 0x6 */
  176. WMI_GRP_MGMT, /* 0x7 */
  177. WMI_GRP_BA_NEG, /* 0x8 */
  178. WMI_GRP_STA_PS, /* 0x9 */
  179. WMI_GRP_DFS, /* 0xa */
  180. WMI_GRP_ROAM, /* 0xb */
  181. WMI_GRP_OFL_SCAN, /* 0xc */
  182. WMI_GRP_P2P, /* 0xd */
  183. WMI_GRP_AP_PS, /* 0xe */
  184. WMI_GRP_RATE_CTRL, /* 0xf */
  185. WMI_GRP_PROFILE, /* 0x10 */
  186. WMI_GRP_SUSPEND, /* 0x11 */
  187. WMI_GRP_BCN_FILTER, /* 0x12 */
  188. WMI_GRP_WOW, /* 0x13 */
  189. WMI_GRP_RTT, /* 0x14 */
  190. WMI_GRP_SPECTRAL, /* 0x15 */
  191. WMI_GRP_STATS, /* 0x16 */
  192. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  193. WMI_GRP_NLO_OFL, /* 0x18 */
  194. WMI_GRP_GTK_OFL, /* 0x19 */
  195. WMI_GRP_CSA_OFL, /* 0x1a */
  196. WMI_GRP_CHATTER, /* 0x1b */
  197. WMI_GRP_TID_ADDBA, /* 0x1c */
  198. WMI_GRP_MISC, /* 0x1d */
  199. WMI_GRP_GPIO, /* 0x1e */
  200. WMI_GRP_FWTEST, /* 0x1f */
  201. WMI_GRP_TDLS, /* 0x20 */
  202. WMI_GRP_RESMGR, /* 0x21 */
  203. WMI_GRP_STA_SMPS, /* 0x22 */
  204. WMI_GRP_WLAN_HB, /* 0x23 */
  205. WMI_GRP_RMC, /* 0x24 */
  206. WMI_GRP_MHF_OFL, /* 0x25 */
  207. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  208. WMI_GRP_OEM, /* 0x27 */
  209. WMI_GRP_NAN, /* 0x28 */
  210. WMI_GRP_COEX, /* 0x29 */
  211. WMI_GRP_OBSS_OFL, /* 0x2a */
  212. WMI_GRP_LPI, /* 0x2b */
  213. WMI_GRP_EXTSCAN, /* 0x2c */
  214. WMI_GRP_DHCP_OFL, /* 0x2d */
  215. WMI_GRP_IPA, /* 0x2e */
  216. WMI_GRP_MDNS_OFL, /* 0x2f */
  217. WMI_GRP_SAP_OFL, /* 0x30 */
  218. WMI_GRP_OCB, /* 0x31 */
  219. WMI_GRP_SOC, /* 0x32 */
  220. WMI_GRP_PKT_FILTER, /* 0x33 */
  221. WMI_GRP_MAWC, /* 0x34 */
  222. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  223. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  224. WMI_GRP_NAN_DATA, /* 0x37 */
  225. WMI_GRP_PROTOTYPE, /* 0x38 */
  226. WMI_GRP_MONITOR, /* 0x39 */
  227. WMI_GRP_REGULATORY, /* 0x3a */
  228. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  229. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  230. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  231. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  232. WMI_GRP_MOTION_DET, /* 0x3f */
  233. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  234. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  235. WMI_GRP_HPCS_PULSE, /* 0x42 */
  236. WMI_GRP_AUDIO, /* 0x43 */
  237. WMI_GRP_CFR_CAPTURE, /* 0x44 */
  238. } WMI_GRP_ID;
  239. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  240. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  241. /**
  242. * Command IDs and commange events
  243. */
  244. typedef enum {
  245. /** initialize the wlan sub system */
  246. WMI_INIT_CMDID = 0x1,
  247. /* Scan specific commands */
  248. /** start scan request to FW */
  249. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  250. /** stop scan request to FW */
  251. WMI_STOP_SCAN_CMDID,
  252. /** full list of channels as defined by the regulatory that will be used by scanner */
  253. WMI_SCAN_CHAN_LIST_CMDID,
  254. /** overwrite default priority table in scan scheduler */
  255. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  256. /** This command to adjust the priority and min.max_rest_time
  257. * of an on ongoing scan request.
  258. */
  259. WMI_SCAN_UPDATE_REQUEST_CMDID,
  260. /** set OUI to be used in probe request if enabled */
  261. WMI_SCAN_PROB_REQ_OUI_CMDID,
  262. /** config adaptive dwell scan */
  263. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  264. /** Only applicable to DBS capable product */
  265. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  266. /* PDEV(physical device) specific commands */
  267. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  268. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  269. /** set channel. mainly used for supporting monitor mode */
  270. WMI_PDEV_SET_CHANNEL_CMDID,
  271. /** set pdev specific parameters */
  272. WMI_PDEV_SET_PARAM_CMDID,
  273. /** enable packet log */
  274. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  275. /** disable packet log*/
  276. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  277. /** set wmm parameters */
  278. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  279. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  280. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  281. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  282. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  283. /** Command to send the DSCP-to-TID map to the target */
  284. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  285. /** set quiet ie parameters. primarily used in AP mode */
  286. WMI_PDEV_SET_QUIET_MODE_CMDID,
  287. /** Enable/Disable Green AP Power Save */
  288. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  289. /** get TPC config for the current operating channel */
  290. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  291. /** set the base MAC address for the physical device before a VDEV is created.
  292. * For firmware that doesn't support this feature and this command, the pdev
  293. * MAC address will not be changed. */
  294. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  295. /* eeprom content dump , the same to bdboard data */
  296. WMI_PDEV_DUMP_CMDID,
  297. /* set LED configuration */
  298. WMI_PDEV_SET_LED_CONFIG_CMDID,
  299. /* Get Current temprature of chip in Celcius degree*/
  300. WMI_PDEV_GET_TEMPERATURE_CMDID,
  301. /* Set LED flashing behavior */
  302. WMI_PDEV_SET_LED_FLASHING_CMDID,
  303. /** Enable/Disable Smart Antenna */
  304. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  305. /** Set Smart Antenna RX antenna*/
  306. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  307. /** Override the antenna switch table */
  308. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  309. /** Override the CTL table */
  310. WMI_PDEV_SET_CTL_TABLE_CMDID,
  311. /** Override the array gain table */
  312. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  313. /** FIPS test mode command */
  314. WMI_PDEV_FIPS_CMDID,
  315. /** get CCK ANI level */
  316. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  317. /** get OFDM ANI level */
  318. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  319. /** NF Cal Power dBr/dBm */
  320. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  321. /** TxPPDU TPC */
  322. WMI_PDEV_GET_TPC_CMDID,
  323. /** Set to enable MIB stats collection */
  324. WMI_MIB_STATS_ENABLE_CMDID,
  325. /** Set preferred channel list for DBS Mgr */
  326. WMI_PDEV_SET_PCL_CMDID,
  327. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  328. WMI_PDEV_SET_HW_MODE_CMDID,
  329. /** Set DFS, SCAN modes and other FW configurations */
  330. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  331. /** Set per band and per pdev antenna chains */
  332. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  333. /** Periodic channel stats request command */
  334. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  335. /** WMI command for power debug framework */
  336. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  337. /** set per-AC rx reorder timeouts */
  338. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  339. /** WMI command for WOW gpio and type */
  340. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  341. /* Get current ANT's per chain's RSSI info */
  342. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  343. /** WMI command for getting Chip Power Stats */
  344. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  345. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  346. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  347. /** vdev restart request for multiple vdevs */
  348. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  349. /** Pdev update packet routing command */
  350. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  351. /** Get Calibration data version details */
  352. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  353. /** Set Diversity Gain */
  354. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  355. /** Get chain RSSI and antena index command */
  356. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  357. /** get bss chan info */
  358. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  359. /** update pmk cache info */
  360. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  361. /** update fils HLP */
  362. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  363. /** update ctltable request **/
  364. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  365. /** Command to set beacon OUI **/
  366. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  367. /** enable/disable per-AC tx queue optimizations */
  368. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  369. /** enable/disable rx promiscuous mode */
  370. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  371. /* set a generic direct DMA ring config */
  372. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  373. /* enable/disable Action frame response as HE TB PPDU */
  374. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  375. /** filter packet log based on MAC address */
  376. WMI_PDEV_PKTLOG_FILTER_CMDID,
  377. /** wmi command for setting rogue ap configuration */
  378. WMI_PDEV_SET_RAP_CONFIG_CMDID,
  379. /** Specify DSM filters along with disallow bssid filters */
  380. WMI_PDEV_DSM_FILTER_CMDID,
  381. /* VDEV (virtual device) specific commands */
  382. /** vdev create */
  383. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  384. /** vdev delete */
  385. WMI_VDEV_DELETE_CMDID,
  386. /** vdev start request */
  387. WMI_VDEV_START_REQUEST_CMDID,
  388. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  389. WMI_VDEV_RESTART_REQUEST_CMDID,
  390. /** vdev up request */
  391. WMI_VDEV_UP_CMDID,
  392. /** vdev stop request */
  393. WMI_VDEV_STOP_CMDID,
  394. /** vdev down request */
  395. WMI_VDEV_DOWN_CMDID,
  396. /* set a vdev param */
  397. WMI_VDEV_SET_PARAM_CMDID,
  398. /* set a key (used for setting per peer unicast and per vdev multicast) */
  399. WMI_VDEV_INSTALL_KEY_CMDID,
  400. /* wnm sleep mode command */
  401. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  402. WMI_VDEV_WMM_ADDTS_CMDID,
  403. WMI_VDEV_WMM_DELTS_CMDID,
  404. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  405. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  406. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  407. WMI_VDEV_PLMREQ_START_CMDID,
  408. WMI_VDEV_PLMREQ_STOP_CMDID,
  409. /* TSF timestamp action for specified vdev */
  410. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  411. /** set the additional IEs in probe requests for scan or
  412. * assoc req etc for frames FW locally generates */
  413. WMI_VDEV_SET_IE_CMDID,
  414. WMI_VDEV_RATEMASK_CMDID,
  415. /** ATF VDEV REQUEST commands. */
  416. WMI_VDEV_ATF_REQUEST_CMDID,
  417. /** Command to send the DSCP-to-TID map to the target for VAP */
  418. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  419. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  420. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  421. /** set quiet ie parameters. primarily used in AP mode */
  422. WMI_VDEV_SET_QUIET_MODE_CMDID,
  423. /** To set custom aggregation size for per vdev */
  424. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  425. /* DISA feature: Encrypt-decrypt data request */
  426. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  427. /** Command to enable mac randomizaton **/
  428. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  429. /** WMI commands related to dbg arp stats */
  430. WMI_VDEV_SET_ARP_STAT_CMDID,
  431. WMI_VDEV_GET_ARP_STAT_CMDID,
  432. /** get tx power for the current vdev */
  433. WMI_VDEV_GET_TX_POWER_CMDID,
  434. /* limit STA offchannel activity */
  435. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  436. /** To set custom software retries per-AC for vdev */
  437. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  438. /** To set chainmask configuration for vdev */
  439. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  440. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  441. /* request LTE-Coex info */
  442. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  443. /** delete all peer (excluding bss peer) */
  444. WMI_VDEV_DELETE_ALL_PEER_CMDID,
  445. /* peer specific commands */
  446. /** create a peer */
  447. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  448. /** delete a peer */
  449. WMI_PEER_DELETE_CMDID,
  450. /** flush specific tid queues of a peer */
  451. WMI_PEER_FLUSH_TIDS_CMDID,
  452. /** set a parameter of a peer */
  453. WMI_PEER_SET_PARAM_CMDID,
  454. /** set peer to associated state. will cary all parameters determined during assocication time */
  455. WMI_PEER_ASSOC_CMDID,
  456. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  457. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  458. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  459. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  460. /** set up mcast group infor for multicast to unicast conversion */
  461. WMI_PEER_MCAST_GROUP_CMDID,
  462. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  463. WMI_PEER_INFO_REQ_CMDID,
  464. /** request the estimated link speed for the peer. FW shall respond with
  465. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  466. */
  467. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  468. /** Set the conditions to report peer justified rate to driver
  469. * The justified rate means the user-rate is justified by PER.
  470. */
  471. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  472. /** update a wds (4 address) entry */
  473. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  474. /** add a proxy sta entry */
  475. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  476. /** Set Smart Antenna TX antenna */
  477. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  478. /** Set Smart Antenna TX train info */
  479. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  480. /** Set SA node config options */
  481. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  482. /** ATF PEER REQUEST commands */
  483. WMI_PEER_ATF_REQUEST_CMDID,
  484. /** bandwidth fairness (BWF) peer configuration request command */
  485. WMI_PEER_BWF_REQUEST_CMDID,
  486. /** rx reorder queue setup for peer/tid */
  487. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  488. /** rx reorder queue remove for peer/tid */
  489. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  490. /** specify a limit for rx A-MPDU block size */
  491. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  492. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  493. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  494. /*
  495. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  496. * placed here, amongst the CMDID defs.
  497. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  498. * EVENTID section, but to preserve backwards compatibility, the value
  499. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  500. * is kept reserved/deprecated.
  501. *
  502. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  503. * WMI peer event message ID, though it will be simpler to instead add
  504. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  505. */
  506. WMI_PEER_RESERVED0_CMDID,
  507. /** Peer/Tid/Msduq threshold update */
  508. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  509. /** TID specific configurations per peer of type
  510. * wmi_peer_tid_configurations_cmd_fixed_param
  511. */
  512. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  513. /** Peer configuration for Channel Frequency Response (CFR) capture
  514. * of type wmi_peer_cfr_capture_cmd.
  515. *
  516. * On targets that do not use the direct DMA framework,
  517. * completion of the CFR capture is communicated through
  518. * HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  519. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_1
  520. * in WMI Service Ready.
  521. *
  522. * On targets that use direct DMA, completion of CFR capture is
  523. * communicated through WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID
  524. * using module ID WMI_DMA_RING_CONFIG_MODULE_RTT.
  525. * Such targets will set WMI_SERVICE_CFR_CAPTURE_IND_EVT_TYPE_1
  526. * in WMI Service Ready and enumerate WMI_DMA_RING_CONFIG_MODULE_RTT
  527. * in the dma_ring_caps entry of WMI_SERVICE_READY_EXT_EVENTID.
  528. * Additional MAC metadata is provided in WMI_PEER_CFR_CAPTURE_EVENTID.
  529. */
  530. WMI_PEER_CFR_CAPTURE_CMDID,
  531. /** WMI command related to AP channel width switching */
  532. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  533. /** WMI command to fetch current tx PN for the peer */
  534. WMI_PEER_TX_PN_REQUEST_CMDID,
  535. /** unmap response with peer ids */
  536. WMI_PEER_UNMAP_RESPONSE_CMDID,
  537. /* beacon/management specific commands */
  538. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  539. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  540. /** transmit beacon by value */
  541. WMI_PDEV_SEND_BCN_CMDID,
  542. /** set the beacon template. used in beacon offload mode to setup the
  543. * the common beacon template with the FW to be used by FW to generate beacons */
  544. WMI_BCN_TMPL_CMDID,
  545. /** set beacon filter with FW */
  546. WMI_BCN_FILTER_RX_CMDID,
  547. /* enable/disable filtering of probe requests in the firmware */
  548. WMI_PRB_REQ_FILTER_RX_CMDID,
  549. /** transmit management frame by value. will be deprecated */
  550. WMI_MGMT_TX_CMDID,
  551. /** set the probe response template. used in beacon offload mode to setup the
  552. * the common probe response template with the FW to be used by FW to generate
  553. * probe responses */
  554. WMI_PRB_TMPL_CMDID,
  555. /** Transmit Mgmt frame by reference */
  556. WMI_MGMT_TX_SEND_CMDID,
  557. /** Transmit data frame by reference */
  558. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  559. /** transmit FILS Discovery frame by value */
  560. WMI_PDEV_SEND_FD_CMDID,
  561. /** Cmd to enable/disable offloaded beacons */
  562. WMI_BCN_OFFLOAD_CTRL_CMDID,
  563. /** Cmd to enable FW handling BSS color change notification from AP. */
  564. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  565. /** To configure Beacon offload quiet-ie params */
  566. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  567. /** commands to directly control ba negotiation directly from host. only used in test mode */
  568. /** turn off FW Auto addba mode and let host control addba */
  569. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  570. /** send add ba request */
  571. WMI_ADDBA_SEND_CMDID,
  572. WMI_ADDBA_STATUS_CMDID,
  573. /** send del ba */
  574. WMI_DELBA_SEND_CMDID,
  575. /** set add ba response will be used by FW to generate addba response*/
  576. WMI_ADDBA_SET_RESP_CMDID,
  577. /** send single VHT MPDU with AMSDU */
  578. WMI_SEND_SINGLEAMSDU_CMDID,
  579. /** Station power save specific config */
  580. /** enable/disable station powersave */
  581. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  582. /** set station power save specific parameter */
  583. WMI_STA_POWERSAVE_PARAM_CMDID,
  584. /** set station mimo powersave mode */
  585. WMI_STA_MIMO_PS_MODE_CMDID,
  586. /** config station TX cycle percentage in a beacon interval */
  587. WMI_STA_TDCC_CONFIG_CMDID,
  588. /** DFS-specific commands */
  589. /** enable DFS (radar detection)*/
  590. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  591. /** disable DFS (radar detection)*/
  592. WMI_PDEV_DFS_DISABLE_CMDID,
  593. /** enable DFS phyerr/parse filter offload */
  594. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  595. /** enable DFS phyerr/parse filter offload */
  596. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  597. /** enable DFS phyerr processing offload */
  598. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  599. /** disable DFS phyerr processing offload */
  600. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  601. /** set ADFS channel config */
  602. WMI_VDEV_ADFS_CH_CFG_CMDID,
  603. /** abort ADFS off-channel-availability-check currently in progress */
  604. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  605. /* Roaming specific commands */
  606. /** set roam scan mode */
  607. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  608. /** set roam scan rssi threshold below which roam scan is enabled */
  609. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  610. /** set roam scan period for periodic roam scan mode */
  611. WMI_ROAM_SCAN_PERIOD,
  612. /** set roam scan trigger rssi change threshold */
  613. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  614. /** set roam AP profile */
  615. WMI_ROAM_AP_PROFILE,
  616. /** set channel list for roam scans */
  617. WMI_ROAM_CHAN_LIST,
  618. /** Stop scan command */
  619. WMI_ROAM_SCAN_CMD,
  620. /** roaming sme offload sync complete */
  621. WMI_ROAM_SYNCH_COMPLETE,
  622. /** set ric request element for 11r roaming */
  623. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  624. /** Invoke roaming forcefully */
  625. WMI_ROAM_INVOKE_CMDID,
  626. /** roaming filter cmd to allow further filtering of roaming candidate */
  627. WMI_ROAM_FILTER_CMDID,
  628. /** set gateway ip, mac and retries for subnet change detection */
  629. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  630. /** configure thresholds for MAWC */
  631. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  632. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  633. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  634. /** configure packet error rate threshold for triggering roaming */
  635. WMI_ROAM_PER_CONFIG_CMDID,
  636. /** configure BSS Transition Management (BTM) offload for roaming */
  637. WMI_ROAM_BTM_CONFIG_CMDID,
  638. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  639. WMI_ENABLE_FILS_CMDID,
  640. /** Request for roam scan stats */
  641. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  642. /** Configure BSS load parameters for roam trigger */
  643. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  644. /** Configure deauth roam trigger parameters */
  645. WMI_ROAM_DEAUTH_CONFIG_CMDID,
  646. /** Configure idle roam trigger parameters */
  647. WMI_ROAM_IDLE_CONFIG_CMDID,
  648. /**
  649. * WMI_ROAM_DSM_FILTER_CMDID is deprecated and should be unused,
  650. * but leave it reserved just to be safe.
  651. */
  652. DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID,
  653. /** Enable or disable roaming triggers */
  654. WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID,
  655. /** Pre-Authentication completion status command */
  656. WMI_ROAM_PREAUTH_STATUS_CMDID,
  657. /** offload scan specific commands */
  658. /** set offload scan AP profile */
  659. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  660. /** remove offload scan AP profile */
  661. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  662. /** set offload scan period */
  663. WMI_OFL_SCAN_PERIOD,
  664. /* P2P specific commands */
  665. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  666. * generated during p2p listen and for p2p discoverability */
  667. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  668. /** enable/disable p2p discoverability on STA/AP VDEVs */
  669. WMI_P2P_DEV_SET_DISCOVERABILITY,
  670. /** set p2p ie to be carried in beacons generated by FW for GO */
  671. WMI_P2P_GO_SET_BEACON_IE,
  672. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  673. WMI_P2P_GO_SET_PROBE_RESP_IE,
  674. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  675. * attribute in the beacons/probe responses received.
  676. * Note: This command is currently used only for Apple P2P implementation.
  677. */
  678. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  679. /** set the configure of p2p find offload */
  680. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  681. /** set the vendor specific p2p ie data for p2p find offload using */
  682. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  683. /** set the BSSID/device name pattern of p2p find offload */
  684. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  685. /** set OppPS related parameters **/
  686. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  687. /** set listen offload start related parameters */
  688. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  689. /** set listen offload stop related parameters */
  690. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  691. /** AP power save specific config */
  692. /** set AP power save specific param */
  693. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  694. /** set AP UAPSD coex specific param */
  695. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  696. /** set Enhanced Green AP param */
  697. WMI_AP_PS_EGAP_PARAM_CMDID,
  698. /** Rate-control specific commands */
  699. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  700. /** WLAN Profiling commands. */
  701. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  702. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  703. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  704. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  705. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  706. /** Suspend resume command Ids */
  707. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  708. WMI_PDEV_RESUME_CMDID,
  709. /* Beacon filter commands */
  710. /** add a beacon filter */
  711. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  712. /** remove a beacon filter */
  713. WMI_RMV_BCN_FILTER_CMDID,
  714. /* WOW Specific WMI commands*/
  715. /** add pattern for awake */
  716. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  717. /** deleta a wake pattern */
  718. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  719. /** enable/deisable wake event */
  720. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  721. /** enable WOW */
  722. WMI_WOW_ENABLE_CMDID,
  723. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  724. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  725. /* IOAC add keep alive cmd. */
  726. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  727. /* IOAC del keep alive cmd. */
  728. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  729. /* IOAC add pattern for awake */
  730. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  731. /* IOAC deleta a wake pattern */
  732. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  733. /* D0-WOW enable or disable cmd */
  734. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  735. /* enable extend WoW */
  736. WMI_EXTWOW_ENABLE_CMDID,
  737. /* Extend WoW command to configure app type1 parameter */
  738. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  739. /* Extend WoW command to configure app type2 parameter */
  740. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  741. /* enable ICMPv6 Network advertisement filtering */
  742. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  743. /*
  744. * Set a pattern to match UDP packet in WOW mode.
  745. * If match, construct a tx frame in a local buffer
  746. * to send through the peer AP to the entity in the
  747. * IP network that sent the UDP packet to this STA.
  748. */
  749. WMI_WOW_UDP_SVC_OFLD_CMDID,
  750. /* configure WOW host wakeup PIN pattern */
  751. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  752. /* Set which action category should wake the host from suspend */
  753. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  754. /* RTT measurement related cmd */
  755. /** request to make an RTT measurement */
  756. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  757. /** request to report a tsf measurement */
  758. WMI_RTT_TSF_CMDID,
  759. /** spectral scan command */
  760. /** configure spectral scan */
  761. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  762. /** enable/disable spectral scan and trigger */
  763. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  764. /* F/W stats */
  765. /** one time request for stats */
  766. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  767. /** Push MCC Adaptive Scheduler Stats to Firmware */
  768. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  769. /** one time request for txrx stats */
  770. WMI_REQUEST_STATS_EXT_CMDID,
  771. /* Link Layer stats */
  772. /** Request for link layer stats */
  773. WMI_REQUEST_LINK_STATS_CMDID,
  774. /** Request for setting params to link layer stats */
  775. WMI_START_LINK_STATS_CMDID,
  776. /** Request to clear stats*/
  777. WMI_CLEAR_LINK_STATS_CMDID,
  778. /** Request for getting the Firmware Memory Dump */
  779. WMI_GET_FW_MEM_DUMP_CMDID,
  780. /** Request to flush of the buffered debug messages */
  781. WMI_DEBUG_MESG_FLUSH_CMDID,
  782. /** Cmd to configure the verbose level */
  783. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  784. /** One time request for wlan stats */
  785. WMI_REQUEST_WLAN_STATS_CMDID,
  786. /** Request for getting RCPI of peer */
  787. WMI_REQUEST_RCPI_CMDID,
  788. /** One time request for peer stats info */
  789. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  790. /** One time request for radio channel stats */
  791. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  792. /** request for WLM (wlan latency manager) stats */
  793. WMI_REQUEST_WLM_STATS_CMDID,
  794. /** ARP OFFLOAD REQUEST*/
  795. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  796. /** Proactive ARP Response Add Pattern Command*/
  797. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  798. /** Proactive ARP Response Del Pattern Command*/
  799. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  800. /** NS offload confid*/
  801. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  802. /** APFIND Config */
  803. WMI_APFIND_CMDID,
  804. /** Passpoint list config */
  805. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  806. /** configure supprssing parameters for MAWC */
  807. WMI_NLO_CONFIGURE_MAWC_CMDID,
  808. /* GTK offload Specific WMI commands*/
  809. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  810. /* CSA offload Specific WMI commands*/
  811. /** csa offload enable */
  812. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  813. /** chan switch command */
  814. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  815. /* Chatter commands*/
  816. /* Change chatter mode of operation */
  817. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  818. /** chatter add coalescing filter command */
  819. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  820. /** chatter delete coalescing filter command */
  821. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  822. /** chatter coalecing query command */
  823. WMI_CHATTER_COALESCING_QUERY_CMDID,
  824. /**addba specific commands */
  825. /** start the aggregation on this TID */
  826. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  827. /** stop the aggregation on this TID */
  828. WMI_PEER_TID_DELBA_CMDID,
  829. /** set station mimo powersave method */
  830. WMI_STA_DTIM_PS_METHOD_CMDID,
  831. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  832. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  833. /** Configure the Keep Alive Parameters */
  834. WMI_STA_KEEPALIVE_CMDID,
  835. /* Request ssn from target for a sta/tid pair */
  836. WMI_BA_REQ_SSN_CMDID,
  837. /* misc command group */
  838. /** echo command mainly used for testing */
  839. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  840. /* !!IMPORTANT!!
  841. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  842. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  843. * as we MUST have a fixed value here to maintain compatibility between
  844. * UTF and the ART2 driver
  845. */
  846. /** UTF WMI commands */
  847. WMI_PDEV_UTF_CMDID,
  848. /** set debug log config */
  849. WMI_DBGLOG_CFG_CMDID,
  850. /* QVIT specific command id */
  851. WMI_PDEV_QVIT_CMDID,
  852. /* Factory Testing Mode request command
  853. * used for integrated chipsets */
  854. WMI_PDEV_FTM_INTG_CMDID,
  855. /* set and get keepalive parameters command */
  856. WMI_VDEV_SET_KEEPALIVE_CMDID,
  857. WMI_VDEV_GET_KEEPALIVE_CMDID,
  858. /* For fw recovery test command */
  859. WMI_FORCE_FW_HANG_CMDID,
  860. /* Set Mcast/Bdcast filter */
  861. WMI_SET_MCASTBCAST_FILTER_CMDID,
  862. /** set thermal management params **/
  863. WMI_THERMAL_MGMT_CMDID,
  864. /** set host auto shutdown params **/
  865. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  866. /** set tpc chainmask config command */
  867. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  868. /** set Antenna diversity command */
  869. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  870. /** Set OCB Sched Request, deprecated */
  871. WMI_OCB_SET_SCHED_CMDID,
  872. /** Set rssi monitoring config command */
  873. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  874. /** Enable/disable Large Receive Offload processing; provide cfg params */
  875. WMI_LRO_CONFIG_CMDID,
  876. /** transfer data from host to firmware to write flash */
  877. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  878. /** Command to enable/disable filtering of multicast IP with unicast mac */
  879. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  880. /** Command to control WISA mode */
  881. WMI_VDEV_WISA_CMDID,
  882. /** set debug log time stamp sync up with host */
  883. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  884. /** Command for host to set/delete multiple mcast filters */
  885. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  886. /** upload a requested section of data from firmware flash to host */
  887. WMI_READ_DATA_FROM_FLASH_CMDID,
  888. /* Thermal Throttling SET CONF commands */
  889. WMI_THERM_THROT_SET_CONF_CMDID,
  890. /* set runtime dpd recalibration params */
  891. WMI_RUNTIME_DPD_RECAL_CMDID,
  892. /* get TX power for input HALPHY parameters */
  893. WMI_GET_TPC_POWER_CMDID,
  894. /* Specify when to start monitoring for idle state */
  895. WMI_IDLE_TRIGGER_MONITOR_CMDID,
  896. /** set ELNA BYPASS status */
  897. WMI_SET_ELNA_BYPASS_CMDID,
  898. /** get ELNA BYPASS status */
  899. WMI_GET_ELNA_BYPASS_CMDID,
  900. /* Offload 11k related requests */
  901. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  902. /* invoke neighbor report from FW */
  903. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  904. /* GPIO Configuration */
  905. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  906. WMI_GPIO_OUTPUT_CMDID,
  907. /* Txbf configuration command */
  908. WMI_TXBF_CMDID,
  909. /* FWTEST Commands */
  910. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  911. /** set NoA descs **/
  912. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  913. /* UNIT Tests */
  914. WMI_UNIT_TEST_CMDID,
  915. /* set debug and tuning parameters */
  916. WMI_FWTEST_CMDID,
  917. /* Q-Boost configuration test commands */
  918. WMI_QBOOST_CFG_CMDID,
  919. /** TDLS Configuration */
  920. /** enable/disable TDLS */
  921. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  922. /** set tdls peer state */
  923. WMI_TDLS_PEER_UPDATE_CMDID,
  924. /** TDLS Offchannel control */
  925. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  926. /** Resmgr Configuration */
  927. /** Adaptive OCS is enabled by default in the FW. This command is used to
  928. * disable FW based adaptive OCS.
  929. */
  930. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  931. /** set the requested channel time quota for the home channels */
  932. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  933. /** set the requested latency for the home channels */
  934. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  935. /** STA SMPS Configuration */
  936. /** force SMPS mode */
  937. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  938. /** set SMPS parameters */
  939. WMI_STA_SMPS_PARAM_CMDID,
  940. /* Wlan HB commands*/
  941. /* enalbe/disable wlan HB */
  942. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  943. /* set tcp parameters for wlan HB */
  944. WMI_HB_SET_TCP_PARAMS_CMDID,
  945. /* set tcp pkt filter for wlan HB */
  946. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  947. /* set udp parameters for wlan HB */
  948. WMI_HB_SET_UDP_PARAMS_CMDID,
  949. /* set udp pkt filter for wlan HB */
  950. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  951. /* OIC ping keep alive */
  952. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  953. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  954. /* WMI commands related to DHCP Lease Renew Offload **/
  955. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  956. /** Wlan RMC commands*/
  957. /** enable/disable RMC */
  958. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  959. /** configure action frame period */
  960. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  961. /** For debug/future enhancement purposes only,
  962. * configures/finetunes RMC algorithms */
  963. WMI_RMC_CONFIG_CMDID,
  964. /** select manual leader */
  965. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  966. /** WLAN MHF offload commands */
  967. /** enable/disable MHF offload */
  968. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  969. /** Plumb routing table for MHF offload */
  970. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  971. /*location scan commands*/
  972. /*start batch scan*/
  973. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  974. /*stop batch scan*/
  975. WMI_BATCH_SCAN_DISABLE_CMDID,
  976. /*get batch scan result*/
  977. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  978. /* OEM related cmd */
  979. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  980. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  981. /* OEM related cmd used for Low Power ranging */
  982. WMI_LPI_OEM_REQ_CMDID,
  983. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  984. /** Command to handle OEM's opaque data */
  985. WMI_OEM_DATA_CMDID,
  986. /** Nan Request */
  987. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  988. /** Modem power state command */
  989. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  990. WMI_CHAN_AVOID_UPDATE_CMDID,
  991. WMI_COEX_CONFIG_CMDID,
  992. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  993. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  994. WMI_SAR_LIMITS_CMDID,
  995. WMI_SAR_GET_LIMITS_CMDID,
  996. /**
  997. * OBSS scan offload enable/disable commands
  998. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  999. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  1000. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  1001. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  1002. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  1003. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  1004. */
  1005. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1006. WMI_OBSS_SCAN_DISABLE_CMDID,
  1007. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  1008. /**LPI commands*/
  1009. /**LPI mgmt snooping config command*/
  1010. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  1011. /**LPI scan start command*/
  1012. WMI_LPI_START_SCAN_CMDID,
  1013. /**LPI scan stop command*/
  1014. WMI_LPI_STOP_SCAN_CMDID,
  1015. /** ExtScan commands */
  1016. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  1017. WMI_EXTSCAN_STOP_CMDID,
  1018. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  1019. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  1020. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  1021. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  1022. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  1023. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  1024. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  1025. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  1026. /** DHCP server offload commands */
  1027. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  1028. /** IPA Offload features related commands */
  1029. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  1030. /** mDNS responder offload commands */
  1031. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1032. WMI_MDNS_SET_FQDN_CMDID,
  1033. WMI_MDNS_SET_RESPONSE_CMDID,
  1034. WMI_MDNS_GET_STATS_CMDID,
  1035. /* enable/disable AP Authentication offload */
  1036. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  1037. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  1038. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  1039. /** Out-of-context-of-BSS (OCB) commands */
  1040. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  1041. WMI_OCB_SET_UTC_TIME_CMDID,
  1042. WMI_OCB_START_TIMING_ADVERT_CMDID,
  1043. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1044. WMI_OCB_GET_TSF_TIMER_CMDID,
  1045. WMI_DCC_GET_STATS_CMDID,
  1046. WMI_DCC_CLEAR_STATS_CMDID,
  1047. WMI_DCC_UPDATE_NDL_CMDID,
  1048. /* System-On-Chip commands */
  1049. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1050. WMI_SOC_SET_HW_MODE_CMDID,
  1051. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1052. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1053. /* packet filter commands */
  1054. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1055. WMI_PACKET_FILTER_ENABLE_CMDID,
  1056. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1057. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1058. /** WMI commands related to PMF 11w Offload */
  1059. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1060. /** WMI commands related to pkt filter (BPF) offload */
  1061. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1062. WMI_BPF_GET_VDEV_STATS_CMDID,
  1063. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1064. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1065. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1066. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1067. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1068. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1069. /** WMI commands related to monitor mode. */
  1070. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1071. /** WMI commands related to regulatory offload */
  1072. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1073. WMI_11D_SCAN_START_CMDID,
  1074. WMI_11D_SCAN_STOP_CMDID,
  1075. WMI_SET_INIT_COUNTRY_CMDID,
  1076. /**
  1077. * Nan Data commands
  1078. * NDI - NAN Data Interface
  1079. * NDP - NAN Data Path
  1080. */
  1081. /* Commands in prototyping phase */
  1082. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1083. WMI_NDP_INITIATOR_REQ_CMDID,
  1084. WMI_NDP_RESPONDER_REQ_CMDID,
  1085. WMI_NDP_END_REQ_CMDID,
  1086. WMI_NDP_CMDID,
  1087. /** WMI commands related to HW data filtering **/
  1088. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1089. /** WMI commands related to WLAN latency module **/
  1090. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1091. /** WMI commands related to STA & AP TWT module **/
  1092. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1093. WMI_TWT_DISABLE_CMDID,
  1094. WMI_TWT_ADD_DIALOG_CMDID,
  1095. WMI_TWT_DEL_DIALOG_CMDID,
  1096. WMI_TWT_PAUSE_DIALOG_CMDID,
  1097. WMI_TWT_RESUME_DIALOG_CMDID,
  1098. WMI_TWT_BTWT_INVITE_STA_CMDID,
  1099. WMI_TWT_BTWT_REMOVE_STA_CMDID,
  1100. /** WMI commands related to motion detection **/
  1101. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1102. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1103. WMI_MOTION_DET_START_STOP_CMDID,
  1104. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1105. /** WMI commands related to OBSS PD Spatial Reuse **/
  1106. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1107. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1108. /** WMI commands related to High Precision Clock Synchronization feature **/
  1109. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1110. /** WMI commands related to Audio Frame aggregation feature **/
  1111. WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO),
  1112. WMI_AUDIO_AGGR_ADD_GROUP_CMDID,
  1113. WMI_AUDIO_AGGR_DEL_GROUP_CMDID,
  1114. WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID,
  1115. WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID,
  1116. /** WMI commands related to Channel Frequency Response Capture **/
  1117. WMI_CFR_CAPTURE_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CFR_CAPTURE),
  1118. } WMI_CMD_ID;
  1119. typedef enum {
  1120. /** WMI service is ready; after this event WMI messages can be sent/received */
  1121. WMI_SERVICE_READY_EVENTID = 0x1,
  1122. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1123. WMI_READY_EVENTID,
  1124. /** Specify what WMI services the target supports (for services beyond
  1125. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1126. */
  1127. WMI_SERVICE_AVAILABLE_EVENTID,
  1128. /** Specify what numbers and kinds of interfaces (a.k.a. vdevs)
  1129. * the target supports
  1130. */
  1131. WMI_IFACE_COMBINATION_IND_EVENTID,
  1132. /** Scan specific events */
  1133. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1134. /* PDEV specific events */
  1135. /** TPC config for the current operating channel */
  1136. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1137. /** Channel stats event */
  1138. WMI_CHAN_INFO_EVENTID,
  1139. /** PHY Error specific WMI event */
  1140. WMI_PHYERR_EVENTID,
  1141. /** eeprom dump event */
  1142. WMI_PDEV_DUMP_EVENTID,
  1143. /** traffic pause event */
  1144. WMI_TX_PAUSE_EVENTID,
  1145. /** DFS radar event */
  1146. WMI_DFS_RADAR_EVENTID,
  1147. /** track L1SS entry and residency event */
  1148. WMI_PDEV_L1SS_TRACK_EVENTID,
  1149. /** Report current temprature of the chip in Celcius degree */
  1150. WMI_PDEV_TEMPERATURE_EVENTID,
  1151. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1152. WMI_SERVICE_READY_EXT_EVENTID,
  1153. /** FIPS test mode event */
  1154. WMI_PDEV_FIPS_EVENTID,
  1155. /** Channel hopping avoidance */
  1156. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1157. /** CCK ANI level event */
  1158. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1159. /** OFDM ANI level event */
  1160. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1161. /** Tx PPDU params */
  1162. WMI_PDEV_TPC_EVENTID,
  1163. /** NF Cal Power in DBR/DBM for all channels */
  1164. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1165. /** SOC/PDEV events */
  1166. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1167. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1168. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1169. /** Report ANT DIV feature's status */
  1170. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1171. /** Chip level Power stats */
  1172. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1173. /** Power Save Failure Detected */
  1174. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1175. /* Event to report the switch count in csa of one or more VDEVs */
  1176. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1177. /** Report the caldata version to host */
  1178. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1179. /** Report chain RSSI and antenna index to host */
  1180. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1181. /** provide noise floor and cycle counts for a channel */
  1182. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1183. /** Response received the ctl table to host */
  1184. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1185. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1186. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1187. /** WMI Event to deliver CTL Failsafe application */
  1188. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1189. /* Event to report the switch count in BSS color of one or more VDEVs */
  1190. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1191. /* Event to send cold boot calibration data */
  1192. WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID,
  1193. /* Event to report a rogue ap info that is detected in fw */
  1194. WMI_PDEV_RAP_INFO_EVENTID,
  1195. WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID,
  1196. /** 2nd extension of SERVICE_READY msg with extra target capability info */
  1197. WMI_SERVICE_READY_EXT2_EVENTID,
  1198. /* VDEV specific events */
  1199. /** VDEV started event in response to VDEV_START request */
  1200. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1201. /** vdev stopped event , generated in response to VDEV_STOP request */
  1202. WMI_VDEV_STOPPED_EVENTID,
  1203. /* Indicate the set key (used for setting per
  1204. * peer unicast and per vdev multicast)
  1205. * operation has completed */
  1206. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1207. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1208. don't use this for any new implementations */
  1209. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1210. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1211. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1212. /* Return the TSF timestamp of specified vdev */
  1213. WMI_VDEV_TSF_REPORT_EVENTID,
  1214. /* FW response to Host for vdev delete cmdid */
  1215. WMI_VDEV_DELETE_RESP_EVENTID,
  1216. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1217. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1218. /** event to report mac randomization success **/
  1219. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1220. /* event for ARP stats collection */
  1221. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1222. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1223. WMI_VDEV_GET_TX_POWER_EVENTID,
  1224. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1225. /* provide LTE-Coex state */
  1226. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1227. /* provide LTE-Coex Dynamic Power Back-off info */
  1228. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1229. /* provide LTE-Coex TDM info */
  1230. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1231. /* provide LTE-Coex IDRx info */
  1232. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1233. /* provide LTE-Coex antenna sharing info */
  1234. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1235. /* Event to handle FW offloaded mgmt packets */
  1236. WMI_VDEV_MGMT_OFFLOAD_EVENTID,
  1237. /* FW response to Host for delete all peer cmdid */
  1238. WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID,
  1239. /* peer specific events */
  1240. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1241. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1242. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1243. WMI_PEER_INFO_EVENTID,
  1244. /** Event indicating that TX fail count reaching threshold */
  1245. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1246. /* Return the estimate link speed for the Peer specified in the
  1247. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1248. */
  1249. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1250. /* Return the peer state
  1251. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1252. */
  1253. WMI_PEER_STATE_EVENTID,
  1254. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1255. * After that, host will send Mx message.
  1256. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1257. */
  1258. WMI_PEER_ASSOC_CONF_EVENTID,
  1259. /* FW response to Host for peer delete cmdid */
  1260. WMI_PEER_DELETE_RESP_EVENTID,
  1261. /** Valid rate code list for peer */
  1262. WMI_PEER_RATECODE_LIST_EVENTID,
  1263. WMI_WDS_PEER_EVENTID,
  1264. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1265. /** Peer Ant Div Info Event with rssi per chain, etc */
  1266. WMI_PEER_ANTDIV_INFO_EVENTID,
  1267. /*
  1268. * WMI_PEER_RESERVED_EVENTID
  1269. * These values are used for placeholders, to allow the subsequent
  1270. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1271. * as it had in its original location, when it was mistakenly placed
  1272. * amongst the WMI_PEER CMDID defs.
  1273. *
  1274. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1275. * event message IDs, though it will be simpler to instead add new
  1276. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1277. */
  1278. WMI_PEER_RESERVED0_EVENTID,
  1279. WMI_PEER_RESERVED1_EVENTID,
  1280. WMI_PEER_RESERVED2_EVENTID,
  1281. WMI_PEER_RESERVED3_EVENTID,
  1282. WMI_PEER_RESERVED4_EVENTID,
  1283. WMI_PEER_RESERVED5_EVENTID,
  1284. WMI_PEER_RESERVED6_EVENTID,
  1285. WMI_PEER_RESERVED7_EVENTID,
  1286. WMI_PEER_RESERVED8_EVENTID,
  1287. WMI_PEER_RESERVED9_EVENTID,
  1288. WMI_PEER_RESERVED10_EVENTID,
  1289. /** Peer operating mode change indication sent to host to update stats */
  1290. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1291. /** report the current tx PN for the peer */
  1292. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1293. WMI_PEER_CFR_CAPTURE_EVENTID,
  1294. /* beacon/mgmt specific events */
  1295. /** RX management frame. the entire frame is carried along with the event. */
  1296. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1297. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1298. use only in host beacon mode */
  1299. WMI_HOST_SWBA_EVENTID,
  1300. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1301. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1302. staggered beacon transmission mode */
  1303. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1304. /** event after the first beacon is transmitted following
  1305. a change in the template.*/
  1306. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1307. /** event after the first probe response is transmitted following
  1308. a change in the template.*/
  1309. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1310. /** Event for Mgmt TX completion event */
  1311. WMI_MGMT_TX_COMPLETION_EVENTID,
  1312. /** Event for Mgmt TX bundle completion event */
  1313. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1314. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1315. * Use this event if number of vdevs > 32.
  1316. */
  1317. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1318. /** Event for offchan data TX completion event */
  1319. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1320. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1321. WMI_HOST_SWFDA_EVENTID,
  1322. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1323. * Used only in host beacon mode. */
  1324. WMI_HOST_SWBA_V2_EVENTID,
  1325. /* ADDBA Related WMI Events*/
  1326. /** Indication the completion of the prior
  1327. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1328. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1329. /** Indication the completion of the prior
  1330. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1331. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1332. /* Seq num returned from hw for a sta/tid pair */
  1333. WMI_BA_RSP_SSN_EVENTID,
  1334. /* Aggregation state requested by BTC */
  1335. WMI_AGGR_STATE_TRIG_EVENTID,
  1336. /** Roam event to trigger roaming on host */
  1337. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1338. /** matching AP found from list of profiles */
  1339. WMI_PROFILE_MATCH,
  1340. /** roam synch event */
  1341. WMI_ROAM_SYNCH_EVENTID,
  1342. /** roam synch frame event */
  1343. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1344. /** various roam scan stats */
  1345. WMI_ROAM_SCAN_STATS_EVENTID,
  1346. /** Blacklisted AP information event */
  1347. WMI_ROAM_BLACKLIST_EVENTID,
  1348. /** Roam Pre-Authentication start event */
  1349. WMI_ROAM_PREAUTH_START_EVENTID,
  1350. /** Roaming PMKID request event */
  1351. WMI_ROAM_PMKID_REQUEST_EVENTID,
  1352. /** P2P disc found */
  1353. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1354. /** send noa info to host when noa is changed for beacon tx offload enable */
  1355. WMI_P2P_NOA_EVENTID,
  1356. /** send p2p listen offload stopped event with different reason */
  1357. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1358. /** Send EGAP Info to host */
  1359. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1360. /* send pdev resume event to host after pdev resume. */
  1361. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1362. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1363. will cary wake reason */
  1364. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1365. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1366. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1367. /*RTT related event ID*/
  1368. /** RTT measurement report */
  1369. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1370. /** TSF measurement report */
  1371. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1372. /** RTT error report */
  1373. WMI_RTT_ERROR_REPORT_EVENTID,
  1374. /*STATS specific events*/
  1375. /** txrx stats event requested by host */
  1376. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1377. /** FW iface link stats Event */
  1378. WMI_IFACE_LINK_STATS_EVENTID,
  1379. /** FW iface peer link stats Event */
  1380. WMI_PEER_LINK_STATS_EVENTID,
  1381. /** FW Update radio stats Event */
  1382. WMI_RADIO_LINK_STATS_EVENTID,
  1383. /** Firmware memory dump Complete event*/
  1384. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1385. /** Event indicating the DIAG logs/events supported by FW */
  1386. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1387. /** Instantaneous RSSI event */
  1388. WMI_INST_RSSI_STATS_EVENTID,
  1389. /** FW update tx power levels event */
  1390. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1391. /** This event is used to report wlan stats to host.
  1392. * It is triggered under 3 conditions:
  1393. * (a) Periodic timer timed out, based on the period specified
  1394. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1395. * (b) Whenever any of the (enabled) stats thresholds specified
  1396. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1397. * within the current stats period.
  1398. * (c) In response to the one-time wlan stats request of
  1399. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1400. *
  1401. * If this event is triggered by condition a or b,
  1402. * the stats counters are cleared at the start of each period.
  1403. * But if it is triggered by condition c, stats counters won't be cleared.
  1404. */
  1405. WMI_REPORT_STATS_EVENTID,
  1406. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1407. WMI_UPDATE_RCPI_EVENTID,
  1408. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1409. * and report peer stats info to host */
  1410. WMI_PEER_STATS_INFO_EVENTID,
  1411. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1412. * and report radio channel stats to host */
  1413. WMI_RADIO_CHAN_STATS_EVENTID,
  1414. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1415. * and report WLM (WLAN latency manager) stats info to host */
  1416. WMI_WLM_STATS_EVENTID,
  1417. /* NLO specific events */
  1418. /** NLO match event after the first match */
  1419. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1420. /** NLO scan complete event */
  1421. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1422. /** APFIND specific events */
  1423. WMI_APFIND_EVENTID,
  1424. /** passpoint network match event */
  1425. WMI_PASSPOINT_MATCH_EVENTID,
  1426. /** GTK offload stautus event requested by host */
  1427. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1428. /** GTK offload failed to rekey event */
  1429. WMI_GTK_REKEY_FAIL_EVENTID,
  1430. /* CSA IE received event */
  1431. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1432. /*chatter query reply event*/
  1433. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1434. /** DFS related events */
  1435. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1436. /** Indicate channel-availability-check completion event to host */
  1437. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1438. /** Indicate off-channel-availability-check completion event to host */
  1439. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1440. /** echo event in response to echo command */
  1441. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1442. /* !!IMPORTANT!!
  1443. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1444. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1445. * as we MUST have a fixed value here to maintain compatibility between
  1446. * UTF and the ART2 driver
  1447. */
  1448. /** UTF specific WMI event */
  1449. WMI_PDEV_UTF_EVENTID,
  1450. /** event carries buffered debug messages */
  1451. WMI_DEBUG_MESG_EVENTID,
  1452. /** FW stats(periodic or on shot) */
  1453. WMI_UPDATE_STATS_EVENTID,
  1454. /** debug print message used for tracing FW code while debugging */
  1455. WMI_DEBUG_PRINT_EVENTID,
  1456. /** DCS wlan or non-wlan interference event
  1457. */
  1458. WMI_DCS_INTERFERENCE_EVENTID,
  1459. /** VI spoecific event */
  1460. WMI_PDEV_QVIT_EVENTID,
  1461. /** FW code profile data in response to profile request */
  1462. WMI_WLAN_PROFILE_DATA_EVENTID,
  1463. /* Factory Testing Mode request event
  1464. * used for integrated chipsets */
  1465. WMI_PDEV_FTM_INTG_EVENTID,
  1466. /* avoid list of frequencies .
  1467. */
  1468. WMI_WLAN_FREQ_AVOID_EVENTID,
  1469. /* Indicate the keepalive parameters */
  1470. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1471. /*Thermal Management event*/
  1472. WMI_THERMAL_MGMT_EVENTID,
  1473. /* Container for DIAG event and log data */
  1474. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1475. /* host auto shutdown event */
  1476. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1477. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1478. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1479. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1480. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1481. WMI_DIAG_EVENTID,
  1482. /** Set OCB Sched Response, deprecated */
  1483. WMI_OCB_SET_SCHED_EVENTID,
  1484. /** event to indicate the flush of the buffered debug messages is complete*/
  1485. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1486. /** event to report mix/max RSSI breach events */
  1487. WMI_RSSI_BREACH_EVENTID,
  1488. /** event to report completion of data storage into flash memory */
  1489. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1490. /** event to report SCPC calibrated data to host */
  1491. WMI_PDEV_UTF_SCPC_EVENTID,
  1492. /** event to provide requested data from the target's flash memory */
  1493. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1494. /** event to report rx aggregation failure frame information */
  1495. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1496. /** event to upload a PKGID to host to identify chip for various products */
  1497. WMI_PKGID_EVENTID,
  1498. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1499. WMI_THERM_THROT_STATS_EVENTID,
  1500. /* WMI UNIT TEST event */
  1501. WMI_UNIT_TEST_EVENTID,
  1502. /** event to report result of host configure SAR2 */
  1503. WMI_SAR2_RESULT_EVENTID,
  1504. /** event to get TX power per input HALPHY parameters */
  1505. WMI_GET_TPC_POWER_EVENTID,
  1506. /** event to provide MU-EDCA Parameters (to update host's beacon config) */
  1507. WMI_MUEDCA_PARAMS_CONFIG_EVENTID,
  1508. /** event to get ELNA BYPASS status */
  1509. WMI_GET_ELNA_BYPASS_EVENTID,
  1510. /* GPIO Event */
  1511. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1512. /** upload H_CV info WMI event
  1513. * to indicate uploaded H_CV info to host
  1514. */
  1515. WMI_UPLOADH_EVENTID,
  1516. /** capture H info WMI event
  1517. * to indicate captured H info to host
  1518. */
  1519. WMI_CAPTUREH_EVENTID,
  1520. /* hw RFkill */
  1521. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1522. /* TDLS Event */
  1523. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1524. /** STA SMPS Event */
  1525. /** force SMPS mode */
  1526. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1527. /*location scan event*/
  1528. /*report the firmware's capability of batch scan*/
  1529. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1530. /*batch scan result*/
  1531. WMI_BATCH_SCAN_RESULT_EVENTID,
  1532. /* OEM Event */
  1533. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1534. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1535. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1536. WMI_OEM_RESPONSE_EVENTID,
  1537. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1538. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1539. /* NAN Event */
  1540. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1541. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1542. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1543. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1544. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1545. /* Coex Event */
  1546. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1547. WMI_SAR_GET_LIMITS_EVENTID,
  1548. /* LPI Event */
  1549. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1550. WMI_LPI_STATUS_EVENTID,
  1551. WMI_LPI_HANDOFF_EVENTID,
  1552. /* ExtScan events */
  1553. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1554. WMI_EXTSCAN_OPERATION_EVENTID,
  1555. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1556. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1557. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1558. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1559. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1560. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1561. /* mDNS offload events */
  1562. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1563. /* SAP Authentication offload events */
  1564. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1565. WMI_SAP_OFL_DEL_STA_EVENTID,
  1566. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1567. /* OBSS Offloads events */
  1568. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1569. /** Out-of-context-of-bss (OCB) events */
  1570. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1571. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1572. WMI_DCC_GET_STATS_RESP_EVENTID,
  1573. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1574. WMI_DCC_STATS_EVENTID,
  1575. /* System-On-Chip events */
  1576. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1577. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1578. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1579. /** Motion Aided WiFi Connectivity (MAWC) events */
  1580. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1581. /** pkt filter (BPF) offload relevant events */
  1582. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1583. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1584. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1585. /* RMC specific event */
  1586. /* RMC manual leader selected event */
  1587. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1588. /** WMI events related to regulatory offload */
  1589. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1590. WMI_11D_NEW_COUNTRY_EVENTID,
  1591. /** Events for TWT(Target Wake Time) of STA and AP */
  1592. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1593. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1594. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1595. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1596. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1597. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1598. WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID,
  1599. WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID,
  1600. /** Events in Prototyping phase */
  1601. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1602. WMI_NDP_INITIATOR_RSP_EVENTID,
  1603. WMI_NDP_RESPONDER_RSP_EVENTID,
  1604. WMI_NDP_END_RSP_EVENTID,
  1605. WMI_NDP_INDICATION_EVENTID,
  1606. WMI_NDP_CONFIRM_EVENTID,
  1607. WMI_NDP_END_INDICATION_EVENTID,
  1608. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1609. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1610. WMI_NDP_EVENTID,
  1611. /** WMI events related to motion detection */
  1612. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  1613. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  1614. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  1615. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  1616. } WMI_EVT_ID;
  1617. /* defines for OEM message sub-types */
  1618. #define WMI_OEM_CAPABILITY_REQ 0x01
  1619. #define WMI_OEM_CAPABILITY_RSP 0x02
  1620. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1621. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1622. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1623. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1624. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1625. #define WMI_OEM_NAN_PEER_INFO 0x08
  1626. #define WMI_OEM_CONFIGURE_LCR 0x09
  1627. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1628. #define WMI_CHAN_LIST_TAG 0x1
  1629. #define WMI_SSID_LIST_TAG 0x2
  1630. #define WMI_BSSID_LIST_TAG 0x3
  1631. #define WMI_IE_TAG 0x4
  1632. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1633. typedef struct {
  1634. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1635. /** primary 20 MHz channel frequency in mhz */
  1636. A_UINT32 mhz;
  1637. /** Center frequency 1 in MHz*/
  1638. A_UINT32 band_center_freq1;
  1639. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1640. A_UINT32 band_center_freq2;
  1641. /** channel info described below */
  1642. A_UINT32 info;
  1643. /** contains min power, max power, reg power and reg class id. */
  1644. A_UINT32 reg_info_1;
  1645. /** contains antennamax, max bandwidth */
  1646. A_UINT32 reg_info_2;
  1647. } wmi_channel;
  1648. typedef enum {
  1649. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1650. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1651. } wmi_channel_change_cause;
  1652. /** channel info consists of 6 bits of channel mode */
  1653. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1654. (pwmi_channel)->info &= 0xffffffc0; \
  1655. (pwmi_channel)->info |= (val); \
  1656. } while (0)
  1657. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1658. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1659. #define WMI_CHAN_FLAG_PASSIVE 7
  1660. #define WMI_CHAN_ADHOC_ALLOWED 8
  1661. #define WMI_CHAN_AP_DISABLED 9
  1662. #define WMI_CHAN_FLAG_DFS 10
  1663. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1664. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1665. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1666. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1667. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1668. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1669. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1670. #define WMI_CHAN_FLAG_PSC 18 /* Indicate it is a PSC (preferred scanning channel) */
  1671. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1672. (pwmi_channel)->info |= (1 << flag); \
  1673. } while (0)
  1674. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1675. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1676. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1677. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1678. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1679. } while (0)
  1680. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1681. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1682. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1683. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1684. } while (0)
  1685. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1686. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1687. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1688. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1689. } while (0)
  1690. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1691. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1692. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1693. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1694. } while (0)
  1695. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1696. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1697. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1698. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1699. } while (0)
  1700. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1701. /* max tx power is in 1 dBm units */
  1702. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1703. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1704. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1705. } while (0)
  1706. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1707. /* max bw supported for each channel, enum wmi_channel_width as value */
  1708. #define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \
  1709. (pwmi_channel)->reg_info_2 &= 0xff00ffff; \
  1710. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \
  1711. } while (0)
  1712. #define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff)
  1713. /** HT Capabilities*/
  1714. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1715. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1716. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1717. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1718. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1719. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1720. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1721. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1722. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1723. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1724. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1725. #define WMI_HT_CAP_HT40_SGI 0x0800
  1726. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1727. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1728. /* These macros should be used when we wish to advertise STBC support for
  1729. * only 1SS or 2SS or 3SS. */
  1730. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1731. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1732. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1733. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1734. WMI_HT_CAP_HT20_SGI | \
  1735. WMI_HT_CAP_HT40_SGI | \
  1736. WMI_HT_CAP_TX_STBC | \
  1737. WMI_HT_CAP_RX_STBC | \
  1738. WMI_HT_CAP_LDPC | \
  1739. WMI_HT_CAP_TX_LDPC | \
  1740. WMI_HT_CAP_RX_LDPC)
  1741. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1742. field. The fields not defined here are not supported, or reserved.
  1743. Do not change these masks and if you have to add new one follow the
  1744. bitmask as specified by 802.11ac draft.
  1745. */
  1746. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1747. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1748. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1749. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1750. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1751. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1752. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1753. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1754. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1755. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1756. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1757. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1758. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1759. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1760. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1761. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1762. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1763. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1764. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1765. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1766. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1767. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1768. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1769. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1770. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1771. /* TEMPORARY:
  1772. * Preserve the incorrect old name as an alias for the correct new name
  1773. * until all references to the old name have been removed from all hosts
  1774. * and targets.
  1775. */
  1776. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1777. /* These macros should be used when we wish to advertise STBC support for
  1778. * only 1SS or 2SS or 3SS. */
  1779. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1780. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1781. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1782. /* TEMPORARY:
  1783. * Preserve the incorrect old name as an alias for the correct new name
  1784. * until all references to the old name have been removed from all hosts
  1785. * and targets.
  1786. */
  1787. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1788. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1789. WMI_VHT_CAP_SGI_80MHZ | \
  1790. WMI_VHT_CAP_TX_STBC | \
  1791. WMI_VHT_CAP_RX_STBC_MASK | \
  1792. WMI_VHT_CAP_RX_LDPC | \
  1793. WMI_VHT_CAP_TX_LDPC | \
  1794. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1795. WMI_VHT_CAP_RX_FIXED_ANT | \
  1796. WMI_VHT_CAP_TX_FIXED_ANT)
  1797. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1798. 802.11ac
  1799. */
  1800. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  1801. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  1802. /* Notification bit for Ext MCS 10/11 support */
  1803. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  1804. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  1805. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1806. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1807. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1808. /** 11ax capabilities */
  1809. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1810. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1811. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1812. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1813. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1814. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  1815. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  1816. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  1817. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT 0x00000018
  1818. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT 0x00000030
  1819. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1820. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  1821. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1822. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  1823. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1824. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  1825. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1826. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  1827. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  1828. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  1829. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  1830. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  1831. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_GET(he_cap_info_dword1) \
  1832. WMI_GET_BITS(he_cap_info_dword1, 3, 2)
  1833. #define WMI_HE_CAP_RX_DL_OFDMA_SUPPORT_SET(he_cap_info_dword1, value) \
  1834. WMI_SET_BITS(he_cap_info_dword1, 3, 2, value)
  1835. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_GET(he_cap_info_dword1) \
  1836. WMI_GET_BITS(he_cap_info_dword1, 5, 2)
  1837. #define WMI_HE_CAP_RX_DL_MUMIMO_SUPPORT_SET(he_cap_info_dword1, value) \
  1838. WMI_SET_BITS(he_cap_info_dword1, 5, 2, value)
  1839. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1840. */
  1841. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1842. /* fragmentation support field value */
  1843. enum {
  1844. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1845. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1846. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1847. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1848. };
  1849. enum {
  1850. WMI_HE_RX_DL_OFDMA_SUPPORT_DEFAULT, /* Default */
  1851. WMI_HE_RX_DL_OFDMA_SUPPORT_DISABLE, /* RX DL OFDMA Support Disabled */
  1852. WMI_HE_RX_DL_OFDMA_SUPPORT_ENABLE, /* RX DL OFDMA Support Enabled */
  1853. WMI_HE_RX_DL_OFDMA_SUPPORT_INVALID, /* INVALID */
  1854. };
  1855. enum {
  1856. WMI_HE_RX_DL_MUMIMO_SUPPORT_DEFAULT, /* Default */
  1857. WMI_HE_RX_DL_MUMIMO_SUPPORT_DISABLE, /* RX DL MU-MIMO Support Disabled */
  1858. WMI_HE_RX_DL_MUMIMO_SUPPORT_ENABLE, /* RX DL MU-MIMO Support Enabled */
  1859. WMI_HE_RX_DL_MUMIMO_SUPPORT_INVALID, /* INVALID */
  1860. };
  1861. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1862. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1863. #define WMI_MAX_NUM_RU MAX_HE_RU
  1864. /*
  1865. * Figure 8 554ae: -PPE Threshold Info field format
  1866. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1867. *
  1868. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1869. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1870. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1871. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1872. *
  1873. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1874. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1875. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1876. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1877. *
  1878. * etc.
  1879. */
  1880. /*
  1881. * Note that in these macros, "ru" is one-based, not zero-based, while
  1882. * nssm1 is zero-based.
  1883. */
  1884. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1885. do { \
  1886. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1887. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1888. } while (0)
  1889. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1890. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1891. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1892. do { \
  1893. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1894. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1895. } while (0)
  1896. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1897. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1898. typedef struct _wmi_ppe_threshold {
  1899. A_UINT32 numss_m1; /** NSS - 1*/
  1900. union {
  1901. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1902. A_UINT32 ru_mask; /** RU index mask */
  1903. };
  1904. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1905. } wmi_ppe_threshold;
  1906. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1907. */
  1908. #define WMI_SYS_CAP_ENABLE 0x00000001
  1909. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1910. /*
  1911. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1912. * Bits 5:0 are reserved
  1913. */
  1914. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1915. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1916. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1917. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1918. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1919. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1920. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1921. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1922. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1923. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1924. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1925. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1926. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1927. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1928. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1929. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1930. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1931. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1932. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1933. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1934. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1935. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1936. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1937. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1938. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1939. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1940. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1941. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1942. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1943. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1944. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1945. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1946. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1947. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1948. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1949. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1950. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1951. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1952. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1953. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1954. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1955. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1956. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1957. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1958. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1959. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1960. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1961. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1962. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1963. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1964. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1965. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1966. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1967. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1968. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1969. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1970. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1971. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1972. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1973. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1974. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1975. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1976. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1977. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1978. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1979. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1980. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1981. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1982. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1983. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1984. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1985. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1986. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1987. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1988. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1989. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1990. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1991. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1992. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1993. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1994. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1995. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  1996. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  1997. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1998. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1999. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2000. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2001. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2002. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  2003. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  2004. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  2005. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  2006. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  2007. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  2008. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  2009. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  2010. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  2011. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  2012. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  2013. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  2014. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  2015. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  2016. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  2017. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  2018. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  2019. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  2020. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  2021. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  2022. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  2023. typedef struct _wmi_abi_version {
  2024. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  2025. A_UINT32 abi_version_1; /** WMI change revision */
  2026. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  2027. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  2028. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  2029. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  2030. } wmi_abi_version;
  2031. /*
  2032. * maximum number of memroy requests allowed from FW.
  2033. */
  2034. #define WMI_MAX_MEM_REQS 16
  2035. /* !!NOTE!!:
  2036. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  2037. * Please don't change it.
  2038. */
  2039. #define HW_BD_INFO_SIZE 5
  2040. /**
  2041. * PDEV ID to identify the physical device,
  2042. * value 0 reserved for SOC level commands/event
  2043. */
  2044. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  2045. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  2046. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  2047. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  2048. /*
  2049. * Enum regarding which BDF elements are provided in which elements of the
  2050. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2051. */
  2052. typedef enum {
  2053. BDF_VERSION = 0,
  2054. REF_DESIGN_ID = 1,
  2055. CUSTOMER_ID = 2,
  2056. PROJECT_ID = 3,
  2057. BOARD_DATA_REV = 4,
  2058. } wmi_hw_bd_info_e;
  2059. /*
  2060. * Macros to get/set BDF details within the
  2061. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  2062. */
  2063. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  2064. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  2065. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  2066. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  2067. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  2068. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  2069. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  2070. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  2071. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  2072. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  2073. /**
  2074. * The following struct holds optional payload for
  2075. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  2076. * device capability to the host.
  2077. */
  2078. typedef struct {
  2079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  2080. A_UINT32 fw_build_vers; /* firmware build number */
  2081. wmi_abi_version fw_abi_vers;
  2082. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  2083. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  2084. A_UINT32 num_rf_chains;
  2085. /* The following field is only valid for service type WMI_SERVICE_11AC */
  2086. A_UINT32 ht_cap_info; /* WMI HT Capability */
  2087. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  2088. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  2089. A_UINT32 hw_min_tx_power;
  2090. A_UINT32 hw_max_tx_power;
  2091. /* sys_cap_info:
  2092. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  2093. * bits 31:2 - reserved (must be set to zero)
  2094. */
  2095. A_UINT32 sys_cap_info;
  2096. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  2097. /** Max beacon and Probe Response IE offload size (includes
  2098. * optional P2P IEs) */
  2099. A_UINT32 max_bcn_ie_size;
  2100. /*
  2101. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  2102. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  2103. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  2104. * by DMA.
  2105. */
  2106. A_UINT32 num_mem_reqs;
  2107. /* Max No. scan channels target can support
  2108. * If FW is too old and doesn't indicate this number, host side value will default to
  2109. * 0, and host will take the original compatible value (62) for future scan channel
  2110. * setup.
  2111. */
  2112. A_UINT32 max_num_scan_channels;
  2113. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2114. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  2115. */
  2116. A_UINT32 hw_bd_id;
  2117. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2118. /*
  2119. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2120. */
  2121. A_UINT32 max_supported_macs;
  2122. /*
  2123. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2124. */
  2125. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2126. /*
  2127. * Number of Dual Band Simultaneous (DBS) hardware modes
  2128. */
  2129. A_UINT32 num_dbs_hw_modes;
  2130. /*
  2131. * txrx_chainmask
  2132. * [7:0] - 2G band tx chain mask
  2133. * [15:8] - 2G band rx chain mask
  2134. * [23:16] - 5G band tx chain mask
  2135. * [31:24] - 5G band rx chain mask
  2136. *
  2137. */
  2138. A_UINT32 txrx_chainmask;
  2139. /*
  2140. * default Dual Band Simultaneous (DBS) hardware mode
  2141. */
  2142. A_UINT32 default_dbs_hw_mode_index;
  2143. /*
  2144. * Number of msdu descriptors target would use
  2145. */
  2146. A_UINT32 num_msdu_desc;
  2147. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  2148. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2149. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2150. * wlan_host_mem_req mem_reqs[];
  2151. * wlan_dbs_hw_mode_list[];
  2152. */
  2153. } wmi_service_ready_event_fixed_param;
  2154. typedef enum {
  2155. WMI_RXTX_LED_ENABLE = 0x00000001,
  2156. WMI_RFKILL_ENABLE = 0x00000002,
  2157. } WMI_LEDRFKILL_FLAGS;
  2158. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2159. typedef struct {
  2160. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2161. /*
  2162. * The wmi_service_segment offset field specifies the position within the
  2163. * logical bitmap of WMI service flags at which the WMI service flags
  2164. * specified within this message begin.
  2165. * Since the first 128 WMI service flags are specified within the
  2166. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2167. * the wmi_service_segment_offset value is expected to be 128 or more.
  2168. */
  2169. A_UINT32 wmi_service_segment_offset;
  2170. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2171. } wmi_service_available_event_fixed_param;
  2172. typedef struct {
  2173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2174. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2175. A_UINT32 default_conc_scan_config_bits;
  2176. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2177. A_UINT32 default_fw_config_bits;
  2178. wmi_ppe_threshold ppet;
  2179. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2180. /*
  2181. * An HT STA shall not allow transmission of more than one MPDU start
  2182. * within the time limit described in the MPDU maximum density field.
  2183. */
  2184. A_UINT32 mpdu_density; /* units are microseconds */
  2185. /*
  2186. * Maximum no of BSSID based RX filters host can program
  2187. * Value 0 means FW hasn't given any limit to host.
  2188. */
  2189. A_UINT32 max_bssid_rx_filters;
  2190. /*
  2191. * Extended FW build version information:
  2192. * bits 27:0 -> reserved
  2193. * bits 31:28 -> CRM sub ID
  2194. */
  2195. A_UINT32 fw_build_vers_ext;
  2196. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2197. * This limit is the maximum number of SSIDs that can be configured in the
  2198. * target for Network List Offload (i.e. scanning for a preferred network).
  2199. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2200. * If this value is non-zero, the host should send back in the
  2201. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2202. * is equal to or less than the target capability limit reported here.
  2203. */
  2204. A_UINT32 max_nlo_ssids;
  2205. /* ref to section 8.4.2.48 Multiple BSSID element
  2206. * The Max BSSID Indicator field contains a value assigned to n,
  2207. * where 2^n is the maximum number of BSSIDs
  2208. */
  2209. A_UINT32 max_bssid_indicator;
  2210. /* 2nd DWORD of HE MAC Capabilities */
  2211. A_UINT32 he_cap_info_ext;
  2212. /*
  2213. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2214. * follow this fixed_param TLV, containing rx characterization info for
  2215. * primary channels.
  2216. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2217. */
  2218. } wmi_service_ready_ext_event_fixed_param;
  2219. /*
  2220. * regdb version GET/SET APIs
  2221. */
  2222. #define WMI_REG_DB_VERSION_MAJOR_BITPOS 0
  2223. #define WMI_REG_DB_VERSION_MINOR_BITPOS 8
  2224. #define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16
  2225. #define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24
  2226. #define WMI_REG_DB_VERSION_NUM_BITS 8
  2227. #define WMI_REG_DB_VERSION_MAJOR_GET(dword) \
  2228. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2229. #define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2230. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2231. #define WMI_REG_DB_VERSION_MINOR_GET(dword) \
  2232. WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2233. #define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \
  2234. WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2235. #define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \
  2236. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2237. #define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \
  2238. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2239. #define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \
  2240. WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS)
  2241. #define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \
  2242. WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value)
  2243. #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) \
  2244. do { \
  2245. WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \
  2246. WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \
  2247. WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \
  2248. WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \
  2249. } while (0)
  2250. typedef struct {
  2251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/
  2252. /*
  2253. * regDB Version to be sent to Host on WMI service ready ext2 event.
  2254. * [7:0] - regDbVersionMajor
  2255. * [15:8] - regDbVersionMinor
  2256. * [23:16] - bdfRegDbVersionMajor
  2257. * [31:24] - bdfRegDbVersionMinor
  2258. * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to
  2259. * access these bitfields.
  2260. */
  2261. A_UINT32 reg_db_version;
  2262. } wmi_service_ready_ext2_event_fixed_param;
  2263. typedef struct {
  2264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */
  2265. /*
  2266. * A variable-length TLV array of wmi_chan_rf_characterization_info will
  2267. * follow this fixed_param TLV, containing rx characterization info for
  2268. * primary channels.
  2269. * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[];
  2270. */
  2271. } wmi_chan_rf_characterization_info_event_fixed_param;
  2272. typedef enum {
  2273. WMI_FW_STA_RTT_INITR = 0x00000001,
  2274. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2275. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2276. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2277. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2278. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2279. WMI_FW_AP_RTT_INITR = 0x00000040,
  2280. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2281. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2282. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2283. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2284. /*
  2285. * New fw sub feature capabilites before
  2286. * WMI_FW_MAX_SUB_FEAT_CAP
  2287. */
  2288. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2289. } WMI_FW_SUB_FEAT_CAPS;
  2290. typedef enum {
  2291. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2292. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2293. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2294. } WMI_HWBD_ID;
  2295. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2296. #define ATH_BD_DATA_REV_SHIFT 0
  2297. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2298. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2299. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2300. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2301. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2302. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2303. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2304. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2305. #define GET_BD_DATA_REV(bd_data_ver) \
  2306. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2307. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2308. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2309. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2310. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2311. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2312. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2313. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2314. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2315. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2316. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2317. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2318. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2319. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2320. typedef struct {
  2321. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2322. A_UINT32 end_freq; /* end frequency */
  2323. } avoid_freq_range_desc;
  2324. typedef struct {
  2325. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2326. A_UINT32 num_freq_ranges;
  2327. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2328. avoid_freq_range_desc avd_freq_range[0];
  2329. } wmi_wlan_avoid_freq_ranges_event;
  2330. #endif
  2331. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2332. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2333. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2334. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2335. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2336. typedef A_UINT32 WLAN_INIT_STATUS;
  2337. typedef struct {
  2338. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2339. wmi_abi_version fw_abi_vers;
  2340. /*
  2341. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2342. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2343. * for cases where the target specifies one MAC address per pdev
  2344. * (so the host can treat the pdevs within the target as separately
  2345. * as possible) rather than one MAC address for the whole SOC.
  2346. */
  2347. wmi_mac_addr mac_addr;
  2348. A_UINT32 status;
  2349. A_UINT32 num_dscp_table;
  2350. /* num_extra_mac_addr -
  2351. * how many additional MAC addresses besides the above mac_addr
  2352. * are provided in the subsequent mac_addr_list TLV
  2353. */
  2354. A_UINT32 num_extra_mac_addr;
  2355. /*
  2356. * Total number of "real" peers (remote peers of an AP vdev,
  2357. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2358. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2359. * total number of peers.
  2360. */
  2361. A_UINT32 num_total_peers;
  2362. /*
  2363. * Number of extra peers that Firmware adds.
  2364. * These are self peers and/or other FW only peers that don't represent
  2365. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2366. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2367. * to allow each tx queue to belong to a peer object.
  2368. * Peer ID can be up to num_total_peers + num_extra_peers.
  2369. */
  2370. A_UINT32 num_extra_peers;
  2371. /*
  2372. * max_ast_index - max AST index that Firmware can generate
  2373. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  2374. * based on num_peers configutation from Host. Hence Host needs to know the
  2375. * max_ast_index that Firmware can generate.
  2376. * A 0x0 value for max_ast_index means the target has not specified a limit.
  2377. */
  2378. A_UINT32 max_ast_index;
  2379. /* pktlog_defs_checksum:
  2380. * checksum computed from the definitions of the enums and structs
  2381. * used within pktlog traces.
  2382. * This pktlog defs checksum needs to be embedded into pktlog trace files
  2383. * (specifically in ath_pktlog_bufhdr.version).
  2384. *
  2385. * If pktlog_defs_checksum is zero then it is invalid; it should be ignored
  2386. * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY
  2387. * (i.e. 7735225).
  2388. *
  2389. * If pktlog_defs_checksum is non-zero then it is valid, and the host
  2390. * should put it into the pktlog trace file header and set
  2391. * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM
  2392. * (i.e. 2453506), to indicate that the file header version field contains
  2393. * a checksum.
  2394. */
  2395. A_UINT32 pktlog_defs_checksum;
  2396. /*
  2397. * This fixed_param TLV is followed by these additional TLVs:
  2398. * mac_addr_list[num_extra_mac_addr];
  2399. */
  2400. } wmi_ready_event_fixed_param;
  2401. typedef struct {
  2402. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2403. /**
  2404. * @brief num_vdev - number of virtual devices (VAPs) to support
  2405. */
  2406. A_UINT32 num_vdevs;
  2407. /**
  2408. * @brief num_peers - number of peer nodes to support
  2409. */
  2410. A_UINT32 num_peers;
  2411. /*
  2412. * @brief In offload mode target supports features like WOW, chatter and other
  2413. * protocol offloads. In order to support them some functionalities like
  2414. * reorder buffering, PN checking need to be done in target. This determines
  2415. * maximum number of peers suported by target in offload mode
  2416. */
  2417. A_UINT32 num_offload_peers;
  2418. /* @brief Number of reorder buffers available for doing target based reorder
  2419. * Rx reorder buffering
  2420. */
  2421. A_UINT32 num_offload_reorder_buffs;
  2422. /**
  2423. * @brief num_peer_keys - number of keys per peer
  2424. */
  2425. A_UINT32 num_peer_keys;
  2426. /**
  2427. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2428. */
  2429. A_UINT32 num_tids;
  2430. /**
  2431. * @brief ast_skid_limit - max skid for resolving hash collisions
  2432. * @details
  2433. * The address search table is sparse, so that if two MAC addresses
  2434. * result in the same hash value, the second of these conflicting
  2435. * entries can slide to the next index in the address search table,
  2436. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2437. * specifies the upper bound on how many subsequent indices to search
  2438. * over to find an unoccupied space.
  2439. */
  2440. A_UINT32 ast_skid_limit;
  2441. /**
  2442. * @brief tx_chain_mask - the nominal chain mask for transmit
  2443. * @details
  2444. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2445. * a reduced number of chains if no clients are associated.
  2446. * This configuration parameter specifies the nominal chain-mask that
  2447. * should be used when not operating with a reduced set of tx chains.
  2448. */
  2449. A_UINT32 tx_chain_mask;
  2450. /**
  2451. * @brief rx_chain_mask - the nominal chain mask for receive
  2452. * @details
  2453. * The chain mask may be modified dynamically, e.g. for a client to use
  2454. * a reduced number of chains for receive if the traffic to the client
  2455. * is low enough that it doesn't require downlink MIMO or antenna
  2456. * diversity.
  2457. * This configuration parameter specifies the nominal chain-mask that
  2458. * should be used when not operating with a reduced set of rx chains.
  2459. */
  2460. A_UINT32 rx_chain_mask;
  2461. /**
  2462. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2463. * @details
  2464. * Each WMM access class (voice, video, best-effort, background) will
  2465. * have its own timeout value to dictate how long to wait for missing
  2466. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2467. * been received.
  2468. * This parameter specifies the timeout in milliseconds for each class .
  2469. * NOTE: the number of class (defined as 4) cannot be
  2470. * changed in the future without breaking WMI compatibility.
  2471. */
  2472. A_UINT32 rx_timeout_pri[4];
  2473. /**
  2474. * @brief rx_decap mode - what mode the rx should decap packets to
  2475. * @details
  2476. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2477. * THis setting also determines the default TX behavior, however TX
  2478. * behavior can be modified on a per VAP basis during VAP init
  2479. */
  2480. A_UINT32 rx_decap_mode;
  2481. /**
  2482. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2483. */
  2484. A_UINT32 scan_max_pending_req;
  2485. /**
  2486. * @brief maximum VDEV that could use BMISS offload
  2487. */
  2488. A_UINT32 bmiss_offload_max_vdev;
  2489. /**
  2490. * @brief maximum VDEV that could use offload roaming
  2491. */
  2492. A_UINT32 roam_offload_max_vdev;
  2493. /**
  2494. * @brief maximum AP profiles that would push to offload roaming
  2495. */
  2496. A_UINT32 roam_offload_max_ap_profiles;
  2497. /**
  2498. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2499. * @details
  2500. * The target's WAL maintains a table to hold information regarding which
  2501. * peers belong to a given multicast group, so that if multicast->unicast
  2502. * conversion is enabled, the target can convert multicast tx frames to a
  2503. * series of unicast tx frames, to each peer within the multicast group.
  2504. * This num_mcast_groups configuration parameter tells the target how
  2505. * many multicast groups to provide storage for within its multicast
  2506. * group membership table.
  2507. */
  2508. A_UINT32 num_mcast_groups;
  2509. /**
  2510. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2511. * @details
  2512. * This num_mcast_table_elems configuration parameter tells the target
  2513. * how many peer elements it needs to provide storage for in its
  2514. * multicast group membership table.
  2515. * These multicast group membership table elements are shared by the
  2516. * multicast groups stored within the table.
  2517. */
  2518. A_UINT32 num_mcast_table_elems;
  2519. /**
  2520. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2521. * @details
  2522. * This configuration parameter specifies whether the target should
  2523. * perform multicast --> unicast conversion on transmit, and if so,
  2524. * what to do if it finds no entries in its multicast group membership
  2525. * table for the multicast IP address in the tx frame.
  2526. * Configuration value:
  2527. * 0 -> Do not perform multicast to unicast conversion.
  2528. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2529. * from the tx frame is found in the multicast group membership
  2530. * table. If the IP multicast address is not found, drop the frame.
  2531. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2532. * from the tx frame is found in the multicast group membership
  2533. * table. If the IP multicast address is not found, transmit the
  2534. * frame as multicast.
  2535. */
  2536. A_UINT32 mcast2ucast_mode;
  2537. /**
  2538. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2539. * @details
  2540. * This parameter controls how much memory the target will allocate to
  2541. * store a log of tx PPDU meta-information (how large the PPDU was,
  2542. * when it was sent, whether it was successful, etc.)
  2543. */
  2544. A_UINT32 tx_dbg_log_size;
  2545. /**
  2546. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2547. */
  2548. A_UINT32 num_wds_entries;
  2549. /**
  2550. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2551. * this limit can be 0 -default, 1 256B
  2552. */
  2553. A_UINT32 dma_burst_size;
  2554. /**
  2555. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2556. * to account for interface latency to avoid underrun.
  2557. */
  2558. A_UINT32 mac_aggr_delim;
  2559. /**
  2560. * @brief rx_skip_defrag_timeout_dup_detection_check
  2561. * @details
  2562. * determine whether target is responsible for detecting duplicate
  2563. * non-aggregate MPDU and timing out stale fragments.
  2564. *
  2565. * A-MPDU reordering is always performed on the target.
  2566. *
  2567. * 0: target responsible for frag timeout and dup checking
  2568. * 1: host responsible for frag timeout and dup checking
  2569. */
  2570. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2571. /**
  2572. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2573. * and Max no of descriptors for each Video link (node).
  2574. */
  2575. A_UINT32 vow_config;
  2576. /**
  2577. * @brief maximum VDEV that could use GTK offload
  2578. */
  2579. A_UINT32 gtk_offload_max_vdev;
  2580. /**
  2581. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2582. */
  2583. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2584. /**
  2585. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2586. * @details
  2587. * This parameter controls the max number of Tx fragments per MSDU.
  2588. * This is sent by the target as part of the WMI_SERVICE_READY event
  2589. * and is overriden by the OS shim as required.
  2590. */
  2591. A_UINT32 max_frag_entries;
  2592. /**
  2593. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2594. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2595. */
  2596. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2597. /**
  2598. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2599. * @details
  2600. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2601. * peers in a connection tracking table for possible TDLS link creation
  2602. * or deletion. This controls the number of tracked peers per vdev.
  2603. */
  2604. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2605. A_UINT32 beacon_tx_offload_max_vdev;
  2606. A_UINT32 num_multicast_filter_entries;
  2607. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2608. /**
  2609. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2610. * from host.
  2611. */
  2612. A_UINT32 num_keep_alive_pattern;
  2613. /**
  2614. * @brief keep_alive_pattern_size - keep alive pattern size.
  2615. */
  2616. A_UINT32 keep_alive_pattern_size;
  2617. /**
  2618. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2619. * @details
  2620. * Each TDLS STA can become a sleep STA independently. This parameter
  2621. * mentions how many such sleep STAs can be supported concurrently.
  2622. */
  2623. A_UINT32 max_tdls_concurrent_sleep_sta;
  2624. /**
  2625. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2626. * @details
  2627. * Each TDLS STA can become a buffer STA independently. This parameter
  2628. * mentions how many such buffer STAs can be supported concurrently.
  2629. */
  2630. A_UINT32 max_tdls_concurrent_buffer_sta;
  2631. /**
  2632. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2633. */
  2634. A_UINT32 wmi_send_separate;
  2635. /**
  2636. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2637. */
  2638. A_UINT32 num_ocb_vdevs;
  2639. /**
  2640. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2641. */
  2642. A_UINT32 num_ocb_channels;
  2643. /**
  2644. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2645. */
  2646. A_UINT32 num_ocb_schedules;
  2647. /**
  2648. * @brief specific configuration from host, such as per platform configuration
  2649. */
  2650. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2651. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2652. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2653. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2654. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2655. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2656. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2657. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2658. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2659. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2660. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2661. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2662. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2663. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2664. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2665. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2666. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2667. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2668. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2669. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2670. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2671. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2672. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2673. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2674. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  2675. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  2676. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  2677. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  2678. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  2679. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  2680. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  2681. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  2682. /*
  2683. * If the AC override valid bit is set then this field will specify the
  2684. * access category to use for EAPOL frames
  2685. * 0 - WMM_AC_BE
  2686. * 1 - WMM_AC_BK
  2687. * 2 - WMM_AC_VI
  2688. * 3 - WMM_AC_VO
  2689. */
  2690. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  2691. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  2692. /*
  2693. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  2694. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  2695. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  2696. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  2697. */
  2698. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  2699. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  2700. /*
  2701. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  2702. * include the HTC header length in the payload length for all HTT_H2T
  2703. * messages.
  2704. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  2705. * payload length includes HTC header length. Other HTT_H2T messages'
  2706. * payload length does not include HTC header length.
  2707. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  2708. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  2709. * flag to indicate its support for this option.
  2710. */
  2711. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  2712. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  2713. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  2714. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  2715. /*
  2716. * If this HTT_PEER_STATS is set, then the target should use the
  2717. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  2718. * else the target should avoid sending the PEER_STATS_IND message.
  2719. */
  2720. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  2721. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  2722. /*
  2723. * If this BIT is set, then the target should use peer_tid_ext to analyze
  2724. * per peer per tid extended configurations
  2725. */
  2726. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  2727. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  2728. /*
  2729. * If the VIDEO_OVER_WIFI_ENABLE flag is set, the target will use a
  2730. * series of algorithmic adjustments to optimize Video performance
  2731. * by reducing latency, reducing latency jitter, and minimizing
  2732. * dropped packets.
  2733. */
  2734. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_S 23
  2735. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_M 0x800000
  2736. /*
  2737. * If the THREE_WAY_COEX_CONFIG_LEGACY flag is set, the target will use
  2738. * the configuration parameters given by Host driver to WLAN FW and
  2739. * apply them along with the existing CoEx Weights Override logic to
  2740. * prioritize the WLAN-BT-Zigbee packets accordingly.
  2741. *
  2742. * The host shall only set the THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT
  2743. * RSRC_CFG flag if the target has set the WMI_SERVICE
  2744. * THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT flag.
  2745. *
  2746. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  2747. */
  2748. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_S 24
  2749. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_M 0x1000000
  2750. /*
  2751. * If the THREE_WAY_COEX_CONFIG_OVERRIDE flag is set, the target will use
  2752. * the configuration parameters given by Host driver to WLAN FW and
  2753. * apply them by OVERRIDing the existing CoEx Weights Override logic to
  2754. * prioritize the WLAN-BT-Zigbee packets accordingly.
  2755. *
  2756. * The host shall only set the THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT
  2757. * RSRC_CFG flag if the target has set the WMI_SERVICE
  2758. * THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT flag.
  2759. *
  2760. * The logic to send GPM to BT-SOC with BT-ZB priorities remains the same.
  2761. */
  2762. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25
  2763. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000
  2764. /*
  2765. * If the TX_COMPLETION_TX_TSF64 flag is set, the target should
  2766. * populate the htt_tx_compl_ind_append_tx_tsf64 array within the
  2767. * HTT_T2H TX_COMPL_IND message.
  2768. */
  2769. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26
  2770. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000
  2771. /*
  2772. * If this BIT is set, then the target should support Packet capture(SMART MU FR)
  2773. */
  2774. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27
  2775. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000
  2776. A_UINT32 flag1;
  2777. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2778. * @details
  2779. * 1 - Smart antenna is enabled.
  2780. * 0 - Smart antenna is disabled.
  2781. * In future this can contain smart antenna specifc capabilities.
  2782. */
  2783. A_UINT32 smart_ant_cap;
  2784. /**
  2785. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2786. * during init
  2787. */
  2788. A_UINT32 BK_Minfree;
  2789. A_UINT32 BE_Minfree;
  2790. A_UINT32 VI_Minfree;
  2791. A_UINT32 VO_Minfree;
  2792. /**
  2793. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2794. * descriptor memory allocation.
  2795. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2796. * If host wants to transmit data packet at its desired rate,
  2797. * this field must be set.
  2798. * 0 - Don't allocate fragment descriptor for data packet.
  2799. */
  2800. A_UINT32 alloc_frag_desc_for_data_pkt;
  2801. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2802. A_UINT32 num_ns_ext_tuples_cfg;
  2803. /**
  2804. * size (in bytes) of the buffer the FW shall allocate per vdev
  2805. * firmware can dynamic allocate memory (or disable)
  2806. * packet filtering feature.
  2807. * 0 - fw chooses its default value
  2808. * -1 (0XFFFFFFFF) - disable APF
  2809. */
  2810. A_UINT32 bpf_instruction_size;
  2811. /**
  2812. * Maximum no of BSSID based RX filters host would program
  2813. * Value 0 means host doesn't given any limit to FW.
  2814. */
  2815. A_UINT32 max_bssid_rx_filters;
  2816. /**
  2817. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2818. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2819. */
  2820. A_UINT32 use_pdev_id;
  2821. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2822. A_UINT32 max_num_dbs_scan_duty_cycle;
  2823. /** Maximum number of Multi group key to support */
  2824. A_UINT32 max_num_group_keys;
  2825. /**
  2826. * HTT peer map/unmap V2 format support
  2827. * 0 -> host doesn't support HTT peer map/unmap v2 format.
  2828. * 1 -> host supports HTT peer map/unmap v2 format; the target is
  2829. * allowed but not required to use peer map/unmap v2 format.
  2830. */
  2831. A_UINT32 peer_map_unmap_v2_support;
  2832. /** Sched config params for all pdevs
  2833. * These tx scheduling configuration parameters are currently only
  2834. * used for internal testing purposes; therefore the non-default
  2835. * values for this field are not currently documented.
  2836. * For regular use, this field should be set to 0x0.
  2837. */
  2838. A_UINT32 sched_params;
  2839. /* Number of MAC on which AP TWT feature is supported */
  2840. A_UINT32 twt_ap_pdev_count;
  2841. /* Max no of STA with which TWT sessions can be formed by the AP */
  2842. A_UINT32 twt_ap_sta_count;
  2843. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2844. * This parameter provides the final specification for the maximum number
  2845. * of SSIDs for the target to support for Network List Offload's scanning
  2846. * for preferred networks.
  2847. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  2848. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  2849. * (If the target didn't provide a max_nlo_ssids field in the
  2850. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  2851. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  2852. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  2853. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  2854. * the host does not support dynamic negotiation of max NLO SSIDs.
  2855. * In such a case, the target will respond as follows:
  2856. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  2857. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  2858. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  2859. * abort its boot-up, due to receiving an invalid/unsupported
  2860. * configuration specification.
  2861. */
  2862. A_UINT32 max_nlo_ssids;
  2863. /**
  2864. * num_packet_filters: the num that host requests fw to support for
  2865. * pktfilter in total, then firmware can dynamic allocate
  2866. * memory(or disable) pktfilter feature.
  2867. *
  2868. * 0 - fw chooses its default value.
  2869. * -1(0XFFFFFFFF)- disable pktfilter.
  2870. */
  2871. A_UINT32 num_packet_filters;
  2872. /**
  2873. * num_max_sta_vdevs: the max num for the sta vdevs
  2874. * fw will use it to config the memory of offload features that
  2875. * are only for sta vdevs.
  2876. * p2p client should be included.
  2877. *
  2878. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  2879. */
  2880. A_UINT32 num_max_sta_vdevs;
  2881. /* ref to section 8.4.2.48 Multiple BSSID element
  2882. * The Max BSSID Indicator field contains a value assigned to n,
  2883. * where 2^n is the maximum number of BSSIDs
  2884. */
  2885. A_UINT32 max_bssid_indicator;
  2886. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  2887. * I.e. sending uplink response to a trigger frame sent by AP.
  2888. * @details
  2889. * 0 - fw default behavior, based on chipset
  2890. * 1 - UL_RESP is disabled.
  2891. * 2 - UL_RESP is enabled.
  2892. * other - reserved.
  2893. */
  2894. A_UINT32 ul_resp_config;
  2895. /* msdu_flow_override_config0 - contains AST enable bitmask
  2896. * AST0 is unconditionally enabled, unless the MSDU flow override feature
  2897. * is entirely disabled.
  2898. * AST1 through AST3 are conditionally enabled, based on bits 0-2 in
  2899. * msdu_flow_override_config0.
  2900. * If all three bits are 0, no msdu flow override feature at all in FW.
  2901. *
  2902. * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET
  2903. * macros are used to read and write these bitfields.
  2904. */
  2905. A_UINT32 msdu_flow_override_config0;
  2906. /* msdu_flow_override_config1:
  2907. * Bits 3:0 - AST0_FLOW_MASK(4)
  2908. * Bits 7:4 - AST1_FLOW_MASK(4)
  2909. * Bits 11:8 - AST2_FLOW_MASK(4)
  2910. * Bits 15:12 - AST3_FLOW_MASK(4)
  2911. * Bits 23:16 - TID_VALID_HI_PRI (8)
  2912. * Bits 31:24 - TID_VALID_LOW_PRI (8)
  2913. *
  2914. * The macros
  2915. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET
  2916. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET
  2917. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET
  2918. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET
  2919. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET
  2920. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET
  2921. * are used to read and write these bitfields.
  2922. */
  2923. A_UINT32 msdu_flow_override_config1;
  2924. } wmi_resource_config;
  2925. #define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \
  2926. (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1))))
  2927. #define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \
  2928. do { \
  2929. if ((ast_x) == 0) break; \
  2930. if ((enable)) { \
  2931. (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \
  2932. } else { \
  2933. (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \
  2934. } \
  2935. } while(0)
  2936. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \
  2937. (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4))
  2938. #define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \
  2939. msdu_flow_config1, ast_x, mask) \
  2940. do { \
  2941. (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \
  2942. (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \
  2943. } while(0)
  2944. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \
  2945. (((msdu_flow_config1) & 0xff0000) >> 16)
  2946. #define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \
  2947. do { \
  2948. (msdu_flow_config1) &= ~0xff0000; \
  2949. (msdu_flow_config1) |= ((mask) << 16); \
  2950. } while(0)
  2951. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \
  2952. ((msdu_flow_config1 & 0xff000000) >> 24)
  2953. #define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \
  2954. do { \
  2955. (msdu_flow_config1) &= ~0xff000000; \
  2956. (msdu_flow_config1) |= ((mask) << 24); \
  2957. } while(0)
  2958. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2959. do { \
  2960. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2961. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2962. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2963. } while (0)
  2964. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2965. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2966. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2967. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2968. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2969. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2970. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2971. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2972. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2973. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2974. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2975. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2976. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2977. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2978. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2979. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2980. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2981. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2982. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2983. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2984. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2985. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2986. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2987. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2988. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2989. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2990. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2991. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2992. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2993. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2994. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2995. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2996. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2997. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2998. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2999. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  3000. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  3001. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  3002. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  3003. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  3004. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  3005. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  3006. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  3007. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  3008. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  3009. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  3010. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  3011. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  3012. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  3013. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  3014. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  3015. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  3016. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  3017. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  3018. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  3019. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  3020. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  3021. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  3022. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  3023. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  3024. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  3025. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  3026. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  3027. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  3028. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  3029. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  3030. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  3031. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  3032. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  3033. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  3034. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  3035. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  3036. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  3037. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  3038. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  3039. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  3040. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  3041. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  3042. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  3043. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  3044. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  3045. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  3046. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  3047. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  3048. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  3049. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  3050. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  3051. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_SET(word32, value) \
  3052. WMI_RSRC_CFG_FLAG_SET((word32), VIDEO_OVER_WIFI_ENABLE, (value))
  3053. #define WMI_RSRC_CFG_FLAG_VIDEO_OVER_WIFI_ENABLE_GET(word32) \
  3054. WMI_RSRC_CFG_FLAG_GET((word32), VIDEO_OVER_WIFI_ENABLE)
  3055. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET(word32, value) \
  3056. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT, (value))
  3057. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_GET(word32) \
  3058. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT)
  3059. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_SET(word32, value) \
  3060. WMI_RSRC_CFG_FLAG_SET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT, (value))
  3061. #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \
  3062. WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT)
  3063. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \
  3064. WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value))
  3065. #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \
  3066. WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE)
  3067. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \
  3068. WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value))
  3069. #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \
  3070. WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT)
  3071. typedef struct {
  3072. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  3073. /** The following indicate the WMI versions to be supported by
  3074. * the host driver. Note that the host driver decide to
  3075. * "downgrade" its WMI version support and this may not be the
  3076. * native version of the host driver. */
  3077. wmi_abi_version host_abi_vers;
  3078. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  3079. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  3080. * wmi_resource_config resource_config;
  3081. * wlan_host_memory_chunk host_mem_chunks[];
  3082. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  3083. * Note that the hw_mode_config, in spite of its "pdev" name,
  3084. * applies to the entire target rather than for a single pdev
  3085. * within the target.
  3086. * To avoid specifying a HW mode for the target, the host should
  3087. * fill hw_mode_config's fields with 0x0.
  3088. */
  3089. } wmi_init_cmd_fixed_param;
  3090. /**
  3091. * TLV for channel list
  3092. */
  3093. typedef struct {
  3094. /** WMI_CHAN_LIST_TAG */
  3095. A_UINT32 tag;
  3096. /** # of channels to scan */
  3097. A_UINT32 num_chan;
  3098. /** channels in Mhz */
  3099. A_UINT32 channel_list[1];
  3100. } wmi_chan_list;
  3101. /**
  3102. * TLV for bssid list
  3103. */
  3104. typedef struct {
  3105. /** WMI_BSSID_LIST_TAG */
  3106. A_UINT32 tag;
  3107. /** number of bssids */
  3108. A_UINT32 num_bssid;
  3109. /** bssid list */
  3110. wmi_mac_addr bssid_list[1];
  3111. } wmi_bssid_list;
  3112. /**
  3113. * TLV for ie data.
  3114. */
  3115. typedef struct {
  3116. /** WMI_IE_TAG */
  3117. A_UINT32 tag;
  3118. /** number of bytes in ie data */
  3119. A_UINT32 ie_len;
  3120. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  3121. A_UINT32 ie_data[1];
  3122. } wmi_ie_data;
  3123. /**
  3124. * TLV used for length/buffer
  3125. */
  3126. typedef struct {
  3127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  3128. A_UINT32 buf_len; /** Length of buf */
  3129. /**
  3130. * Following this structure is the TLV byte stream of buf of length buf_len:
  3131. * A_UINT8 buf[];
  3132. *
  3133. */
  3134. } wmi_tlv_buf_len_param;
  3135. /**
  3136. * TLV used for specifying the demensions of a multi-dimensional array
  3137. * that has been stored in a flat buffer
  3138. */
  3139. typedef struct {
  3140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  3141. /**
  3142. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  3143. * for a multi-dimensional array.
  3144. * If the length of outer dimension is not 1, the inner dimension
  3145. * shouldn't be 1.
  3146. * If the multi-dimensional array has less than 4 dimensions, the outer
  3147. * dimensions' lengths should be 1. For example, a buf[3][4] array
  3148. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  3149. * The outermost dimension of the array can be inferred from the array
  3150. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  3151. * the outermost (5th) dimension would be
  3152. * array length / (d1_len * d2_len * d3_len * d4_len)
  3153. *
  3154. * For security (to ensure no out-of-bounds memory access),
  3155. * the receiver shall validate that the product of all dimensions
  3156. * is equal to (or less than) the array length.
  3157. */
  3158. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  3159. A_UINT32 d2_len; /* the length of 2nd dimension array */
  3160. A_UINT32 d3_len; /* the length of 3rd dimension array */
  3161. A_UINT32 d4_len; /* the length of 4th dimension array */
  3162. /**
  3163. * Following this structure is the TLV multi-dimension array buffer:
  3164. * <type> buf[L1*L2*L3*L4];
  3165. * where, L1, L2, L3, and L4 are the values of
  3166. * d1_len, d2_len, d3_len and d4_len.
  3167. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  3168. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  3169. */
  3170. } wmi_tlv_arrays_len_param;
  3171. typedef struct {
  3172. /** Len of the SSID */
  3173. A_UINT32 ssid_len;
  3174. /** SSID */
  3175. A_UINT32 ssid[8];
  3176. } wmi_ssid;
  3177. typedef struct {
  3178. /** WMI_SSID_LIST_TAG */
  3179. A_UINT32 tag;
  3180. A_UINT32 num_ssids;
  3181. wmi_ssid ssids[1];
  3182. } wmi_ssid_list;
  3183. typedef struct {
  3184. /** WMI_SCAN_START_OFFSET_TAG */
  3185. A_UINT32 tag;
  3186. /** Number of start TSF offsets */
  3187. A_UINT32 num_offset;
  3188. /** Array of start TSF offsets provided in milliseconds */
  3189. A_UINT32 start_tsf_offset[1];
  3190. } wmi_scan_start_offset;
  3191. /**
  3192. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  3193. */
  3194. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  3195. * 0 to be used to represent unspecified / don't care / default values.
  3196. * Therefore, WMI phy mode = WLAN phy mode + 1.
  3197. */
  3198. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  3199. * and the FW will use any mode as long as the frequency matches.
  3200. */
  3201. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  3202. * be equal to num_chan. (Unless the host does not specify phymode_list values
  3203. * at all, in which case the number of phymode_list elements will be zero.)
  3204. * The indexing of the phymode_list[] array corresponds to same index of
  3205. * the chan_list[] array.
  3206. */
  3207. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  3208. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  3209. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  3210. typedef struct {
  3211. /*
  3212. * freq unit: MHz (upper 16bits -- value)
  3213. * flags (lower 16bits -- bitfield): valid for the freq short ssid
  3214. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3215. */
  3216. A_UINT32 freq_flags;
  3217. /* per spec, only 4 bytes*/
  3218. A_UINT32 short_ssid;
  3219. } wmi_hint_freq_short_ssid;
  3220. /** following bssid mac address same as wmi_mac_addr
  3221. * one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
  3222. * freq_flags will be: 0x175c0001
  3223. * macaddr31to00 will be: 0x127f0300
  3224. * macaddr47to32 will be: 0x00005634
  3225. */
  3226. typedef struct {
  3227. /*
  3228. * freq unit: MHz (upper 16bits -- value)
  3229. * flags (lower 16bits -- bitfield): valid for the freq bssid
  3230. * The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
  3231. */
  3232. A_UINT32 freq_flags;
  3233. /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
  3234. wmi_mac_addr bssid;
  3235. } wmi_hint_freq_bssid;
  3236. /** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
  3237. #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)
  3238. #define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
  3239. /** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
  3240. #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))
  3241. #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))
  3242. /** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
  3243. #define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
  3244. #define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
  3245. /** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
  3246. #define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
  3247. #define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
  3248. /** other macro for 6GHZ, TU(time unit), 20TU normally it is 20ms */
  3249. #define MAX_NUM_20TU_EACH_CH 4
  3250. #define MAX_NUM_S_SSID_EACH_20TU 1
  3251. #define MAX_NUM_BSSID_EACH_20TU 3
  3252. /* prefix used by scan requestor ids on the host */
  3253. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  3254. /* prefix used by scan request ids generated on the host */
  3255. /* host cycles through the lower 12 bits to generate ids */
  3256. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  3257. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  3258. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  3259. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  3260. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  3261. #define WMI_IE_BITMAP_SIZE 8
  3262. typedef struct {
  3263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  3264. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  3265. A_UINT32 scan_id;
  3266. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  3267. A_UINT32 scan_req_id;
  3268. /** VDEV id(interface) that is requesting scan */
  3269. A_UINT32 vdev_id;
  3270. /** Scan Priority, input to scan scheduler */
  3271. A_UINT32 scan_priority;
  3272. /** Scan events subscription */
  3273. A_UINT32 notify_scan_events;
  3274. /** dwell time in msec on active channels */
  3275. A_UINT32 dwell_time_active;
  3276. /** dwell time in msec on passive channels */
  3277. A_UINT32 dwell_time_passive;
  3278. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  3279. A_UINT32 min_rest_time;
  3280. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  3281. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  3282. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  3283. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  3284. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  3285. * irrespective of activity. activity is determined by the idle_time parameter.
  3286. */
  3287. A_UINT32 max_rest_time;
  3288. /** time before sending next set of probe requests.
  3289. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  3290. * The number of probe requests specified depends on the ssid_list and bssid_list
  3291. */
  3292. A_UINT32 repeat_probe_time;
  3293. /** time in msec between 2 consequetive probe requests with in a set. */
  3294. A_UINT32 probe_spacing_time;
  3295. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  3296. A_UINT32 idle_time;
  3297. /** maximum time in msec allowed for scan */
  3298. A_UINT32 max_scan_time;
  3299. /** delay in msec before sending first probe request after switching to a channel */
  3300. A_UINT32 probe_delay;
  3301. /** Scan control flags */
  3302. A_UINT32 scan_ctrl_flags;
  3303. /** Burst duration time in msec*/
  3304. A_UINT32 burst_duration;
  3305. /** # if channels to scan. In the TLV channel_list[] */
  3306. A_UINT32 num_chan;
  3307. /** number of bssids. In the TLV bssid_list[] */
  3308. A_UINT32 num_bssid;
  3309. /** number of ssid. In the TLV ssid_list[] */
  3310. A_UINT32 num_ssids;
  3311. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  3312. A_UINT32 ie_len;
  3313. /** Max number of probes to be sent */
  3314. A_UINT32 n_probes;
  3315. /** MAC Address to use in Probe Req as SA **/
  3316. wmi_mac_addr mac_addr;
  3317. /** Mask on which MAC has to be randomized **/
  3318. wmi_mac_addr mac_mask;
  3319. /** ie bitmap to use in probe req **/
  3320. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3321. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3322. A_UINT32 num_vendor_oui;
  3323. /** Scan control flags extended **/
  3324. A_UINT32 scan_ctrl_flags_ext;
  3325. /** dwell time in msec on active 2G channels, if it's not zero */
  3326. A_UINT32 dwell_time_active_2g;
  3327. /**
  3328. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  3329. * as an active channel
  3330. */
  3331. A_UINT32 dwell_time_active_6ghz;
  3332. /**
  3333. * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
  3334. * as a passive channel
  3335. */
  3336. A_UINT32 dwell_time_passive_6ghz;
  3337. /**
  3338. * TLV (tag length value) parameters follow the scan_cmd
  3339. * structure. The TLV's are:
  3340. * A_UINT32 channel_list[num_chan]; // in MHz
  3341. * wmi_ssid ssid_list[num_ssids];
  3342. * wmi_mac_addr bssid_list[num_bssid];
  3343. * A_UINT8 ie_data[ie_len];
  3344. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  3345. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  3346. * wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
  3347. * wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
  3348. * *** NOTE:
  3349. * *** Use caution when using further TLVs, in case the additional
  3350. * *** TLVs cause the message size to exceed the of the buffer to
  3351. * *** hold the message.
  3352. */
  3353. } wmi_start_scan_cmd_fixed_param;
  3354. /**
  3355. * scan control flags.
  3356. */
  3357. /** passively scan all channels including active channels */
  3358. #define WMI_SCAN_FLAG_PASSIVE 0x1
  3359. /** add wild card ssid probe request even though ssid_list is specified. */
  3360. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  3361. /** add cck rates to rates/xrate ie for the generated probe request */
  3362. #define WMI_SCAN_ADD_CCK_RATES 0x4
  3363. /** add ofdm rates to rates/xrate ie for the generated probe request */
  3364. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  3365. /** To enable indication of Chan load and Noise floor to host */
  3366. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  3367. /** Filter Probe request frames */
  3368. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  3369. /**When set, not to scan DFS channels*/
  3370. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  3371. /**When set, certain errors are ignored and scan continues.
  3372. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  3373. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  3374. /** Enable promiscous mode for CCXv4 */
  3375. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  3376. /** allow to send probe req on DFS channel */
  3377. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  3378. /** add TPC content in probe req frame */
  3379. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  3380. /** add DS content in probe req frame */
  3381. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  3382. /** use random mac address for TA for probe request frame and add
  3383. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  3384. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  3385. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  3386. /** allow mgmt transmission during off channel scan */
  3387. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  3388. /** allow data transmission during off channel scan */
  3389. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  3390. /** allow capture ppdu with phy errrors */
  3391. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  3392. /** always do passive scan on passive channels */
  3393. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  3394. /** set HALF (10MHz) rate support */
  3395. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  3396. /** set Quarter (5MHz) rate support */
  3397. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  3398. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  3399. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  3400. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  3401. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  3402. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  3403. typedef enum {
  3404. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  3405. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  3406. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  3407. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  3408. WMI_SCAN_DWELL_MODE_STATIC = 4,
  3409. } WMI_SCAN_DWELL_MODE;
  3410. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  3411. do { \
  3412. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  3413. WMI_SCAN_DWELL_MODE_MASK); \
  3414. } while (0)
  3415. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  3416. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  3417. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  3418. #define WMI_SCAN_CLASS_MASK 0xFF000000
  3419. /*
  3420. * Masks identifying types/ID of scans
  3421. * Scan_Stop macros should be the same value as below defined in UMAC
  3422. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  3423. * #define IEEE80211_VAP_SCAN 0x01000000
  3424. * #define IEEE80211_ALL_SCANS 0x04000000
  3425. */
  3426. #define WMI_SCAN_STOP_ONE 0x00000000
  3427. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  3428. #define WMI_SCAN_STOP_ALL 0x04000000
  3429. /** extended Scan ctrl flags **/
  3430. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  3431. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  3432. policy scan manager computes */
  3433. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  3434. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  3435. policy scan manager computes*/
  3436. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  3437. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  3438. /* Enable Reception of Public Action frame with this flag */
  3439. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x00000004
  3440. /* Indicate to scan all PSC channel */
  3441. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH 0x00000008
  3442. /* Indicate to scan all NON-PSC channel */
  3443. #define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH 0x00000010
  3444. /* Indicate to save scan result matching hint from scan client */
  3445. #define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT 0x00000020
  3446. /* Skip any ch on which no any RNR had been received */
  3447. #define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH 0x00000040
  3448. /* Indicate client hint req is high priority than fw rnr or FILS disc */
  3449. #define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY 0x00000080
  3450. /**
  3451. * new 6 GHz flags per chan (short ssid or bssid) in struct
  3452. * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
  3453. */
  3454. /* Indicate not to send probe req for short_ssid or bssid on that channel */
  3455. #define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ 0x00000001
  3456. typedef struct {
  3457. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  3458. /** requestor requesting cancel */
  3459. A_UINT32 requestor;
  3460. /** Scan ID */
  3461. A_UINT32 scan_id;
  3462. /**
  3463. * Req Type
  3464. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  3465. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  3466. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  3467. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  3468. */
  3469. A_UINT32 req_type;
  3470. /**
  3471. * vDev ID
  3472. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  3473. */
  3474. A_UINT32 vdev_id;
  3475. /** pdev_id for identifying the MAC
  3476. * See macros starting with WMI_PDEV_ID_ for values.
  3477. * In non-DBDC case host should set it to 0
  3478. */
  3479. A_UINT32 pdev_id;
  3480. } wmi_stop_scan_cmd_fixed_param;
  3481. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  3482. #define APPEND_TO_EXISTING_CHAN_LIST 1
  3483. #define CHANNEL_MAX_BANDWIDTH_VALID 2
  3484. typedef struct {
  3485. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  3486. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  3487. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  3488. 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. */
  3489. /** Followed by the variable length TLV chan_info:
  3490. * wmi_channel chan_info[] */
  3491. } wmi_scan_chan_list_cmd_fixed_param;
  3492. /*
  3493. * Priority numbers must be sequential, starting with 0.
  3494. */
  3495. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  3496. typedef enum {
  3497. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  3498. WMI_SCAN_PRIORITY_LOW,
  3499. WMI_SCAN_PRIORITY_MEDIUM,
  3500. WMI_SCAN_PRIORITY_HIGH,
  3501. WMI_SCAN_PRIORITY_VERY_HIGH,
  3502. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  3503. } wmi_scan_priority;
  3504. /* Five Levels for Requested Priority */
  3505. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  3506. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  3507. /**
  3508. * 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
  3509. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  3510. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  3511. */
  3512. typedef struct {
  3513. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  3514. /**
  3515. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  3516. * 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
  3517. */
  3518. A_UINT32 vdev_type;
  3519. /**
  3520. * number of rows in mapping_table for a specific vdev
  3521. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  3522. */
  3523. A_UINT32 number_rows;
  3524. /**
  3525. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  3526. * In non-DBDC case host should set it to 0
  3527. */
  3528. A_UINT32 pdev_id;
  3529. /** mapping_table for a specific vdev follows this TLV
  3530. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  3531. } wmi_scan_sch_priority_table_cmd_fixed_param;
  3532. /** update flags */
  3533. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  3534. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  3535. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  3536. typedef struct {
  3537. A_UINT32 tlv_header;
  3538. /** requestor requesting update scan request */
  3539. A_UINT32 requestor;
  3540. /** Scan ID of the scan request that need to be update */
  3541. A_UINT32 scan_id;
  3542. /** update flags, indicating which of the following fields are valid and need to be updated*/
  3543. A_UINT32 scan_update_flags;
  3544. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  3545. A_UINT32 scan_priority;
  3546. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  3547. A_UINT32 min_rest_time;
  3548. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  3549. A_UINT32 max_rest_time;
  3550. /** 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 */
  3551. A_UINT32 pdev_id;
  3552. } wmi_scan_update_request_cmd_fixed_param;
  3553. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  3554. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  3555. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  3556. typedef struct _wmi_vendor_oui {
  3557. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  3558. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  3559. }wmi_vendor_oui;
  3560. typedef struct {
  3561. A_UINT32 tlv_header;
  3562. /** oui to be used in probe request frame when random mac addresss is
  3563. * requested part of scan parameters. this is applied to both FW internal scans and
  3564. * host initated scans. host can request for random mac address with
  3565. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  3566. A_UINT32 prob_req_oui;
  3567. A_UINT32 vdev_id;
  3568. /** Control Flags **/
  3569. A_UINT32 flags;
  3570. /** ie bitmap to use in probe req **/
  3571. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3572. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3573. A_UINT32 num_vendor_oui;
  3574. /** 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 */
  3575. A_UINT32 pdev_id;
  3576. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  3577. wmi_vendor_oui vendor_oui[];*/
  3578. } wmi_scan_prob_req_oui_cmd_fixed_param;
  3579. enum wmi_scan_event_type {
  3580. WMI_SCAN_EVENT_STARTED = 0x1,
  3581. WMI_SCAN_EVENT_COMPLETED = 0x2,
  3582. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  3583. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  3584. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  3585. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  3586. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  3587. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  3588. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  3589. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  3590. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  3591. WMI_SCAN_EVENT_MAX = 0x8000
  3592. };
  3593. enum wmi_scan_completion_reason {
  3594. /** scan related events */
  3595. WMI_SCAN_REASON_NONE = 0xFF,
  3596. WMI_SCAN_REASON_COMPLETED = 0,
  3597. WMI_SCAN_REASON_CANCELLED = 1,
  3598. WMI_SCAN_REASON_PREEMPTED = 2,
  3599. WMI_SCAN_REASON_TIMEDOUT = 3,
  3600. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  3601. WMI_SCAN_REASON_SUSPENDED = 5,
  3602. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  3603. WMI_SCAN_REASON_MAX,
  3604. };
  3605. typedef struct {
  3606. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  3607. /** scan event (wmi_scan_event_type) */
  3608. A_UINT32 event;
  3609. /** status of the scan completion event */
  3610. A_UINT32 reason;
  3611. /** channel freq , only valid for FOREIGN channel event*/
  3612. A_UINT32 channel_freq;
  3613. /**id of the requestor whose scan is in progress */
  3614. A_UINT32 requestor;
  3615. /**id of the scan that is in progress */
  3616. A_UINT32 scan_id;
  3617. /**id of VDEV that requested the scan */
  3618. A_UINT32 vdev_id;
  3619. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  3620. * In case of AP it is TSF of the AP vdev
  3621. * In case of STA connected state this is the TSF of the AP
  3622. * In case of STA not connected it will be the free running HW timer
  3623. */
  3624. A_UINT32 tsf_timestamp;
  3625. } wmi_scan_event_fixed_param;
  3626. /* WMI Diag event */
  3627. typedef struct {
  3628. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  3629. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  3630. A_UINT32 count; /* Number of diag frames added to current event */
  3631. A_UINT32 dropped;
  3632. /* followed by WMITLV_TAG_ARRAY_BYTE */
  3633. } wmi_diag_event_fixed_param;
  3634. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  3635. typedef struct {
  3636. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  3637. 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 */
  3638. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  3639. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  3640. 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 */
  3641. 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
  3642. * neighbor report requests that will be sent by FW after every roam */
  3643. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  3644. * interested in candidate of the same SSID */
  3645. } wmi_neighbor_report_offload;
  3646. typedef struct {
  3647. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  3648. A_UINT32 vdev_id;
  3649. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  3650. } wmi_11k_offload_report_fixed_param;
  3651. typedef struct {
  3652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  3653. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  3654. } wmi_neighbor_report_11k_offload_tlv_param;
  3655. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  3656. typedef struct {
  3657. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  3658. A_UINT32 vdev_id;
  3659. A_UINT32 flags;
  3660. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  3661. * In that case AP gives all the candidates in ESS without SSID filter
  3662. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  3663. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  3664. #define WMI_MAX_PMKID_LEN 16
  3665. #define WMI_MAX_PMK_LEN 64
  3666. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  3667. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  3668. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  3669. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  3670. typedef struct {
  3671. A_UINT32 tlv_header;
  3672. A_UINT32 pmk_len;
  3673. 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,
  3674. in spite of the automatic byte-swap applied to WMI messages during download*/
  3675. A_UINT32 pmkid_len;
  3676. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3677. wmi_mac_addr bssid;
  3678. wmi_ssid ssid;
  3679. A_UINT32 cache_id;
  3680. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  3681. A_UINT32 action_flag; // add/delete the entry
  3682. } wmi_pmk_cache;
  3683. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  3684. typedef struct {
  3685. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  3686. A_UINT32 op_flag; //option to flush all the cache at once
  3687. A_UINT32 vdev_id;
  3688. A_UINT32 num_cache;
  3689. /**
  3690. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  3691. * structure. The TLV's are:
  3692. * wmi_pmk_cache cache_list[];
  3693. */
  3694. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  3695. #define WMI_FILS_MAX_USERNAME_LEN 16
  3696. #define WMI_FILS_MAX_REALM_LEN 256
  3697. #define WMI_FILS_MAX_RRK_LEN 64
  3698. #define WMI_FILS_MAX_RIK_LEN 64
  3699. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3700. in spite of the automatic byte-swap applied to WMI messages during download*/
  3701. typedef struct {
  3702. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  3703. A_UINT32 username_length;
  3704. A_UINT32 next_erp_seq_num;
  3705. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  3706. A_UINT32 rRk_length;
  3707. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  3708. A_UINT32 rIk_length;
  3709. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3710. A_UINT32 realm_len;
  3711. } wmi_erp_info;
  3712. enum wmi_fils_hlp_pkt_type {
  3713. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  3714. };
  3715. typedef struct {
  3716. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  3717. A_UINT32 flags;
  3718. wmi_erp_info vdev_erp_info;
  3719. } wmi_roam_fils_offload_tlv_param;
  3720. typedef struct {
  3721. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  3722. A_UINT32 flags;
  3723. A_UINT32 vdev_id;
  3724. A_UINT32 size;
  3725. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  3726. // A_UINT8 fils_hlp_pkt[];
  3727. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  3728. #define WMI_MAX_KEK_LEN 64
  3729. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  3730. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  3731. typedef struct {
  3732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  3733. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  3734. A_UINT32 next_erp_seq_num;
  3735. A_UINT32 kek_len;
  3736. A_UINT8 kek[WMI_MAX_KEK_LEN];
  3737. A_UINT32 pmk_len;
  3738. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  3739. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3740. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3741. A_UINT32 realm_len;
  3742. } wmi_roam_fils_synch_tlv_param;
  3743. /*
  3744. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3745. * then these stats are combined stats for all the active channels.
  3746. */
  3747. typedef struct {
  3748. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3749. /** ack count, it is an incremental number, not accumulated number */
  3750. A_UINT32 ackRcvBad;
  3751. /** bad rts count, it is an incremental number, not accumulated number */
  3752. A_UINT32 rtsBad;
  3753. /** good rts, it is an incremental number, not accumulated number */
  3754. A_UINT32 rtsGood;
  3755. /** fcs count, it is an incremental number, not accumulated number */
  3756. A_UINT32 fcsBad;
  3757. /** beacon count, it is an incremental number, not accumulated number */
  3758. A_UINT32 noBeacons;
  3759. } wmi_update_whal_mib_stats_event_fixed_param;
  3760. /*
  3761. * This defines how much headroom is kept in the
  3762. * receive frame between the descriptor and the
  3763. * payload, in order for the WMI PHY error and
  3764. * management handler to insert header contents.
  3765. *
  3766. * This is in bytes.
  3767. */
  3768. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3769. /** This event will be used for sending scan results
  3770. * as well as rx mgmt frames to the host. The rx buffer
  3771. * will be sent as part of this WMI event. It would be a
  3772. * good idea to pass all the fields in the RX status
  3773. * descriptor up to the host.
  3774. */
  3775. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3776. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3777. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3778. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3779. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3780. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3781. #define MAX_ANTENNA_EIGHT 8
  3782. typedef struct {
  3783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3784. /** channel on which this frame is received (channel number) */
  3785. A_UINT32 channel;
  3786. /** snr information used to cal rssi */
  3787. A_UINT32 snr;
  3788. /** Rate kbps */
  3789. A_UINT32 rate;
  3790. /** rx phy mode WLAN_PHY_MODE */
  3791. A_UINT32 phy_mode;
  3792. /** length of the frame */
  3793. A_UINT32 buf_len;
  3794. /** rx status */
  3795. A_UINT32 status; /* capture mode indication */
  3796. /** RSSI of PRI 20MHz for each chain. */
  3797. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3798. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3799. A_UINT32 flags;
  3800. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3801. A_INT32 rssi;
  3802. /** delta between local TSF(TSF timestamp when frame was RXd)
  3803. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3804. * beacon,proberesp for e.g). If remote TSF is not available,
  3805. * delta set to 0.
  3806. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3807. * and thus would need to be sign-extended if added to a value
  3808. * larger than 32 bits.
  3809. */
  3810. A_UINT32 tsf_delta;
  3811. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3812. * TSF timestamp in the RX MAC descriptor provided by HW.
  3813. */
  3814. A_UINT32 rx_tsf_l32;
  3815. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3816. * after the packet is received.
  3817. */
  3818. A_UINT32 rx_tsf_u32;
  3819. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3820. * See macros starting with WMI_PDEV_ID_ for values.
  3821. */
  3822. A_UINT32 pdev_id;
  3823. /** freq in MHz of the channel on which this frame was received */
  3824. A_UINT32 chan_freq;
  3825. /* This TLV is followed by array of bytes:
  3826. * A_UINT8 bufp[]; <-- management frame buffer
  3827. */
  3828. /* This TLV is optionally followed by array of struct:
  3829. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3830. */
  3831. } wmi_mgmt_rx_hdr;
  3832. typedef enum {
  3833. PKT_CAPTURE_MODE_DISABLE = 0,
  3834. PKT_CAPTURE_MODE_MGMT_ONLY,
  3835. PKT_CAPTURE_MODE_DATA_ONLY,
  3836. PKT_CAPTURE_MODE_DATA_MGMT,
  3837. } WMI_PKT_CAPTURE_MODE_CONFIG;
  3838. /* This information sending to host during offloaded MGMT local TX and host TX */
  3839. typedef struct {
  3840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */
  3841. /* channel frequency in MHz */
  3842. A_UINT32 chan_freq;
  3843. /** snr information used to cal rssi in dB */
  3844. A_UINT32 snr;
  3845. /** Rate kbps */
  3846. A_UINT32 rate_kbps;
  3847. /** phy mode WLAN_PHY_MODE */
  3848. A_UINT32 phy_mode;
  3849. /** length of the frame in bytes */
  3850. A_UINT32 buf_len;
  3851. /** status:
  3852. * 0x00: CRC ERR
  3853. * 0x08: DECRYPT ERR
  3854. * 0x10: MIC ERR
  3855. * 0x20: KEY CACHE MISS
  3856. */
  3857. A_UINT32 status;
  3858. /** flags:
  3859. * Information about the management frame e.g. can give a scan source
  3860. * for a scan result mgmt frame
  3861. * Refer to WMI_MGMT_RX_HDR_ definitions.
  3862. * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO
  3863. */
  3864. A_UINT32 flags;
  3865. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3866. A_INT32 rssi;
  3867. /** delta between local TSF (TSF timestamp when frame was RXd)
  3868. * and remote TSF (TSF timestamp in the IE for mgmt frame -
  3869. * beacon, proberesp for example). If remote TSF is not available,
  3870. * delta is set to 0.
  3871. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3872. * and thus would need to be sign-extended if added to a value
  3873. * larger than 32 bits.
  3874. */
  3875. A_UINT32 tsf_delta;
  3876. /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from
  3877. * TSF timestamp in the TX MAC descriptor provided by HW.
  3878. */
  3879. A_UINT32 tsf_l32;
  3880. /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from
  3881. * TSF timestamp in the TX MAC descriptor provided by HW.
  3882. */
  3883. A_UINT32 tsf_u32;
  3884. /** pdev_id for identifying the MAC the tx mgmt frame transmitted.
  3885. * See macros starting with WMI_PDEV_ID_ for values.
  3886. */
  3887. A_UINT32 pdev_id;
  3888. A_UINT32 direction; /* tx:0,rx:1*/
  3889. /** tx_status:
  3890. * 0: xmit ok
  3891. * 1: excessive retries
  3892. * 2: blocked by tx filtering
  3893. * 4: fifo underrun
  3894. * 8: swabort
  3895. */
  3896. A_UINT32 tx_status;
  3897. /* This TLV may be followed by array of bytes:
  3898. * A_UINT8 bufp[]; <-- management frame buffer
  3899. */
  3900. } wmi_mgmt_hdr;
  3901. /*
  3902. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3903. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3904. */
  3905. typedef struct
  3906. {
  3907. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3908. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3909. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3910. } wmi_rssi_ctl_ext;
  3911. typedef struct {
  3912. /** TSF timestamp */
  3913. A_UINT32 tsf_timestamp;
  3914. /**
  3915. * Current freq1, freq2
  3916. *
  3917. * [7:0]: freq1[lo]
  3918. * [15:8] : freq1[hi]
  3919. * [23:16]: freq2[lo]
  3920. * [31:24]: freq2[hi]
  3921. */
  3922. A_UINT32 freq_info_1;
  3923. /**
  3924. * Combined RSSI over all chains and channel width for this PHY error
  3925. *
  3926. * [7:0]: RSSI combined
  3927. * [15:8]: Channel width (MHz)
  3928. * [23:16]: PHY error code
  3929. * [24:16]: reserved (future use)
  3930. */
  3931. A_UINT32 freq_info_2;
  3932. /**
  3933. * RSSI on chain 0 through 3
  3934. *
  3935. * This is formatted the same as the PPDU_START RX descriptor
  3936. * field:
  3937. *
  3938. * [7:0]: pri20
  3939. * [15:8]: sec20
  3940. * [23:16]: sec40
  3941. * [31:24]: sec80
  3942. */
  3943. A_UINT32 rssi_chain0;
  3944. A_UINT32 rssi_chain1;
  3945. A_UINT32 rssi_chain2;
  3946. A_UINT32 rssi_chain3;
  3947. /**
  3948. * Last calibrated NF value for chain 0 through 3
  3949. *
  3950. * nf_list_1:
  3951. *
  3952. * + [15:0] - chain 0
  3953. * + [31:16] - chain 1
  3954. *
  3955. * nf_list_2:
  3956. *
  3957. * + [15:0] - chain 2
  3958. * + [31:16] - chain 3
  3959. */
  3960. A_UINT32 nf_list_1;
  3961. A_UINT32 nf_list_2;
  3962. /** Length of the frame */
  3963. A_UINT32 buf_len;
  3964. } wmi_single_phyerr_rx_hdr;
  3965. typedef struct {
  3966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3967. /**
  3968. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3969. *
  3970. * This is formatted the same as the PPDU_START RX descriptor
  3971. * field:
  3972. *
  3973. * [7:0]: pri20
  3974. * [15:8]: sec20
  3975. * [23:16]: sec40
  3976. * [31:24]: sec80
  3977. */
  3978. A_UINT32 rssi_chain4;
  3979. A_UINT32 rssi_chain5;
  3980. A_UINT32 rssi_chain6;
  3981. A_UINT32 rssi_chain7;
  3982. /**
  3983. * Last calibrated NF value for chain 4 through 7 in dbm
  3984. *
  3985. * nf_list_3:
  3986. * + [15:0] - chain 4
  3987. * + [31:16] - chain 5
  3988. *
  3989. * nf_list_4:
  3990. * + [15:0] - chain 6
  3991. * + [31:16] - chain 7
  3992. *
  3993. * Each chain's noise floor is stored as a sign-extended (negative)
  3994. * value in dBm units.
  3995. */
  3996. A_UINT32 nf_list_3;
  3997. A_UINT32 nf_list_4;
  3998. } wmi_single_phyerr_ext_rx_hdr;
  3999. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  4000. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  4001. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  4002. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  4003. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  4004. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  4005. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  4006. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  4007. /*
  4008. * Please keep in mind that these _SET macros break macro side effect
  4009. * assumptions; don't be clever with them.
  4010. */
  4011. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  4012. (WMI_F_MS((hdr)->freq_info_1, \
  4013. WMI_UNIFIED_FREQINFO_##f##_LO) \
  4014. | (WMI_F_MS((hdr)->freq_info_1, \
  4015. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  4016. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  4017. do { \
  4018. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  4019. WMI_UNIFIED_FREQINFO_##f##_LO); \
  4020. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  4021. WMI_UNIFIED_FREQINFO_##f##_HI); \
  4022. } while (0)
  4023. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  4024. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  4025. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  4026. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  4027. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  4028. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  4029. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  4030. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  4031. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  4032. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  4033. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4034. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  4035. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  4036. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  4037. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  4038. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4039. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  4040. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  4041. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  4042. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  4043. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  4044. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  4045. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  4046. #define WMI_UNIFIED_CHAIN_0_S 0
  4047. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  4048. #define WMI_UNIFIED_CHAIN_1_S 16
  4049. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  4050. #define WMI_UNIFIED_CHAIN_2_S 0
  4051. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  4052. #define WMI_UNIFIED_CHAIN_3_S 16
  4053. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  4054. #define WMI_UNIFIED_CHAIN_4_S 0
  4055. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  4056. #define WMI_UNIFIED_CHAIN_5_S 16
  4057. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  4058. #define WMI_UNIFIED_CHAIN_6_S 0
  4059. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  4060. #define WMI_UNIFIED_CHAIN_7_S 16
  4061. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  4062. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  4063. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  4064. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  4065. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  4066. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  4067. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  4068. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  4069. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  4070. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  4071. WMI_UNIFIED_CHAIN_##c)))
  4072. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  4073. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  4074. WMI_UNIFIED_CHAIN_##c);
  4075. /*
  4076. * For now, this matches what the underlying hardware is doing.
  4077. * Update ar6000ProcRxDesc() to use these macros when populating
  4078. * the rx descriptor and then we can just copy the field over
  4079. * to the WMI PHY notification without worrying about breaking
  4080. * things.
  4081. */
  4082. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  4083. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  4084. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  4085. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  4086. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  4087. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  4088. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  4089. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  4090. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  4091. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  4092. WMI_UNIFIED_RSSI_CHAN_##ch);
  4093. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  4094. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  4095. WMI_UNIFIED_RSSI_CHAN_##ch)))
  4096. #define WMI_UNIFIED_CHAIN_RSSI_GET(tlv, chain_idx, band) \
  4097. ((A_INT8) WMI_F_MS((tlv)->chain_rssi[chain_idx], WMI_UNIFIED_RSSI_CHAN_ ## band))
  4098. typedef struct {
  4099. /** Phy error event header */
  4100. wmi_single_phyerr_rx_hdr hdr;
  4101. /** frame buffer */
  4102. A_UINT8 bufp[1];
  4103. } wmi_single_phyerr_rx_event;
  4104. /* PHY ERROR MASK 0 */
  4105. /* bits 1:0 defined but not published */
  4106. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  4107. /* bits 23:3 defined but not published */
  4108. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  4109. /* bits 25:24 defined but not published */
  4110. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  4111. /* bits 31:27 defined but not published */
  4112. /* PHY ERROR MASK 1 */
  4113. /* bits 13:0 defined but not published */
  4114. /* bits 31:14 reserved */
  4115. /* PHY ERROR MASK 2 */
  4116. /* bits 31:0 reserved */
  4117. typedef struct {
  4118. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  4119. /** Phy error phy error count */
  4120. A_UINT32 num_phyerr_events;
  4121. A_UINT32 tsf_l32;
  4122. A_UINT32 tsf_u32;
  4123. A_UINT32 buf_len;
  4124. union {
  4125. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  4126. /** pdev_id for identifying the MAC
  4127. * See macros starting with WMI_PDEV_ID_ for values.
  4128. */
  4129. A_UINT32 pdev_id;
  4130. };
  4131. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  4132. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  4133. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  4134. /* This TLV is followed by array of bytes:
  4135. * frame buffer - contains multiple payloads in the order:
  4136. * header - payload, header - payload...
  4137. * (The header is of type: wmi_single_phyerr_rx_hdr)
  4138. * A_UINT8 bufp[];
  4139. * The extension hdr will repeat num_phyerr_events of times
  4140. * and will have 1:1 mapping with above header. i.e the 1st
  4141. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  4142. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  4143. */
  4144. } wmi_comb_phyerr_rx_hdr;
  4145. /* WMI MGMT TX */
  4146. typedef struct {
  4147. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  4148. /** unique id identifying the VDEV, generated by the caller */
  4149. A_UINT32 vdev_id;
  4150. /** peer MAC address */
  4151. wmi_mac_addr peer_macaddr;
  4152. /** xmit rate */
  4153. A_UINT32 tx_rate;
  4154. /** xmit power */
  4155. A_UINT32 tx_power;
  4156. /** Buffer length in bytes */
  4157. A_UINT32 buf_len;
  4158. /* This TLV is followed by array of bytes:
  4159. * A_UINT8 bufp[]; <-- management frame buffer
  4160. */
  4161. } wmi_mgmt_tx_hdr;
  4162. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  4163. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  4164. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  4165. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  4166. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  4167. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  4168. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  4169. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  4170. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  4171. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  4172. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  4173. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  4174. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  4175. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  4176. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  4177. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  4178. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1)
  4179. #define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value)
  4180. typedef struct {
  4181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  4182. union {
  4183. struct {
  4184. /* DWORD 0: tx power, tx rate, retry_limit */
  4185. A_UINT32
  4186. /* pwr -
  4187. * Specify what power the tx frame needs to be transmitted at.
  4188. * The power a signed (two's complement) value is in units of 0.5 dBm.
  4189. * The value needs to be appropriately sign-extended when extracting
  4190. * the value from the message and storing it in a variable that is
  4191. * larger than A_INT8. (fw automatically handles this sign-extension.)
  4192. * If the transmission uses multiple tx chains, this power spec is
  4193. * the total transmit power, assuming incoherent combination of
  4194. * per-chain power to produce the total power.
  4195. */
  4196. pwr: 8,
  4197. /* mcs_mask -
  4198. * Specify the allowable values for MCS index (modulation and coding)
  4199. * to use for transmitting the frame.
  4200. *
  4201. * For HT / VHT preamble types, this mask directly corresponds to
  4202. * the HT or VHT MCS indices that are allowed. For each bit N set
  4203. * within the mask, MCS index N is allowed for transmitting the frame.
  4204. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  4205. * rates versus OFDM rates, so the host has the option of specifying
  4206. * that the target must transmit the frame with CCK or OFDM rates
  4207. * (not HT or VHT), but leaving the decision to the target whether
  4208. * to use CCK or OFDM.
  4209. *
  4210. * For CCK and OFDM, the bits within this mask are interpreted as
  4211. * follows:
  4212. * bit 0 -> CCK 1 Mbps rate is allowed
  4213. * bit 1 -> CCK 2 Mbps rate is allowed
  4214. * bit 2 -> CCK 5.5 Mbps rate is allowed
  4215. * bit 3 -> CCK 11 Mbps rate is allowed
  4216. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  4217. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  4218. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  4219. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  4220. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  4221. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  4222. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  4223. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  4224. *
  4225. * The MCS index specification needs to be compatible with the
  4226. * bandwidth mask specification. For example, a MCS index == 9
  4227. * specification is inconsistent with a preamble type == VHT,
  4228. * Nss == 1, and channel bandwidth == 20 MHz.
  4229. *
  4230. * Furthermore, the host has only a limited ability to specify to
  4231. * the target to select from HT + legacy rates, or VHT + legacy rates,
  4232. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  4233. * If no bits are set, target can choose what MCS type to use.
  4234. */
  4235. mcs_mask: 12,
  4236. /* nss_mask -
  4237. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  4238. * Each bit in this mask corresponds to a Nss value:
  4239. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  4240. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  4241. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  4242. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  4243. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  4244. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  4245. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  4246. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  4247. * The values in the Nss mask must be suitable for the recipient, e.g.
  4248. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  4249. * recipient which only supports 2x2 MIMO.
  4250. * If no bits are set, target can choose what NSS type to use.
  4251. */
  4252. nss_mask: 8,
  4253. /* retry_limit -
  4254. * Specify the maximum number of transmissions, including the
  4255. * initial transmission, to attempt before giving up if no ack
  4256. * is received.
  4257. * If the tx rate is specified, then all retries shall use the
  4258. * same rate as the initial transmission.
  4259. * If no tx rate is specified, the target can choose whether to
  4260. * retain the original rate during the retransmissions, or to
  4261. * fall back to a more robust rate.
  4262. */
  4263. retry_limit: 4;
  4264. };
  4265. A_UINT32 tx_param_dword0;
  4266. };
  4267. union {
  4268. struct {
  4269. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  4270. A_UINT32
  4271. /* chain_mask - specify which chains to transmit from
  4272. * If not set, target will choose what chain_mask to use.
  4273. */
  4274. chain_mask: 8,
  4275. /* The bits in this mask correspond to the values as below
  4276. * bit 0 -> 5MHz
  4277. * bit 1 -> 10MHz
  4278. * bit 2 -> 20MHz
  4279. * bit 3 -> 40MHz
  4280. * bit 4 -> 80MHz
  4281. * bit 5 -> 160MHz
  4282. * bit 6 -> 80_80MHz
  4283. * If no bits are set, target can choose what BW to use.
  4284. */
  4285. bw_mask: 7,
  4286. /* preamble_type_mask -
  4287. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  4288. * may choose from for transmitting this frame.
  4289. * Each bit in this mask corresponds to a preamble_type value:
  4290. * bit 0: if set, OFDM
  4291. * bit 1: if set, CCK
  4292. * bit 2: if set, HT
  4293. * bit 3: if set, VHT
  4294. * bit 4: if set, HE
  4295. * If no bits are set, target can choose what preamble type to use.
  4296. */
  4297. preamble_type: 5,
  4298. /* Data:1 Mgmt:0
  4299. */
  4300. frame_type: 1,
  4301. /* Capture CFR when bit is set
  4302. */
  4303. cfr_capture: 1,
  4304. reserved1_31_22: 10;
  4305. };
  4306. A_UINT32 tx_param_dword1;
  4307. };
  4308. } wmi_tx_send_params;
  4309. typedef struct {
  4310. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  4311. A_UINT32 vdev_id;
  4312. A_UINT32 desc_id; /* echoed in tx_compl_event */
  4313. A_UINT32 chanfreq; /* MHz units */
  4314. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  4315. * pass by reference WMI management frames.
  4316. *
  4317. * a) If the command is for pass by reference,
  4318. * paddr_lo and padd_hi will hold the address of remote/host buffer
  4319. * b) If the command is for pass by value,
  4320. * paddr_lo and paddr_hi will be NULL.
  4321. */
  4322. A_UINT32 paddr_lo;
  4323. A_UINT32 paddr_hi;
  4324. A_UINT32 frame_len;
  4325. A_UINT32 buf_len; /** Buffer length in bytes */
  4326. /*
  4327. * The frame which will have tx_params_valid set will be always be RAW
  4328. * frame, as it will be tx'ed on non-pause tid
  4329. */
  4330. A_UINT32 tx_params_valid;
  4331. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  4332. * A_UINT8 bufp[];
  4333. */
  4334. /* This TLV is followed by wmi_tx_send_params
  4335. * wmi_tx_send_params tx_send_params;
  4336. */
  4337. } wmi_mgmt_tx_send_cmd_fixed_param;
  4338. typedef struct {
  4339. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  4340. A_UINT32 vdev_id;
  4341. A_UINT32 desc_id; /* echoed in tx_compl_event */
  4342. A_UINT32 chanfreq; /* MHz units */
  4343. A_UINT32 paddr_lo;
  4344. A_UINT32 paddr_hi;
  4345. A_UINT32 frame_len;
  4346. A_UINT32 buf_len; /** Buffer length in bytes */
  4347. /* The frame which will have tx_params_valid set will be always be RAW
  4348. * frame, as it will be tx'ed on non-pause tid
  4349. */
  4350. A_UINT32 tx_params_valid;
  4351. /* This TLV is followed by array of bytes: First 64 bytes of frame
  4352. * A_UINT8 bufp[];
  4353. */
  4354. /* This TLV is followed by wmi_tx_send_params
  4355. * wmi_tx_send_params tx_send_params;
  4356. */
  4357. } wmi_offchan_data_tx_send_cmd_fixed_param;
  4358. typedef struct {
  4359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  4360. A_UINT32 value;
  4361. } wmi_echo_event_fixed_param;
  4362. typedef struct {
  4363. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  4364. A_UINT32 value;
  4365. } wmi_echo_cmd_fixed_param;
  4366. typedef struct {
  4367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  4368. /** pdev_id for identifying the MAC
  4369. * See macros starting with WMI_PDEV_ID_ for values.
  4370. */
  4371. A_UINT32 pdev_id;
  4372. /** reg domain code */
  4373. A_UINT32 reg_domain;
  4374. A_UINT32 reg_domain_2G;
  4375. A_UINT32 reg_domain_5G;
  4376. A_UINT32 conformance_test_limit_2G;
  4377. A_UINT32 conformance_test_limit_5G;
  4378. A_UINT32 dfs_domain;
  4379. } wmi_pdev_set_regdomain_cmd_fixed_param;
  4380. typedef struct {
  4381. /** TRUE for scan start and flase for scan end */
  4382. A_UINT32 scan_start;
  4383. } wmi_pdev_scan_cmd;
  4384. /* WMI support for setting ratemask in target */
  4385. typedef struct {
  4386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  4387. A_UINT32 vdev_id;
  4388. /*
  4389. * 0 - cck/ofdm
  4390. * 1 - HT
  4391. * 2 - VHT
  4392. * 3 - HE
  4393. */
  4394. A_UINT32 type;
  4395. A_UINT32 mask_lower32;
  4396. A_UINT32 mask_higher32;
  4397. A_UINT32 mask_lower32_2;
  4398. A_UINT32 mask_higher32_2;
  4399. } wmi_vdev_config_ratemask_cmd_fixed_param;
  4400. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  4401. enum {
  4402. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  4403. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  4404. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  4405. }; /* nrp - Neighbor Rx Packets */
  4406. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  4407. enum {
  4408. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  4409. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  4410. };
  4411. /* nrp flag - Filter Neighbor Rx Packets
  4412. * (capture flag, 2 & 3 not initially supported)
  4413. */
  4414. enum {
  4415. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  4416. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  4417. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  4418. };
  4419. typedef struct {
  4420. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  4421. A_UINT32 vdev_id;
  4422. /* AP Bssid or Client Mac-addr */
  4423. wmi_mac_addr addr;
  4424. /* Add/Remove NRF Filter */
  4425. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  4426. /* client/ap filter */
  4427. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  4428. /* optional - tx/rx capture */
  4429. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  4430. /* BSSID index - index of the BSSID register */
  4431. A_UINT32 bssid_idx;
  4432. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  4433. /*Command to set/unset chip in quiet mode*/
  4434. typedef struct {
  4435. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  4436. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  4437. A_UINT32 period; /*period in TUs*/
  4438. A_UINT32 duration; /*duration in TUs*/
  4439. A_UINT32 next_start; /*offset in TUs*/
  4440. A_UINT32 enabled; /*enable/disable*/
  4441. } wmi_pdev_set_quiet_cmd_fixed_param;
  4442. typedef struct {
  4443. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  4444. A_UINT32 vdev_id; /* Virtual interface ID */
  4445. A_UINT32 period; /* period in TUs */
  4446. A_UINT32 duration; /* duration in TUs */
  4447. A_UINT32 next_start; /* offset in TUs */
  4448. A_UINT32 enabled; /* enable/disable */
  4449. } wmi_vdev_set_quiet_cmd_fixed_param;
  4450. /*
  4451. * START_STOP flag value: 1 - Start, 0 - Stop
  4452. */
  4453. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  4454. /*
  4455. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  4456. * This flag is only relevant if the START_STOP flag == 1 (start).
  4457. */
  4458. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  4459. /*
  4460. * Enable/Disable sending Quiet IE info in SWBA event from the target
  4461. * 0 - Don't include Quiet IE in WMI SWBA Event
  4462. * 1 - Include Quiet IE in WMI SWBA Event
  4463. */
  4464. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  4465. typedef struct {
  4466. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  4467. A_UINT32 vdev_id; /* Virtual interface ID */
  4468. A_UINT32 period; /* period in TUs */
  4469. A_UINT32 duration; /* duration in TUs */
  4470. A_UINT32 next_start; /* offset in TUs from beacon */
  4471. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  4472. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  4473. */
  4474. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  4475. typedef struct {
  4476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  4477. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  4478. /* Size for tx aggregation for the vdev mentioned in vdev id
  4479. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  4480. */
  4481. A_UINT32 tx_aggr_size;
  4482. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  4483. /*
  4484. * To set TX aggregation size limits per VDEV per AC
  4485. * bits 1:0 (ac):
  4486. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  4487. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  4488. * for all Access Categories
  4489. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  4490. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  4491. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  4492. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  4493. * bits 31:6: Reserved bits. should be set to zero.
  4494. */
  4495. A_UINT32 enable_bitmap;
  4496. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  4497. typedef enum {
  4498. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  4499. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  4500. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  4501. } wmi_vdev_custom_aggr_type_t;
  4502. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  4503. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  4504. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  4505. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  4506. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  4507. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  4508. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  4509. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  4510. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  4511. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  4512. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  4513. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4514. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  4515. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  4516. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4517. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  4518. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  4519. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4520. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  4521. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  4522. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4523. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  4524. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  4525. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4526. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  4527. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  4528. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4529. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  4530. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  4531. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4532. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  4533. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  4534. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4535. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  4536. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  4537. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4538. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  4539. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  4540. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4541. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  4542. typedef enum {
  4543. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  4544. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  4545. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  4546. } wmi_vdev_custom_sw_retry_type_t;
  4547. typedef struct {
  4548. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  4549. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  4550. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  4551. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  4552. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  4553. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  4554. typedef struct {
  4555. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  4556. A_UINT32 tlv_header;
  4557. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  4558. A_UINT32 vdev_id;
  4559. /* number of chains to use for transmissions in 2.4 GHz band */
  4560. A_UINT32 num_tx_chains_2g;
  4561. /* number of chains to use for reception in 2.4 GHz band */
  4562. A_UINT32 num_rx_chains_2g;
  4563. /* nss to use for transmissions in 2.4 GHz band */
  4564. A_UINT32 tx_nss_2g;
  4565. /* nss to use for reception in 2.4 GHz band */
  4566. A_UINT32 rx_nss_2g;
  4567. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  4568. A_UINT32 num_tx_chains_b;
  4569. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  4570. A_UINT32 num_tx_chains_g;
  4571. /* number of chains to use for transmissions in 5 GHz band */
  4572. A_UINT32 num_tx_chains_5g;
  4573. /* number of chains to use for reception in 5 GHz band */
  4574. A_UINT32 num_rx_chains_5g;
  4575. /* nss to use for transmissions in 5 GHz band */
  4576. A_UINT32 tx_nss_5g;
  4577. /* nss to use for reception in 5 GHz band */
  4578. A_UINT32 rx_nss_5g;
  4579. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  4580. A_UINT32 num_tx_chains_a;
  4581. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  4582. A_UINT32 disable_tx_mrc_2g;
  4583. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  4584. A_UINT32 disable_rx_mrc_2g;
  4585. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  4586. A_UINT32 disable_tx_mrc_5g;
  4587. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  4588. A_UINT32 disable_rx_mrc_5g;
  4589. } wmi_vdev_chainmask_config_cmd_fixed_param;
  4590. /*
  4591. * Command to enable/disable Green AP Power Save.
  4592. * This helps conserve power during AP operation. When the AP has no
  4593. * stations associated with it, the host can enable Green AP Power Save
  4594. * to request the firmware to shut down all but one transmit and receive
  4595. * chains.
  4596. */
  4597. typedef struct {
  4598. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  4599. /** pdev_id for identifying the MAC
  4600. * See macros starting with WMI_PDEV_ID_ for values.
  4601. */
  4602. A_UINT32 pdev_id;
  4603. A_UINT32 enable; /*1:enable, 0:disable*/
  4604. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  4605. #define MAX_HT_IE_LEN 32
  4606. /* DEPRECATED */
  4607. typedef struct {
  4608. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  4609. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4610. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  4611. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4612. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4613. /** The TLV for the HT IE follows:
  4614. * A_UINT32 ie_data[];
  4615. */
  4616. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  4617. #define MAX_VHT_IE_LEN 32
  4618. /* DEPRECATED */
  4619. typedef struct {
  4620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  4621. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4622. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  4623. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4624. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4625. /** The TLV for the VHT IE follows:
  4626. * A_UINT32 ie_data[];
  4627. */
  4628. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  4629. typedef struct {
  4630. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  4631. /** pdev_id for identifying the MAC
  4632. * See macros starting with WMI_PDEV_ID_ for values.
  4633. */
  4634. A_UINT32 pdev_id;
  4635. wmi_mac_addr base_macaddr;
  4636. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  4637. /*
  4638. * For now, the spectral configuration is global rather than
  4639. * per-vdev. The vdev is a placeholder and will be ignored
  4640. * by the firmware.
  4641. */
  4642. typedef struct {
  4643. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  4644. A_UINT32 vdev_id;
  4645. A_UINT32 spectral_scan_count;
  4646. A_UINT32 spectral_scan_period;
  4647. A_UINT32 spectral_scan_priority;
  4648. A_UINT32 spectral_scan_fft_size;
  4649. A_UINT32 spectral_scan_gc_ena;
  4650. A_UINT32 spectral_scan_restart_ena;
  4651. A_UINT32 spectral_scan_noise_floor_ref;
  4652. A_UINT32 spectral_scan_init_delay;
  4653. A_UINT32 spectral_scan_nb_tone_thr;
  4654. A_UINT32 spectral_scan_str_bin_thr;
  4655. A_UINT32 spectral_scan_wb_rpt_mode;
  4656. A_UINT32 spectral_scan_rssi_rpt_mode;
  4657. A_UINT32 spectral_scan_rssi_thr;
  4658. A_UINT32 spectral_scan_pwr_format;
  4659. A_UINT32 spectral_scan_rpt_mode;
  4660. A_UINT32 spectral_scan_bin_scale;
  4661. A_UINT32 spectral_scan_dBm_adj;
  4662. A_UINT32 spectral_scan_chn_mask;
  4663. } wmi_vdev_spectral_configure_cmd_fixed_param;
  4664. /*
  4665. * Enabling, disabling and triggering the spectral scan
  4666. * is a per-vdev operation. That is, it will set channel
  4667. * flags per vdev rather than globally; so concurrent scan/run
  4668. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  4669. */
  4670. typedef struct {
  4671. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  4672. A_UINT32 vdev_id;
  4673. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  4674. A_UINT32 trigger_cmd;
  4675. /* 0 - ignore; 1 - enable, 2 - disable */
  4676. A_UINT32 enable_cmd;
  4677. } wmi_vdev_spectral_enable_cmd_fixed_param;
  4678. typedef struct {
  4679. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  4680. A_UINT32 vdev_id;
  4681. } wmi_vdev_get_tx_power_cmd_fixed_param;
  4682. #define WMI_BEACON_CTRL_TX_DISABLE 0
  4683. #define WMI_BEACON_CTRL_TX_ENABLE 1
  4684. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  4685. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  4686. typedef struct {
  4687. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  4688. /** unique id identifying the VDEV, generated by the caller */
  4689. A_UINT32 vdev_id;
  4690. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  4691. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  4692. /** common structure used for wmi_vedv_get_tx_power_event */
  4693. typedef struct {
  4694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  4695. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  4696. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  4697. } wmi_vdev_get_tx_power_event_fixed_param;
  4698. typedef enum {
  4699. /** Limit the offchannel duration */
  4700. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  4701. /** Skip DFS channels from Scan channel list.
  4702. * valid for both host scans and FW scans */
  4703. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  4704. } wmi_vdev_limit_offchan_flags;
  4705. typedef struct {
  4706. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  4707. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  4708. A_UINT32 vdev_id;
  4709. /** see enum wmi_vdev_limit_offchan_flags */
  4710. A_UINT32 flags;
  4711. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  4712. A_UINT32 max_offchan_time;
  4713. /** rest time in msec on the BSS channel */
  4714. A_UINT32 rest_time;
  4715. } wmi_vdev_limit_offchan_cmd_fixed_param;
  4716. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  4717. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  4718. #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) */
  4719. #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) */
  4720. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  4721. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  4722. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  4723. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  4724. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  4725. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4726. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  4727. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4728. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  4729. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4730. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  4731. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4732. typedef enum {
  4733. WMI_CSA_IE_PRESENT = 0x00000001,
  4734. WMI_XCSA_IE_PRESENT = 0x00000002,
  4735. WMI_WBW_IE_PRESENT = 0x00000004,
  4736. WMI_CSWARP_IE_PRESENT = 0x00000008,
  4737. WMI_QSBW_ISE_PRESENT = 0x00000010,
  4738. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  4739. /* wmi CSA receive event from beacon frame */
  4740. typedef struct {
  4741. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  4742. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  4743. wmi_mac_addr i_addr1;
  4744. wmi_mac_addr i_addr2;
  4745. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  4746. * changed in the future without breaking WMI compatibility */
  4747. A_UINT32 csa_ie[2];
  4748. A_UINT32 xcsa_ie[2];
  4749. A_UINT32 wb_ie[2];
  4750. A_UINT32 cswarp_ie;
  4751. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  4752. A_UINT32 qsbw_ise;
  4753. } wmi_csa_event_fixed_param;
  4754. typedef enum {
  4755. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  4756. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  4757. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  4758. } WMI_PEER_MCAST2UCAST_MODE;
  4759. typedef enum {
  4760. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  4761. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  4762. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  4763. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  4764. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  4765. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  4766. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  4767. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4768. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4769. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4770. * Bit 3-5 : "Xretry threshold" to use
  4771. * Bit 6~31 : reserved for future use.
  4772. */
  4773. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  4774. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  4775. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  4776. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  4777. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  4778. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  4779. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  4780. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  4781. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  4782. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  4783. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  4784. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  4785. typedef enum {
  4786. /** TX chain mask */
  4787. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  4788. /** RX chain mask */
  4789. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  4790. /** TX power limit for 2G Radio */
  4791. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  4792. /** TX power limit for 5G Radio */
  4793. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  4794. /** TX power scale */
  4795. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  4796. /** Beacon generation mode . 0: host, 1: target */
  4797. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  4798. /** Beacon generation mode . 0: staggered 1: bursted */
  4799. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  4800. /** Resource manager off chan mode .
  4801. * 0: turn off off chan mode. 1: turn on offchan mode
  4802. */
  4803. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  4804. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  4805. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  4806. /** Dynamic bandwidth 0: disable 1: enable */
  4807. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  4808. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  4809. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  4810. /** aggregrate sw retry threshold. 0-disable*/
  4811. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  4812. /** Station kickout threshold (non of consecutive failures).0-disable */
  4813. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  4814. /** Aggerate size scaling configuration per AC */
  4815. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  4816. /** LTR enable */
  4817. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  4818. /** LTR latency for BE, in us */
  4819. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  4820. /** LTR latency for BK, in us */
  4821. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  4822. /** LTR latency for VI, in us */
  4823. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  4824. /** LTR latency for VO, in us */
  4825. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  4826. /** LTR AC latency timeout, in ms */
  4827. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  4828. /** LTR platform latency override, in us */
  4829. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  4830. /** LTR-M override, in us */
  4831. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  4832. /** Tx activity timeout for LTR, in us */
  4833. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  4834. /** L1SS state machine enable */
  4835. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  4836. /** Deep sleep state machine enable */
  4837. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  4838. /** RX buffering flush enable */
  4839. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  4840. /** RX buffering matermark */
  4841. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  4842. /** RX buffering timeout enable */
  4843. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  4844. /** RX buffering timeout value */
  4845. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  4846. /** pdev level stats update period in ms */
  4847. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  4848. /** vdev level stats update period in ms */
  4849. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  4850. /** peer level stats update period in ms */
  4851. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  4852. /** beacon filter status update period */
  4853. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  4854. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4855. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  4856. /** Access category on which ARP frames are sent */
  4857. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  4858. /** DCS configuration */
  4859. WMI_PDEV_PARAM_DCS, /* 0x24 */
  4860. /** Enable/Disable ANI on target */
  4861. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  4862. /** configure the ANI polling period */
  4863. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  4864. /** configure the ANI listening period */
  4865. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  4866. /** configure OFDM immunity level */
  4867. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  4868. /** configure CCK immunity level */
  4869. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  4870. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4871. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  4872. /** Enable/Disable proxy STA */
  4873. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  4874. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4875. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  4876. /** Enable/Disable power gating sleep */
  4877. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  4878. /** Enable/Disable Rfkill */
  4879. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  4880. /** Set Bursting DUR */
  4881. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  4882. /** Set Bursting ENABLE */
  4883. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  4884. /** HW rfkill config */
  4885. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  4886. /** Enable radio low power features */
  4887. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  4888. /** L1SS entry and residency time track */
  4889. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  4890. /** set hyst at runtime, requirement from SS */
  4891. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  4892. /** Enable/ Disable POWER COLLAPSE */
  4893. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  4894. /** configure LED system state */
  4895. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  4896. /** Enable/Disable LED */
  4897. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  4898. /** set DIRECT AUDIO time latency */
  4899. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  4900. /** set DIRECT AUDIO Feature ENABLE */
  4901. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  4902. /** pdev level whal mib stats update enable */
  4903. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  4904. /** ht/vht info based on vdev */
  4905. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  4906. /** Set CTS channel BW for dynamic BW adjustment feature */
  4907. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  4908. /** Set GPIO pin info used by WNTS */
  4909. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  4910. /** Enable/Disable hardware adaptive early rx feature */
  4911. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  4912. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4913. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  4914. /** Increasing/decreasing step used by hardware */
  4915. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  4916. /** The fixed early rx duration when adaptive early rx is disabled */
  4917. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  4918. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4919. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  4920. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4921. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  4922. /** Increasing/decreasing step used by hardware */
  4923. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  4924. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4925. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  4926. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4927. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  4928. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4929. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  4930. /** 2G TX chain mask */
  4931. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  4932. /** 2G RX chain mask */
  4933. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  4934. /** 5G TX chain mask */
  4935. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  4936. /** 5G RX chain mask */
  4937. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  4938. /* Set tx chain mask for CCK rates */
  4939. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  4940. /* Set tx chain mask for 1SS stream */
  4941. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  4942. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4943. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  4944. /** TX power backoff in dB: tx power -= param value
  4945. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4946. * the values. Safety check will happen in Halphy
  4947. */
  4948. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  4949. /** enable and disable aggregate burst along with duration */
  4950. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  4951. /** Set the global RX decap mode */
  4952. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  4953. /** Enable/Disable Fast channel reset */
  4954. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  4955. /** Default antenna for Smart antenna */
  4956. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  4957. /** Set the user-specified antenna gain */
  4958. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  4959. /** Set the user-specified RX filter */
  4960. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  4961. /** configure the user-specified MCAST tid for managed mcast feature
  4962. * 0-15 is the valid range. 0xff will clear the tid setting */
  4963. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  4964. /** Enable/Disable Proxy sta mode */
  4965. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  4966. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4967. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4968. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  4969. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4970. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  4971. /** Remove the Mcast buffers added by host */
  4972. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  4973. /** En/disable station power save state indication */
  4974. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  4975. /** Access category on which ARP frames are sent */
  4976. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  4977. /** allow or disallow interbss frame forwarding */
  4978. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  4979. /** Enable/Disable reset */
  4980. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  4981. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  4982. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  4983. /** Set global PPDU duration limit (usec). */
  4984. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  4985. /** set txbf sounding period of vap in milliseconds */
  4986. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  4987. /** Set promiscuous mode */
  4988. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  4989. /** Set burst mode */
  4990. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  4991. /** enable enhanced stats */
  4992. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  4993. /** Set mu-grouping policy */
  4994. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  4995. /** Channel Hopping Enable */
  4996. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  4997. /** Set Channel Hopping NF threshold in dBm */
  4998. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  4999. /** Set PAPRD policy */
  5000. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  5001. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  5002. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  5003. /** ATF enable/disable strict schedule */
  5004. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  5005. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  5006. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  5007. /** Default antenna polarization */
  5008. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  5009. /** Set mgmt retry limit */
  5010. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  5011. /** Set CCA sensitivity level in dBm */
  5012. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  5013. /** Set 2G positive and negative Tx power in 0.5dBm units */
  5014. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  5015. /** Set 5G positive and negative Tx power in 0.5dBm
  5016. * units */
  5017. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  5018. /** Enable/disble AMSDU for tids */
  5019. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  5020. /** Enable/disable AMPDU for tids */
  5021. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  5022. /** Set CCA threshold in dBm */
  5023. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  5024. /** RTS Fixed rate setting */
  5025. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  5026. /** Pdev reset */
  5027. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  5028. /** wapi mbssid offset **/
  5029. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  5030. /** ARP DEBUG source address*/
  5031. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  5032. /** ARP DEBUG destination address*/
  5033. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  5034. /** ATF enable/disable obss noise scheduling */
  5035. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  5036. /** ATF obss noise scaling factor */
  5037. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  5038. /**
  5039. * TX power reduction scaling exponent - final tx power is the
  5040. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  5041. * 2^(scale exponent). For example:
  5042. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  5043. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  5044. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  5045. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  5046. */
  5047. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  5048. /** ATF enabe/disabe dynamically */
  5049. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  5050. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  5051. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  5052. /** Set propagation delay for 2G / 5G band.
  5053. * The propagation delay is fundamentally a per-peer property, but
  5054. * the target may not support per-peer settings for ack timeouts.
  5055. * This pdev parameter allows the MAC-level ack timeout to be set to
  5056. * a value suitable for the worst-case propagation delay of any peer
  5057. * within that pdev.
  5058. * Units are microseconds.
  5059. */
  5060. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  5061. /**
  5062. * Host can enable/disable ANT DIV feature
  5063. * if it's been enabled in BDF
  5064. */
  5065. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  5066. /** Host can force one chain to select a specific ANT */
  5067. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  5068. /**
  5069. * Start a cycle ANT self test periodically.
  5070. * In the test, the FW would select each ANT pair
  5071. * one by one, the cycle time could be configured
  5072. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  5073. */
  5074. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  5075. /**
  5076. * Configure the cycle time of ANT self test,
  5077. * the unit is micro second. Per the timer
  5078. * limitation, too small value could be not so
  5079. * accurate.
  5080. */
  5081. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  5082. /**
  5083. * wlan stats observation period, the unit is millisecond.
  5084. * The value of 0 is used to turn off periodic stats report.
  5085. */
  5086. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  5087. /**
  5088. * Set tx_ppdu_delay[] bin size to specify how many
  5089. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  5090. * histogram represents.
  5091. */
  5092. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  5093. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  5094. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  5095. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  5096. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  5097. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  5098. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  5099. /** Set TX delay value in TX sch module, unit is microseconds */
  5100. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  5101. /** Set RTS enable for SIFS bursting */
  5102. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  5103. /** Set Maximum number of MPDUs in an AMPDU*/
  5104. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  5105. /** Enable/disable peer stats info mechanism
  5106. * A zero value disables; a non-zero value enables.
  5107. */
  5108. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  5109. /** Configure Fast PWR Transition mode
  5110. * 0x0 -> inidcates Fast PWR transition disabled
  5111. * 0x1 -> indicates Static mode enabled
  5112. * 0x2 -> indicates Dynamic mode enabled
  5113. */
  5114. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  5115. /** Enable/disable radio channel stats mechanism
  5116. * A zero value disables; a non-zero value enables.
  5117. */
  5118. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  5119. /** Enable/disable radio diagnosis feature
  5120. * which allows retrieving the status of radio.
  5121. * A zero value disables; a non-zero value enables.
  5122. */
  5123. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  5124. /** Enable/Disable mesh mcast traffic
  5125. * 1 - Allow mesh mcast traffic
  5126. * 0 - Disallow mesh mcast traffic
  5127. */
  5128. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  5129. /** Enable/Disable smart chainmask scheme
  5130. * 1 - Enable smart chainmask scheme
  5131. * 0 - Disable smart chainmask scheme
  5132. */
  5133. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  5134. /** Enable/Disable alternate chainmask scheme
  5135. * 1 - Enable alternate chainmask scheme
  5136. * 0 - Disable alternate chainmask scheme
  5137. */
  5138. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  5139. /** User configured parameters for antenna diversity algorithm
  5140. * BIT[25..13]: Probe period (milliseconds units)
  5141. * BIT[12..0]: Stay period (milliseconds units)
  5142. */
  5143. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  5144. /** pdev packet power save levels,
  5145. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  5146. */
  5147. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  5148. /** Define IOT pattern to be enabled/disabled
  5149. * bit values: 0 - disable, 1 - enable
  5150. * BIT[0..31]: each bit represents an IOT pattern
  5151. * -----
  5152. * Bit 0 - avoid SMPS with certain APs
  5153. * Bits 31:1 - reserved
  5154. */
  5155. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  5156. /** ACK timeout - change wireless packet ack timeout configuration,
  5157. * units are microseconds
  5158. */
  5159. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  5160. /** Number of TX chains to use for a/b/g rates.
  5161. * bit 0~15 : 11b mode TX chain number.
  5162. * bit 16~31 : 11ag mode TX chain number.
  5163. */
  5164. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  5165. /** Enable/Disable cck txfir override
  5166. * bit 0 - enable (1) or disable (0) CCK tx FIR
  5167. * bits 31:1 - unused / reserved (set to 0)
  5168. */
  5169. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  5170. /** Enable/Disable DTIM Synth
  5171. * 1- Enable DTIM Synth
  5172. * 0- Disable DTIM Synth
  5173. */
  5174. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  5175. /** Configure auto detect power failure feature.
  5176. * 0 - FW will trigger crash if power failure happens.
  5177. * 1 - FW will send a failure notification to host, and the host
  5178. * framework determines how to respond to the power failure
  5179. * 2 - Silently rejuvenate if power failure occurs.
  5180. * 3 - Feature disabled.
  5181. */
  5182. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  5183. /** Configure operating voltage corner mode based on phymode and bw.
  5184. * bit 0-1 - operating voltage corner mode for 11a/b.
  5185. * bit 2-3 - operating voltage corner mode for 11g.
  5186. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  5187. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  5188. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  5189. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  5190. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  5191. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  5192. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  5193. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  5194. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  5195. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  5196. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  5197. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  5198. * ---------------------------------------------
  5199. * 00 - Static voltage corner SVS
  5200. * 01 - static voltage corner LOW SVS
  5201. * 10 - Dynamic voltage corner selection based on TPUT
  5202. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  5203. */
  5204. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  5205. /* Enable/Disable data stall detection */
  5206. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  5207. /* GCMP Support indication to FW */
  5208. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  5209. /** Enable/Disable chain selection optimization for one chain dtim
  5210. * non-zero - Enable optimization and use this non-zero value as the
  5211. * chain imbalance threshold for optimization to kick in
  5212. * (units = dB)
  5213. * 0- Disable optimization
  5214. */
  5215. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  5216. /*
  5217. * Override default FW behavior and explicitly enable / disable
  5218. * the use of CCK for PPDU transmissions.
  5219. *
  5220. * When CCK transmissions are disabled, the default OFDM legacy
  5221. * rate will be used instead.
  5222. */
  5223. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  5224. /*
  5225. * Set the user-specified antenna gain, but in 0.5 dB units.
  5226. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  5227. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  5228. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  5229. */
  5230. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  5231. /*
  5232. * Global Enable/Disable control for Secondary Retry Feature Set
  5233. *
  5234. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  5235. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  5236. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  5237. * Bit 3-5: "Xretry threshold" to use
  5238. */
  5239. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  5240. /** Set global uplink triggered PPDU duration limit (usec). */
  5241. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  5242. /** Set target buffer status report trigger interval (ms) */
  5243. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  5244. /** Use simplified equal RU allocation for DL and UL OFDMA */
  5245. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  5246. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  5247. * 0 - Don't allow quick FTDM Policy (Default)
  5248. * 1 - Allow quick FTDM policy.
  5249. */
  5250. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  5251. /** Set MWS-COEX 5G-NR power limit.
  5252. * 0: Don't apply user specific power limit,
  5253. * use internal power limit (Default)
  5254. * 1-2: invalid value (ignored)
  5255. * 3-21: apply the specified value as the external power limit, in dBm
  5256. * >21: invalid value (ignored)
  5257. */
  5258. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  5259. /** Set max msdus available for cong ctrl in target */
  5260. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  5261. /*
  5262. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  5263. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  5264. * Value 0: Disable this feature
  5265. * Non zero Value: Periodicity (seconds)
  5266. */
  5267. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  5268. /*
  5269. * Enable/Disable periodic peer CFR capture
  5270. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  5271. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  5272. */
  5273. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  5274. /*
  5275. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  5276. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  5277. * CFR measurment of other peers will be in multiples of this base timer.
  5278. * The unit is in milliseconds.
  5279. */
  5280. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  5281. /*
  5282. * Once the periodic capture is enabled using
  5283. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  5284. * the target. This parameter will ensure that the timer stops if there are
  5285. * no active peers in the capture list. Once the peers are added again to
  5286. * the capture list, the timer will not start again. The timer has to be
  5287. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  5288. * Value 1: Enable this feature
  5289. * Value 0: Disable this feature
  5290. */
  5291. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  5292. /*
  5293. * Configures a portion of the Estimated Service Params indication
  5294. * (802.11mc) settings, which together specify estimated throughput.
  5295. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  5296. * Value 0: Disable this feature
  5297. * Non zero Value: ESP BA WINDOW size
  5298. */
  5299. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  5300. /*
  5301. * Configures a portion of the Estimated Service Params indication
  5302. * (802.11mc) settings, which together specify estimated throughput.
  5303. * The accompanying A_UINT32 parameter is the air time fraction to be
  5304. * advertised in the ESP IE
  5305. * Value 0: Disable this feature
  5306. * Non zero Value: Air time fraction in percentage
  5307. */
  5308. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  5309. /*
  5310. * Configures a portion of the Estimated Service Params indication
  5311. * (802.11mc) settings, which together specify estimated throughput.
  5312. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  5313. * of milliseconds.
  5314. * Value 0: Disable this feature
  5315. * Non zero Value: PPDU duration in milliseconds
  5316. */
  5317. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  5318. /*
  5319. * Enable/Disable NOL(Non Occupancy list) in firmware
  5320. * 1- Use NOL in firmware
  5321. * 0- Don't use NOL in firmware
  5322. */
  5323. WMI_PDEV_PARAM_USE_NOL,
  5324. /*
  5325. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  5326. * trigger frames sent by AP
  5327. * 1 - Allow RU26
  5328. * 0 - Do not allow RU26
  5329. */
  5330. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  5331. /*
  5332. * Enable/Disable sub channel marking
  5333. * 1 - Enable sub channel marking
  5334. * 0 - Disable sub channel marking (default value)
  5335. */
  5336. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  5337. /*
  5338. * Enable/Disable/Set MGMT_TTL in milliseconds.
  5339. * non_zero - Enable, with the specified value
  5340. * 0 - Disable
  5341. */
  5342. WMI_PDEV_PARAM_SET_MGMT_TTL,
  5343. /*
  5344. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  5345. * non_zero - Enable, with the specified value
  5346. * 0 - Disable
  5347. */
  5348. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  5349. /*
  5350. * TBTT_CTRL_CFG
  5351. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  5352. * 0 - DEFAULT -> HW_TBTT
  5353. * 1 - SW_TBTT -> HW_TBTT disabled,
  5354. * software would truncate BURST near TBTT
  5355. * 2 - IGNORE_TBTT
  5356. *
  5357. * BITS 3 - 31 Reserved, must be set to 0x0
  5358. */
  5359. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  5360. /*
  5361. * BITS0 ~1 (refer to enum)
  5362. * 0 - default --> always update
  5363. * 1 - ignore to update
  5364. * 2 - update if larger than threshould
  5365. * 3 - update if less or equal than threshould
  5366. *
  5367. * BITS 2 ~ 31 Threshould
  5368. */
  5369. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  5370. /* Set global MU PPDU duration for DL (usec units) */
  5371. WMI_PDEV_PARAM_SET_MU_PPDU_DURATION,
  5372. /*
  5373. * Enable / disable test mode configuration.
  5374. * By default FW will always send triggers dynamically (mix of BSR/Basic).
  5375. * The below testmode are only used for certain tests.
  5376. * A value of 1 in a given bit enables corresponding test mode.
  5377. * bit | test mode
  5378. * ---------------
  5379. * 0 | FW only sends BSR triggers.
  5380. * 1 | FW only sends Basic triggers.
  5381. * 2 | If set, FW enables MU-RTS trigger.
  5382. * | If cleared, FW uses implementation-specific internal default setting.
  5383. * 3 | FW enables unicast embedded trigger in HE MU PPDU.
  5384. * 4-31| reserved.
  5385. */
  5386. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_TYPE_ENABLE,
  5387. /*
  5388. * Configure test command to set LSIG len.
  5389. * Value 0: Dynamic LSIG based on STA's qdepth.
  5390. * Non zero Value: LSIG length to be configured
  5391. * as part of trigger frame.
  5392. * bit |
  5393. * ---------------
  5394. * 0 - 30 | Bits storing the host supplied <value>.
  5395. * 31 | If set: The legitimate value closest to the value specified in
  5396. * | in bits 30:0 is directly set in UL len in trigger frame.
  5397. * | The FW performs calculations to determine which legitimate
  5398. * | value is closest to the specified value, if the specified
  5399. * | value is not already legitimate.
  5400. * | If not set: The value in lower bits is the duration (in ms),
  5401. * | from which the UL len is derived.
  5402. * | Example: if host sets 2000 (2ms), then UL Len in trigger
  5403. * | will be derived to accomodate the given duration.
  5404. */
  5405. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_LSIG_LEN,
  5406. /*
  5407. * Configure test cmd for fixed rate setting used for UL Trigger
  5408. * (only Basic/BSR triggers).
  5409. * The top nibble is used to select which format to use for encoding
  5410. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  5411. * format.
  5412. * If V == 0b0001: format is: 0x1000RRRR.
  5413. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  5414. *
  5415. */
  5416. WMI_PDEV_PARAM_SET_TEST_CMD_UL_TRIGGER_FIXED_RATE,
  5417. /*
  5418. * Configure test command to set the mac padding duration.
  5419. * 0 - FW set Mac Padding to 0us
  5420. * 1 - FW set Mac Padding to 8us
  5421. * 2 - FW set Mac Padding to 16us
  5422. */
  5423. WMI_PDEV_PARAM_SET_TEST_CMD_UL_MAC_PADDING,
  5424. /*
  5425. * Configure test command to set the fc duration in BSR trigger frame.
  5426. * value 0 - FW calulates the duration(default).
  5427. * Non zero Value: Duration to be configured.
  5428. */
  5429. WMI_PDEV_PARAM_SET_TEST_CMD_UL_BSR_FC_DURATION,
  5430. /* Parameter used for configuring TWT scheduling properties
  5431. * bit | config_mode
  5432. * -----------------
  5433. * 0 | Disables DL MU for TWT peers within TWT SP
  5434. * 1 | Disables UL MU for TWT peers within TWT SP
  5435. * 2 | Disables scheduling from WMM sched context for TWT peers
  5436. * 3 | If set, FW only sends Basic triggers in TWT SP.
  5437. * 4-31| reserved.
  5438. */
  5439. WMI_PDEV_PARAM_SET_TEST_CMD_TWT_SCHED_CONFIG,
  5440. /* Parameter used to configure OBSS Packet Detect threshold
  5441. * for Spatial Reuse feature.
  5442. * The accepted values are in between 0x00 and 0xFF, inclusive.
  5443. * The parameter value is programmed into the spatial reuse register,
  5444. * to specify how low the background signal strength from neighboring
  5445. * BSS cells must be, for this AP to employ spatial reuse.
  5446. *
  5447. * The value of the parameter is compared against the OBSS RSSI in dB.
  5448. * It is a 8-bit value whose
  5449. * range is -128 to 127 (after two's complement operation).
  5450. * For example, if the parameter value is 0xF5, the target will
  5451. * allow spatial reuse if the RSSI detected from other BSS
  5452. * is below -10 dB.
  5453. * Similarly, if the parameter value is 0x0A, the target will
  5454. * allow spatial reuse only if the RSSI detected from neighboring
  5455. * BSS cells is no more than 10 dB.
  5456. *
  5457. * bit | purpose
  5458. * -------------
  5459. * 0 - 7 | Param Value
  5460. * 8 - 30 | reserved
  5461. * 31 | Enable/Disable. If set to 0, ignore bits 0-7.
  5462. */
  5463. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD,
  5464. /* Parameter used for enabling/disabling non wlan coex from boot */
  5465. WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT,
  5466. /* Parameter used to configure OBSS Packet Detection per Access Category
  5467. * for Spatial Reuse feature.
  5468. * Based on the bits set, the corresponding Access Category Queues will have
  5469. * spatial reuse enabled / disabled.
  5470. * bit | AC
  5471. * -----------
  5472. * 0 | BK
  5473. * 1 | BE
  5474. * 2 | VI
  5475. * 3 | VO
  5476. * 4 - 31 | Reserved
  5477. */
  5478. WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC,
  5479. } WMI_PDEV_PARAM;
  5480. #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1)
  5481. #define WMI_PDEV_ONLY_BSR_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 1)
  5482. #define WMI_PDEV_ONLY_BSR_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 0, 1, 0)
  5483. #define WMI_PDEV_ONLY_BASIC_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 1, 1)
  5484. #define WMI_PDEV_ONLY_BASIC_TRIG_ENABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 1)
  5485. #define WMI_PDEV_ONLY_BASIC_TRIG_DISABLE(trig_type) WMI_SET_BITS(trig_type, 1, 1, 0)
  5486. #define WMI_PDEV_MU_RTS_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 2, 1)
  5487. #define WMI_PDEV_MU_RTS_ENABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 1)
  5488. #define WMI_PDEV_MU_RTS_DISABLE(trig_type) WMI_SET_BITS(trig_type, 2, 1, 0)
  5489. #define WMI_PDEV_EMBEDDED_TRIGGER_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 3, 1)
  5490. #define WMI_PDEV_EMBEDDED_TRIGGER_ENABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 1)
  5491. #define WMI_PDEV_EMBEDDED_TRIGGER_DISABLE(trig_type) WMI_SET_BITS(trig_type, 3, 1, 0)
  5492. #define WMI_PDEV_TWT_SCHED_CFG_IS_DL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 0, 1)
  5493. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 1)
  5494. #define WMI_PDEV_TWT_SCHED_CFG_DL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 0, 1, 0)
  5495. #define WMI_PDEV_TWT_SCHED_CFG_IS_UL_MU_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 1, 1)
  5496. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 1)
  5497. #define WMI_PDEV_TWT_SCHED_CFG_UL_MU_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 1, 1, 0)
  5498. #define WMI_PDEV_TWT_SCHED_CFG_IS_WMM_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 2, 1)
  5499. #define WMI_PDEV_TWT_SCHED_CFG_WMM_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 1)
  5500. #define WMI_PDEV_TWT_SCHED_CFG_WMM_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 2, 1, 0)
  5501. #define WMI_PDEV_TWT_SCHED_CFG_IS_USE_ONLY_BASIC_TRIGGER_IS_ENABLED(twt_sched_cfg) WMI_GET_BITS(twt_sched_cfg, 3, 1)
  5502. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_ENABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 1)
  5503. #define WMI_PDEV_TWT_SCHED_CFG_USE_ONLY_BASIC_TRIGGER_DISABLE(twt_sched_cfg) WMI_SET_BITS(twt_sched_cfg, 3, 1, 0)
  5504. #define WMI_PDEV_LSIG_LEN_DURATION_ENABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 1)
  5505. #define WMI_PDEV_LSIG_LEN_DURATION_DISABLE(lsig_len) WMI_SET_BITS(lsig_len, 0, 31, 0)
  5506. #define WMI_PDEV_LSIG_LEN_DURATION_GET(lsig_len) WMI_GET_BITS(lsig_len, 0, 30)
  5507. #define WMI_PDEV_LSIG_LEN_DURATION_SET(lsig_len, value) WMI_SET_BITS(lsig_len, 0, 30, value)
  5508. typedef struct {
  5509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  5510. /** pdev_id for identifying the MAC
  5511. * See macros starting with WMI_PDEV_ID_ for values.
  5512. */
  5513. A_UINT32 pdev_id;
  5514. /** parameter id */
  5515. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  5516. /** parameter value */
  5517. A_UINT32 param_value;
  5518. } wmi_pdev_set_param_cmd_fixed_param;
  5519. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  5520. typedef enum {
  5521. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  5522. WMI_TBTT_CTRL_SW_TRUNCATE,
  5523. WMI_TBTT_CTRL_IGNORE_TBTT,
  5524. WMI_TBTT_CTRL_MAX = 0x7,
  5525. } WMI_TBTT_CTRL_CFG;
  5526. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  5527. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  5528. * bits 0~2 : TBTT_CTRL_CFG
  5529. * bits 3~31: Reserved (set to 0x0)
  5530. */
  5531. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  5532. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  5533. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  5534. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  5535. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  5536. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  5537. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  5538. * bit 0~15 : 11b mode TX chain number.
  5539. * bit 16~31: 11ag mode TX chain number.
  5540. */
  5541. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  5542. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  5543. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  5544. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  5545. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  5546. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  5547. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  5548. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  5549. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  5550. typedef enum {
  5551. WMI_CTS_CBW_INVALID = 0,
  5552. WMI_CTS_CBW_20,
  5553. WMI_CTS_CBW_40,
  5554. WMI_CTS_CBW_80,
  5555. WMI_CTS_CBW_80_80,
  5556. WMI_CTS_CBW_160,
  5557. } WMI_CTS_CBW;
  5558. typedef struct {
  5559. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  5560. /** pdev_id for identifying the MAC
  5561. * See macros starting with WMI_PDEV_ID_ for values.
  5562. */
  5563. A_UINT32 pdev_id;
  5564. /** parameter */
  5565. A_UINT32 param;
  5566. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  5567. typedef struct {
  5568. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  5569. /** pdev_id for identifying the MAC */
  5570. A_UINT32 pdev_id;
  5571. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  5572. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  5573. /** index of the last-used antenna for each chain */
  5574. A_UINT32 ant_id[WMI_MAX_CHAINS];
  5575. /** mac address of diversity peer */
  5576. wmi_mac_addr macaddr;
  5577. } wmi_pdev_div_get_rssi_antid_fixed_param;
  5578. typedef struct {
  5579. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  5580. A_UINT32 param; /* 1 = read only, 2= read and clear */
  5581. } wmi_pdev_bss_chan_info_request_fixed_param;
  5582. typedef struct {
  5583. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  5584. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  5585. A_UINT32 len; /* the number of ctltable bytes in current payload */
  5586. A_UINT32 seq; /* the number of current transfers */
  5587. /*
  5588. * This TLV is followed by the following additional TLVs:
  5589. * ARRAY_BYTE TLV of ctltable_data
  5590. */
  5591. } wmi_pdev_update_ctltable_request_fixed_param;
  5592. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  5593. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  5594. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  5595. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  5596. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  5597. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  5598. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  5599. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  5600. typedef struct {
  5601. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  5602. /** pdev_id for identifying the MAC
  5603. * See macros starting with WMI_PDEV_ID_ for values.
  5604. * In non-DBDC case host should set it to 0
  5605. */
  5606. A_UINT32 pdev_id;
  5607. /*
  5608. * Percentage of air time available for each AC
  5609. * BIT[0-7] : AC_BE
  5610. * BIT[8-15] : AC_BK
  5611. * BIT[16-23] : AC_VI
  5612. * BIT[24-31] : AC_VO
  5613. */
  5614. A_UINT32 ac_airtime_percentage;
  5615. } wmi_esp_estimate_event_fixed_param;
  5616. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  5617. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  5618. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  5619. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5620. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  5621. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5622. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  5623. do { \
  5624. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5625. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  5626. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5627. } while (0)
  5628. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  5629. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5630. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  5631. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5632. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  5633. do { \
  5634. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5635. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  5636. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5637. } while (0)
  5638. typedef struct {
  5639. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  5640. union {
  5641. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  5642. /** pdev_id for identifying the MAC
  5643. * See macros starting with WMI_PDEV_ID_ for values.
  5644. */
  5645. A_UINT32 pdev_id;
  5646. };
  5647. /**
  5648. * The following "value" field is divided into bit fields as follows:
  5649. * bits | purpose
  5650. * -----+---------------------------------------
  5651. * 0 | enable/disable FAST diversity
  5652. * 1 | enable/disable SLOW diversity
  5653. * 5:2 | chain0 slow-diversity weighting factor
  5654. * 9:6 | chain1 slow-diversity weighting factor
  5655. * 31:10| currenty unused (set to 0x0)
  5656. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  5657. */
  5658. A_UINT32 value;
  5659. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  5660. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  5661. typedef struct {
  5662. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  5663. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  5664. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  5665. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  5666. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  5667. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  5668. 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] */
  5669. 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] */
  5670. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  5671. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  5672. } wmi_rssi_breach_monitor_config_fixed_param;
  5673. typedef struct {
  5674. /** parameter */
  5675. A_UINT32 param;
  5676. } wmi_pdev_dump_cmd;
  5677. typedef enum {
  5678. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  5679. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  5680. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  5681. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5682. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5683. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  5684. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  5685. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  5686. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  5687. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  5688. } wmi_tx_pause_type;
  5689. typedef enum {
  5690. ACTION_PAUSE = 0x0,
  5691. ACTION_UNPAUSE = 0x1,
  5692. } wmi_tx_pause_action;
  5693. typedef struct {
  5694. A_UINT32 tlv_header;
  5695. A_UINT32 pause_type;
  5696. A_UINT32 action;
  5697. A_UINT32 vdev_map;
  5698. A_UINT32 peer_id;
  5699. A_UINT32 tid_map;
  5700. } wmi_tx_pause_event_fixed_param;
  5701. typedef enum {
  5702. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  5703. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  5704. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  5705. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  5706. WMI_MGMT_TX_COMP_TYPE_MAX,
  5707. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  5708. typedef struct {
  5709. A_UINT32 tlv_header;
  5710. A_UINT32 desc_id; /* from tx_send_cmd */
  5711. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  5712. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5713. * See macros starting with WMI_PDEV_ID_ for values.
  5714. */
  5715. A_UINT32 pdev_id;
  5716. /* ppdu_id
  5717. * Hardware PPDU ID for tracking the completion stats
  5718. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5719. */
  5720. A_UINT32 ppdu_id;
  5721. /* ack_rssi
  5722. * TX mgmt ack RSSI report to host.
  5723. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  5724. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  5725. * the noise floor.
  5726. */
  5727. A_UINT32 ack_rssi;
  5728. } wmi_mgmt_tx_compl_event_fixed_param;
  5729. typedef struct {
  5730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  5731. A_UINT32 desc_id; /* from tx_send_cmd */
  5732. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  5733. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5734. * See macros starting with WMI_PDEV_ID_ for values.
  5735. */
  5736. A_UINT32 pdev_id;
  5737. /* ppdu_id
  5738. * Hardware PPDU ID for tracking the completion stats
  5739. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5740. */
  5741. A_UINT32 ppdu_id;
  5742. } wmi_offchan_data_tx_compl_event_fixed_param;
  5743. typedef struct {
  5744. A_UINT32 tlv_header;
  5745. A_UINT32 num_reports;
  5746. /* tlv for completion
  5747. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  5748. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  5749. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  5750. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  5751. * RSSI units = dB w.r.t. noise floor
  5752. */
  5753. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  5754. #define WMI_TPC_RATE_MAX 160
  5755. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5756. #define WMI_TPC_TX_NUM_CHAIN 4
  5757. typedef enum {
  5758. /* bits 0-7 for table flags */
  5759. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  5760. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  5761. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  5762. /* bits 8-11 for interface version flags */
  5763. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  5764. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  5765. } WMI_TPC_CONFIG_EVENT_FLAG;
  5766. typedef struct {
  5767. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  5768. A_UINT32 regDomain;
  5769. A_UINT32 chanFreq;
  5770. A_UINT32 phyMode;
  5771. A_UINT32 twiceAntennaReduction;
  5772. A_UINT32 twiceMaxRDPower;
  5773. A_INT32 twiceAntennaGain;
  5774. A_UINT32 powerLimit;
  5775. A_UINT32 rateMax;
  5776. A_UINT32 numTxChain;
  5777. A_UINT32 ctl;
  5778. A_UINT32 flags;
  5779. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5780. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  5781. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5782. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5783. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5784. /** pdev_id for identifying the MAC
  5785. * See macros starting with WMI_PDEV_ID_ for values.
  5786. */
  5787. A_UINT32 pdev_id;
  5788. /* This TLV is followed by further TLVs:
  5789. * 1. byte array:
  5790. * A_UINT8 ratesArray[];
  5791. * 2a. multi-dimensional array dimension spec:
  5792. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  5793. *
  5794. * 2b. ctl power table
  5795. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  5796. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  5797. * bf is [0 or 1] for [on or off].
  5798. * For 2G, modes is [0, 1, 2, or 3] for
  5799. * [cck, legacy, (v)ht20, or (v)ht40]
  5800. * For 5G, modes is [0, 1, 2, or 3] for
  5801. * [legacy, (v)ht20, (v)ht40, or vht80]
  5802. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  5803. */
  5804. } wmi_pdev_tpc_config_event_fixed_param;
  5805. typedef struct {
  5806. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  5807. A_UINT32 tlv_header;
  5808. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  5809. A_UINT32 num_chains_valid;
  5810. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  5811. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  5812. /** index of the last-used antenna for each chain */
  5813. A_UINT32 ant_id[WMI_MAX_CHAINS];
  5814. /** mac address of diversity peer */
  5815. wmi_mac_addr macaddr;
  5816. /* EVM value for stream0 and stream1 20Mhz, dB units */
  5817. A_INT32 chain_evm[WMI_MAX_CHAINS];
  5818. } wmi_pdev_div_rssi_antid_event_fixed_param;
  5819. typedef struct {
  5820. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  5821. A_UINT32 freq; /* Units in MHz */
  5822. A_INT32 noise_floor; /* units are dBm */
  5823. /* rx clear - how often the channel was unused */
  5824. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  5825. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  5826. /* cycle count - elapsed time during the measured period, in clock ticks */
  5827. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  5828. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  5829. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  5830. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  5831. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  5832. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  5833. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  5834. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  5835. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  5836. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  5837. } wmi_pdev_bss_chan_info_event_fixed_param;
  5838. typedef struct {
  5839. /* WMI event response update ctltable request to host */
  5840. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  5841. A_UINT32 total_len; /* the total number of bytes to be transferred */
  5842. A_UINT32 len; /* the number of FW received bytes from host */
  5843. A_UINT32 seq; /* the number of current transfers */
  5844. } wmi_pdev_update_ctltable_event_fixed_param;
  5845. typedef struct {
  5846. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  5847. A_UINT32 periodCnt;
  5848. A_UINT32 L1Cnt;
  5849. A_UINT32 L11Cnt;
  5850. A_UINT32 L12Cnt;
  5851. A_UINT32 L1Entry;
  5852. A_UINT32 L11Entry;
  5853. A_UINT32 L12Entry;
  5854. /** pdev_id for identifying the MAC
  5855. * See macros starting with WMI_PDEV_ID_ for values.
  5856. */
  5857. A_UINT32 pdev_id;
  5858. } wmi_pdev_l1ss_track_event_fixed_param;
  5859. typedef struct {
  5860. A_UINT32 len;
  5861. A_UINT32 msgref;
  5862. A_UINT32 segmentInfo;
  5863. } wmi_pdev_seg_hdr_info;
  5864. /*
  5865. * Transmit power scale factor.
  5866. *
  5867. */
  5868. typedef enum {
  5869. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  5870. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  5871. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  5872. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  5873. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  5874. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  5875. } WMI_TP_SCALE;
  5876. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  5877. typedef struct {
  5878. /** message buffer, NULL terminated */
  5879. char bufp[WMI_MAX_DEBUG_MESG];
  5880. } wmi_debug_mesg_event;
  5881. enum {
  5882. /** P2P device */
  5883. VDEV_SUBTYPE_P2PDEV = 0,
  5884. /** P2P client */
  5885. VDEV_SUBTYPE_P2PCLI,
  5886. /** P2P GO */
  5887. VDEV_SUBTYPE_P2PGO,
  5888. /** BT3.0 HS */
  5889. VDEV_SUBTYPE_BT,
  5890. };
  5891. typedef struct {
  5892. /** idnore power , only use flags , mode and freq */
  5893. wmi_channel chan;
  5894. } wmi_pdev_set_channel_cmd;
  5895. typedef enum {
  5896. WMI_PKTLOG_EVENT_RX = 0x1,
  5897. WMI_PKTLOG_EVENT_TX = 0x2,
  5898. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  5899. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  5900. /* 0x10 used by deprecated DBG_PRINT */
  5901. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  5902. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  5903. } WMI_PKTLOG_EVENT;
  5904. typedef enum {
  5905. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  5906. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  5907. } WMI_PKTLOG_ENABLE;
  5908. typedef enum {
  5909. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  5910. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  5911. } WMI_PKTLOG_FILTER_TYPE;
  5912. typedef struct {
  5913. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  5914. /** pdev_id for identifying the MAC
  5915. * See macros starting with WMI_PDEV_ID_ for values.
  5916. */
  5917. A_UINT32 pdev_id;
  5918. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  5919. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  5920. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  5921. typedef struct {
  5922. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  5923. /** pdev_id for identifying the MAC
  5924. * See macros starting with WMI_PDEV_ID_ for values.
  5925. */
  5926. A_UINT32 pdev_id;
  5927. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  5928. typedef struct {
  5929. /** TLV tag and len; tag equals
  5930. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  5931. A_UINT32 tlv_header;
  5932. /** mac addr of the peer to be filtered */
  5933. wmi_mac_addr peer_mac_address;
  5934. } wmi_pdev_pktlog_filter_info;
  5935. typedef struct {
  5936. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  5937. /** pdev_id for identifying the MAC
  5938. * See macros starting with WMI_PDEV_ID_ for values.
  5939. */
  5940. A_UINT32 pdev_id;
  5941. /** 0 - disable filtering, 1 - enable filtering */
  5942. A_UINT32 enable;
  5943. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  5944. A_UINT32 num_of_mac_addresses;
  5945. /* This TLV is followed by another TLV of array of structs
  5946. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  5947. */
  5948. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  5949. typedef enum {
  5950. WMI_ROGUE_AP_ON_STA_PS = 1, /* rogue ap on sta ps module */
  5951. } WMI_ROGUE_AP_TYPE;
  5952. typedef struct {
  5953. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_fixed_param */
  5954. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  5955. * See macros starting with WMI_PDEV_ID_ for values.
  5956. */
  5957. A_UINT32 pdev_id;
  5958. /** rogue ap type, see WMI_ROGUE_AP_TYPE */
  5959. A_UINT32 type;
  5960. /** Enable detection of rogue ap in the ps module
  5961. *
  5962. * 0 -> disabled
  5963. * 1 -> enabled (default)
  5964. */
  5965. A_UINT32 sta_ps_detection_enabled;
  5966. /* This TLV is followed by rap_param for each rogue ap:
  5967. * wmi_pdev_set_rap_config_on_sta_ps_tlv_param rap_param[];
  5968. */
  5969. } wmi_pdev_set_rap_config_fixed_param;
  5970. typedef struct {
  5971. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rap_config_on_sta_ps_tlv_param */
  5972. /** bssid of rogue ap */
  5973. wmi_mac_addr bssid;
  5974. } wmi_pdev_set_rap_config_on_sta_ps_tlv_param;
  5975. typedef struct {
  5976. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  5977. /** pdev_id for identifying the MAC
  5978. * See macros starting with WMI_PDEV_ID_ for values.
  5979. */
  5980. A_UINT32 pdev_id;
  5981. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  5982. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  5983. } wmi_mib_stats_enable_cmd_fixed_param;
  5984. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  5985. * NOTE: This constant cannot be changed without breaking
  5986. * WMI Compatibility. */
  5987. #define WMI_DSCP_MAP_MAX (64)
  5988. /*
  5989. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  5990. * @details
  5991. * Create an API for sending the custom DSCP-to-TID map to the target
  5992. * If this is a request from the user space or from above the UMAC
  5993. * then the best place to implement this is in the umac_if_offload of the OL path.
  5994. * Provide a place holder for this API in the ieee80211com (ic).
  5995. *
  5996. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  5997. * in the target should be directed to the function pointer in the ic.
  5998. *
  5999. * Implementation details of the API to send the map to the target are as described-
  6000. *
  6001. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  6002. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  6003. * 64 TID values for 2^6 (64) DSCP ids.
  6004. * Example:
  6005. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  6006. * 0, 0, 0, 0, 0, 0, 0, 0,
  6007. * 1, 1, 1, 1, 1, 1, 1, 1,
  6008. * 2, 2, 2, 2, 2, 2, 2, 2,
  6009. * 3, 3, 3, 3, 3, 3, 3, 3,
  6010. * 4, 4, 4, 4, 4, 4, 4, 4,
  6011. * 5, 5, 5, 5, 5, 5, 5, 5,
  6012. * 6, 6, 6, 6, 6, 6, 6, 6,
  6013. * 7, 7, 7, 7, 7, 7, 7, 7,
  6014. * };
  6015. *
  6016. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  6017. *
  6018. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  6019. *
  6020. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  6021. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  6022. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  6023. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  6024. *
  6025. */
  6026. /* DEPRECATED - use VDEV level command instead
  6027. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  6028. */
  6029. typedef struct {
  6030. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  6031. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  6032. /* map indicating DSCP to TID conversion */
  6033. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  6034. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  6035. typedef struct {
  6036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  6037. A_UINT32 vdev_id;
  6038. /** map indicating DSCP to TID conversion */
  6039. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  6040. A_UINT32 enable_override;
  6041. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  6042. enum WMI_WAKE_GPIO_TYPE {
  6043. WMI_WAKE_GPIO_LOW = 1,
  6044. WMI_WAKE_GPIO_HIGH = 2,
  6045. WMI_WAKE_GPIO_RISING_EDGE = 3,
  6046. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  6047. };
  6048. /**
  6049. * Set GPIO numbers used to wakeup host and wakeup target.
  6050. */
  6051. typedef struct {
  6052. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  6053. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  6054. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  6055. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  6056. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  6057. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  6058. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  6059. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  6060. * @details
  6061. * Create an API for setting the custom rate for the MCAST and BCAST frames
  6062. * in the target. If this is a request from the user space or from above the UMAC
  6063. * then the best place to implement this is in the umac_if_offload of the OL path.
  6064. * Provide a place holder for this API in the ieee80211com (ic).
  6065. *
  6066. * Implementation details of the API to set custom rates for MCAST and BCAST in
  6067. * the target are as described-
  6068. *
  6069. * 1. The function will have 3 arguments-
  6070. * vap structure,
  6071. * MCAST/ BCAST identifier code,
  6072. * 8 bit rate code
  6073. *
  6074. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  6075. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  6076. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  6077. * b'3-b'0 indicate the rate, which is indicated as follows:
  6078. * OFDM : 0: OFDM 48 Mbps
  6079. * 1: OFDM 24 Mbps
  6080. * 2: OFDM 12 Mbps
  6081. * 3: OFDM 6 Mbps
  6082. * 4: OFDM 54 Mbps
  6083. * 5: OFDM 36 Mbps
  6084. * 6: OFDM 18 Mbps
  6085. * 7: OFDM 9 Mbps
  6086. * CCK (pream == 1)
  6087. * 0: CCK 11 Mbps Long
  6088. * 1: CCK 5.5 Mbps Long
  6089. * 2: CCK 2 Mbps Long
  6090. * 3: CCK 1 Mbps Long
  6091. * 4: CCK 11 Mbps Short
  6092. * 5: CCK 5.5 Mbps Short
  6093. * 6: CCK 2 Mbps Short
  6094. * HT/VHT (pream == 2/3)
  6095. * 0..7: MCS0..MCS7 (HT)
  6096. * 0..9: MCS0..MCS9 (VHT)
  6097. *
  6098. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  6099. * to the target.
  6100. * Arguments to the API are-
  6101. * wmi handle,
  6102. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  6103. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  6104. * rate value.
  6105. */
  6106. typedef enum {
  6107. WMI_SET_MCAST_RATE,
  6108. WMI_SET_BCAST_RATE
  6109. } MCAST_BCAST_RATE_ID;
  6110. typedef struct {
  6111. MCAST_BCAST_RATE_ID rate_id;
  6112. A_UINT32 rate;
  6113. } mcast_bcast_rate;
  6114. typedef struct {
  6115. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  6116. A_UINT32 cwmin;
  6117. A_UINT32 cwmax;
  6118. A_UINT32 aifs;
  6119. A_UINT32 txoplimit;
  6120. A_UINT32 acm;
  6121. A_UINT32 no_ack;
  6122. } wmi_wmm_params;
  6123. /* DEPRECATED - use VDEV level command instead
  6124. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  6125. */
  6126. typedef struct {
  6127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  6128. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  6129. A_UINT32 dg_type;
  6130. /* The TLVs for the 4 AC follows:
  6131. * wmi_wmm_params wmm_params_ac_be;
  6132. * wmi_wmm_params wmm_params_ac_bk;
  6133. * wmi_wmm_params wmm_params_ac_vi;
  6134. * wmi_wmm_params wmm_params_ac_vo;
  6135. */
  6136. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  6137. typedef enum {
  6138. WMI_REQUEST_PEER_STAT = 0x0001,
  6139. WMI_REQUEST_AP_STAT = 0x0002,
  6140. WMI_REQUEST_PDEV_STAT = 0x0004,
  6141. WMI_REQUEST_VDEV_STAT = 0x0008,
  6142. WMI_REQUEST_BCNFLT_STAT = 0x0010,
  6143. WMI_REQUEST_VDEV_RATE_STAT = 0x0020,
  6144. WMI_REQUEST_INST_STAT = 0x0040,
  6145. WMI_REQUEST_MIB_STAT = 0x0080,
  6146. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x0100,
  6147. WMI_REQUEST_CONGESTION_STAT = 0x0200,
  6148. WMI_REQUEST_PEER_EXTD_STAT = 0x0400,
  6149. WMI_REQUEST_BCN_STAT = 0x0800,
  6150. WMI_REQUEST_BCN_STAT_RESET = 0x1000,
  6151. WMI_REQUEST_PEER_EXTD2_STAT = 0x2000,
  6152. WMI_REQUEST_MIB_EXTD_STAT = 0x4000,
  6153. } wmi_stats_id;
  6154. /*
  6155. * cfg_retry_count is set to max number of times the AP should try sending
  6156. * QoS Null frames to the STA for measuring the instantaneous RSSI
  6157. *
  6158. * retry_count is used to maintain the number of times the AP has tried sending
  6159. * QoS Null frames to the STA for measuring the instantaneous RSSI
  6160. */
  6161. typedef struct {
  6162. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  6163. A_UINT32 cfg_retry_count;
  6164. A_UINT32 retry_count;
  6165. } wmi_inst_rssi_stats_params;
  6166. typedef struct {
  6167. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  6168. wmi_stats_id stats_id;
  6169. /** unique id identifying the VDEV, generated by the caller */
  6170. A_UINT32 vdev_id;
  6171. /** peer MAC address */
  6172. wmi_mac_addr peer_macaddr;
  6173. 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. */
  6174. /*
  6175. * This TLV is (optionally) followed by other TLVs:
  6176. * wmi_inst_rssi_stats_params inst_rssi_params;
  6177. */
  6178. } wmi_request_stats_cmd_fixed_param;
  6179. /* stats type bitmap */
  6180. #define WMI_LINK_STATS_RADIO 0x00000001
  6181. #define WMI_LINK_STATS_IFACE 0x00000002
  6182. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  6183. #define WMI_LINK_STATS_PER_PEER 0x00000008
  6184. /* wifi clear statistics bitmap */
  6185. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  6186. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  6187. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  6188. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  6189. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  6190. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  6191. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  6192. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  6193. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  6194. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  6195. /** Default value for stats if the stats collection has not started */
  6196. #define WMI_STATS_VALUE_INVALID 0xffffffff
  6197. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  6198. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  6199. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  6200. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  6201. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  6202. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  6203. typedef struct {
  6204. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  6205. A_UINT32 num_of_diag_events_logs;
  6206. /* The TLVs will follow.
  6207. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  6208. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  6209. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  6210. */
  6211. } wmi_diag_event_log_config_fixed_param;
  6212. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  6213. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  6214. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  6215. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  6216. typedef struct {
  6217. A_UINT32 tlv_header;
  6218. A_UINT32 num_of_diag_events_logs;
  6219. /* The TLVs will follow.
  6220. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  6221. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  6222. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  6223. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  6224. */
  6225. } wmi_diag_event_log_supported_event_fixed_params;
  6226. typedef struct {
  6227. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  6228. A_UINT32 reserved0; /** placeholder for future */
  6229. } wmi_debug_mesg_flush_fixed_param;
  6230. typedef struct {
  6231. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  6232. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  6233. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  6234. /** reason_code1:
  6235. * The information stored in reason_code1 varies based on the data stally
  6236. * type values:
  6237. * data_stall_type | reason_code1
  6238. * -----------------------------------------------------
  6239. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  6240. * RX_REFILL_FAILED | ring_id (0-7)
  6241. * RX_FCS_LEN_ERROR | exact error type
  6242. */
  6243. A_UINT32 reason_code1;
  6244. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  6245. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  6246. } wmi_debug_mesg_fw_data_stall_param;
  6247. typedef struct {
  6248. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  6249. A_UINT32 reserved0; /** placeholder for future */
  6250. } wmi_debug_mesg_flush_complete_fixed_param;
  6251. typedef struct {
  6252. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  6253. /* vdev_id, where RSSI breach event occurred */
  6254. A_UINT32 vdev_id;
  6255. /* request id */
  6256. A_UINT32 request_id;
  6257. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  6258. A_UINT32 event_bitmap;
  6259. /* rssi at the time of RSSI breach. Unit dBm */
  6260. A_UINT32 rssi;
  6261. /* bssid of the monitored AP's */
  6262. wmi_mac_addr bssid;
  6263. } wmi_rssi_breach_event_fixed_param;
  6264. typedef struct {
  6265. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  6266. /** unique id identifying the segment */
  6267. A_UINT32 seg_id;
  6268. /** Start address of the segment to be read */
  6269. A_UINT32 seg_start_addr_lo;
  6270. A_UINT32 seg_start_addr_hi;
  6271. /** Length of the segment to be read */
  6272. A_UINT32 seg_length;
  6273. /** Host bufeer address to which the segment will be read and dumped */
  6274. A_UINT32 dest_addr_lo;
  6275. A_UINT32 dest_addr_hi;
  6276. } wmi_fw_mem_dump;
  6277. /* Command to get firmware memory dump*/
  6278. typedef struct {
  6279. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  6280. /** unique id identifying the request */
  6281. A_UINT32 request_id;
  6282. /** number of memory dump segments */
  6283. A_UINT32 num_fw_mem_dump_segs;
  6284. /**
  6285. * This TLV is followed by another TLV
  6286. * wmi_fw_mem_dump fw_mem_dump[];
  6287. */
  6288. } wmi_get_fw_mem_dump_fixed_param;
  6289. /** Event to indicate the completion of fw mem dump */
  6290. typedef struct {
  6291. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  6292. /** unique id identifying the request, given in the request stats command */
  6293. A_UINT32 request_id;
  6294. /*In case of Firmware memory dump */
  6295. A_UINT32 fw_mem_dump_complete;
  6296. } wmi_update_fw_mem_dump_fixed_param;
  6297. typedef enum {
  6298. WMI_ROAMING_IDLE = 0,
  6299. WMI_ROAMING_ACTIVE = 1,
  6300. } wmi_roam_state;
  6301. /* access categories */
  6302. typedef enum {
  6303. WMI_AC_VO = 0,
  6304. WMI_AC_VI = 1,
  6305. WMI_AC_BE = 2,
  6306. WMI_AC_BK = 3,
  6307. WMI_AC_MAX = 4,
  6308. } wmi_traffic_ac;
  6309. typedef enum {
  6310. WMI_STA_STATS = 0,
  6311. WMI_SOFTAP_STATS = 1,
  6312. WMI_IBSS_STATS = 2,
  6313. WMI_P2P_CLIENT_STATS = 3,
  6314. WMI_P2P_GO_STATS = 4,
  6315. WMI_NAN_STATS = 5,
  6316. WMI_MESH_STATS = 6,
  6317. } wmi_link_iface_type;
  6318. /* channel operating width */
  6319. typedef enum {
  6320. WMI_CHAN_WIDTH_20 = 0,
  6321. WMI_CHAN_WIDTH_40 = 1,
  6322. WMI_CHAN_WIDTH_80 = 2,
  6323. WMI_CHAN_WIDTH_160 = 3,
  6324. WMI_CHAN_WIDTH_80P80 = 4,
  6325. WMI_CHAN_WIDTH_5 = 5,
  6326. WMI_CHAN_WIDTH_10 = 6,
  6327. WMI_CHAN_WIDTH_165 = 7,
  6328. } wmi_channel_width;
  6329. /*Clear stats*/
  6330. typedef struct {
  6331. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  6332. /** unique id identifying the VDEV, generated by the caller */
  6333. A_UINT32 vdev_id;
  6334. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  6335. A_UINT32 stop_stats_collection_req;
  6336. /** identifies what stats to be cleared */
  6337. A_UINT32 stats_clear_req_mask;
  6338. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  6339. wmi_mac_addr peer_macaddr;
  6340. } wmi_clear_link_stats_cmd_fixed_param;
  6341. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  6342. typedef struct {
  6343. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  6344. /** threshold to classify the pkts as short or long */
  6345. A_UINT32 mpdu_size_threshold;
  6346. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  6347. A_UINT32 aggressive_statistics_gathering;
  6348. } wmi_start_link_stats_cmd_fixed_param;
  6349. typedef struct {
  6350. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  6351. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  6352. A_UINT32 stats_type;
  6353. /** unique id identifying the VDEV, generated by the caller */
  6354. A_UINT32 vdev_id;
  6355. /** unique id identifying the request, generated by the caller */
  6356. A_UINT32 request_id;
  6357. /** peer MAC address */
  6358. wmi_mac_addr peer_macaddr;
  6359. } wmi_request_link_stats_cmd_fixed_param;
  6360. #define WLM_STATS_REQ_LINK 0x00000001
  6361. typedef struct {
  6362. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  6363. /** unique id identifying the VDEV, generated by the caller */
  6364. A_UINT32 vdev_id;
  6365. /** WLM event request bitmask
  6366. * Used by host to customize the wlm stats report.
  6367. * Filled with a combination of WLM_STATS_xxx values.
  6368. */
  6369. A_UINT32 request_bitmask;
  6370. } wmi_request_wlm_stats_cmd_fixed_param;
  6371. /* channel statistics */
  6372. typedef struct {
  6373. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  6374. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  6375. A_UINT32 channel_width;
  6376. /** Primary 20 MHz channel */
  6377. A_UINT32 center_freq;
  6378. /** center frequency (MHz) first segment */
  6379. A_UINT32 center_freq0;
  6380. /** center frequency (MHz) second segment */
  6381. A_UINT32 center_freq1;
  6382. /** msecs the radio is awake (32 bits number accruing over time) */
  6383. A_UINT32 radio_awake_time;
  6384. /** msecs the CCA register is busy (32 bits number accruing over time) */
  6385. A_UINT32 cca_busy_time;
  6386. } wmi_channel_stats;
  6387. /*
  6388. * Each step represents 0.5 dB. The starting value is 0 dBm.
  6389. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  6390. */
  6391. #define MAX_TPC_LEVELS 64
  6392. /* radio statistics */
  6393. typedef struct {
  6394. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  6395. /** Wifi radio (if multiple radio supported) */
  6396. A_UINT32 radio_id;
  6397. /** msecs the radio is awake (32 bits number accruing over time) */
  6398. A_UINT32 on_time;
  6399. /** msecs the radio is transmitting (32 bits number accruing over time) */
  6400. A_UINT32 tx_time;
  6401. /** msecs the radio is in active receive (32 bits number accruing over time) */
  6402. A_UINT32 rx_time;
  6403. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  6404. A_UINT32 on_time_scan;
  6405. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  6406. A_UINT32 on_time_nbd;
  6407. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  6408. A_UINT32 on_time_gscan;
  6409. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  6410. A_UINT32 on_time_roam_scan;
  6411. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  6412. A_UINT32 on_time_pno_scan;
  6413. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  6414. A_UINT32 on_time_hs20;
  6415. /** number of channels */
  6416. A_UINT32 num_channels;
  6417. /** tx time per TPC level - DEPRECATED
  6418. * This field is deprecated.
  6419. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  6420. */
  6421. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  6422. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  6423. A_UINT32 on_time_host_scan;
  6424. /** msecs the radio is awake due to LPI scan (accruing over time) */
  6425. A_UINT32 on_time_lpi_scan;
  6426. } wmi_radio_link_stats;
  6427. /** tx time per power level statistics */
  6428. typedef struct {
  6429. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  6430. /** total number of tx power levels */
  6431. A_UINT32 total_num_tx_power_levels;
  6432. /** number of tx power levels that are carried in this event */
  6433. A_UINT32 num_tx_power_levels;
  6434. /** offset of current stats
  6435. * If ((num_tx_power_levels + power_level_offset)) ==
  6436. * total_num_tx_power_levels)
  6437. * this message completes the report of tx time per power levels.
  6438. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  6439. * will be sent by the target to deliver the remainder of the tx time
  6440. * per power level stats.
  6441. */
  6442. A_UINT32 power_level_offset;
  6443. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  6444. A_UINT32 radio_id;
  6445. /*
  6446. * This TLV will be followed by a TLV containing a variable-length array of
  6447. * A_UINT32 with tx time per power level data
  6448. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  6449. * The tx time is in units of milliseconds.
  6450. * The power levels are board-specific values; a board-specific translation
  6451. * has to be applied to determine what actual power corresponds to each
  6452. * power level.
  6453. * Just as the host has a BDF file available, the host should also have
  6454. * a data file available that provides the power level to power translations.
  6455. */
  6456. } wmi_tx_power_level_stats_evt_fixed_param;
  6457. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  6458. typedef struct {
  6459. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  6460. /** unique id identifying the request, given in the request stats command */
  6461. A_UINT32 request_id;
  6462. /** Number of radios*/
  6463. A_UINT32 num_radio;
  6464. /** more_data will be set depending on the number of radios */
  6465. A_UINT32 more_radio_events;
  6466. /*
  6467. * This TLV is followed by another TLV of array of bytes
  6468. * size of(struct wmi_radio_link_stats);
  6469. *
  6470. * This TLV is followed by another TLV of array of bytes
  6471. * num_channels * size of(struct wmi_channel_stats)
  6472. */
  6473. } wmi_radio_link_stats_event_fixed_param;
  6474. /* per rate statistics */
  6475. typedef struct {
  6476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  6477. /** rate information
  6478. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  6479. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  6480. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  6481. * b'3-b'0 indicate the rate, which is indicated as follows:
  6482. * OFDM : 0: OFDM 48 Mbps
  6483. * 1: OFDM 24 Mbps
  6484. * 2: OFDM 12 Mbps
  6485. * 3: OFDM 6 Mbps
  6486. * 4: OFDM 54 Mbps
  6487. * 5: OFDM 36 Mbps
  6488. * 6: OFDM 18 Mbps
  6489. * 7: OFDM 9 Mbps
  6490. * CCK (pream == 1)
  6491. * 0: CCK 11 Mbps Long
  6492. * 1: CCK 5.5 Mbps Long
  6493. * 2: CCK 2 Mbps Long
  6494. * 3: CCK 1 Mbps Long
  6495. * 4: CCK 11 Mbps Short
  6496. * 5: CCK 5.5 Mbps Short
  6497. * 6: CCK 2 Mbps Short
  6498. * HT/VHT (pream == 2/3)
  6499. * 0..7: MCS0..MCS7 (HT)
  6500. * 0..9: MCS0..MCS9 (VHT)
  6501. */
  6502. A_UINT32 rate;
  6503. /** units of 100 Kbps */
  6504. A_UINT32 bitrate;
  6505. /** number of successfully transmitted data pkts (ACK rcvd) */
  6506. A_UINT32 tx_mpdu;
  6507. /** number of received data pkts */
  6508. A_UINT32 rx_mpdu;
  6509. /** number of data packet losses (no ACK) */
  6510. A_UINT32 mpdu_lost;
  6511. /** total number of data pkt retries */
  6512. A_UINT32 retries;
  6513. /** number of short data pkt retries */
  6514. A_UINT32 retries_short;
  6515. /** number of long data pkt retries */
  6516. A_UINT32 retries_long;
  6517. } wmi_rate_stats;
  6518. typedef struct {
  6519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  6520. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  6521. A_UINT32 peer_type;
  6522. /** mac address */
  6523. wmi_mac_addr peer_mac_address;
  6524. /** peer wmi_CAPABILITY_XXX */
  6525. A_UINT32 capabilities;
  6526. /** number of rates */
  6527. A_UINT32 num_rates;
  6528. } wmi_peer_link_stats;
  6529. /** PEER statistics (once started) reset and start afresh after each connection */
  6530. typedef struct {
  6531. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  6532. /** unique id identifying the request, given in the request stats command */
  6533. A_UINT32 request_id;
  6534. /** number of peers accomidated in this particular event */
  6535. A_UINT32 num_peers;
  6536. /** Indicates the fragment number */
  6537. A_UINT32 peer_event_number;
  6538. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  6539. A_UINT32 more_data;
  6540. /**
  6541. * This TLV is followed by another TLV
  6542. * num_peers * size of(struct wmi_peer_stats)
  6543. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  6544. */
  6545. } wmi_peer_stats_event_fixed_param;
  6546. /* per access category statistics */
  6547. typedef struct {
  6548. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  6549. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  6550. A_UINT32 ac_type;
  6551. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  6552. A_UINT32 tx_mpdu;
  6553. /** number of received unicast mpdus */
  6554. A_UINT32 rx_mpdu;
  6555. /** number of succesfully transmitted multicast data packets */
  6556. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  6557. A_UINT32 tx_mcast;
  6558. /** number of received multicast data packets */
  6559. A_UINT32 rx_mcast;
  6560. /** number of received unicast a-mpdus */
  6561. A_UINT32 rx_ampdu;
  6562. /** number of transmitted unicast a-mpdus */
  6563. A_UINT32 tx_ampdu;
  6564. /** number of data pkt losses (no ACK) */
  6565. A_UINT32 mpdu_lost;
  6566. /** total number of data pkt retries */
  6567. A_UINT32 retries;
  6568. /** number of short data pkt retries */
  6569. A_UINT32 retries_short;
  6570. /** number of long data pkt retries */
  6571. A_UINT32 retries_long;
  6572. /** data pkt min contention time (usecs) */
  6573. A_UINT32 contention_time_min;
  6574. /** data pkt max contention time (usecs) */
  6575. A_UINT32 contention_time_max;
  6576. /** data pkt avg contention time (usecs) */
  6577. A_UINT32 contention_time_avg;
  6578. /** num of data pkts used for contention statistics */
  6579. A_UINT32 contention_num_samples;
  6580. /** number of pending pkts */
  6581. A_UINT32 tx_pending_msdu;
  6582. } wmi_wmm_ac_stats;
  6583. /* interface statistics */
  6584. typedef struct {
  6585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  6586. /** access point beacon received count from connected AP */
  6587. A_UINT32 beacon_rx;
  6588. /** access point mgmt frames received count from connected AP (including Beacon) */
  6589. A_UINT32 mgmt_rx;
  6590. /** action frames received count */
  6591. A_UINT32 mgmt_action_rx;
  6592. /** action frames transmit count */
  6593. A_UINT32 mgmt_action_tx;
  6594. /** access Point Beacon and Management frames RSSI (averaged) */
  6595. A_UINT32 rssi_mgmt;
  6596. /** access Point Data Frames RSSI (averaged) from connected AP */
  6597. A_UINT32 rssi_data;
  6598. /** access Point ACK RSSI (averaged) from connected AP */
  6599. A_UINT32 rssi_ack;
  6600. /** number of peers */
  6601. A_UINT32 num_peers;
  6602. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  6603. A_UINT32 num_peer_events;
  6604. /** number of ac */
  6605. A_UINT32 num_ac;
  6606. /** Roaming Stat */
  6607. A_UINT32 roam_state;
  6608. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  6609. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  6610. A_UINT32 avg_bcn_spread_offset_high;
  6611. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  6612. A_UINT32 avg_bcn_spread_offset_low;
  6613. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  6614. A_UINT32 is_leaky_ap;
  6615. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  6616. A_UINT32 avg_rx_frms_leaked;
  6617. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  6618. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  6619. a data frame with PM bit set) */
  6620. A_UINT32 rx_leak_window;
  6621. A_UINT32 tx_rts_succ_cnt;
  6622. A_UINT32 tx_rts_fail_cnt;
  6623. A_UINT32 tx_ppdu_succ_cnt;
  6624. A_UINT32 tx_ppdu_fail_cnt;
  6625. /** msecs the interface is in Connected state (accruing over time) */
  6626. A_UINT32 connected_duration;
  6627. /** msecs the interface is in DisConnected state (accruing over time) */
  6628. A_UINT32 disconnected_duration;
  6629. /** msecs the interface is doing RTT ranging (accruing over time) */
  6630. A_UINT32 rtt_ranging_duration;
  6631. /** msecs the interface is in RTT responder mode (accruing over time) */
  6632. A_UINT32 rtt_responder_duration;
  6633. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  6634. A_UINT32 num_probes_tx;
  6635. /** Number of Beacon misses on this interface (accruing over time) */
  6636. A_UINT32 num_beacon_miss;
  6637. } wmi_iface_link_stats;
  6638. typedef enum {
  6639. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  6640. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  6641. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  6642. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  6643. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  6644. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  6645. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  6646. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  6647. /* Add New offload stat type here */
  6648. WMI_OFFLOAD_STATS_TYPE_MAX,
  6649. } wmi_offload_stats_type;
  6650. typedef struct {
  6651. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  6652. /** Type of offload stat. enum wmi_offload_stats_type **/
  6653. A_UINT32 type;
  6654. /** Number of (MSDUs) frames Received **/
  6655. A_UINT32 rx_count;
  6656. /** Number of frames Dropped **/
  6657. A_UINT32 drp_count;
  6658. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  6659. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  6660. A_UINT32 fwd_count;
  6661. } wmi_iface_offload_stats;
  6662. /** Interface statistics (once started) reset and start afresh after each connection */
  6663. typedef struct {
  6664. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  6665. /** unique id identifying the request, given in the request stats command */
  6666. A_UINT32 request_id;
  6667. /** unique id identifying the VDEV, generated by the caller */
  6668. A_UINT32 vdev_id;
  6669. /** Number of offload stats **/
  6670. A_UINT32 num_offload_stats;
  6671. /*
  6672. * This TLV is followed by other TLVs:
  6673. * wmi_iface_link_stats iface_link_stats;
  6674. * num_ac * size of(struct wmi_wmm_ac_stats)
  6675. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  6676. */
  6677. } wmi_iface_link_stats_event_fixed_param;
  6678. typedef struct {
  6679. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  6680. /** bitmask listing which WLM stats are provided.
  6681. * Copied from wlm_stats_cmd_fixed_param.
  6682. * (This field is provided for convenience rather than necessity, since
  6683. * the recipient can directly check which TLV arrays have non-zero length.)
  6684. */
  6685. A_UINT32 request_bitmask;
  6686. /** unique id identifying the VDEV, generated by the caller */
  6687. A_UINT32 vdev_id;
  6688. /**
  6689. * timestamp of event report, in microseconds units
  6690. * This timestamp is for debugging purposes only.
  6691. * It can be used to correlate this WLM stats event data with
  6692. * other WLM information uploaded through other means.
  6693. */
  6694. A_UINT32 timestamp;
  6695. /**
  6696. * Interval between two consecutive WLM stats query requests,
  6697. * in microseconds units.
  6698. * This interval is used for converting the scan_period and pwr_on_period
  6699. * values from within wmi_wlm_link_stats from percentage units to time
  6700. * units.
  6701. */
  6702. A_UINT32 req_interval;
  6703. /*
  6704. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  6705. */
  6706. } wmi_wlm_stats_event_fixed_param;
  6707. /** Suspend option */
  6708. enum {
  6709. WMI_PDEV_SUSPEND, /* suspend */
  6710. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  6711. };
  6712. typedef struct {
  6713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  6714. /* suspend option sent to target */
  6715. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6716. A_UINT32 suspend_opt;
  6717. } wmi_pdev_suspend_cmd_fixed_param;
  6718. typedef struct {
  6719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  6720. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6721. } wmi_pdev_resume_cmd_fixed_param;
  6722. typedef struct {
  6723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  6724. A_UINT32 num_vdev_stats; /* number of vdevs */
  6725. } wmi_vdev_rate_stats_event_fixed_param;
  6726. typedef struct {
  6727. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  6728. A_UINT32 vdevid; /* Id of the wlan vdev*/
  6729. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  6730. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  6731. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  6732. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  6733. } wmi_vdev_rate_ht_info;
  6734. typedef struct {
  6735. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  6736. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  6737. } wmi_rx_aggr_failure_event_fixed_param;
  6738. typedef struct {
  6739. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  6740. A_UINT32 start_seq; /* start sequence number of the hole */
  6741. A_UINT32 end_seq; /* end sequence number of the hole */
  6742. } wmi_rx_aggr_failure_info;
  6743. typedef struct {
  6744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  6745. /** unique id identifying the VDEV, generated by the caller */
  6746. A_UINT32 vdev_id;
  6747. /** peer MAC address */
  6748. wmi_mac_addr peer_macaddr;
  6749. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6750. } wmi_peer_tx_pn_request_cmd_fixed_param;
  6751. typedef struct {
  6752. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  6753. /** unique id identifying the VDEV, generated by the caller */
  6754. A_UINT32 vdev_id;
  6755. /** peer MAC address */
  6756. wmi_mac_addr peer_macaddr;
  6757. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6758. /** Packet Number
  6759. * The PN is provided in little endian order, with bits 7:0 of the PN
  6760. * residing in pn[0].
  6761. * The key_type indirectly specifies the packet number length, and thus
  6762. * how many bytes within pn[] are filled with valid data.
  6763. */
  6764. A_UINT8 pn[16];
  6765. } wmi_peer_tx_pn_response_event_fixed_param;
  6766. typedef struct {
  6767. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  6768. wmi_stats_id stats_id;
  6769. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  6770. A_UINT32 num_pdev_stats;
  6771. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  6772. A_UINT32 num_vdev_stats;
  6773. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  6774. A_UINT32 num_peer_stats;
  6775. A_UINT32 num_bcnflt_stats;
  6776. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  6777. A_UINT32 num_chan_stats;
  6778. /** number of MIB stats event structures (wmi_mib_stats) */
  6779. A_UINT32 num_mib_stats;
  6780. 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. */
  6781. /** number of beacon stats event structures (wmi_bcn_stats) */
  6782. A_UINT32 num_bcn_stats;
  6783. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  6784. A_UINT32 num_peer_extd_stats;
  6785. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  6786. A_UINT32 num_peer_extd2_stats;
  6787. /** last_event
  6788. * The most significant bit is set to 1 to indicate whether the last_event
  6789. * field contains valid data. The least significant bit is set to 1 to
  6790. * indicate this is the final WMI_STATS_EVENT in a series.
  6791. */
  6792. A_UINT32 last_event;
  6793. /** number of extended MIB stats event structures (wmi_mib_extd_stats) */
  6794. A_UINT32 num_mib_extd_stats;
  6795. /* This TLV is followed by another TLV of array of bytes
  6796. * A_UINT8 data[];
  6797. * This data array contains
  6798. * num_pdev_stats * size of(struct wmi_pdev_stats)
  6799. * num_vdev_stats * size of(struct wmi_vdev_stats)
  6800. * num_peer_stats * size of(struct wmi_peer_stats)
  6801. * num_bcnflt_stats * size_of()
  6802. * num_chan_stats * size of(struct wmi_chan_stats)
  6803. * num_mib_stats * size of(struct wmi_mib_stats)
  6804. * num_bcn_stats * size of(struct wmi_bcn_stats)
  6805. */
  6806. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  6807. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  6808. * following the information elements listed above.
  6809. */
  6810. /* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id,
  6811. * the data[] array also contains
  6812. * num_mib_extd_stats * size of(struct wmi_mib_extd_stats)
  6813. * following the information elements listed above.
  6814. */
  6815. } wmi_stats_event_fixed_param;
  6816. /* WLAN channel CCA stats bitmap */
  6817. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  6818. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  6819. #define WLAN_STATS_TX_TIME_SHIFT 1
  6820. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  6821. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  6822. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  6823. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  6824. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  6825. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  6826. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  6827. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  6828. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  6829. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  6830. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  6831. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  6832. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  6833. /* WLAN peer signal stats bitmap */
  6834. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  6835. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  6836. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  6837. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  6838. /* WLAN TX stats bitmap */
  6839. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  6840. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  6841. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  6842. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  6843. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  6844. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  6845. #define WLAN_STATS_TX_BYTES_SHIFT 3
  6846. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  6847. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  6848. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  6849. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  6850. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  6851. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  6852. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  6853. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  6854. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  6855. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  6856. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  6857. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  6858. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  6859. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  6860. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  6861. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  6862. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  6863. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  6864. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  6865. /* WLAN RX stats bitmap */
  6866. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  6867. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  6868. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  6869. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  6870. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  6871. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  6872. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  6873. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  6874. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  6875. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  6876. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  6877. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  6878. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  6879. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  6880. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  6881. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  6882. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  6883. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  6884. #define WLAN_STATS_RX_MCS_SHIFT 9
  6885. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  6886. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  6887. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  6888. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  6889. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  6890. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  6891. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  6892. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  6893. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  6894. typedef struct
  6895. {
  6896. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  6897. A_UINT32 vdev_id;
  6898. /** Percentage of idle time, no TX, no RX, no interference */
  6899. A_UINT32 idle_time;
  6900. /** Percentage of time transmitting packets */
  6901. A_UINT32 tx_time;
  6902. /** Percentage of time receiving packets in current BSSs */
  6903. A_UINT32 rx_in_bss_time;
  6904. /** Percentage of time receiving packets not in current BSSs */
  6905. A_UINT32 rx_out_bss_time;
  6906. /** Percentage of time interference detected. */
  6907. A_UINT32 rx_busy_time;
  6908. /** Percentage of time receiving packets with errors
  6909. * or packets flagged as retransmission or seqnum discontinued. */
  6910. A_UINT32 rx_in_bad_cond_time;
  6911. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  6912. A_UINT32 tx_in_bad_cond_time;
  6913. /** Percentage of time the chip is unable to work in normal conditions. */
  6914. A_UINT32 wlan_not_avail_time;
  6915. } wmi_chan_cca_stats;
  6916. /** Thresholds of cca stats, stands for percentages of stats variation.
  6917. * Check wmi_chan_cca_stats for each stats's meaning.
  6918. */
  6919. typedef struct
  6920. {
  6921. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  6922. A_UINT32 idle_time; /* units = percent */
  6923. A_UINT32 tx_time; /* units = percent */
  6924. A_UINT32 rx_in_bss_time; /* units = percent */
  6925. A_UINT32 rx_out_bss_time; /* units = percent */
  6926. A_UINT32 rx_busy_time; /* units = percent */
  6927. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  6928. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  6929. A_UINT32 wlan_not_avail_time; /* units = percent */
  6930. } wmi_chan_cca_stats_thresh;
  6931. typedef struct
  6932. {
  6933. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  6934. A_UINT32 vdev_id;
  6935. A_UINT32 peer_id;
  6936. /** per chain SNR in current bss, units are dB */
  6937. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  6938. /** per chain background noise, units are dBm */
  6939. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  6940. /** per antenna rx MPDUs */
  6941. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  6942. /** per antenna tx MPDUs */
  6943. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  6944. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  6945. A_UINT32 num_chains_valid;
  6946. } wmi_peer_signal_stats;
  6947. /** Thresholds of signal stats, stand for percentage of stats variation.
  6948. * Check wmi_peer_signal_stats for each stats's meaning.
  6949. */
  6950. typedef struct
  6951. {
  6952. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  6953. A_UINT32 per_chain_snr; /* units = dB */
  6954. A_UINT32 per_chain_nf; /* units = dBm */
  6955. } wmi_peer_signal_stats_thresh;
  6956. typedef struct
  6957. {
  6958. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  6959. /** Number of total TX MSDUs on MAC layer in the period */
  6960. A_UINT32 tx_msdu_cnt;
  6961. /** Number of total TX MPDUs on MAC layer in the period */
  6962. A_UINT32 tx_mpdu_cnt;
  6963. /** Number of total TX PPDUs on MAC layer in the period */
  6964. A_UINT32 tx_ppdu_cnt;
  6965. /** Bytes of tx data on MAC layer in the period */
  6966. A_UINT32 tx_bytes;
  6967. /** Number of TX MSDUs cancelled due to any reason in the period,
  6968. * such as WMM limitation/bandwidth limitation/radio congestion */
  6969. A_UINT32 tx_msdu_drop_cnt;
  6970. /** Bytes of dropped TX packets in the period */
  6971. A_UINT32 tx_drop_bytes;
  6972. /** Number of unacked transmissions of MPDUs */
  6973. A_UINT32 tx_mpdu_retry_cnt;
  6974. /** Number of MPDUs have not been ACKed despite retried */
  6975. A_UINT32 tx_mpdu_fail_cnt;
  6976. /** Number of PPDUs which received no block ack */
  6977. A_UINT32 tx_ppdu_fail_cnt;
  6978. /* This TLV is followed by TLVs below: :
  6979. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  6980. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  6981. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  6982. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  6983. */
  6984. } wmi_tx_stats;
  6985. /** Thresholds of tx stats, stand for percentage of stats variation.
  6986. * Check wmi_tx_stats for each stats's meaning.
  6987. */
  6988. typedef struct
  6989. {
  6990. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  6991. A_UINT32 tx_msdu_cnt;
  6992. A_UINT32 tx_mpdu_cnt;
  6993. A_UINT32 tx_ppdu_cnt;
  6994. A_UINT32 tx_bytes;
  6995. A_UINT32 tx_msdu_drop_cnt;
  6996. A_UINT32 tx_drop_bytes;
  6997. A_UINT32 tx_mpdu_retry_cnt;
  6998. A_UINT32 tx_mpdu_fail_cnt;
  6999. A_UINT32 tx_ppdu_fail_cnt;
  7000. A_UINT32 tx_mpdu_aggr;
  7001. A_UINT32 tx_succ_mcs;
  7002. A_UINT32 tx_fail_mcs;
  7003. A_UINT32 tx_ppdu_delay;
  7004. } wmi_tx_stats_thresh;
  7005. typedef struct
  7006. {
  7007. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  7008. A_UINT32 vdev_id;
  7009. A_UINT32 peer_id;
  7010. /* The TLVs for the 4 AC follows:
  7011. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  7012. */
  7013. } wmi_peer_ac_tx_stats;
  7014. typedef struct
  7015. {
  7016. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  7017. /** Number of RX MPDUs on MAC layer */
  7018. A_UINT32 mac_rx_mpdu_cnt;
  7019. /** Bytes of RX packets on MAC layer */
  7020. A_UINT32 mac_rx_bytes;
  7021. /** Number of RX PPDU on PHY layer */
  7022. A_UINT32 phy_rx_ppdu_cnt;
  7023. /** Bytes of RX packets on PHY layer */
  7024. A_UINT32 phy_rx_bytes;
  7025. /** Number of discontinuity in seqnum */
  7026. A_UINT32 rx_disorder_cnt;
  7027. /** Number of RX MPDUs flagged as retransmissions */
  7028. A_UINT32 rx_mpdu_retry_cnt;
  7029. /** Number of RX MPDUs identified as duplicates */
  7030. A_UINT32 rx_mpdu_dup_cnt;
  7031. /** Number of RX MPDUs discarded */
  7032. A_UINT32 rx_mpdu_discard_cnt;
  7033. /* This TLV is followed by TLVs below:
  7034. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  7035. * A_UINT32 rx_mcs[rx_mcs_array_len];
  7036. */
  7037. } wmi_rx_stats;
  7038. /** Thresholds of rx stats, stands for percentage of stats variation.
  7039. * Check wmi_rx_stats for each stats's meaning.
  7040. */
  7041. typedef struct
  7042. {
  7043. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  7044. A_UINT32 mac_rx_mpdu_cnt;
  7045. A_UINT32 mac_rx_bytes;
  7046. A_UINT32 phy_rx_ppdu_cnt;
  7047. A_UINT32 phy_rx_bytes;
  7048. A_UINT32 rx_disorder_cnt;
  7049. A_UINT32 rx_mpdu_retry_cnt;
  7050. A_UINT32 rx_mpdu_dup_cnt;
  7051. A_UINT32 rx_mpdu_discard_cnt;
  7052. A_UINT32 rx_mpdu_aggr;
  7053. A_UINT32 rx_mcs;
  7054. A_UINT32 sta_ps_inds;
  7055. A_UINT32 sta_ps_durs;
  7056. A_UINT32 rx_probe_reqs;
  7057. A_UINT32 rx_oth_mgmts;
  7058. } wmi_rx_stats_thresh;
  7059. typedef struct
  7060. {
  7061. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  7062. A_UINT32 vdev_id;
  7063. A_UINT32 peer_id;
  7064. /** How many times STAs go to sleep */
  7065. A_UINT32 sta_ps_inds;
  7066. /** Total sleep time of STAs, milliseconds units */
  7067. A_UINT32 sta_ps_durs;
  7068. /** Number of probe requests received */
  7069. A_UINT32 rx_probe_reqs;
  7070. /** Number of other management frames received, not including probe requests */
  7071. A_UINT32 rx_oth_mgmts;
  7072. /* The TLVs for the 4 AC follows:
  7073. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  7074. */
  7075. } wmi_peer_ac_rx_stats;
  7076. typedef struct
  7077. {
  7078. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  7079. /*
  7080. * This struct provides the timestamps from a low-frequency timer
  7081. * for the start and end of a stats period.
  7082. * Each timestamp is reported twice, with different units.
  7083. * The _msec timestamp is in millisecond units.
  7084. * The _count timestamp is in clock tick units.
  7085. * The timestamp is reported in clock ticks as well as in milliseconds
  7086. * so that if the stats start and end times fall within the same
  7087. * millisecond, the clock tick timestamps can still be used to
  7088. * determine what fraction of a millisecond the stats period occupied.
  7089. */
  7090. A_UINT32 start_low_freq_msec;
  7091. A_UINT32 start_low_freq_count;
  7092. A_UINT32 end_low_freq_msec;
  7093. A_UINT32 end_low_freq_count;
  7094. } wmi_stats_period;
  7095. typedef enum {
  7096. /** Periodic timer timed out, based on the period specified
  7097. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  7098. */
  7099. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  7100. /** Any of the (enabled) stats thresholds specified
  7101. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  7102. * within the current stats period.
  7103. */
  7104. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  7105. /** In Response to the one-time wlan stats request of
  7106. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  7107. */
  7108. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  7109. } wmi_report_stats_event_trigger_cond_id;
  7110. typedef struct
  7111. {
  7112. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_interference */
  7113. /** For cases where a single rx chain has options to be connected to
  7114. * different rx antennas, show which rx antennas were in use during
  7115. * receipt of a given PPDU.
  7116. * This sa_ant_matrix provides a bitmask of the antennas used while
  7117. * receiving this frame.
  7118. */
  7119. A_UINT32 sa_ant_matrix;
  7120. /** Count how many times the hal_rxerr_phy is marked, in this time period.
  7121. * The counter value is reset each period. The host specifies the period
  7122. * via WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD.
  7123. */
  7124. A_UINT32 phyerr_count;
  7125. /** The timestamp at which the WMI event is reported.
  7126. * In targets that have a WBTIMER_1 timer, this timestamp is taken
  7127. * from WBTIMER_1.
  7128. */
  7129. A_UINT32 timestamp;
  7130. } wmi_stats_interference;
  7131. typedef struct {
  7132. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  7133. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  7134. A_UINT32 trigger_cond_id;
  7135. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  7136. A_UINT32 cca_chgd_bitmap;
  7137. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  7138. A_UINT32 sig_chgd_bitmap;
  7139. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  7140. A_UINT32 tx_chgd_bitmap;
  7141. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  7142. A_UINT32 rx_chgd_bitmap;
  7143. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  7144. A_UINT32 num_chan_cca_stats;
  7145. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  7146. A_UINT32 num_peer_signal_stats;
  7147. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  7148. A_UINT32 num_peer_ac_tx_stats;
  7149. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  7150. * The array indicates number of MPDUs sent on specified aggregation size
  7151. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  7152. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  7153. A_UINT32 tx_mpdu_aggr_array_len;
  7154. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  7155. * The array indicates number of acked PPDUs sent at a specific rate */
  7156. A_UINT32 tx_succ_mcs_array_len;
  7157. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  7158. * The array indicates number of unacked PPDUs sent at a specific rate */
  7159. A_UINT32 tx_fail_mcs_array_len;
  7160. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  7161. * The array counts numbers of PPDUs encountering different TX time delays.
  7162. * TX delay here means time interval between the time a PPDU is queued
  7163. * to the MAC HW for transmission and the time the lower layers of
  7164. * tx FW return a tx status.
  7165. *
  7166. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  7167. * each bin of the tx_ppdu_delay histogram represents.
  7168. * By default the bin size is 10ms.
  7169. * tx_ppdu_delay[0] -> delays between 0-9 ms
  7170. * tx_ppdu_delay[1] -> delays between 10-19 ms
  7171. * ...
  7172. * tx_ppdu_delay[9] -> delays between 90-99 ms
  7173. * tx_ppdu_delay[10] -> delays >= 100 ms
  7174. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  7175. */
  7176. A_UINT32 tx_ppdu_delay_bin_size_ms;
  7177. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  7178. A_UINT32 tx_ppdu_delay_array_len;
  7179. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  7180. A_UINT32 num_peer_ac_rx_stats;
  7181. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  7182. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  7183. A_UINT32 rx_mpdu_aggr_array_len;
  7184. /** Array size of rx_mcs[] which is histogram of encoding rate.
  7185. * The array indicates number of PPDUs received at a specific rate */
  7186. A_UINT32 rx_mcs_array_len;
  7187. /** Array size of stats_period[] which contains several stats periods. */
  7188. A_UINT32 stats_period_array_len;
  7189. /**
  7190. * This TLV is followed by TLVs below:
  7191. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  7192. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  7193. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  7194. * 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)
  7195. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  7196. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  7197. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  7198. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  7199. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  7200. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  7201. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  7202. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  7203. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  7204. * 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)
  7205. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  7206. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  7207. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  7208. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  7209. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  7210. * 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.
  7211. **/
  7212. } wmi_report_stats_event_fixed_param;
  7213. typedef struct {
  7214. /** TLV tag and len; tag equals
  7215. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  7216. A_UINT32 tlv_header;
  7217. /** peer MAC address */
  7218. wmi_mac_addr peer_macaddr;
  7219. /** bytes (size of MPDUs) transmitted to this peer */
  7220. struct {
  7221. /* lower 32 bits of the tx_bytes value */
  7222. A_UINT32 low_32;
  7223. /* upper 32 bits of the tx_bytes value */
  7224. A_UINT32 high_32;
  7225. } tx_bytes;
  7226. /** packets (MSDUs) transmitted to this peer */
  7227. struct {
  7228. /* lower 32 bits of the tx_packets value */
  7229. A_UINT32 low_32;
  7230. /* upper 32 bits of the tx_packets value */
  7231. A_UINT32 high_32;
  7232. } tx_packets;
  7233. /** bytes (size of MPDUs) received from this peer */
  7234. struct {
  7235. /* lower 32 bits of the rx_bytes value */
  7236. A_UINT32 low_32;
  7237. /* upper 32 bits of the rx_bytes value */
  7238. A_UINT32 high_32;
  7239. } rx_bytes;
  7240. /** packets (MSDUs) received from this peer */
  7241. struct {
  7242. /* lower 32 bits of the rx_packets value */
  7243. A_UINT32 low_32;
  7244. /* upper 32 bits of the rx_packets value */
  7245. A_UINT32 high_32;
  7246. } rx_packets;
  7247. /** cumulative retry counts (MPDUs) */
  7248. A_UINT32 tx_retries;
  7249. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  7250. A_UINT32 tx_failed;
  7251. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  7252. * (in format of 0x1000RRRR)
  7253. * The rate-code is a 4-bytes field in which,
  7254. * for given rate, nss and preamble
  7255. *
  7256. * b'31-b'29 unused / reserved
  7257. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  7258. * b'27-b'11 unused / reserved
  7259. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  7260. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  7261. * b'4-b'0 indicate the rate, which is indicated as follows:
  7262. * OFDM : 0: OFDM 48 Mbps
  7263. * 1: OFDM 24 Mbps
  7264. * 2: OFDM 12 Mbps
  7265. * 3: OFDM 6 Mbps
  7266. * 4: OFDM 54 Mbps
  7267. * 5: OFDM 36 Mbps
  7268. * 6: OFDM 18 Mbps
  7269. * 7: OFDM 9 Mbps
  7270. * CCK (pream == 1)
  7271. * 0: CCK 11 Mbps Long
  7272. * 1: CCK 5.5 Mbps Long
  7273. * 2: CCK 2 Mbps Long
  7274. * 3: CCK 1 Mbps Long
  7275. * 4: CCK 11 Mbps Short
  7276. * 5: CCK 5.5 Mbps Short
  7277. * 6: CCK 2 Mbps Short
  7278. * HT/VHT (pream == 2/3)
  7279. * 0..7: MCS0..MCS7 (HT)
  7280. * 0..9: MCS0..MCS9 (11AC VHT)
  7281. * 0..11: MCS0..MCS11 (11AX VHT)
  7282. */
  7283. /** rate-code of the last transmission */
  7284. A_UINT32 last_tx_rate_code;
  7285. /** rate-code of the last received PPDU */
  7286. A_UINT32 last_rx_rate_code;
  7287. /** bitrate of the last transmission, in units of kbps */
  7288. A_UINT32 last_tx_bitrate_kbps;
  7289. /** bitrate of the last received PPDU, in units of kbps */
  7290. A_UINT32 last_rx_bitrate_kbps;
  7291. /** combined RSSI of the last received PPDU, in unit of dBm */
  7292. A_INT32 peer_rssi;
  7293. /** number of succeed transmissions (MPDUs) (ACK) */
  7294. A_UINT32 tx_succeed;
  7295. /**
  7296. * The RSSI values are in dBm units, and are exponentially time-averaged.
  7297. * The averaging is performed on the dB values (rather than the linear
  7298. * values).
  7299. */
  7300. A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS];
  7301. } wmi_peer_stats_info;
  7302. typedef struct {
  7303. /** TLV tag and len; tag equals
  7304. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  7305. A_UINT32 tlv_header;
  7306. /** VDEV to which the peers belong to */
  7307. A_UINT32 vdev_id;
  7308. /** number of peers in peer_stats_info[] */
  7309. A_UINT32 num_peers;
  7310. /** flag to indicate if there are more peers which will
  7311. * be sent a following seperate peer_stats_info event */
  7312. A_UINT32 more_data;
  7313. /* This TLV is followed by another TLV of array of structs
  7314. * wmi_peer_stats_info peer_stats_info[];
  7315. */
  7316. } wmi_peer_stats_info_event_fixed_param;
  7317. typedef struct {
  7318. /** TLV tag and len; tag equals
  7319. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  7320. A_UINT32 tlv_header;
  7321. /** primary channel freq of the channel whose stats is sent */
  7322. A_UINT32 chan_mhz;
  7323. /** accumulation of time the radio is tuned to this channel,
  7324. * in units of microseconds */
  7325. A_UINT32 on_chan_us;
  7326. /** accumulation of the TX PPDU duration over the measurement period,
  7327. * in units of microseconds */
  7328. A_UINT32 tx_duration_us;
  7329. /** accumulation of the RX PPDU duration over the measurement period,
  7330. * in units of microseconds */
  7331. A_UINT32 rx_duration_us;
  7332. /** ratio of channel busy time to on_chan_us, in units of percent */
  7333. A_UINT32 chan_busy_ratio;
  7334. /** ratio of on_chan_us to the measurement period, in units of percent */
  7335. A_UINT32 on_chan_ratio;
  7336. /** measurement period, in units of microseconds */
  7337. A_UINT32 measurement_period_us;
  7338. /** MPDUs transmitted on this channel */
  7339. A_UINT32 tx_mpdus;
  7340. /** MSDUs transmitted on this channel */
  7341. A_UINT32 tx_msdus;
  7342. /** MPDUS successfully received on this channel */
  7343. A_UINT32 rx_succ_mpdus;
  7344. /** Failed MPDUs (CRC failures) received on this channel */
  7345. A_UINT32 rx_fail_mpdus;
  7346. } wmi_radio_chan_stats;
  7347. typedef struct {
  7348. /** TLV tag and len; tag equals
  7349. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  7350. A_UINT32 tlv_header;
  7351. /** number of channel stats in radio_chan_stats[] */
  7352. A_UINT32 num_chans;
  7353. /* This TLV is followed by another TLV of array of structs
  7354. * wmi_radio_chan_stats radio_chan_stats[];
  7355. */
  7356. } wmi_radio_chan_stats_event_fixed_param;
  7357. /**
  7358. * PDEV statistics
  7359. *
  7360. * This struct incorporates the wlan_dbg_stats struct, which is
  7361. * conditionally defined, based on the AR900B flag.
  7362. * The below _v1 struct variant is the unconditional definition
  7363. * that matches what would be conditionally defined by builds that
  7364. * don't use the AR900B flag. The _v2 struct variant is the
  7365. * unconditional definition that matches what would be conditionally
  7366. * defined by builds that use the AR900B flag.
  7367. * The _v2 struct def can be used within host or target builds
  7368. * that don't use the AR900B flag, but needs to interoperate with a
  7369. * target or host build that does use the AR900B flag.
  7370. * Similarly, the _v1 struct def can be used by a host or target build
  7371. * that does use the AR900B flag, but needs to interoperate with a
  7372. * target or host build that doesn't use the AR900B flag.
  7373. *
  7374. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  7375. * defined, as an alias for either the _v1 or _v2 variant.
  7376. */
  7377. typedef struct {
  7378. /** Channel noise floor */
  7379. A_INT32 chan_nf;
  7380. /** TX frame count */
  7381. A_UINT32 tx_frame_count;
  7382. /** RX frame count */
  7383. A_UINT32 rx_frame_count;
  7384. /** rx clear count */
  7385. A_UINT32 rx_clear_count;
  7386. /** cycle count */
  7387. A_UINT32 cycle_count;
  7388. /** Phy error count */
  7389. A_UINT32 phy_err_count;
  7390. /** Channel Tx Power */
  7391. A_UINT32 chan_tx_pwr;
  7392. /** WAL dbg stats */
  7393. struct wlan_dbg_stats_v1 pdev_stats;
  7394. } wmi_pdev_stats_v1;
  7395. typedef struct {
  7396. /** Channel noise floor */
  7397. A_INT32 chan_nf;
  7398. /** TX frame count */
  7399. A_UINT32 tx_frame_count;
  7400. /** RX frame count */
  7401. A_UINT32 rx_frame_count;
  7402. /** rx clear count */
  7403. A_UINT32 rx_clear_count;
  7404. /** cycle count */
  7405. A_UINT32 cycle_count;
  7406. /** Phy error count */
  7407. A_UINT32 phy_err_count;
  7408. /** Channel Tx Power */
  7409. A_UINT32 chan_tx_pwr;
  7410. /** WAL dbg stats */
  7411. struct wlan_dbg_stats_v2 pdev_stats;
  7412. } wmi_pdev_stats_v2;
  7413. #if defined(AR900B)
  7414. #define wmi_pdev_stats wmi_pdev_stats_v2
  7415. #else
  7416. #define wmi_pdev_stats wmi_pdev_stats_v1
  7417. #endif
  7418. /**
  7419. * VDEV statistics
  7420. * @todo
  7421. * add all VDEV stats here
  7422. */
  7423. typedef struct {
  7424. A_INT32 bcn_snr;
  7425. A_INT32 dat_snr;
  7426. } wmi_snr_info;
  7427. typedef struct {
  7428. /** unique id identifying the VDEV, generated by the caller */
  7429. A_UINT32 vdev_id;
  7430. wmi_snr_info vdev_snr;
  7431. 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) */
  7432. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  7433. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  7434. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  7435. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  7436. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  7437. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  7438. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  7439. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  7440. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  7441. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  7442. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  7443. } wmi_vdev_stats;
  7444. /*
  7445. * vdev ext stats with additonal bcn stats
  7446. * (Due to backward compatiblity requirements, these new stats fields cannot be
  7447. * added inside wmi_vdev_stats.)
  7448. */
  7449. typedef struct {
  7450. A_UINT32 vdev_id;
  7451. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  7452. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  7453. } wmi_bcn_stats;
  7454. /**
  7455. * peer statistics.
  7456. */
  7457. typedef struct {
  7458. /** peer MAC address */
  7459. wmi_mac_addr peer_macaddr;
  7460. /** rssi */
  7461. A_UINT32 peer_rssi;
  7462. /** last tx data rate used for peer */
  7463. A_UINT32 peer_tx_rate;
  7464. /** last rx data rate used for peer */
  7465. A_UINT32 peer_rx_rate;
  7466. } wmi_peer_stats;
  7467. /**
  7468. * Peer extension statistics
  7469. */
  7470. typedef struct {
  7471. /** peer MAC address */
  7472. wmi_mac_addr peer_macaddr;
  7473. /* lower 32 bits of rx duration in microseconds */
  7474. A_UINT32 rx_duration;
  7475. /** Total TX bytes (including dot11 header) sent to peer */
  7476. A_UINT32 peer_tx_bytes;
  7477. /** Total RX bytes (including dot11 header) received from peer */
  7478. A_UINT32 peer_rx_bytes;
  7479. /** last TX ratecode */
  7480. A_UINT32 last_tx_rate_code;
  7481. /** TX power used by peer - units are 0.5 dBm */
  7482. A_INT32 last_tx_power;
  7483. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  7484. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  7485. /* upper 32 bits of rx duration in microseconds */
  7486. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  7487. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  7488. } wmi_peer_extd_stats;
  7489. typedef struct {
  7490. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  7491. /** peer MAC address */
  7492. wmi_mac_addr peer_macaddr;
  7493. /*
  7494. * The following rx_bytes field (lower/upper pair) counts only the
  7495. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  7496. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  7497. * and wmi_peer_stats_info.rx_bytes fields.
  7498. */
  7499. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  7500. A_UINT32 rx_bytes_l32;
  7501. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  7502. A_UINT32 rx_bytes_u32;
  7503. /** Number of MPDUS received with FCS error from this peer */
  7504. A_UINT32 rx_fcs_err;
  7505. /** Number of MPDUs(both data and non data) received from this peer */
  7506. A_UINT32 rx_mpdus;
  7507. /** nss of last tx data to peer */
  7508. A_UINT32 last_tx_nss;
  7509. /** nss of last rx data from peer */
  7510. A_UINT32 last_rx_nss;
  7511. /** chain mask used for last tx data to peer */
  7512. A_UINT32 last_tx_chain_mask;
  7513. /** chain mask used for last rx data from peer */
  7514. A_UINT32 last_rx_chain_mask;
  7515. } wmi_peer_extd2_stats;
  7516. typedef struct {
  7517. /** Primary channel freq of the channel for which stats are sent */
  7518. A_UINT32 chan_mhz;
  7519. /** Time spent on the channel */
  7520. A_UINT32 sampling_period_us;
  7521. /** Aggregate duration over a sampling period for which channel activity was observed */
  7522. A_UINT32 rx_clear_count;
  7523. /** Accumalation of the TX PPDU duration over a sampling period */
  7524. A_UINT32 tx_duration_us;
  7525. /** Accumalation of the RX PPDU duration over a sampling period */
  7526. A_UINT32 rx_duration_us;
  7527. } wmi_chan_stats;
  7528. /**
  7529. * MIB statistics. See 802.11 spec for the meaning of each field.
  7530. */
  7531. typedef struct {
  7532. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  7533. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  7534. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  7535. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  7536. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  7537. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  7538. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  7539. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  7540. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  7541. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  7542. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  7543. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  7544. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  7545. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  7546. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  7547. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  7548. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  7549. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  7550. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  7551. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  7552. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  7553. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  7554. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  7555. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  7556. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  7557. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  7558. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  7559. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  7560. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  7561. union {
  7562. A_UINT64 counter; /* for use by target only */
  7563. struct {
  7564. A_UINT32 low;
  7565. A_UINT32 high;
  7566. } upload; /* for use by host */
  7567. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  7568. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  7569. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  7570. union {
  7571. A_UINT64 counter; /* for use by target only */
  7572. struct {
  7573. A_UINT32 rx_octets_in_ampdu_low;
  7574. A_UINT32 rx_octets_in_ampdu_high;
  7575. } upload; /* for use by host */
  7576. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  7577. A_UINT32 reserved_1;
  7578. A_UINT32 reserved_2;
  7579. A_UINT32 reserved_3;
  7580. A_UINT32 reserved_4;
  7581. } wmi_mib_stats;
  7582. /**
  7583. * MIB extension statistics.
  7584. */
  7585. typedef struct {
  7586. A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/
  7587. A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/
  7588. A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/
  7589. A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/
  7590. A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/
  7591. A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/
  7592. A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/
  7593. A_UINT32 reserved[8]; /* Reserve more fields for future extension */
  7594. } wmi_mib_extd_stats;
  7595. typedef struct {
  7596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  7597. A_UINT32 vdev_id;
  7598. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  7599. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  7600. wmi_mac_addr peer_macaddr;
  7601. } wmi_rssi_stats;
  7602. typedef struct {
  7603. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  7604. A_UINT32 vdev_id;
  7605. /* congestion -
  7606. * This field holds the congestion percentage = (busy_time/total_time)*100
  7607. * for the interval from when the vdev was started to the current time
  7608. * (or the time at which the vdev was stopped).
  7609. */
  7610. A_UINT32 congestion;
  7611. } wmi_congestion_stats;
  7612. typedef struct {
  7613. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  7614. A_UINT32 num_per_chain_rssi_stats;
  7615. /* This TLV is followed by another TLV of array of structs:
  7616. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  7617. */
  7618. } wmi_per_chain_rssi_stats;
  7619. /* vdev control flags (per bits) */
  7620. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  7621. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  7622. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  7623. typedef struct {
  7624. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  7625. /** unique id identifying the VDEV, generated by the caller */
  7626. A_UINT32 vdev_id;
  7627. /** VDEV type (AP,STA,IBSS,MONITOR) */
  7628. A_UINT32 vdev_type;
  7629. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  7630. A_UINT32 vdev_subtype;
  7631. /** VDEV MAC address */
  7632. wmi_mac_addr vdev_macaddr;
  7633. /** Number of configured txrx streams */
  7634. A_UINT32 num_cfg_txrx_streams;
  7635. /**
  7636. * pdev_id for identifying the MAC,
  7637. * See macros starting with WMI_PDEV_ID_ for values.
  7638. */
  7639. A_UINT32 pdev_id;
  7640. /** control flags for this vdev */
  7641. A_UINT32 flags;
  7642. /** vdevid of transmitted AP (mbssid case) */
  7643. A_UINT32 vdevid_trans;
  7644. /* This TLV is followed by another TLV of array of structures
  7645. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  7646. */
  7647. } wmi_vdev_create_cmd_fixed_param;
  7648. typedef struct {
  7649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  7650. /* band - Should take values from wmi_channel_band_mask */
  7651. A_UINT32 band;
  7652. /* max supported tx streams per given band for this vdev */
  7653. A_UINT32 supported_tx_streams;
  7654. /* max supported rx streams per given band for this vdev */
  7655. A_UINT32 supported_rx_streams;
  7656. } wmi_vdev_txrx_streams;
  7657. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  7658. typedef struct {
  7659. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  7660. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  7661. A_UINT32 duration; /** Absent period duration in micro seconds */
  7662. A_UINT32 interval; /** Absent period interval in micro seconds */
  7663. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  7664. } wmi_p2p_noa_descriptor;
  7665. /** values for vdev_type */
  7666. #define WMI_VDEV_TYPE_AP 0x1
  7667. #define WMI_VDEV_TYPE_STA 0x2
  7668. #define WMI_VDEV_TYPE_IBSS 0x3
  7669. #define WMI_VDEV_TYPE_MONITOR 0x4
  7670. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  7671. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  7672. * operations like Network discovery, service provisioning and service
  7673. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  7674. * WMI command to create this VDEV once during initialization and host is not
  7675. * expected to use any VDEV specific WMI commands on this VDEV.
  7676. **/
  7677. #define WMI_VDEV_TYPE_NAN 0x5
  7678. #define WMI_VDEV_TYPE_OCB 0x6
  7679. /* NAN Data Interface */
  7680. #define WMI_VDEV_TYPE_NDI 0x7
  7681. #define WMI_VDEV_TYPE_MESH_POINT 0x8
  7682. /*
  7683. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  7684. * which are used in 11ax systems
  7685. */
  7686. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  7687. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  7688. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  7689. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  7690. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  7691. /*
  7692. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  7693. * which are used in 11ax systems
  7694. */
  7695. #define WMI_HE_LTF_DEFAULT 0x0
  7696. #define WMI_HE_LTF_1X 0x1
  7697. #define WMI_HE_LTF_2X 0x2
  7698. #define WMI_HE_LTF_4X 0x3
  7699. /** values for vdev_subtype */
  7700. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  7701. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  7702. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  7703. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  7704. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  7705. /* new subtype for 11S mesh is required as 11S functionality differs
  7706. * in many ways from proprietary mesh
  7707. * 11S uses 6-addr frame format and supports peering between mesh
  7708. * stations and dynamic best path selection between mesh stations.
  7709. * While in proprietary mesh, neighboring mesh station MAC is manually
  7710. * added to AST table for traffic flow between mesh stations
  7711. */
  7712. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  7713. /* Subtype to indicate that the AP VAP is in smart monitor mode
  7714. * This is needed to differentiate in firmware betweem normal AP mode
  7715. * with smart monitor AP mode
  7716. */
  7717. #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7
  7718. /** values for vdev_start_request flags */
  7719. /** Indicates that AP VDEV uses hidden ssid. only valid for
  7720. * AP/GO */
  7721. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  7722. /** Indicates if robust management frame/management frame
  7723. * protection is enabled. For GO/AP vdevs, it indicates that
  7724. * it may support station/client associations with RMF enabled.
  7725. * For STA/client vdevs, it indicates that sta will
  7726. * associate with AP with RMF enabled. */
  7727. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  7728. /*
  7729. * Host is sending bcn_tx_rate to override the beacon tx rates.
  7730. */
  7731. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  7732. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  7733. * of assoc request/response
  7734. */
  7735. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  7736. /* BSS color 0-6 */
  7737. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  7738. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  7739. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  7740. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  7741. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  7742. /* TWT required */
  7743. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  7744. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  7745. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  7746. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  7747. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  7748. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  7749. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  7750. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  7751. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  7752. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  7753. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  7754. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  7755. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  7756. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  7757. /* MAX BSS supported by MultiBSS element */
  7758. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  7759. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  7760. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  7761. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  7762. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  7763. /* when set to 1 disables use of BSS color */
  7764. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  7765. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  7766. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  7767. /* When set to 1 HE AP transmits beacons using two PHY formats,
  7768. * one in non-HE format and other in an HE_EXT_SU PHY format
  7769. */
  7770. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  7771. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  7772. #define WMI_MAX_HECAP_PHY_SIZE (3)
  7773. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  7774. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  7775. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  7776. /*
  7777. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  7778. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  7779. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  7780. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  7781. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  7782. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  7783. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  7784. * 242-tone RU mapping in 40 MHz and 80
  7785. * MHz channel width in 5 GHz. Otherwise Reserved.
  7786. * B6: Reserved
  7787. */
  7788. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  7789. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  7790. /*
  7791. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7792. * where in the preamble only the secondary 20 MHz is punctured
  7793. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7794. * where in the preamble only one of the two 20 MHz sub-channels in the
  7795. * secondary 40 MHz is punctured
  7796. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  7797. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  7798. * secondary 20 MHz is punctured
  7799. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  7800. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  7801. * primary 40 MHz is present
  7802. */
  7803. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  7804. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  7805. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  7806. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  7807. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  7808. /* Indicates support of transmission and reception of LDPC encoded packets */
  7809. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  7810. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  7811. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7812. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7813. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7814. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7815. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7816. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7817. /*
  7818. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  7819. */
  7820. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  7821. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  7822. /*
  7823. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  7824. * time streams supported for reception when midamble is used in the Data field.
  7825. */
  7826. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  7827. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  7828. /*
  7829. * B0: For a transmitting STA acting as beamformee, it indicates support of
  7830. * NDP reception using 4x LTF and 3.2 us guard interval duration
  7831. */
  7832. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  7833. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  7834. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7835. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  7836. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  7837. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7838. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  7839. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  7840. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  7841. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  7842. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  7843. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  7844. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  7845. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  7846. /*
  7847. * If the transmitting STA is an AP:
  7848. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  7849. * transmission.
  7850. * If the transmitting STA is a non-AP STA:
  7851. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  7852. * transmission.
  7853. */
  7854. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  7855. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  7856. /*
  7857. * If the transmitting STA is an AP:
  7858. * indicates STA supports of reception of UL MUMIMO transmission on an
  7859. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7860. * If the transmitting STA is a non-AP STA:
  7861. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  7862. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7863. */
  7864. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  7865. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  7866. /* Tx DCM
  7867. * B0:B1
  7868. * 00: Does not support DCM
  7869. * 01: BPSK
  7870. * 10: QPSK
  7871. * 11: 16-QAM
  7872. * B2 signals maximum number of spatial streams with DCM
  7873. * 0: 1 spatial stream
  7874. * 1: 2 spatial streams
  7875. */
  7876. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  7877. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  7878. /* Rx DCM
  7879. * B0:B1
  7880. * 00: Does not support DCM
  7881. * 01: BPSK
  7882. * 10: QPSK
  7883. * 11: 16-QAM
  7884. * B2 signals maximum number of spatial streams with DCM
  7885. * 0: 1 spatial stream
  7886. * 1: 2 spatial streams
  7887. */
  7888. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  7889. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  7890. /*
  7891. * Indicates that the STA supports the reception of an HE MU PPDU payload
  7892. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  7893. */
  7894. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  7895. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  7896. /* Indicates support for operation as an SU beamformer */
  7897. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  7898. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  7899. /* Indicates support for operation as an SU beamformee */
  7900. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  7901. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  7902. /* Indicates support for operation as an MU Beamformer */
  7903. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  7904. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  7905. /*
  7906. * Num STS -1 for <= 80MHz (min val 3)
  7907. * The maximum number of space-time streams minus 1 that the STA can
  7908. * receive in an HE NDP
  7909. */
  7910. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  7911. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  7912. /*
  7913. * Num STS -1 for > 80MHz (min val 3)
  7914. * The maximum number of space-time streams minus 1 that the STA can
  7915. * receive in an HE NDP
  7916. */
  7917. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  7918. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  7919. /*
  7920. * Number Of Sounding Dimensions For <= 80 MHz
  7921. * If SU beamformer capable, set to the maximum supported value of the
  7922. * TXVECTOR parameter NUM_STS minus 1.
  7923. * Otherwise, reserved.
  7924. */
  7925. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  7926. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  7927. /*
  7928. * Number Of Sounding Dimensions For > 80 MHz
  7929. * If SU beamformer capable, set to the maximum supported value of the
  7930. * TXVECTOR parameter NUM_STS minus 1.
  7931. * Otherwise, reserved.
  7932. */
  7933. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  7934. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  7935. /*
  7936. * Indicates if the HE beamformee is capable of feedback with tone
  7937. * grouping of 16 in the HE Compressed Beamforming Report field for
  7938. * a SU-type feedback.
  7939. */
  7940. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  7941. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  7942. /*
  7943. * Indicates if the HE beamformee is capable of feedback with tone
  7944. * grouping of 16 in the HE Compressed Beamforming Report field for
  7945. * a MU-type feedback.
  7946. */
  7947. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  7948. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  7949. /*
  7950. * Indicates if HE beamformee is capable of feedback with codebook
  7951. * size {4, 2} in the HECompressed Beamforming Report field for
  7952. * a SU-type feedback.
  7953. */
  7954. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  7955. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  7956. /*
  7957. * Indicates if HE beamformee is capable of feedback with codebook
  7958. * size {7, 5} in the HE Compressed Beamforming Report field for
  7959. * a MU-type feedback.
  7960. */
  7961. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  7962. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  7963. /*
  7964. * Beamforming Feedback With Trigger Frame
  7965. * If the transmitting STA is an AP STA:
  7966. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  7967. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  7968. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  7969. * If the transmitting STA is a non-AP STA:
  7970. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  7971. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  7972. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  7973. */
  7974. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  7975. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  7976. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  7977. * over the right 106-tone RU or partial BW ER
  7978. */
  7979. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  7980. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  7981. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  7982. * where the RU does not span the entire PPDU bandwidth.
  7983. */
  7984. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  7985. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  7986. /* Indicates whether or not the PPE Threshold field is present */
  7987. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  7988. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  7989. /* Indicates that the STA supports SRP-based SR operation */
  7990. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  7991. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  7992. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  7993. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  7994. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  7995. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  7996. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  7997. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  7998. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  7999. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  8000. * minus 1. Otherwise, reserved.
  8001. */
  8002. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  8003. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  8004. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  8005. * STBC with one spatial stream
  8006. */
  8007. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  8008. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  8009. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  8010. * STBC with one spatial stream
  8011. */
  8012. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  8013. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  8014. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  8015. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  8016. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  8017. /*
  8018. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  8019. * 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.
  8020. */
  8021. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  8022. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  8023. /*
  8024. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  8025. * 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.
  8026. */
  8027. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  8028. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  8029. /*
  8030. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  8031. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  8032. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  8033. * 160 MHz HE TB PPDU.
  8034. */
  8035. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  8036. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  8037. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  8038. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  8039. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  8040. /*
  8041. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  8042. * 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
  8043. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  8044. */
  8045. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  8046. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  8047. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  8048. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  8049. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  8050. /* set to 1 to for TWT Requestor support*/
  8051. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  8052. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  8053. /* set to 1 to for TWT Responder support*/
  8054. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  8055. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  8056. /* Level of frag support
  8057. Set to 0 for no support for dynamic fragmentation.
  8058. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  8059. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  8060. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  8061. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  8062. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  8063. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  8064. */
  8065. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  8066. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  8067. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  8068. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  8069. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  8070. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  8071. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  8072. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  8073. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  8074. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  8075. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  8076. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  8077. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  8078. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  8079. /*
  8080. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  8081. * a QoS Data frame for which no block ack agreement exists.
  8082. */
  8083. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  8084. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  8085. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  8086. /*0=No Feedback,2=Unsolicited,3=Both*/
  8087. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  8088. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  8089. /* bit 16 reserved. */
  8090. /*Set to 1 for reception of AllAck support*/
  8091. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  8092. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  8093. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  8094. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  8095. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  8096. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  8097. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  8098. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  8099. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  8100. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  8101. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  8102. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  8103. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  8104. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  8105. /*Set to 1 if the STA supports MU cascading operation*/
  8106. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  8107. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  8108. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  8109. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  8110. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  8111. /*Set to 1 when the STA supports its reception*/
  8112. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  8113. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  8114. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  8115. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  8116. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  8117. /*1 if OFDMA Random Access Supported*/
  8118. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  8119. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  8120. /* Maximum AMPDU Length Exponent.
  8121. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  8122. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  8123. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  8124. * padding is not included in this limit.
  8125. */
  8126. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  8127. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  8128. /*A-MSDU Fragmentation Support*/
  8129. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  8130. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  8131. /*Flexible TWT Schedule Support*/
  8132. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  8133. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  8134. /*Rx Control Frame to MultiBSS*/
  8135. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  8136. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  8137. /* BSRP A-MPDU Aggregation
  8138. * maintaining compatability since we dont support this now so not wasting memory
  8139. */
  8140. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  8141. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  8142. /* Quiet Time Period (QTP) operation
  8143. * maintaining compatability since we dont support this now so not wasting memory
  8144. */
  8145. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  8146. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  8147. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  8148. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  8149. * that contains a BQR in the A-Control subfield
  8150. * maintaining compatability since we dont support this now so not wasting memory
  8151. */
  8152. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  8153. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  8154. /*Indicates support by the STA for the role of SR Responder.*/
  8155. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  8156. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  8157. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  8158. * frames or TIM frames as described in AP operation for opportunistic power save.
  8159. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  8160. */
  8161. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  8162. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  8163. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  8164. * the NDP Feedback Report Poll Trigger frame.
  8165. */
  8166. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  8167. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  8168. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  8169. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  8170. * removed by standard
  8171. */
  8172. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  8173. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  8174. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  8175. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  8176. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  8177. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  8178. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  8179. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  8180. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  8181. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  8182. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  8183. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  8184. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  8185. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  8186. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  8187. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  8188. /**DO NOT USE - DEPRECATED*/
  8189. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  8190. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  8191. /*DO NOT USE - DEPRECATED**/
  8192. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  8193. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  8194. /*DO NOT USE - DEPRECATED**/
  8195. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  8196. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  8197. /*DO NOT USE - DEPRECATED**/
  8198. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  8199. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  8200. /* START TEMPORARY WORKAROUND -
  8201. * Leave legacy names as aliases for new names, until all references to the
  8202. * legacy names have been removed.
  8203. */
  8204. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  8205. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  8206. /* END TEMPORARY WORKAROUND */
  8207. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  8208. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  8209. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  8210. /*
  8211. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  8212. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  8213. */
  8214. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  8215. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  8216. /*
  8217. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  8218. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  8219. */
  8220. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  8221. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  8222. /*
  8223. * Indicates the spatial multiplexing power save mode after receiving a
  8224. * Trigger frame that is in operation immediately after (re)association.
  8225. */
  8226. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  8227. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  8228. /* Indicates support for Punctured Sounding */
  8229. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  8230. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  8231. /*
  8232. * Indicates support for receiving a Trigger frame in an HT PPDU and
  8233. * receiving a Trigger frame in a VHT PPDU
  8234. */
  8235. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  8236. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  8237. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  8238. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  8239. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  8240. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  8241. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  8242. typedef struct {
  8243. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  8244. /** unique id identifying the VDEV, generated by the caller */
  8245. A_UINT32 vdev_id;
  8246. /** requestor id identifying the caller module */
  8247. A_UINT32 requestor_id;
  8248. /** beacon interval from received beacon */
  8249. A_UINT32 beacon_interval;
  8250. /** DTIM Period from the received beacon */
  8251. A_UINT32 dtim_period;
  8252. /** Flags */
  8253. A_UINT32 flags;
  8254. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  8255. wmi_ssid ssid;
  8256. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  8257. /** This field will be invalid and ignored unless the */
  8258. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  8259. /** When valid, this field contains the fixed tx rate for the beacon */
  8260. /** and probe response frames send by the GO or SoftAP */
  8261. A_UINT32 bcn_tx_rate;
  8262. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  8263. A_UINT32 bcn_txPower;
  8264. /** number of p2p NOA descriptor(s) from scan entry */
  8265. A_UINT32 num_noa_descriptors;
  8266. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  8267. During CAC, Our HW shouldn't ack ditected frames */
  8268. A_UINT32 disable_hw_ack;
  8269. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  8270. /** The DBS policy manager indicates the preferred number of transmit streams. */
  8271. A_UINT32 preferred_tx_streams;
  8272. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  8273. /** the DBS policy manager indicates the preferred number of receive streams. */
  8274. A_UINT32 preferred_rx_streams;
  8275. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  8276. A_UINT32 cac_duration_ms; /* in milliseconds */
  8277. A_UINT32 regdomain;
  8278. /* The TLVs follows this structure:
  8279. * wmi_channel chan; <-- WMI channel
  8280. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  8281. */
  8282. } wmi_vdev_start_request_cmd_fixed_param;
  8283. typedef struct {
  8284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  8285. /** unique id identifying the VDEV, generated by the caller */
  8286. A_UINT32 vdev_id;
  8287. } wmi_vdev_delete_cmd_fixed_param;
  8288. typedef struct {
  8289. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  8290. /** unique id identifying the VDEV, generated by the caller */
  8291. A_UINT32 vdev_id;
  8292. /** aid (assoc id) received in association response for STA VDEV */
  8293. A_UINT32 vdev_assoc_id;
  8294. /** bssid of the BSS the VDEV is joining */
  8295. wmi_mac_addr vdev_bssid;
  8296. /** bssid of transmitted AP (mbssid case) */
  8297. wmi_mac_addr trans_bssid;
  8298. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  8299. A_UINT32 profile_idx;
  8300. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  8301. A_UINT32 profile_num;
  8302. } wmi_vdev_up_cmd_fixed_param;
  8303. typedef struct {
  8304. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  8305. /** unique id identifying the VDEV, generated by the caller */
  8306. A_UINT32 vdev_id;
  8307. } wmi_vdev_stop_cmd_fixed_param;
  8308. typedef struct {
  8309. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  8310. /** unique id identifying the VDEV, generated by the caller */
  8311. A_UINT32 vdev_id;
  8312. } wmi_vdev_down_cmd_fixed_param;
  8313. typedef struct {
  8314. /** unique id identifying the VDEV, generated by the caller */
  8315. A_UINT32 vdev_id;
  8316. } wmi_vdev_standby_response_cmd;
  8317. typedef struct {
  8318. /** unique id identifying the VDEV, generated by the caller */
  8319. A_UINT32 vdev_id;
  8320. } wmi_vdev_resume_response_cmd;
  8321. typedef struct {
  8322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  8323. /** unique id identifying the VDEV, generated by the caller */
  8324. A_UINT32 vdev_id;
  8325. /** parameter id */
  8326. A_UINT32 param_id;
  8327. /** parameter value */
  8328. A_UINT32 param_value;
  8329. } wmi_vdev_set_param_cmd_fixed_param;
  8330. typedef struct {
  8331. A_UINT32 key_seq_counter_l;
  8332. A_UINT32 key_seq_counter_h;
  8333. } wmi_key_seq_counter;
  8334. #define WMI_CIPHER_NONE 0x0 /* clear key */
  8335. #define WMI_CIPHER_WEP 0x1
  8336. #define WMI_CIPHER_TKIP 0x2
  8337. #define WMI_CIPHER_AES_OCB 0x3
  8338. #define WMI_CIPHER_AES_CCM 0x4
  8339. #define WMI_CIPHER_WAPI 0x5
  8340. #define WMI_CIPHER_CKIP 0x6
  8341. #define WMI_CIPHER_AES_CMAC 0x7
  8342. #define WMI_CIPHER_ANY 0x8
  8343. #define WMI_CIPHER_AES_GCM 0x9
  8344. #define WMI_CIPHER_AES_GMAC 0xa
  8345. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  8346. typedef struct {
  8347. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  8348. /** unique id identifying the VDEV, generated by the caller */
  8349. A_UINT32 vdev_id;
  8350. /** MAC address used for installing */
  8351. wmi_mac_addr peer_macaddr;
  8352. /** key index */
  8353. A_UINT32 key_ix;
  8354. /** key flags */
  8355. A_UINT32 key_flags;
  8356. /** key cipher, defined above */
  8357. A_UINT32 key_cipher;
  8358. /** key rsc counter */
  8359. wmi_key_seq_counter key_rsc_counter;
  8360. /** global key rsc counter */
  8361. wmi_key_seq_counter key_global_rsc_counter;
  8362. /** global key tsc counter */
  8363. wmi_key_seq_counter key_tsc_counter;
  8364. /** WAPI key rsc counter */
  8365. A_UINT8 wpi_key_rsc_counter[16];
  8366. /** WAPI key tsc counter */
  8367. A_UINT8 wpi_key_tsc_counter[16];
  8368. /** key length */
  8369. A_UINT32 key_len;
  8370. /** key tx mic length */
  8371. A_UINT32 key_txmic_len;
  8372. /** key rx mic length */
  8373. A_UINT32 key_rxmic_len;
  8374. /** specifies if the group_key_ix is valid, filled by the sender */
  8375. A_UINT32 is_group_key_ix_valid;
  8376. /** Multi group key ID */
  8377. A_UINT32 group_key_ix;
  8378. /*
  8379. * Following this struct are this TLV.
  8380. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  8381. */
  8382. } wmi_vdev_install_key_cmd_fixed_param;
  8383. /** Preamble types to be used with VDEV fixed rate configuration */
  8384. typedef enum {
  8385. WMI_RATE_PREAMBLE_OFDM,
  8386. WMI_RATE_PREAMBLE_CCK,
  8387. WMI_RATE_PREAMBLE_HT,
  8388. WMI_RATE_PREAMBLE_VHT,
  8389. WMI_RATE_PREAMBLE_HE,
  8390. } WMI_RATE_PREAMBLE;
  8391. /** Value to disable fixed rate setting */
  8392. #define WMI_FIXED_RATE_NONE (0xff)
  8393. #define WMI_GI_400_NS 1
  8394. #define WMI_GI_800_NS 0
  8395. #define WMI_GI_1600_NS 2
  8396. #define WMI_GI_3200_NS 3
  8397. /** OCE(Optimized Connectivity_Experience) Feature flags */
  8398. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  8399. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  8400. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  8401. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  8402. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  8403. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  8404. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  8405. /** the definition of different VDEV parameters */
  8406. typedef enum {
  8407. /** RTS Threshold */
  8408. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  8409. /** Fragmentation threshold */
  8410. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  8411. /** beacon interval in TUs */
  8412. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  8413. /** Listen interval in TUs */
  8414. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  8415. /** muticast rate in Mbps */
  8416. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  8417. /** management frame rate in Mbps */
  8418. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  8419. /** slot time (long vs short) */
  8420. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  8421. /** preamble (long vs short) */
  8422. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  8423. /** SWBA time (time before tbtt in msec) */
  8424. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  8425. /** time period for updating VDEV stats */
  8426. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  8427. /** age out time in msec for frames queued for station in power save*/
  8428. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  8429. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  8430. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  8431. /** DTIM period (specified in units of num beacon intervals) */
  8432. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  8433. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  8434. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  8435. /** enable/dsiable WDS for this VDEV */
  8436. WMI_VDEV_PARAM_WDS, /* 0xf */
  8437. /** ATIM Window */
  8438. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  8439. /** BMISS max */
  8440. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  8441. /** BMISS first time */
  8442. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  8443. /** BMISS final time */
  8444. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  8445. /** WMM enables/disabled */
  8446. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  8447. /** Channel width */
  8448. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  8449. /** Channel Offset */
  8450. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  8451. /** Disable HT Protection */
  8452. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  8453. /** Quick STA Kickout */
  8454. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  8455. /** Rate to be used with Management frames */
  8456. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  8457. /** Protection Mode */
  8458. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  8459. /** Fixed rate setting
  8460. * The top nibble is used to select which format to use for encoding
  8461. * the rate specification: 0xVXXXXXXX
  8462. * If V == 0b0000: format is same as before: 0x000000RR
  8463. * If V == 0b0001: format is: 0x1000RRRR.
  8464. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8465. * The host shall use the new V1 format (and set V = 0x1) if the target
  8466. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  8467. * system is configured with Nss > 4 (either at compile time within the
  8468. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  8469. * by the target).
  8470. */
  8471. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  8472. /**
  8473. * 11AX: GI =
  8474. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  8475. * 11N: SGI=WMI_GI_400_NS
  8476. */
  8477. WMI_VDEV_PARAM_SGI, /* 0x1c */
  8478. /** Enable LDPC */
  8479. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  8480. /** Enable Tx STBC */
  8481. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  8482. /** Enable Rx STBC */
  8483. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  8484. /** Intra BSS forwarding */
  8485. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  8486. /** Setting Default xmit key for Vdev */
  8487. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  8488. /** NSS width */
  8489. WMI_VDEV_PARAM_NSS, /* 0x22 */
  8490. /** Set the custom rate for the broadcast data frames */
  8491. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  8492. /** Set the custom rate (rate-code) for multicast data frames */
  8493. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  8494. /** Tx multicast packet indicate Enable/Disable */
  8495. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  8496. /** Tx DHCP packet indicate Enable/Disable */
  8497. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  8498. /** Enable host inspection of Tx unicast packet to unknown destination */
  8499. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  8500. /* The minimum amount of time AP begins to consider STA inactive */
  8501. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  8502. /* An associated STA is considered inactive when there is no recent TX/RX
  8503. * activity and no downlink frames are buffered for it. Once a STA exceeds
  8504. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  8505. * a keep alive to verify the STA is still associated. If the STA does ACK
  8506. * the data-null, or if the data-null is buffered and the STA does not
  8507. * retrieve it, the STA will be considered unresponsive (see
  8508. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  8509. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  8510. /* An associated STA is considered unresponsive if there is no recent
  8511. * TX/RX activity and downlink frames are buffered for it. Once a STA
  8512. * exceeds the maximum unresponsive time, the AP will send a
  8513. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  8514. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  8515. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  8516. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  8517. /** Enable/Disable RTS-CTS */
  8518. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  8519. /* Enable TXBFee/er */
  8520. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  8521. /**Set packet power save */
  8522. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  8523. /**Drops un-encrypted packets if any received in an encryted connection
  8524. * otherwise forwards to host
  8525. */
  8526. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  8527. /*
  8528. * Set TX encap type.
  8529. *
  8530. * enum wmi_pkt_type is to be used as the parameter
  8531. * specifying the encap type.
  8532. */
  8533. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  8534. /*
  8535. * Try to detect stations that woke-up and exited power save but did not
  8536. * successfully transmit data-null with PM=0 to AP. When this happens,
  8537. * STA and AP power save state are out-of-sync. Use buffered but
  8538. * undelivered MSDU to the STA as a hint that the STA is really awake
  8539. * and expecting normal ASAP delivery, rather than retrieving BU with
  8540. * PS-Poll, U-APSD trigger, etc.
  8541. *
  8542. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  8543. */
  8544. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  8545. /* Enable/Disable early rx dynamic adjust feature.
  8546. * Early-rx dynamic adjust is a advance power save feature.
  8547. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  8548. * timing discrepancies in the system.
  8549. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  8550. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  8551. * properly to minimum the power consume.*/
  8552. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  8553. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  8554. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  8555. * which can be set by user through WMI command.
  8556. */
  8557. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  8558. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  8559. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  8560. /* set slop_step */
  8561. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  8562. /* set init slop */
  8563. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  8564. /* pause adjust enable/disable */
  8565. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  8566. /* Set channel pwr limit value of the vdev the minimal value of all
  8567. * vdevs operating on this channel will be set as channel tx power
  8568. * limit, which is used to configure ratearray
  8569. */
  8570. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  8571. /* set the count of snr value for calculation in snr monitor */
  8572. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  8573. /** Roaming offload */
  8574. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  8575. /** Enable Leader request RX functionality for RMC */
  8576. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  8577. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  8578. * by himself. If the beacon lost time exceed this threshold, the peer is
  8579. * thought to be gone. */
  8580. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  8581. /** max rate in kpbs, transmit rate can't go beyond it */
  8582. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  8583. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  8584. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  8585. /* set Tx failure count threshold for the vdev */
  8586. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  8587. /* set ebt resync timeout value, in the unit of TU */
  8588. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  8589. /* Enable Aggregation State Trigger Event */
  8590. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  8591. /* This parameter indicates whether IBSS station can enter into power save
  8592. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  8593. * awake all the time and should never set PM=1 in its transmitted frames.
  8594. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  8595. * is non-zero. */
  8596. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  8597. /* This parameter indicates if this station can enter into power collapse
  8598. * for the remaining beacon interval after the ATIM window.
  8599. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  8600. * is set to TRUE. */
  8601. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  8602. /* This parameter indicates whether IBSS station exit power save mode and
  8603. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  8604. * whenever there is a TX/RX activity. */
  8605. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  8606. /* If Awake on TX/RX activity is enabled, this parameter indicates
  8607. * the data inactivity time in number of beacon intervals after which
  8608. * IBSS station reenters power save by sending Null frame with PM=1. */
  8609. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  8610. /* Inactivity time in msec after which TX Service Period (SP) is
  8611. * terminated by sending a Qos Null frame with EOSP.
  8612. * If value is 0, TX SP is terminated with the last buffered packet itself
  8613. * instead of waiting for the inactivity timeout. */
  8614. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  8615. /** DTIM policy */
  8616. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  8617. /* When IBSS network is initialized, PS-supporting device
  8618. * does not enter protocol sleep state during first
  8619. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  8620. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  8621. /* Enable/Disable 1 RX chain usage during the ATIM window */
  8622. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  8623. /* RX Leak window is the time driver waits before shutting down
  8624. * the radio or switching the channel and after receiving an ACK
  8625. * for a data frame with PM bit set) */
  8626. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  8627. /** Averaging factor(16 bit value) is used in the calculations to
  8628. * perform averaging of different link level statistics like average
  8629. * beacon spread or average number of frames leaked */
  8630. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  8631. /** disconnect threshold, once the consecutive error for specific peer
  8632. * exceed this threhold, FW will send kickout event to host */
  8633. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  8634. /** The rate_code of RTS_CTS changed by host. Now FW can support
  8635. * more non-HT rates rather than 1Mbps or 6Mbps */
  8636. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  8637. /** This parameter indicates whether using a long duration RTS-CTS
  8638. * protection when a SAP goes off channel in MCC mode */
  8639. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  8640. /** This parameter indicates whether using a broadcast probe response
  8641. * to increase the detectability of SAP in MCC mode */
  8642. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  8643. /** This parameter indicates the power backoff in percentage
  8644. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  8645. * Host passes 0, 1, 2, 3, 4 to Firmware
  8646. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  8647. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  8648. */
  8649. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  8650. /** TX power backoff in dB: tx power -= param value
  8651. * Host passes values(DB) to Halphy, Halphy reduces the power table
  8652. * by the values. Safety check will happen in Halphy.
  8653. */
  8654. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  8655. /** Multicast to Unicast conversion setting */
  8656. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  8657. /** Total number of HW retries */
  8658. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  8659. /** Max tx percentage for cabq */
  8660. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  8661. /** MFPTEST settings */
  8662. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  8663. /** RTS Fixed rate setting */
  8664. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  8665. /** VHT SGI MASK */
  8666. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  8667. /** VHT80 Auto Rate MASK */
  8668. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  8669. /** set Proxy STA features for this vap */
  8670. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  8671. /** set virtual cell mode - enable/disable */
  8672. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  8673. /** Set receive packet type */
  8674. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  8675. /** Set ratemask with specific Bandwidth and NSS */
  8676. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  8677. /** Set SENSOR Support */
  8678. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  8679. /** Set beacon rate */
  8680. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  8681. /** Enable CTS to self for DTIM beacon */
  8682. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  8683. /** Disable station kickout at Vap level */
  8684. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  8685. /* VDEV capabilities */
  8686. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  8687. /**
  8688. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  8689. * The host must ensure that either no other vdevs share the TSF with
  8690. * this vdev, or else that it is acceptable to apply this TSF adjustment
  8691. * to all vdevs sharing the TSF.
  8692. */
  8693. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  8694. /** Disable/Enable AMPDU of vdev per AC:
  8695. * bit | AC
  8696. * --------
  8697. * 0 | VO
  8698. * 1 | VI
  8699. * 2 | BE
  8700. * 3 | BK
  8701. * A value of 0 in a given bit disables A-MPDU aggregation for
  8702. * that AC; a value of 1 enables A-MPDU aggregation
  8703. */
  8704. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  8705. /**
  8706. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  8707. * Used mainly for mesh-vap.
  8708. * The parameter value delivered with the RX_FILTER vdev param contains
  8709. * a bit-or mask of wmi_vdev_param_filter enum values.
  8710. */
  8711. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  8712. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  8713. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  8714. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8715. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  8716. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8717. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  8718. /** disable dynamic bw RTS **/
  8719. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  8720. /** per ssid (vdev) based ATF strict/fair scheduling policy
  8721. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  8722. */
  8723. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  8724. /** Enable or disable Dual carrier modulation
  8725. * valid values: 0-Disable DCM, 1-Enable DCM.
  8726. */
  8727. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  8728. /** Enable or disable Extended range
  8729. * valid values: 0-Disable ER, 1-Enable ER.
  8730. */
  8731. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  8732. /* enable or disable BCAST probe response feature */
  8733. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  8734. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  8735. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  8736. /* enable or disable NOA for P2P GO */
  8737. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  8738. /** Per band user management frame fix rate setting
  8739. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  8740. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  8741. *
  8742. * BIT 23: 11ax (1) or legacy (0) rate code
  8743. * BITS [22..12]: rate code for 5G
  8744. *
  8745. * BIT 11: 11ax (1) or legacy (0) rate code
  8746. * BITS [10..0]: rate code for 2G
  8747. */
  8748. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  8749. /* This should be called before WMI_VDEV_PARAM_TXBF */
  8750. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  8751. /** This parameter indicates whether VDEV is SMPS intolerant.
  8752. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  8753. * dynamically change the RX NSS.
  8754. *
  8755. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  8756. */
  8757. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  8758. /** specify probe request Tx delay for scans triggered on this VDEV */
  8759. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  8760. /** specify the time gap between each set of probe request transmissions.
  8761. * The number of probe requests in each set depends on the ssid_list and
  8762. * bssid_list in the scan request.
  8763. * This parameter will be applied only for scans triggered on this VDEV.
  8764. */
  8765. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  8766. /** specify the HE LTF setting that should be used for fixed rate
  8767. * transmissions.
  8768. *
  8769. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  8770. * or WMI_HE_LTF_4X.
  8771. */
  8772. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  8773. /** VDEV parameter to configure the number of TX chains to use for
  8774. * a/b/g rates.
  8775. * bit 0~15 : 11b mode TX chain number.
  8776. * bit 16~31 : 11ag mode TX chain number.
  8777. *
  8778. * valid values:
  8779. * Should not exceed the maximum number of supported TX Chains
  8780. * 0 - Used to reset the vote. Acts as Don't Care
  8781. */
  8782. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  8783. /**
  8784. * Enable or disable the multi group key feature on this VDEV.
  8785. * used for NAN APP and VLAN Tagging
  8786. */
  8787. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  8788. /*
  8789. * Specify the total number of multi group key on this VDEV.
  8790. */
  8791. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  8792. /** VDEV parameter to enable or disable various OCE features */
  8793. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  8794. /*
  8795. * Set/Clear 3 least-significant bits to
  8796. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  8797. *
  8798. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  8799. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  8800. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  8801. * bits 31:3 -> Reserved bits. should be set to zero.
  8802. */
  8803. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  8804. /** VDEV parameter to config modulated DTIM count */
  8805. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  8806. /**
  8807. * VDEV parameter to config max listen interval,
  8808. * when modulated DTIM is enabled.
  8809. * Units are 100TU.
  8810. */
  8811. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  8812. /** VDEV parameter to config dynamic DTIM count */
  8813. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  8814. /** VDEV parameter to enable or disable RTT responder role
  8815. * valid values: 0-Disable responder role 1-Enable responder role
  8816. */
  8817. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  8818. /** Parameter to configure BA mode.
  8819. * Valid values: 0- Auto mode,
  8820. * 1- Manual mode(addba req not sent).
  8821. * 2- buffer size 64
  8822. * 3- buffer size 256
  8823. */
  8824. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  8825. /**
  8826. * VDEV parameter to force to set modulate DTIM count as listen interval,
  8827. * no matter whether WoW is enabled
  8828. * Default: Disabled.
  8829. * Valid values: 0- Disabled,
  8830. * 1- Enabled.
  8831. */
  8832. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  8833. /** specify the setting that are valid for auto rate transmissions.
  8834. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  8835. * used for auto rate.
  8836. * BIT0 = 1 (WMI_HE_LTF_1X)
  8837. * BIT1 = 1 (WMI_HE_LTF_2X)
  8838. * BIT2 = 1 (WMI_HE_LTF_4X)
  8839. * BIT3-7 = Reserved bits.
  8840. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  8841. * used for auto rate.
  8842. * BIT8 = 1 (400 NS)
  8843. * BIT9 = 1 (800 NS)
  8844. * BIT10 = 1 (1600 NS)
  8845. * BIT11 = 1 (3200 NS)
  8846. * BIT12-15 = Reserved bits.
  8847. * bits 31:16: Reserved bits. should be set to zero.
  8848. */
  8849. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  8850. /** VDEV parameter to enable or disable RTT initiator mac address
  8851. * randomization.
  8852. * Default: Disabled.
  8853. * valid values: 0-Disable random mac 1-Enable random mac
  8854. */
  8855. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  8856. /**
  8857. * For each AC, configure how many tx retries to send without RTS
  8858. * before enabling RTS
  8859. * bits 0:7 :BE
  8860. * bits 8:15 :BK
  8861. * bits 16:23 :VI
  8862. * bits 24:31 :VO
  8863. * A value of 0 in specific AC means default configuration for that AC.
  8864. */
  8865. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  8866. /**
  8867. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  8868. * We have logic where AMSDU aggregation size is dynamically decided
  8869. * based on MCS. That logic is enabled by default.
  8870. * For certain tests, we need a method to disable this optimization,
  8871. * and base AMSDU size only on the peer's capability rather than our logic.
  8872. * A value of 0 means disable internal optimization,
  8873. * 1 means enable internal optimzation.
  8874. */
  8875. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  8876. /**
  8877. * In RAW mode, FW will not know whether the encryption is enabled
  8878. * on this vdev or not.
  8879. * Because of this, FW will not program the right info into the
  8880. * RawNwifi TLV resulting in the connection failure in RAW mode.
  8881. * So to program the right info, FW should know whether the security
  8882. * is enabled on this VDEV.
  8883. * Host will send this VDEV param command (With Value = 1) in case of
  8884. * RAW secure mode.
  8885. */
  8886. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  8887. /**
  8888. * Dynamically enable/disable green tx (GTX) on supported rates.
  8889. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  8890. * Note: If GTX was already running (since the global GTX control
  8891. * resides with default BDF setting) & host wants to disable GTX,
  8892. * the VDEV does not exercise any more TPC changes on the GTX supported
  8893. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  8894. * Whenever, host wants to reenable GTX, the enable command resumes the
  8895. * GTX functionality & TPC convergence to lower power levels can be
  8896. * attained as long as PER on GTX supported rates is within the pre-defined
  8897. * PER margin configured through the BDF.
  8898. */
  8899. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  8900. /*
  8901. * Enable/Disable multicast buffer.
  8902. * A FLAG to enable & disable buffering of multicast frames at AP
  8903. * when stations are in Power Save mode.
  8904. * Once AP disables buffering of multicast frame,
  8905. * clients which goes into Power save mode will not receive these frames.
  8906. * by default MCAST buffering will be enabled.
  8907. * (CABQ = Content After Beacon Queue = multicast queue)
  8908. * Host will send this VDEV param command,
  8909. * With Value = 1 means fw will disable the MCAST buffering
  8910. * With Value = 0 means fw will enable the MCAST buffering.
  8911. */
  8912. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  8913. /**
  8914. * For SU and MU sounding
  8915. * switch between su ac/ax sounding and mu ac/ax sounding
  8916. * switch between triggered/ non-triggered on ax sounding enabled.
  8917. * each bit toggles the corresponding modes by enabling/disabling
  8918. *
  8919. * Bit 1 doesn't carry any operation for now and may change later,
  8920. * so reserved.
  8921. *
  8922. *-----------------------
  8923. * bit(0) | mode
  8924. *-----------------------
  8925. * 0 | AC
  8926. * 1 | AX
  8927. *-----------------------
  8928. *
  8929. * bit(1) | Reserved
  8930. *
  8931. *-----------------------
  8932. * bit(2) | mode
  8933. *-----------------------
  8934. * 0 | SU
  8935. * 1 | MU
  8936. *-----------------------
  8937. * bit(3) | mode
  8938. *-----------------------
  8939. * 0 | non -triggered
  8940. * 1 | triggered
  8941. */
  8942. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  8943. /** Fixed rate setting used in UL Trigger
  8944. * The top nibble is used to select which format to use for encoding
  8945. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8946. * format.
  8947. * If V == 0b0001: format is: 0x1000RRRR.
  8948. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8949. *
  8950. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  8951. */
  8952. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  8953. /**
  8954. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  8955. * 11AX: GI =
  8956. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  8957. * 11N: SGI=WMI_GI_400_NS
  8958. */
  8959. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  8960. /** Enable/Disable LDPC in UL Trigger */
  8961. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  8962. /** Max NSS allowed in UL Trigger */
  8963. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  8964. /** Enable/Disable STBC in UL Trigger */
  8965. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  8966. /** specify the HE LTF setting that should be used for fixed rate
  8967. * uplink transmissions.
  8968. *
  8969. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  8970. * or WMI_HE_LTF_4X.
  8971. */
  8972. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  8973. /** Uplink OFDMA PPDU bandwidth (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)*/
  8974. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  8975. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  8976. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  8977. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  8978. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  8979. /** Parameter used when MTU size is sent by the host
  8980. * In particular, this configuration message is used for cases where the
  8981. * encapsulation header results in a larger max frame size than the
  8982. * typical 802.3 + SNAP/LLC frame.
  8983. */
  8984. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  8985. /** Send every nth beacon to host
  8986. * if value of n is 0, it means this Nth beacon upload is disabled
  8987. */
  8988. WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */
  8989. /**
  8990. * To capture the MGMT OR DATA OR BOTH packets.
  8991. * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of
  8992. * which parameter value enables which kind of packet captures.
  8993. */
  8994. WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */
  8995. /**
  8996. * To configure duration of how many seconds without tx unicast traffic is
  8997. * considered stale for mcast rate adaptation
  8998. */
  8999. WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */
  9000. /*
  9001. * Bits 3:0 - AST0_FLOW_MASK(4)
  9002. * Bits 7:4 - AST1_FLOW_MASK(4)
  9003. * Bits 11:8 - AST2_FLOW_MASK(4)
  9004. * Bits 15:12 - AST3_FLOW_MASK(4)
  9005. * Bits 23:16 - TID_VALID_HI_PRI(8)
  9006. * Bits 31:24 - TID_VALID_LOW_PRI(8)
  9007. *
  9008. * The below macros can be used to set/get the relevent fields.
  9009. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x)
  9010. * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask)
  9011. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1)
  9012. * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask)
  9013. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1)
  9014. * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask)
  9015. */
  9016. WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */
  9017. /* Enable/Disable using NULL frame for leaky AP */
  9018. WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */
  9019. /**
  9020. * To configure duration of how many seconds without TX/RX data traffic,
  9021. * NDI vdev can kickout the connected peer (i.e. NDP Termination).
  9022. */
  9023. WMI_VDEV_PARAM_NDP_INACTIVITY_TIMEOUT, /* 0x97 */
  9024. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  9025. * The below vdev param types are used for prototyping, and are
  9026. * prone to change.
  9027. */
  9028. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  9029. /* 11AX SPECIFIC defines */
  9030. /* USE this for BSS color change */
  9031. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  9032. /*
  9033. * Enable / disable trigger access for a AP vdev's peers.
  9034. * For a STA mode vdev this will enable/disable triggered access
  9035. * and enable/disable Multi User mode of operation.
  9036. * A value of 0 in a given bit disables corresponding mode.
  9037. * bit | hemu mode
  9038. * ---------------
  9039. * 0 | HE SUBFEE
  9040. * 1 | HE SUBFER
  9041. * 2 | HE MUBFEE
  9042. * 3 | HE MUBFER
  9043. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  9044. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  9045. * | trigger receive & UL response
  9046. * 6 | UL MUMIMO
  9047. */
  9048. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  9049. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  9050. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  9051. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  9052. } WMI_VDEV_PARAM;
  9053. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  9054. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  9055. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  9056. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  9057. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  9058. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  9059. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  9060. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  9061. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  9062. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  9063. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  9064. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  9065. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  9066. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  9067. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  9068. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  9069. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  9070. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  9071. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  9072. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  9073. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  9074. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  9075. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  9076. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  9077. /* vdev capabilities bit mask */
  9078. #define WMI_VDEV_BEACON_SUPPORT 0x1
  9079. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  9080. #define WMI_VDEV_VOW_ENABLED 0x4
  9081. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  9082. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  9083. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  9084. /* Per VAP rate dropdown masks */
  9085. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  9086. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  9087. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  9088. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  9089. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  9090. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  9091. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  9092. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  9093. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  9094. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  9095. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  9096. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  9097. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  9098. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  9099. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  9100. /* TXBF capabilities masks */
  9101. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  9102. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  9103. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  9104. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  9105. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  9106. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  9107. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  9108. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  9109. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  9110. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  9111. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  9112. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  9113. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  9114. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  9115. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  9116. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  9117. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  9118. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  9119. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  9120. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  9121. #define WMI_TXBF_CONF_STS_CAP_S 4
  9122. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  9123. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  9124. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  9125. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  9126. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  9127. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  9128. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  9129. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  9130. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  9131. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  9132. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  9133. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  9134. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  9135. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  9136. /* commands for 11ax TXBF capabilities */
  9137. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  9138. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  9139. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  9140. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  9141. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  9142. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  9143. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  9144. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  9145. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  9146. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  9147. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  9148. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  9149. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  9150. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  9151. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  9152. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  9153. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  9154. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  9155. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  9156. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  9157. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  9158. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  9159. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  9160. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  9161. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  9162. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  9163. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  9164. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  9165. /* TXBF capabilities */
  9166. typedef struct {
  9167. A_UINT32 txbf_cap;
  9168. } wmi_vdev_txbf_cap;
  9169. /* vdev rx filters (for mesh) */
  9170. typedef enum {
  9171. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  9172. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  9173. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  9174. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  9175. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  9176. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  9177. } wmi_vdev_param_filter;
  9178. /* Length of ATIM Window in TU */
  9179. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  9180. enum wmi_pkt_type {
  9181. WMI_PKT_TYPE_RAW = 0,
  9182. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  9183. WMI_PKT_TYPE_ETHERNET = 2,
  9184. };
  9185. /*******************************************************************
  9186. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  9187. * Do not use it!
  9188. *******************************************************************/
  9189. typedef struct {
  9190. A_UINT8 sutxbfee : 1,
  9191. mutxbfee : 1,
  9192. sutxbfer : 1,
  9193. mutxbfer : 1,
  9194. txb_sts_cap : 3,
  9195. implicit_bf : 1;
  9196. } wmi_vdev_txbf_en;
  9197. /** Upto 8 bits are available for Roaming module to be sent along with
  9198. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  9199. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  9200. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  9201. /* Enable Roaming module in FW to do scan based on Final BMISS */
  9202. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  9203. /**
  9204. * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming.
  9205. * param value = 0 --> Enable EAPOL 4way handshake
  9206. * param value = 1 --> Skip EAPOL 4way handshake
  9207. */
  9208. #define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4
  9209. /** slot time long */
  9210. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  9211. /** slot time short */
  9212. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  9213. /** preablbe long */
  9214. #define WMI_VDEV_PREAMBLE_LONG 0x1
  9215. /** preablbe short */
  9216. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  9217. /** the definition of different START/RESTART Event response */
  9218. typedef enum {
  9219. /* Event respose of START CMD */
  9220. WMI_VDEV_START_RESP_EVENT = 0,
  9221. /* Event respose of RESTART CMD */
  9222. WMI_VDEV_RESTART_RESP_EVENT,
  9223. } WMI_START_EVENT_PARAM;
  9224. typedef struct {
  9225. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  9226. /** unique id identifying the VDEV, generated by the caller */
  9227. A_UINT32 vdev_id;
  9228. /** requestor id that requested the VDEV start request */
  9229. A_UINT32 requestor_id;
  9230. /* Respose of Event type START/RESTART */
  9231. WMI_START_EVENT_PARAM resp_type;
  9232. /** status of the response */
  9233. A_UINT32 status;
  9234. /** Vdev chain mask */
  9235. A_UINT32 chain_mask;
  9236. /** Vdev mimo power save mode */
  9237. A_UINT32 smps_mode;
  9238. union {
  9239. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  9240. /** pdev_id for identifying the MAC
  9241. * See macros starting with WMI_PDEV_ID_ for values.
  9242. */
  9243. A_UINT32 pdev_id;
  9244. };
  9245. /** Configured Transmit Streams **/
  9246. A_UINT32 cfgd_tx_streams;
  9247. /** Configured Receive Streams **/
  9248. A_UINT32 cfgd_rx_streams;
  9249. } wmi_vdev_start_response_event_fixed_param;
  9250. typedef struct {
  9251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  9252. /** unique id identifying the VDEV, generated by the caller */
  9253. A_UINT32 vdev_id;
  9254. } wmi_vdev_stopped_event_fixed_param;
  9255. typedef struct {
  9256. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  9257. /** unique id identifying the VDEV, generated by the caller */
  9258. A_UINT32 vdev_id;
  9259. } wmi_vdev_delete_resp_event_fixed_param;
  9260. /** common structure used for simple events (stopped, resume_req, standby response) */
  9261. typedef struct {
  9262. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  9263. /** unique id identifying the VDEV, generated by the caller */
  9264. A_UINT32 vdev_id;
  9265. } wmi_vdev_simple_event_fixed_param;
  9266. /** VDEV start response status codes */
  9267. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  9268. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  9269. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  9270. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  9271. #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */
  9272. #define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */
  9273. /** Beacon processing related command and event structures */
  9274. typedef struct {
  9275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  9276. /** unique id identifying the VDEV, generated by the caller */
  9277. A_UINT32 vdev_id;
  9278. /** xmit rate */
  9279. A_UINT32 tx_rate;
  9280. /** xmit power */
  9281. A_UINT32 txPower;
  9282. /** beacon buffer length in bytes */
  9283. A_UINT32 buf_len;
  9284. /* This TLV is followed by array of bytes:
  9285. * A_UINT8 bufp[]; <-- beacon frame buffer
  9286. */
  9287. } wmi_bcn_tx_hdr;
  9288. /* Beacon filter */
  9289. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  9290. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  9291. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  9292. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  9293. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  9294. typedef struct {
  9295. /** Filter ID */
  9296. A_UINT32 bcn_filter_id;
  9297. /** Filter type - wmi_bcn_filter */
  9298. A_UINT32 bcn_filter;
  9299. /** Buffer len */
  9300. A_UINT32 bcn_filter_len;
  9301. /** Filter info (threshold, BSSID, RSSI) */
  9302. A_UINT8 *bcn_filter_buf;
  9303. } wmi_bcn_filter_rx_cmd;
  9304. /** Capabilities and IEs to be passed to firmware */
  9305. typedef struct {
  9306. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  9307. /** Capabilities */
  9308. A_UINT32 caps;
  9309. /** ERP info */
  9310. A_UINT32 erp;
  9311. /** Advanced capabilities */
  9312. /** HT capabilities */
  9313. /** HT Info */
  9314. /** ibss_dfs */
  9315. /** wpa Info */
  9316. /** rsn Info */
  9317. /** rrm info */
  9318. /** ath_ext */
  9319. /** app IE */
  9320. } wmi_bcn_prb_info;
  9321. typedef struct {
  9322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  9323. /** unique id identifying the VDEV, generated by the caller */
  9324. A_UINT32 vdev_id;
  9325. /** TIM IE offset from the beginning of the template. */
  9326. A_UINT32 tim_ie_offset;
  9327. /** beacon buffer length. data is in TLV data[] */
  9328. A_UINT32 buf_len;
  9329. /** CSA IE switch count offset from the beginning of data[]
  9330. * Value 0 indicates CSA IE is not present in beacon template.
  9331. */
  9332. A_UINT32 csa_switch_count_offset; /* units = bytes */
  9333. /** Extended CSA IE switch count offset from the beginning of data[]
  9334. * Value 0 indicates CSA IE is not present in beacon template.
  9335. */
  9336. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  9337. /** Specify when to send the CSA switch count status from FW to host.
  9338. * See WMI_CSA_EVENT_BMAP* below for more information.
  9339. * E.g. if CSA switch count event is needed to be sent when the switch count
  9340. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  9341. */
  9342. A_UINT32 csa_event_bitmap;
  9343. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  9344. A_UINT32 mbssid_ie_offset;
  9345. /** offset (in octets/bytes) of ESP IE in beacon frame */
  9346. A_UINT32 esp_ie_offset;
  9347. /** CSC IE color switch count offset from the beginning of data[]
  9348. * Value 0 indicates CSC IE is not present in beacon template.
  9349. */
  9350. A_UINT32 csc_switch_count_offset; /* units = bytes */
  9351. /** Specify when to send the CSC switch count status from FW to host.
  9352. * See WMI_CSC_EVENT_BMAP* below for more information.
  9353. * E.g. if CSA switch count event is needed to be sent when the switch count
  9354. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  9355. */
  9356. A_UINT32 csc_event_bitmap;
  9357. /*
  9358. * The TLVs follows:
  9359. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  9360. * A_UINT8 data[]; <-- Variable length data
  9361. */
  9362. } wmi_bcn_tmpl_cmd_fixed_param;
  9363. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  9364. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  9365. Same can also be achieved by setting bitmap to 0X80000001 */
  9366. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  9367. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  9368. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  9369. Same can also be achieved by setting bitmap to 0X80000001 */
  9370. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  9371. typedef struct {
  9372. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  9373. /** unique id identifying the VDEV, generated by the caller */
  9374. A_UINT32 vdev_id;
  9375. /** beacon buffer length. data is in TLV data[] */
  9376. A_UINT32 buf_len;
  9377. /*
  9378. * The TLVs follows:
  9379. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  9380. * A_UINT8 data[]; <-- Variable length data
  9381. */
  9382. } wmi_prb_tmpl_cmd_fixed_param;
  9383. typedef struct {
  9384. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  9385. A_UINT32 tlv_header;
  9386. /** unique id identifying the VDEV */
  9387. A_UINT32 vdev_id;
  9388. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  9389. A_UINT32 tx_status;
  9390. } wmi_offload_bcn_tx_status_event_fixed_param;
  9391. enum wmi_sta_ps_mode {
  9392. /** enable power save for the given STA VDEV */
  9393. WMI_STA_PS_MODE_DISABLED = 0,
  9394. /** disable power save for a given STA VDEV */
  9395. WMI_STA_PS_MODE_ENABLED = 1,
  9396. };
  9397. typedef struct {
  9398. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  9399. /** unique id identifying the VDEV, generated by the caller */
  9400. A_UINT32 vdev_id;
  9401. /** Power save mode
  9402. *
  9403. * (see enum wmi_sta_ps_mode)
  9404. */
  9405. A_UINT32 sta_ps_mode;
  9406. } wmi_sta_powersave_mode_cmd_fixed_param;
  9407. typedef struct {
  9408. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_tdcc_config_cmd_fixed_param */
  9409. /** Set a max tx period: percentage of one beacon interval. range: 0 - 100 */
  9410. A_UINT32 tx_cycle_percentage;
  9411. /** Enable/disable TX Duty Cycle Control powersave */
  9412. A_UINT32 enabled;
  9413. } wmi_sta_tdcc_config_cmd_fixed_param;
  9414. enum wmi_csa_offload_en {
  9415. WMI_CSA_OFFLOAD_DISABLE = 0,
  9416. WMI_CSA_OFFLOAD_ENABLE = 1,
  9417. };
  9418. typedef struct {
  9419. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  9420. A_UINT32 vdev_id;
  9421. A_UINT32 csa_offload_enable;
  9422. } wmi_csa_offload_enable_cmd_fixed_param;
  9423. typedef struct {
  9424. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  9425. A_UINT32 vdev_id;
  9426. /*
  9427. * The TLVs follows:
  9428. * wmi_channel chan;
  9429. */
  9430. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  9431. /**
  9432. * This parameter controls the policy for retrieving frames from AP while the
  9433. * STA is in sleep state.
  9434. *
  9435. * Only takes affect if the sta_ps_mode is enabled
  9436. */
  9437. enum wmi_sta_ps_param_rx_wake_policy {
  9438. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  9439. * the Power save SM(state machine) will come out of sleep by either
  9440. * sending null frame (or) a data frame (with PS==0) in response to TIM
  9441. * bit set in the received beacon frame from AP.
  9442. */
  9443. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  9444. /* Here the power save state machine will not wakeup in response to TIM
  9445. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  9446. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  9447. * access categories are delivery-enabled, the station will send a UAPSD
  9448. * trigger frame, otherwise it will send a PS-Poll.
  9449. */
  9450. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  9451. };
  9452. /** Number of tx frames/beacon that cause the power save SM to wake up.
  9453. *
  9454. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  9455. * meaning, It will cause the SM to never wake up. This is useful if you want
  9456. * to keep the system to sleep all the time for some kind of test mode . host
  9457. * can change this parameter any time. It will affect at the next tx frame.
  9458. */
  9459. enum wmi_sta_ps_param_tx_wake_threshold {
  9460. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  9461. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  9462. /* Values greater than one indicate that many TX attempts per beacon
  9463. * interval before the STA will wake up
  9464. */
  9465. };
  9466. /**
  9467. * The maximum number of PS-Poll frames the FW will send in response to
  9468. * traffic advertised in TIM before waking up (by sending a null frame with PS
  9469. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  9470. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  9471. * parameter is used when the RX wake policy is
  9472. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  9473. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  9474. */
  9475. enum wmi_sta_ps_param_pspoll_count {
  9476. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  9477. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  9478. * will send before waking up.
  9479. */
  9480. };
  9481. /*
  9482. * This will include the delivery and trigger enabled state for every AC.
  9483. * This is the negotiated state with AP. The host MLME needs to set this based
  9484. * on AP capability and the state Set in the association request by the
  9485. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  9486. */
  9487. #define WMI_UAPSD_AC_TYPE_DELI 0
  9488. #define WMI_UAPSD_AC_TYPE_TRIG 1
  9489. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  9490. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  9491. (1 << (ac<<1)) : \
  9492. (1 << ((ac<<1)+1)))
  9493. enum wmi_sta_ps_param_uapsd {
  9494. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  9495. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  9496. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  9497. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  9498. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  9499. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  9500. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  9501. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  9502. };
  9503. enum wmi_sta_powersave_param {
  9504. /**
  9505. * Controls how frames are retrievd from AP while STA is sleeping
  9506. *
  9507. * (see enum wmi_sta_ps_param_rx_wake_policy)
  9508. */
  9509. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  9510. /**
  9511. * The STA will go active after this many TX
  9512. *
  9513. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  9514. */
  9515. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  9516. /**
  9517. * Number of PS-Poll to send before STA wakes up
  9518. *
  9519. * (see enum wmi_sta_ps_param_pspoll_count)
  9520. *
  9521. */
  9522. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  9523. /**
  9524. * TX/RX inactivity time in msec before going to sleep.
  9525. *
  9526. * The power save SM will monitor tx/rx activity on the VDEV, if no
  9527. * activity for the specified msec of the parameter the Power save SM will
  9528. * go to sleep.
  9529. */
  9530. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  9531. /**
  9532. * Set uapsd configuration.
  9533. *
  9534. * (see enum wmi_sta_ps_param_uapsd)
  9535. */
  9536. WMI_STA_PS_PARAM_UAPSD = 4,
  9537. /**
  9538. * Number of PS-Poll to send before STA wakes up in QPower Mode
  9539. */
  9540. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  9541. /**
  9542. * Enable QPower
  9543. */
  9544. WMI_STA_PS_ENABLE_QPOWER = 6,
  9545. /**
  9546. * Number of TX frames before the entering the Active state
  9547. */
  9548. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  9549. /**
  9550. * QPower SPEC PSPOLL interval
  9551. */
  9552. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  9553. /**
  9554. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  9555. * no-data bit set
  9556. */
  9557. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  9558. /**
  9559. * Max value of ITO reset when there is no tx-rx
  9560. * after AP has set the TIM bit
  9561. */
  9562. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  9563. };
  9564. typedef struct {
  9565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  9566. /** unique id identifying the VDEV, generated by the caller */
  9567. A_UINT32 vdev_id;
  9568. /** station power save parameter (see enum wmi_sta_powersave_param) */
  9569. A_UINT32 param;
  9570. A_UINT32 value;
  9571. } wmi_sta_powersave_param_cmd_fixed_param;
  9572. /** No MIMO power save */
  9573. #define WMI_STA_MIMO_PS_MODE_DISABLE
  9574. /** mimo powersave mode static*/
  9575. #define WMI_STA_MIMO_PS_MODE_STATIC
  9576. /** mimo powersave mode dynamic */
  9577. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  9578. typedef struct {
  9579. /** unique id identifying the VDEV, generated by the caller */
  9580. A_UINT32 vdev_id;
  9581. /** mimo powersave mode as defined above */
  9582. A_UINT32 mimo_pwrsave_mode;
  9583. } wmi_sta_mimo_ps_mode_cmd;
  9584. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  9585. enum wmi_ap_ps_param_uapsd {
  9586. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  9587. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  9588. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  9589. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  9590. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  9591. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  9592. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  9593. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  9594. };
  9595. /** U-APSD maximum service period of peer station */
  9596. enum wmi_ap_ps_peer_param_max_sp {
  9597. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  9598. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  9599. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  9600. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  9601. /* keep last! */
  9602. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  9603. };
  9604. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  9605. enum wmi_ap_ps_param_sifs_resp_frmtype {
  9606. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  9607. WMI_SIFS_RESP_UAPSD = (1 << 1),
  9608. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  9609. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  9610. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  9611. };
  9612. /**
  9613. * AP power save parameter
  9614. * Set a power save specific parameter for a peer station
  9615. */
  9616. enum wmi_ap_ps_peer_param {
  9617. /** Set uapsd configuration for a given peer.
  9618. *
  9619. * This will include the delivery and trigger enabled state for every AC.
  9620. * The host MLME needs to set this based on AP capability and stations
  9621. * request Set in the association request received from the station.
  9622. *
  9623. * Lower 8 bits of the value specify the UAPSD configuration.
  9624. *
  9625. * (see enum wmi_ap_ps_param_uapsd)
  9626. * The default value is 0.
  9627. */
  9628. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  9629. /**
  9630. * Set the service period for a UAPSD capable station
  9631. *
  9632. * The service period from wme ie in the (re)assoc request frame.
  9633. *
  9634. * (see enum wmi_ap_ps_peer_param_max_sp)
  9635. */
  9636. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  9637. /** Time in seconds for aging out buffered frames for STA in power save */
  9638. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  9639. /**
  9640. * Specify frame types that are considered SIFS RESP trigger frame
  9641. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  9642. */
  9643. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  9644. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  9645. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  9646. /** Specifies the WNM sleep state of a STA */
  9647. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  9648. };
  9649. typedef struct {
  9650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  9651. /** unique id identifying the VDEV, generated by the caller */
  9652. A_UINT32 vdev_id;
  9653. /** peer MAC address */
  9654. wmi_mac_addr peer_macaddr;
  9655. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  9656. A_UINT32 param;
  9657. /** AP powersave param value (see defines) */
  9658. A_UINT32 value;
  9659. } wmi_ap_ps_peer_cmd_fixed_param;
  9660. /** Configure peer station 11v U-APSD coexistance
  9661. *
  9662. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  9663. * sent down to FW along with this command.
  9664. *
  9665. * The semantics of these fields are described in the following text extracted
  9666. * from 802.11v.
  9667. *
  9668. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  9669. * U-APSD Coexistence element, the AP should not transmit frames to the
  9670. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  9671. * begins when the AP receives the U-APSD trigger frame and ends after
  9672. * the transmission period specified by the result of the following
  9673. * calculation:
  9674. *
  9675. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  9676. *
  9677. * Where T is the time the U-APSD trigger frame was received at the AP
  9678. * Interval is the UAPSD Coexistence element Duration/Interval field
  9679. * value (see 7.3.2.91) or upon the successful transmission of a frame
  9680. * with EOSP bit set to 1, whichever is earlier.
  9681. *
  9682. *
  9683. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  9684. * Coexistence element, the AP should not transmit frames to the non-AP
  9685. * STA outside of the U-APSD Coexistence Service Period, which begins
  9686. * when the AP receives a U-APSD trigger frame and ends after the
  9687. * transmission period specified by the result of the following
  9688. * calculation: End of transmission period = T + Duration
  9689. */
  9690. typedef struct {
  9691. /** unique id identifying the VDEV, generated by the caller */
  9692. A_UINT32 vdev_id;
  9693. /** peer MAC address */
  9694. wmi_mac_addr peer_macaddr;
  9695. /** Enable U-APSD coexistence support for this peer
  9696. *
  9697. * 0 -> disabled (default)
  9698. * 1 -> enabled
  9699. */
  9700. A_UINT32 enabled;
  9701. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  9702. A_UINT32 duration_interval;
  9703. /** Upper 32 bits of 64-bit TSF offset */
  9704. A_UINT32 tsf_offset_high;
  9705. /** Lower 32 bits of 64-bit TSF offset */
  9706. A_UINT32 tsf_offset_low;
  9707. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  9708. typedef enum {
  9709. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  9710. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  9711. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  9712. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  9713. } wmi_ap_ps_egap_flag_type;
  9714. #define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8)
  9715. #define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8)
  9716. #define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8)
  9717. #define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8)
  9718. #define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val)
  9719. #define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val)
  9720. #define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val)
  9721. #define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val)
  9722. /**
  9723. * configure enhanced green ap parameters
  9724. */
  9725. typedef struct {
  9726. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  9727. /** Enable enhanced green ap
  9728. * 0 -> disabled
  9729. * 1 -> enabled
  9730. */
  9731. A_UINT32 enable;
  9732. /** The param indicates a duration that all STAs connected
  9733. * to S-AP have no traffic.
  9734. */
  9735. A_UINT32 inactivity_time; /* in unit of milliseconds */
  9736. /** The param indicates a duration that all STAs connected
  9737. * to S-AP have no traffic, after all STAs have entered powersave.
  9738. */
  9739. A_UINT32 wait_time; /* in unit of milliseconds */
  9740. /** The param is used to turn on/off some functions within E-GAP.
  9741. */
  9742. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  9743. /** Reduced_txrx_chainmask
  9744. * [7:0] - 2G band tx chain mask
  9745. * [15:8] - 2G band rx chain mask
  9746. * [23:16] - 5G band tx chain mask
  9747. * [31:24] - 5G band rx chain mask
  9748. */
  9749. A_UINT32 reduced_txrx_chainmask;
  9750. } wmi_ap_ps_egap_param_cmd_fixed_param;
  9751. typedef enum {
  9752. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  9753. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  9754. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  9755. WMI_AP_PS_EGAP_STATUS_MAX = 15
  9756. } wmi_ap_ps_egap_status_type;
  9757. /**
  9758. * send ehanced green ap status to host
  9759. */
  9760. typedef struct
  9761. {
  9762. /** TLV tag and len; tag equals
  9763. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  9764. A_UINT32 tlv_header;
  9765. union {
  9766. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  9767. /** pdev_id for identifying the MAC
  9768. * See macros starting with WMI_PDEV_ID_ for values.
  9769. */
  9770. A_UINT32 pdev_id;
  9771. };
  9772. /** The param indicates the current tx chainmask with the mac id. */
  9773. A_UINT32 tx_chainmask;
  9774. /** The param indicates the current rx chainmask with the mac id. */
  9775. A_UINT32 rx_chainmask;
  9776. } wmi_ap_ps_egap_info_chainmask_list;
  9777. typedef struct {
  9778. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  9779. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  9780. A_UINT32 status;
  9781. /* This TLV is followed by
  9782. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  9783. */
  9784. } wmi_ap_ps_egap_info_event_fixed_param;
  9785. /* 128 clients = 4 words */
  9786. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  9787. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  9788. typedef struct {
  9789. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9790. /** TIM bitmap len (in bytes) */
  9791. A_UINT32 tim_len;
  9792. /** TIM Partial Virtual Bitmap */
  9793. A_UINT32 tim_mcast;
  9794. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  9795. A_UINT32 tim_changed;
  9796. A_UINT32 tim_num_ps_pending;
  9797. /** Use the vdev_id only if vdev_id_valid is set */
  9798. A_UINT32 vdev_id_valid;
  9799. /** unique id identifying the VDEV */
  9800. A_UINT32 vdev_id;
  9801. } wmi_tim_info;
  9802. typedef struct {
  9803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9804. /** TIM Partial Virtual Bitmap */
  9805. A_UINT32 tim_mcast;
  9806. A_UINT32 tim_changed;
  9807. A_UINT32 tim_num_ps_pending;
  9808. /** Use the vdev_id only if vdev_id_valid is set */
  9809. A_UINT32 vdev_id_valid;
  9810. /** unique id identifying the VDEV */
  9811. A_UINT32 vdev_id;
  9812. /** TIM bitmap len (in bytes) */
  9813. A_UINT32 tim_len;
  9814. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  9815. } wmi_tim_info_v2;
  9816. typedef struct {
  9817. /** Flag to enable quiet period IE support */
  9818. A_UINT32 is_enabled;
  9819. /** Quiet start */
  9820. A_UINT32 tbttcount;
  9821. /** Beacon intervals between quiets*/
  9822. A_UINT32 period;
  9823. /** TUs of each quiet*/
  9824. A_UINT32 duration;
  9825. /** TUs of from TBTT of quiet start*/
  9826. A_UINT32 offset;
  9827. } wmi_quiet_info;
  9828. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  9829. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  9830. typedef struct {
  9831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  9832. /** Bit 0: Flag to indicate an update in NOA schedule
  9833. * Bits 7-1: Reserved
  9834. * Bits 15-8: Index (identifies the instance of NOA sub element)
  9835. * Bit 16: Opp PS state of the AP
  9836. * Bits 23-17: Ctwindow in TUs
  9837. * Bits 31-24: Number of NOA descriptors
  9838. */
  9839. A_UINT32 noa_attributes;
  9840. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  9841. /** Use the vdev_id only if vdev_id_valid is set */
  9842. A_UINT32 vdev_id_valid;
  9843. /** unique id identifying the VDEV */
  9844. A_UINT32 vdev_id;
  9845. } wmi_p2p_noa_info;
  9846. typedef struct {
  9847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  9848. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  9849. A_UINT8 tbttcount; /* quiet start */
  9850. A_UINT8 period; /* beacon intervals between quiets */
  9851. A_UINT16 duration; /* TUs of each quiet */
  9852. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  9853. } wmi_quiet_offload_info;
  9854. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  9855. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  9856. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  9857. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  9858. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  9859. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9860. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  9861. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  9862. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  9863. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  9864. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  9865. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  9866. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9867. WMI_UNIFIED_NOA_ATTR_INDEX);
  9868. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  9869. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  9870. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  9871. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  9872. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  9873. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9874. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  9875. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  9876. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  9877. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  9878. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  9879. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  9880. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  9881. WMI_UNIFIED_NOA_ATTR_CTWIN);
  9882. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  9883. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  9884. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  9885. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  9886. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  9887. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9888. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  9889. typedef struct {
  9890. /** TIM info */
  9891. wmi_tim_info tim_info;
  9892. /** P2P NOA info */
  9893. wmi_p2p_noa_info p2p_noa_info;
  9894. /* TBD: More info elements to be added later */
  9895. } wmi_bcn_info;
  9896. typedef struct {
  9897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  9898. /** bitmap identifying the VDEVs, generated by the caller */
  9899. A_UINT32 vdev_map;
  9900. /** how many vdev's info is included in this message
  9901. * If this field is zero, then the number of vdevs is specified by
  9902. * the number of bits set in the vdev_map bitmap.
  9903. */
  9904. A_UINT32 num_vdevs;
  9905. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  9906. * wmi_tim_info tim_info[];
  9907. * wmi_p2p_noa_info p2p_noa_info[];
  9908. * wmi_quiet_offload_info quiet_offload_info[0/1];
  9909. *
  9910. */
  9911. } wmi_host_swba_event_fixed_param;
  9912. #define WMI_MAX_AP_VDEV 16
  9913. typedef struct {
  9914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  9915. /** vdev_id identifying the VDEV for which FILS should be generated */
  9916. A_UINT32 vdev_id;
  9917. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  9918. A_UINT32 fils_tt;
  9919. /** next TBTT time (in TU) for this vdev */
  9920. A_UINT32 tbtt;
  9921. } wmi_host_swfda_event_fixed_param;
  9922. typedef struct {
  9923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  9924. /** bimtap of VDEVs that has tbtt offset updated */
  9925. A_UINT32 vdev_map;
  9926. /* The TLVs for tbttoffset_list will follow this TLV.
  9927. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  9928. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  9929. */
  9930. } wmi_tbtt_offset_event_fixed_param;
  9931. typedef struct {
  9932. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  9933. /** unique id identifying the VDEV */
  9934. A_UINT32 vdev_id;
  9935. /** tbttoffset in TUs */
  9936. A_UINT32 tbttoffset;
  9937. } wmi_tbtt_offset_info;
  9938. /** Use this event if number of vdevs > 32 */
  9939. typedef struct {
  9940. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  9941. A_UINT32 num_vdevs;
  9942. /*
  9943. * The TLVs for tbttoffset will follow this TLV.
  9944. * Of size num_vdevs * wmi_tbtt_offset_info
  9945. */
  9946. } wmi_tbtt_offset_ext_event_fixed_param;
  9947. /* Peer Specific commands and events */
  9948. typedef struct {
  9949. A_UINT32 percentage; /* in unit of 12.5% */
  9950. A_UINT32 min_delta; /* in unit of Mbps */
  9951. } rate_delta_t;
  9952. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  9953. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  9954. #define MAX_NUM_OF_RATE_THRESH 4
  9955. typedef struct {
  9956. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  9957. Any of these two conditions or both of them can be set. */
  9958. rate_delta_t rate_delta;
  9959. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  9960. If the threshold count is less than 4, set zero to
  9961. the one following the last threshold */
  9962. } report_cond_per_phy_t;
  9963. enum peer_rate_report_cond_phy_type {
  9964. PEER_RATE_REPORT_COND_11B = 0,
  9965. PEER_RATE_REPORT_COND_11A_G,
  9966. PEER_RATE_REPORT_COND_11N,
  9967. PEER_RATE_REPORT_COND_11AC,
  9968. PEER_RATE_REPORT_COND_MAX_NUM
  9969. };
  9970. typedef struct {
  9971. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  9972. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  9973. A_UINT32 report_backoff_time; /* in unit of msecond */
  9974. A_UINT32 report_timer_period; /* in unit of msecond */
  9975. /* In the following field, the array index means the phy type,
  9976. * please see enum peer_rate_report_cond_phy_type for detail */
  9977. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  9978. } wmi_peer_set_rate_report_condition_fixed_param;
  9979. /* Peer Type:
  9980. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  9981. * on address and vdev opmode. This is largely here to allow host to indicate that
  9982. * peer is explicitly a TDLS peer
  9983. */
  9984. enum wmi_peer_type {
  9985. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  9986. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  9987. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  9988. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  9989. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  9990. WMI_PEER_TYPE_TRANS_BSS = 5, /* For creating BSS peer when connecting with non-transmit AP */
  9991. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  9992. /* Reserved from 128 - 255 for target internal use.*/
  9993. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  9994. };
  9995. typedef struct {
  9996. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  9997. /** unique id identifying the VDEV, generated by the caller */
  9998. A_UINT32 vdev_id;
  9999. /** peer MAC address */
  10000. wmi_mac_addr peer_macaddr;
  10001. /** peer type: see enum values above */
  10002. A_UINT32 peer_type;
  10003. } wmi_peer_create_cmd_fixed_param;
  10004. typedef struct {
  10005. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  10006. /** unique id identifying the VDEV, generated by the caller */
  10007. A_UINT32 vdev_id;
  10008. /** peer MAC address */
  10009. wmi_mac_addr peer_macaddr;
  10010. } wmi_peer_delete_cmd_fixed_param;
  10011. typedef struct {
  10012. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */
  10013. /** unique id identifying the VDEV, generated by the caller */
  10014. A_UINT32 vdev_id;
  10015. } wmi_vdev_delete_all_peer_cmd_fixed_param;
  10016. typedef struct {
  10017. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  10018. A_UINT32 tlv_header;
  10019. /*
  10020. * Following this struct is the TLV:
  10021. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  10022. * that have been unmapped by the host
  10023. */
  10024. } wmi_peer_unmap_response_cmd_fixed_param;
  10025. typedef struct {
  10026. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  10027. /** unique id identifying the VDEV, generated by the caller */
  10028. A_UINT32 vdev_id;
  10029. /** peer MAC address */
  10030. wmi_mac_addr peer_macaddr;
  10031. /**
  10032. * maximum block ack window size to use during a rx block ack negotiation,
  10033. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  10034. */
  10035. A_UINT32 rx_block_ack_win_limit;
  10036. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  10037. typedef struct {
  10038. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  10039. /** unique id identifying the VDEV, generated by the caller */
  10040. A_UINT32 vdev_id;
  10041. /** peer MAC address */
  10042. wmi_mac_addr peer_macaddr;
  10043. /** tid bitmap identifying the tids to flush */
  10044. A_UINT32 peer_tid_bitmap;
  10045. } wmi_peer_flush_tids_cmd_fixed_param;
  10046. typedef struct {
  10047. /** rate mode . 0: disable fixed rate (auto rate)
  10048. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  10049. * 2: ht20 11n rate specified as mcs index
  10050. * 3: ht40 11n rate specified as mcs index
  10051. */
  10052. A_UINT32 rate_mode;
  10053. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  10054. * and series 3 is stored at byte 3 (MSB) */
  10055. A_UINT32 rate_series;
  10056. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  10057. * and retry count for rate 3 is stored at byte 3 (MSB) */
  10058. A_UINT32 rate_retries;
  10059. } wmi_fixed_rate;
  10060. typedef struct {
  10061. /** unique id identifying the VDEV, generated by the caller */
  10062. A_UINT32 vdev_id;
  10063. /** peer MAC address */
  10064. wmi_mac_addr peer_macaddr;
  10065. /** fixed rate */
  10066. wmi_fixed_rate peer_fixed_rate;
  10067. } wmi_peer_fixed_rate_cmd;
  10068. #define WMI_MGMT_TID 17
  10069. typedef struct {
  10070. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  10071. /** unique id identifying the VDEV, generated by the caller */
  10072. A_UINT32 vdev_id;
  10073. /** peer MAC address */
  10074. wmi_mac_addr peer_macaddr;
  10075. } wmi_addba_clear_resp_cmd_fixed_param;
  10076. typedef struct {
  10077. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  10078. /** unique id identifying the VDEV, generated by the caller */
  10079. A_UINT32 vdev_id;
  10080. /** peer MAC address */
  10081. wmi_mac_addr peer_macaddr;
  10082. /** Tid number */
  10083. A_UINT32 tid;
  10084. /** Buffer/Window size*/
  10085. A_UINT32 buffersize;
  10086. } wmi_addba_send_cmd_fixed_param;
  10087. typedef struct {
  10088. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  10089. /** unique id identifying the VDEV, generated by the caller */
  10090. A_UINT32 vdev_id;
  10091. /** peer MAC address */
  10092. wmi_mac_addr peer_macaddr;
  10093. /** Tid number */
  10094. A_UINT32 tid;
  10095. /** Is Initiator */
  10096. A_UINT32 initiator;
  10097. /** Reason code */
  10098. A_UINT32 reasoncode;
  10099. } wmi_delba_send_cmd_fixed_param;
  10100. typedef struct {
  10101. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  10102. /** unique id identifying the vdev, generated by the caller */
  10103. A_UINT32 vdev_id;
  10104. /** peer mac address */
  10105. wmi_mac_addr peer_macaddr;
  10106. /** Tid number */
  10107. A_UINT32 tid;
  10108. /** status code */
  10109. A_UINT32 statuscode;
  10110. } wmi_addba_setresponse_cmd_fixed_param;
  10111. typedef struct {
  10112. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  10113. /** unique id identifying the vdev, generated by the caller */
  10114. A_UINT32 vdev_id;
  10115. /** peer mac address */
  10116. wmi_mac_addr peer_macaddr;
  10117. /** Tid number */
  10118. A_UINT32 tid;
  10119. } wmi_send_singleamsdu_cmd_fixed_param;
  10120. /* Type of Station DTIM Power Save method */
  10121. enum {
  10122. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  10123. * also the same value as the listen interval. For this method, the
  10124. * station will wake up based on the listen interval. If this
  10125. * listen interval is not equal to DTIM, then the station may
  10126. * miss certain DTIM beacons. If this value is 1, then the
  10127. * station will wake up for every beacon.
  10128. */
  10129. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  10130. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  10131. * When this value is 1, then the station will wake at every DTIM beacon.
  10132. * If this value is >1, then the station will skip certain DTIM beacons.
  10133. * This value is the multiple of DTIM intervals that the station will
  10134. * wake up to receive the DTIM beacons.
  10135. */
  10136. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  10137. };
  10138. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  10139. typedef struct {
  10140. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  10141. /** unique id identifying the VDEV, generated by the caller */
  10142. A_UINT32 vdev_id;
  10143. /** Station DTIM Power Save method as defined above */
  10144. A_UINT32 dtim_pwrsave_method;
  10145. /** DTIM PS value. Contents depends on the method */
  10146. A_UINT32 value;
  10147. /** Modulated DTIM value */
  10148. A_UINT32 MaxLIModulatedDTIM;
  10149. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  10150. /*
  10151. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  10152. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  10153. * If there is no uplink/download for the specified service interval (field service_interval),
  10154. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  10155. * specified in the UP (field user_priority).
  10156. * Firmware also monitors the responses for these QOS-NULL triggers.
  10157. * If the peer does not have any delivery frames, it will respond with
  10158. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  10159. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  10160. * are unused and should be set to 0.
  10161. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  10162. * certain host-based implementations that don't want this firmware offload.
  10163. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  10164. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  10165. * and rest of the AC default to 300 ms.
  10166. *
  10167. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  10168. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  10169. * the more advanced monitoring method.
  10170. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  10171. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  10172. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  10173. * will save more power by waking up less and sending less trigger frames.
  10174. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  10175. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  10176. * should be 0.
  10177. */
  10178. typedef struct {
  10179. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  10180. /** WMM Access category from 0 to 3 */
  10181. A_UINT32 wmm_ac;
  10182. /** User priority to use in trigger frames. It is the TID
  10183. * value. This field needs to be specified and may not be
  10184. * equivalent to AC since some implementation may use the TSPEC
  10185. * to enable UAPSD and negotiate a particular user priority. */
  10186. A_UINT32 user_priority;
  10187. /** service interval in ms */
  10188. A_UINT32 service_interval;
  10189. /** Suspend interval in ms */
  10190. A_UINT32 suspend_interval;
  10191. /** delay interval in ms */
  10192. A_UINT32 delay_interval;
  10193. } wmi_sta_uapsd_auto_trig_param;
  10194. typedef struct {
  10195. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  10196. /** unique id identifying the VDEV, generated by the caller */
  10197. A_UINT32 vdev_id;
  10198. /** peer mac address */
  10199. wmi_mac_addr peer_macaddr;
  10200. /** Number of AC to specify */
  10201. A_UINT32 num_ac;
  10202. /*
  10203. * Following this struc is the TLV:
  10204. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  10205. */
  10206. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  10207. /** mimo powersave state */
  10208. #define WMI_PEER_MIMO_PS_STATE 0x1
  10209. /** enable/disable AMPDU . initial value (enabled) */
  10210. #define WMI_PEER_AMPDU 0x2
  10211. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  10212. #define WMI_PEER_AUTHORIZE 0x3
  10213. /** peer channel bandwidth */
  10214. #define WMI_PEER_CHWIDTH 0x4
  10215. /** peer NSS */
  10216. #define WMI_PEER_NSS 0x5
  10217. /** USE 4 ADDR */
  10218. #define WMI_PEER_USE_4ADDR 0x6
  10219. /* set group membership status */
  10220. #define WMI_PEER_MEMBERSHIP 0x7
  10221. #define WMI_PEER_USERPOS 0x8
  10222. /*
  10223. * A critical high-level protocol is being used with this peer. Target
  10224. * should take appropriate measures (if possible) to ensure more
  10225. * reliable link with minimal latency. This *may* include modifying the
  10226. * station power save policy, enabling more RX chains, increased
  10227. * priority of channel scheduling, etc.
  10228. *
  10229. * NOTE: This parameter should only be considered a hint as specific
  10230. * behavior will depend on many factors including current network load
  10231. * and vdev/peer configuration.
  10232. *
  10233. * For STA VDEV this peer corresponds to the AP's BSS peer.
  10234. * For AP VDEV this peer corresponds to the remote peer STA.
  10235. */
  10236. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  10237. /* set Tx failure count threshold for the peer - Currently unused */
  10238. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  10239. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  10240. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  10241. /* Set peer advertised IBSS atim window length */
  10242. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  10243. /** peer phy mode */
  10244. #define WMI_PEER_PHYMODE 0xD
  10245. /** Use FIXED Pwr */
  10246. #define WMI_PEER_USE_FIXED_PWR 0xE
  10247. /** Set peer fixed rate
  10248. * The top nibble is used to select which format to use for encoding
  10249. * the rate specification: 0xVXXXXXXX
  10250. * If V == 0b0000: format is same as before: 0x000000RR
  10251. * If V == 0b0001: format is: 0x1000RRRR.
  10252. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10253. * The host shall use the new V1 format (and set V = 0x1) if the target
  10254. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  10255. * system is configured with Nss > 4 (either at compile time within the
  10256. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  10257. * by the target).
  10258. */
  10259. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  10260. /** Whitelist peer TIDs */
  10261. #define WMI_PEER_SET_MU_WHITELIST 0x10
  10262. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  10263. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  10264. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  10265. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  10266. /**
  10267. * default ring routing for peer data packets,
  10268. * param_value = bit 0 for hash based routing enabled or not
  10269. * (value 1 is enabled, value 0 is disabled)
  10270. * bits 1:5 are for ring 32 (i.e. ring id value
  10271. * selected from 0 to 31 values)
  10272. * bit 8 for peer based ring selection enabled or not
  10273. * (value 1 is enabled, value 0 is disabled
  10274. * bits 9-15 are valid when bit 8 is set to 1)
  10275. * bit 9 is for ring selection enabled for filter-pass
  10276. * unicast or not (value 1 is enabled, value 0 is disabled)
  10277. * bit 10 is for ring selection enabled for filter-pass
  10278. * mcast or not (value 1 is enabled, value 0 is disabled)
  10279. * bit 11 is for ring selection enabled for filter-pass
  10280. * BAR or not (value 1 is enabled, value 0 is disabled)
  10281. * bit 12-13 is for source ring selection value
  10282. * (value 0 for wbm2rxdma buf ring,
  10283. * value 1 for fw2rxdma buf ring,
  10284. * value 2 for sw2rxdma buf ring,
  10285. * value 3 for no buf ring)
  10286. * bit 14-15 is for destination ring selection value
  10287. * (value 0 for wbm release ring,
  10288. * value 1 for rxdma2fw ring,
  10289. * value 2 for rxdma2sw ring,
  10290. * value 3 for rxdma2reo ring)
  10291. */
  10292. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  10293. /* peer NSS for VHT160 - Extended NSS support */
  10294. #define WMI_PEER_NSS_VHT160 0x14
  10295. /* peer NSS for VHT160 - Extended NSS support */
  10296. #define WMI_PEER_NSS_VHT80_80 0x15
  10297. /* Peer SU TXBF sounding interval */
  10298. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  10299. /* Peer MU TXBF sounding interval */
  10300. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  10301. /* Peer TXBF sounding enable or disable */
  10302. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  10303. /* Per peer 11ax OFDMA enable or disable */
  10304. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  10305. /* Per peer 11ax/11ac MU enable or disable */
  10306. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  10307. /** Set peer fixed rate used in UL Trigger
  10308. * The top nibble is used to select which format to use for encoding
  10309. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  10310. * If V == 0b0001: format is: 0x1000RRRR.
  10311. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  10312. *
  10313. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  10314. */
  10315. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  10316. /** send specific OMI to peer via QoS-null frame
  10317. * param_value = follow 11ax spec definition
  10318. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  10319. */
  10320. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  10321. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  10322. /* Disable burst and assist */
  10323. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  10324. /* Enable 11r FT Roaming */
  10325. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  10326. /* update peer flag for ptk 4 way handshake */
  10327. #define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f
  10328. /* update peer flag for gtk 2 way handshake */
  10329. #define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20
  10330. /* update peer flag for M4 sent */
  10331. #define WMI_PEER_PARAM_M4_SENT 0x21
  10332. /* Per peer MISC stats enable or disable */
  10333. #define WMI_PEER_PARAM_MISC_STATS_ENABLE 0x22
  10334. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  10335. #define WMI_PEER_MIMO_PS_NONE 0x0
  10336. #define WMI_PEER_MIMO_PS_STATIC 0x1
  10337. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  10338. typedef struct {
  10339. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  10340. /** unique id identifying the VDEV, generated by the caller */
  10341. A_UINT32 vdev_id;
  10342. /** peer MAC address */
  10343. wmi_mac_addr peer_macaddr;
  10344. /** parameter id */
  10345. A_UINT32 param_id;
  10346. /** parametr value */
  10347. A_UINT32 param_value;
  10348. } wmi_peer_set_param_cmd_fixed_param;
  10349. typedef union {
  10350. /*
  10351. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  10352. * by the target or a little-endian host.
  10353. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  10354. * macros on the A_UINT32 "value" field.
  10355. */
  10356. struct {
  10357. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  10358. A_UINT16 tx_rate; /* see per-mode specs below */
  10359. };
  10360. A_UINT32 value; /* for use by big-endian host */
  10361. } wmi_peer_max_min_tx_rate;
  10362. /*
  10363. * Any access to the mode/tx_rate in an big endian system should use
  10364. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  10365. */
  10366. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  10367. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  10368. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  10369. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  10370. /* CCK max/min tx Rate description
  10371. * tx_rate = 0: 1 Mbps
  10372. * tx_rate = 1: 2 Mbps
  10373. * tx_rate = 2: 5.5 Mbps
  10374. * tx_rate = 3: 11 Mbps
  10375. * tx_rate = else: invalid
  10376. */
  10377. enum {
  10378. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  10379. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  10380. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  10381. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  10382. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  10383. };
  10384. /* OFDM max/min tx Rate description
  10385. * tx_rate = 0: 6 Mbps
  10386. * tx_rate = 1: 9 Mbps
  10387. * tx_rate = 2: 12 Mbps
  10388. * tx_rate = 3: 18 Mbps
  10389. * tx_rate = 4: 24 Mbps
  10390. * tx_rate = 5: 32 Mbps
  10391. * tx_rate = 6: 48 Mbps
  10392. * tx_rate = 7: 54 Mbps
  10393. * tx_rate = else: invalid
  10394. */
  10395. enum {
  10396. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  10397. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  10398. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  10399. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  10400. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  10401. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  10402. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  10403. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  10404. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  10405. };
  10406. /* HT max/min tx rate description
  10407. * tx_rate = 0~7 : MCS Rate 0~7
  10408. * tx_rate=else : invalid.
  10409. */
  10410. #define WMI_MAX_HT_TX_MCS 0x07
  10411. /* VHT max/min tx rate description
  10412. * tx_rate = 0~9 : MCS Rate 0~9
  10413. * tx_rate=else : invalid.
  10414. */
  10415. #define WMI_MAX_VHT_TX_MCS 0x09
  10416. #define MAX_SUPPORTED_RATES 128
  10417. typedef struct {
  10418. /** total number of rates */
  10419. A_UINT32 num_rates;
  10420. /**
  10421. * rates (each 8bit value) packed into a 32 bit word.
  10422. * the rates are filled from least significant byte to most
  10423. * significant byte.
  10424. */
  10425. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  10426. } wmi_rate_set;
  10427. /* NOTE: It would bea good idea to represent the Tx MCS
  10428. * info in one word and Rx in another word. This is split
  10429. * into multiple words for convenience
  10430. */
  10431. typedef struct {
  10432. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  10433. A_UINT32 rx_max_rate; /* Max Rx data rate */
  10434. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  10435. A_UINT32 tx_max_rate; /* Max Tx data rate */
  10436. /*
  10437. * bit [15:0] indicates MCS 0 to 9
  10438. * bit [23:16] indicates MCS 10 & 11
  10439. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  10440. */
  10441. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  10442. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  10443. } wmi_vht_rate_set;
  10444. /* NOTE: It would bea good idea to represent the Tx MCS
  10445. * info in one word and Rx in another word. This is split
  10446. * into multiple words for convenience
  10447. * 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
  10448. */
  10449. typedef struct {
  10450. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  10451. /* HE Supported MCS Set field Rx
  10452. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  10453. * value 0 - MCS 0-7 enabled for this NSS
  10454. * value 1 - MCS 0-9 enabled for this NSS
  10455. * value 2 - MCS 0-11 enabled for this NSS
  10456. * value 3 - NSS disabled
  10457. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  10458. */
  10459. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  10460. /* HE Supported MCS Set field Tx
  10461. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  10462. * value 0 - MCS 0-7 enabled for this NSS
  10463. * value 1 - MCS 0-9 enabled for this NSS
  10464. * value 2 - MCS 0-11 enabled for this NSS
  10465. * value 3 - NSS disabled
  10466. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  10467. */
  10468. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  10469. } wmi_he_rate_set;
  10470. /*
  10471. * IMPORTANT: Make sure the bit definitions here are consistent
  10472. * with the ni_flags definitions in wlan_peer.h
  10473. */
  10474. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  10475. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  10476. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  10477. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  10478. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  10479. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  10480. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  10481. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  10482. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  10483. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  10484. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  10485. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  10486. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  10487. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  10488. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  10489. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  10490. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  10491. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  10492. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  10493. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  10494. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  10495. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  10496. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  10497. /**
  10498. * Peer rate capabilities.
  10499. *
  10500. * This is of interest to the ratecontrol
  10501. * module which resides in the firmware. The bit definitions are
  10502. * consistent with that defined in if_athrate.c.
  10503. *
  10504. * @todo
  10505. * Move this to a common header file later so there is no need to
  10506. * duplicate the definitions or maintain consistency.
  10507. */
  10508. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  10509. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  10510. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  10511. #define WMI_RC_HT_FLAG 0x08 /* HT */
  10512. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  10513. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  10514. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  10515. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  10516. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  10517. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  10518. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  10519. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  10520. typedef struct {
  10521. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  10522. /** peer MAC address */
  10523. wmi_mac_addr peer_macaddr;
  10524. /** VDEV id */
  10525. A_UINT32 vdev_id;
  10526. /** assoc = 1 reassoc = 0 */
  10527. A_UINT32 peer_new_assoc;
  10528. /** peer associd (16 bits) */
  10529. A_UINT32 peer_associd;
  10530. /** peer station flags: see definition above */
  10531. A_UINT32 peer_flags;
  10532. /** negotiated capabilities (lower 16 bits)*/
  10533. A_UINT32 peer_caps;
  10534. /** Listen interval */
  10535. A_UINT32 peer_listen_intval;
  10536. /** HT capabilties of the peer */
  10537. A_UINT32 peer_ht_caps;
  10538. /** maximum rx A-MPDU length */
  10539. A_UINT32 peer_max_mpdu;
  10540. /** mpdu density of the peer in usec(0 to 16) */
  10541. A_UINT32 peer_mpdu_density;
  10542. /** peer rate capabilties see flags above */
  10543. A_UINT32 peer_rate_caps;
  10544. /** num spatial streams */
  10545. A_UINT32 peer_nss;
  10546. /** VHT capabilties of the peer */
  10547. A_UINT32 peer_vht_caps;
  10548. /** phy mode */
  10549. A_UINT32 peer_phymode;
  10550. /** HT Operation Element of the peer. Five bytes packed in 2
  10551. * INT32 array and filled from lsb to msb.
  10552. * Note that the size of array peer_ht_info[] cannotbe changed
  10553. * without breaking WMI Compatibility. */
  10554. A_UINT32 peer_ht_info[2];
  10555. /** total number of negotiated legacy rate set. Also the sizeof
  10556. * peer_legacy_rates[] */
  10557. A_UINT32 num_peer_legacy_rates;
  10558. /** total number of negotiated ht rate set. Also the sizeof
  10559. * peer_ht_rates[] */
  10560. A_UINT32 num_peer_ht_rates;
  10561. /**
  10562. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  10563. * in VHT160 / VHT80+80 Mode.
  10564. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  10565. * handshake with the Max Rx NSS differing for different bandwidths
  10566. * instead of a single max Rx NSS Value.
  10567. * Some QCA chipsets have to advertise a different max Rx NSS value for
  10568. * 160 MHz and 80MHz.
  10569. *
  10570. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  10571. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  10572. * Extended NSS support
  10573. * bit[30:6]: Reserved
  10574. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  10575. */
  10576. A_UINT32 peer_bw_rxnss_override;
  10577. /* 802.11ax capabilities */
  10578. wmi_ppe_threshold peer_ppet;
  10579. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  10580. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  10581. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  10582. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  10583. /* 2nd DWORD of 11ax MAC Capabilities */
  10584. A_UINT32 peer_he_cap_info_ext;
  10585. /*
  10586. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  10587. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  10588. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  10589. * bit[4:3] : Indicates support for DL OFDMA
  10590. * Refer to enum WMI_HE_RX_DL_OFDMA_SUPPORT_x
  10591. * bit[6:5] : Indicates support for DL MU-MIMO
  10592. * Refer to enum WMI_HE_RX_DL_MUMIMO_SUPPORT_x
  10593. * bit[31:7] : Reserved
  10594. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  10595. */
  10596. A_UINT32 peer_he_cap_info_internal;
  10597. /* Following this struct are the TLV's:
  10598. * A_UINT8 peer_legacy_rates[];
  10599. * A_UINT8 peer_ht_rates[];
  10600. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  10601. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  10602. */
  10603. } wmi_peer_assoc_complete_cmd_fixed_param;
  10604. /* WDS Entry Flags */
  10605. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  10606. typedef struct {
  10607. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  10608. /** peer MAC address */
  10609. wmi_mac_addr peer_macaddr;
  10610. /** wds MAC addr */
  10611. wmi_mac_addr wds_macaddr;
  10612. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  10613. A_UINT32 flags;
  10614. A_UINT32 vdev_id;
  10615. } wmi_peer_add_wds_entry_cmd_fixed_param;
  10616. #define WMI_CHAN_INFO_START_RESP 0
  10617. #define WMI_CHAN_INFO_END_RESP 1
  10618. /* deprecated but maintained as aliases: old names containing typo */
  10619. #define WMI_CHAN_InFO_START_RESP WMI_CHAN_INFO_START_RESP
  10620. #define WMI_CHAN_InFO_END_RESP WMI_CHAN_INFO_END_RESP
  10621. typedef struct {
  10622. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  10623. /** wds MAC addr */
  10624. wmi_mac_addr wds_macaddr;
  10625. A_UINT32 vdev_id;
  10626. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  10627. typedef struct {
  10628. /** peer MAC address */
  10629. wmi_mac_addr peer_macaddr;
  10630. } wmi_peer_q_empty_callback_event;
  10631. /*
  10632. * Command to update an already existing WDS entry. Different address setting
  10633. * combinations are possible.
  10634. *
  10635. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  10636. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  10637. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  10638. * Null wds and peer -> Flags will be updated for all WDS entries.
  10639. */
  10640. typedef struct {
  10641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  10642. /** peer MAC address */
  10643. wmi_mac_addr peer_macaddr;
  10644. /** wds MAC addr */
  10645. wmi_mac_addr wds_macaddr;
  10646. /* Flags associated with WDS entry */
  10647. A_UINT32 flags;
  10648. A_UINT32 vdev_id;
  10649. } wmi_peer_update_wds_entry_cmd_fixed_param;
  10650. /**
  10651. * Channel info WMI event
  10652. */
  10653. typedef struct {
  10654. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  10655. /** Error code */
  10656. A_UINT32 err_code;
  10657. /** Channel freq */
  10658. A_UINT32 freq;
  10659. /** Read flags */
  10660. A_UINT32 cmd_flags;
  10661. /** Noise Floor value */
  10662. A_UINT32 noise_floor;
  10663. /** rx clear count */
  10664. A_UINT32 rx_clear_count;
  10665. /** cycle count */
  10666. A_UINT32 cycle_count;
  10667. /** channel tx power per range in 0.5dBm steps */
  10668. A_UINT32 chan_tx_pwr_range;
  10669. /** channel tx power per throughput */
  10670. A_UINT32 chan_tx_pwr_tp;
  10671. /** rx frame count (cumulative) */
  10672. A_UINT32 rx_frame_count;
  10673. /** BSS rx cycle count */
  10674. A_UINT32 my_bss_rx_cycle_count;
  10675. /** b-mode data rx time (units are microseconds) */
  10676. A_UINT32 rx_11b_mode_data_duration;
  10677. /** tx frame count */
  10678. A_UINT32 tx_frame_cnt;
  10679. /** mac clock */
  10680. A_UINT32 mac_clk_mhz;
  10681. /** unique id identifying the VDEV */
  10682. A_UINT32 vdev_id;
  10683. } wmi_chan_info_event_fixed_param;
  10684. /**
  10685. * Non wlan interference event
  10686. */
  10687. typedef struct {
  10688. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  10689. A_UINT32 channel; /* either number or freq in mhz*/
  10690. } wlan_dcs_cw_int;
  10691. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  10692. /**
  10693. * wlan_dcs_im_tgt_stats
  10694. *
  10695. */
  10696. typedef struct _wlan_dcs_im_tgt_stats {
  10697. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  10698. /** current running TSF from the TSF-1 */
  10699. A_UINT32 reg_tsf32;
  10700. /** Known last frame rssi, in case of multiple stations, if
  10701. * and at different ranges, this would not gaurantee that
  10702. * this is the least rssi.
  10703. */
  10704. A_UINT32 last_ack_rssi;
  10705. /** Sum of all the failed durations in the last one second interval.
  10706. */
  10707. A_UINT32 tx_waste_time;
  10708. /** count how many times the hal_rxerr_phy is marked, in this
  10709. * time period
  10710. */
  10711. A_UINT32 rx_time;
  10712. A_UINT32 phyerr_cnt;
  10713. /**
  10714. * WLAN IM stats from target to host
  10715. *
  10716. * Below statistics are sent from target to host periodically.
  10717. * These are collected at target as long as target is running
  10718. * and target chip is not in sleep.
  10719. *
  10720. */
  10721. /** listen time from ANI */
  10722. A_INT32 listen_time;
  10723. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  10724. A_UINT32 reg_tx_frame_cnt;
  10725. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  10726. A_UINT32 reg_rx_frame_cnt;
  10727. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  10728. A_UINT32 reg_rxclr_cnt;
  10729. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  10730. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  10731. /** extenstion channel rx clear count */
  10732. A_UINT32 reg_rxclr_ext_cnt;
  10733. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  10734. A_UINT32 reg_ofdm_phyerr_cnt;
  10735. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  10736. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  10737. /** Channel noise floor (units are dBm) */
  10738. A_INT32 chan_nf;
  10739. /** BSS rx cycle count */
  10740. A_UINT32 my_bss_rx_cycle_count;
  10741. } wlan_dcs_im_tgt_stats_t;
  10742. /**
  10743. * wmi_dcs_interference_event_t
  10744. *
  10745. * Right now this is event and stats together. Partly this is
  10746. * because cw interference is handled in target now. This
  10747. * can be done at host itself, if we can carry the NF alone
  10748. * as a stats event. In future this would be done and this
  10749. * event would carry only stats.
  10750. */
  10751. typedef struct {
  10752. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  10753. /**
  10754. * Type of the event present, either the cw interference event, or the wlan_im stats
  10755. */
  10756. A_UINT32 interference_type; /* type of interference, wlan or cw */
  10757. /** pdev_id for identifying the MAC
  10758. * See macros starting with WMI_PDEV_ID_ for values.
  10759. */
  10760. A_UINT32 pdev_id;
  10761. /*
  10762. * Following this struct are these TLVs. Note that they are both array of structures
  10763. * but can have at most one element. Which TLV is empty or has one element depends
  10764. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  10765. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  10766. *
  10767. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  10768. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  10769. */
  10770. } wmi_dcs_interference_event_fixed_param;
  10771. enum wmi_peer_mcast_group_action {
  10772. wmi_peer_mcast_group_action_add = 0,
  10773. wmi_peer_mcast_group_action_del = 1
  10774. };
  10775. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  10776. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  10777. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  10778. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  10779. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  10780. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  10781. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  10782. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  10783. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  10784. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  10785. /* multicast group membership commands */
  10786. /* TODO: Converting this will be tricky since it uses an union.
  10787. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  10788. typedef struct {
  10789. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  10790. A_UINT32 flags;
  10791. wmi_mac_addr ucast_mac_addr;
  10792. /* in network byte order */
  10793. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  10794. A_UINT8 mcast_ip_addr[16];
  10795. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  10796. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  10797. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  10798. A_UINT32 num_filter_addr;
  10799. /* this array should contain the src IPs that are to be filtered during find
  10800. The array should be packed.
  10801. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  10802. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  10803. A_UINT8 vdev_id; /* vdev of this mcast group */
  10804. } wmi_peer_mcast_group_cmd_fixed_param;
  10805. /** Offload Scan and Roaming related commands */
  10806. /** The FW performs 2 different kinds of offload scans independent
  10807. * of host. One is Roam scan which is primarily performed on a
  10808. * station VDEV after association to look for a better AP that
  10809. * the station VDEV can roam to. The second scan is connect scan
  10810. * which is mainly performed when the station is not associated
  10811. * and to look for a matching AP profile from a list of
  10812. * configured profiles. */
  10813. /* flags for roam_scan_mode_cmd
  10814. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  10815. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  10816. /**
  10817. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  10818. * the roam scan mode is one of the periodic, rssi change, both, none.
  10819. * None : Disable Roam scan. No Roam scan at all.
  10820. * Periodic : Scan periodically with a configurable period.
  10821. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  10822. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  10823. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  10824. *
  10825. */
  10826. typedef struct {
  10827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  10828. A_UINT32 roam_scan_mode;
  10829. A_UINT32 vdev_id;
  10830. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  10831. /*
  10832. * Minimum duration allowed between two consecutive roam scans.
  10833. * Roam scan is not allowed, if duration between two consecutive
  10834. * roam scans is less than this time.
  10835. */
  10836. A_UINT32 min_delay_btw_scans; /* In msec */
  10837. /*
  10838. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  10839. * positions) showing for which roam_trigger_reasons the
  10840. * min_delay_btw_scans constraint should be applied.
  10841. * 0x0 means there is no time restrictions between successive roam scans.
  10842. */
  10843. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  10844. } wmi_roam_scan_mode_fixed_param;
  10845. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  10846. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  10847. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  10848. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  10849. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  10850. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  10851. typedef struct {
  10852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  10853. A_UINT32 vdev_id;
  10854. A_UINT32 command_arg;
  10855. } wmi_roam_scan_cmd_fixed_param;
  10856. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  10857. /**
  10858. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  10859. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  10860. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  10861. */
  10862. typedef struct {
  10863. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  10864. /** unique id identifying the VDEV, generated by the caller */
  10865. A_UINT32 vdev_id;
  10866. /** roam scan rssi threshold */
  10867. A_UINT32 roam_scan_rssi_thresh;
  10868. /** When using Hw generated beacon RSSI interrupts */
  10869. A_UINT32 roam_rssi_thresh_diff;
  10870. /** 5G scan max count */
  10871. A_UINT32 hirssi_scan_max_count;
  10872. /** 5G scan rssi change threshold value */
  10873. A_UINT32 hirssi_scan_delta;
  10874. /** 5G scan upper bound */
  10875. A_UINT32 hirssi_upper_bound;
  10876. /** roam scan rssi threshold for 5G band.
  10877. * offset from roam_scan_rssi_thres, in dB units
  10878. */
  10879. A_INT32 rssi_thresh_offset_5g;
  10880. /* The TLVs will follow.
  10881. * wmi_roam_scan_extended_threshold_param extended_param;
  10882. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  10883. * wmi_roam_dense_thres_param dense_param;
  10884. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  10885. */
  10886. } wmi_roam_scan_rssi_threshold_fixed_param;
  10887. /**
  10888. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  10889. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  10890. */
  10891. /**
  10892. * btm_config.flags
  10893. * BIT 0 : Enable/Disable the BTM offload.
  10894. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  10895. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  10896. * BIT 6 : Enable/Disable solicited BTM
  10897. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  10898. * BIT 8 : BTM query preference over 11k neighbor report request
  10899. * BIT 9-31 : Reserved
  10900. */
  10901. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  10902. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  10903. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  10904. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  10905. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  10906. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  10907. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  10908. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  10909. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  10910. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  10911. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  10912. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  10913. #define WMI_ROAM_BTM_SET_BTM_QUERY_WITH_CANDIDATE_LIST(flags, val) WMI_SET_BITS(flags, 9, 1, val)
  10914. #define WMI_ROAM_BTM_GET_BTM_QUERY_WITH_CANDIDATE_LIST(flags) WMI_GET_BITS(flags, 9, 1)
  10915. /** 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 */
  10916. #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 */
  10917. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  10918. /** reserved upto 3 */
  10919. /** 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 */
  10920. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  10921. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  10922. /** reserved upto 7 */
  10923. typedef struct {
  10924. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  10925. A_UINT32 tlv_header;
  10926. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  10927. A_UINT32 vdev_id;
  10928. /** BTM configuration control flags */
  10929. A_UINT32 flags;
  10930. /* BTM query timeout, unit: milliseconds
  10931. * valid value range: 1-10000,
  10932. * default value: 100 will be set if invalid value is given
  10933. */
  10934. A_UINT32 solicited_timeout_ms;
  10935. /* Maximum attempt of solicited BTM
  10936. * If continuous failure reach to this value, solicited BTM to current
  10937. * ESS will be disabled.
  10938. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  10939. * Default value: 3 will be set if invalid value is given
  10940. */
  10941. A_UINT32 max_attempt_cnt;
  10942. /* Time to stick to current AP after BTM, unit: seconds
  10943. * valid value range: 0 -(2^16-1).
  10944. * Either 0 or (2^16)-1 means stick to AP forever.
  10945. * Default value: 300 will be set if invalid value is given
  10946. */
  10947. A_UINT32 stick_time_seconds;
  10948. /* Disassoc time threshold in milliseconds
  10949. * This time threshold allows the target to judge whether the STA
  10950. * should can move to another AP immediately, or if the STA has time
  10951. * to calculate roaming candidates.
  10952. * If the disassoc_timer_threshold value is 0x0, the field should be
  10953. * disregarded.
  10954. */
  10955. A_UINT32 disassoc_timer_threshold;
  10956. /*
  10957. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  10958. * positions) showing for which roam_trigger_reasons the
  10959. * btm query needs to be sent.
  10960. * If roam trigger reasons are unspecified, btm_bitmap will be 0x0.
  10961. */
  10962. A_UINT32 btm_bitmap;
  10963. /*
  10964. * Consider AP as roam candidate only if AP score is better than
  10965. * btm_candidate_min_score for BTM roam trigger
  10966. */
  10967. A_UINT32 btm_candidate_min_score;
  10968. } wmi_btm_config_fixed_param;
  10969. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  10970. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  10971. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  10972. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  10973. typedef struct {
  10974. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  10975. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  10976. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  10977. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  10978. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  10979. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  10980. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  10981. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  10982. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  10983. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  10984. } wmi_roam_scan_extended_threshold_param;
  10985. /**
  10986. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  10987. * Applicable when the scan mode is Periodic or both.
  10988. */
  10989. typedef struct {
  10990. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  10991. /** unique id identifying the VDEV, generated by the caller */
  10992. A_UINT32 vdev_id;
  10993. /** roam scan period value */
  10994. A_UINT32 roam_scan_period; /* units = milliseconds */
  10995. /** Aging for Roam scans */
  10996. A_UINT32 roam_scan_age;
  10997. /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */
  10998. A_UINT32 inactivity_time_period; /* units = milliseconds */
  10999. /** Maximum allowed data packets count during inactivity_time_period */
  11000. A_UINT32 roam_inactive_count;
  11001. /** New roam scan period after device is in inactivity state */
  11002. A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */
  11003. /** roam full scan period value */
  11004. A_UINT32 roam_full_scan_period; /* units = milliseconds */
  11005. } wmi_roam_scan_period_fixed_param;
  11006. /**
  11007. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  11008. * Rssi change threshold used when mode is Rssi change (or) Both.
  11009. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  11010. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  11011. */
  11012. typedef struct {
  11013. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  11014. /** unique id identifying the VDEV, generated by the caller */
  11015. A_UINT32 vdev_id;
  11016. /** roam scan rssi change threshold value */
  11017. A_UINT32 roam_scan_rssi_change_thresh;
  11018. /** When using Hw generated beacon RSSI interrupts */
  11019. A_UINT32 bcn_rssi_weight;
  11020. /** Minimum delay between two 5G scans */
  11021. A_UINT32 hirssi_delay_btw_scans;
  11022. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  11023. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  11024. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  11025. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  11026. /**
  11027. * TLV for roaming channel list
  11028. */
  11029. typedef struct {
  11030. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  11031. /** unique id identifying the VDEV, generated by the caller */
  11032. A_UINT32 vdev_id;
  11033. /** WMI_CHAN_LIST_TAG */
  11034. A_UINT32 chan_list_type;
  11035. /** # if channels to scan */
  11036. A_UINT32 num_chan;
  11037. /**
  11038. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  11039. * structure. The TLV's are:
  11040. * A_UINT32 channel_list[]; // in MHz
  11041. **/
  11042. } wmi_roam_chan_list_fixed_param;
  11043. /** Authentication modes */
  11044. enum {
  11045. WMI_AUTH_NONE, /* no upper level auth */
  11046. WMI_AUTH_OPEN, /* open */
  11047. WMI_AUTH_SHARED, /* shared-key */
  11048. WMI_AUTH_8021X, /* 802.1x */
  11049. WMI_AUTH_AUTO, /* Auto */
  11050. WMI_AUTH_WPA, /* WPA */
  11051. WMI_AUTH_RSNA, /* WPA2/RSNA */
  11052. WMI_AUTH_CCKM, /* CCKM */
  11053. WMI_AUTH_WAPI, /* WAPI */
  11054. WMI_AUTH_AUTO_PSK,
  11055. WMI_AUTH_WPA_PSK,
  11056. WMI_AUTH_RSNA_PSK,
  11057. WMI_AUTH_WAPI_PSK,
  11058. WMI_AUTH_FT_RSNA, /* 11r FT */
  11059. WMI_AUTH_FT_RSNA_PSK,
  11060. WMI_AUTH_RSNA_PSK_SHA256,
  11061. WMI_AUTH_RSNA_8021X_SHA256,
  11062. WMI_AUTH_CCKM_WPA,
  11063. WMI_AUTH_CCKM_RSNA,
  11064. WMI_AUTH_RSNA_FILS_SHA256,
  11065. WMI_AUTH_RSNA_FILS_SHA384,
  11066. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  11067. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  11068. WMI_AUTH_FT_RSNA_SAE,
  11069. WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384,
  11070. WMI_AUTH_FT_RSNA_FILS_SHA256,
  11071. WMI_AUTH_FT_RSNA_FILS_SHA384,
  11072. WMI_AUTH_WPA3_SAE,
  11073. WMI_AUTH_WPA3_OWE,
  11074. };
  11075. typedef enum {
  11076. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  11077. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  11078. WMI_SCAN_CLIENT_ROAM, /* 3 */
  11079. WMI_SCAN_CLIENT_P2P, /* 4 */
  11080. WMI_SCAN_CLIENT_LPI, /* 5 */
  11081. WMI_SCAN_CLIENT_NAN, /* 6 */
  11082. WMI_SCAN_CLIENT_ANQP, /* 7 */
  11083. WMI_SCAN_CLIENT_OBSS, /* 8 */
  11084. WMI_SCAN_CLIENT_PLM, /* 9 */
  11085. WMI_SCAN_CLIENT_HOST, /* 10 */
  11086. } WMI_SCAN_CLIENT_ID;
  11087. typedef struct {
  11088. /** authentication mode (defined above) */
  11089. A_UINT32 rsn_authmode;
  11090. /** unicast cipher set */
  11091. A_UINT32 rsn_ucastcipherset;
  11092. /** mcast/group cipher set */
  11093. A_UINT32 rsn_mcastcipherset;
  11094. /** mcast/group management frames cipher set */
  11095. A_UINT32 rsn_mcastmgmtcipherset;
  11096. } wmi_rsn_params;
  11097. /** looking for a wps enabled AP */
  11098. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  11099. /** looking for a secure AP */
  11100. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  11101. /** looking for a PMF enabled AP */
  11102. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  11103. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  11104. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  11105. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  11106. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  11107. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  11108. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  11109. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  11110. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  11111. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  11112. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  11113. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  11114. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  11115. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  11116. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  11117. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  11118. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  11119. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  11120. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  11121. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  11122. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  11123. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  11124. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  11125. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  11126. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  11127. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  11128. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  11129. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  11130. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  11131. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  11132. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  11133. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  11134. /* 2 and 3 are reserved */
  11135. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  11136. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  11137. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  11138. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  11139. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  11140. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  11141. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  11142. /**
  11143. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  11144. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  11145. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  11146. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  11147. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  11148. good_bucket_size : bucket size of slot in good zone. Units in dB.
  11149. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  11150. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  11151. */
  11152. /**
  11153. The graph below explains how RSSI scoring percentage is calculated
  11154. as the RSSI improves. In the graph, the derived parameters good_buckets
  11155. and bad_buckets are used. These derived parameters are related to the
  11156. specified parameters as follows:
  11157. good_buckets =
  11158. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  11159. bad_buckets =
  11160. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  11161. | (x0,y0) (x0 = best_rssi, y0 = 100)
  11162. p 100 |-------o
  11163. e | |<--------- (100 - good_rssi_pct)/good_buckets
  11164. r | |___ ,---- good_bucket_size
  11165. c | | |
  11166. e | |_V_
  11167. n | |
  11168. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  11169. 80 | |
  11170. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  11171. | |_____
  11172. | | ,-- bad_bucket_size
  11173. | | |
  11174. | |__v__
  11175. | |
  11176. | |
  11177. 40 | o------------
  11178. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  11179. +------o------------o-----------o------------->
  11180. -50 -70 -80 rssi dBm
  11181. | excellent | good | bad | poor
  11182. | zone | zone | zone | zone
  11183. V V V
  11184. BEST_THRES GOOD_THRES BAD_THRES
  11185. */
  11186. typedef struct {
  11187. A_INT32 best_rssi_threshold;
  11188. A_INT32 good_rssi_threshold;
  11189. A_INT32 bad_rssi_threshold;
  11190. A_UINT32 good_rssi_pcnt;
  11191. A_UINT32 bad_rssi_pcnt;
  11192. A_UINT32 good_bucket_size;
  11193. A_UINT32 bad_bucket_size;
  11194. A_INT32 rssi_pref_5g_rssi_thresh;
  11195. } wmi_roam_cnd_rssi_scoring;
  11196. /**
  11197. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the value respectively.
  11198. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  11199. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  11200. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  11201. BITS 24-31 :- It contains scoring percentage of 1600MHz BW
  11202. The value of each index must be 0-100
  11203. */
  11204. typedef struct {
  11205. A_UINT32 score_pcnt;
  11206. } wmi_roam_cnd_bw_scoring;
  11207. /**
  11208. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  11209. BITS 0-7 :- It contains scoring percentage of 2G
  11210. BITS 8-15 :- It contains scoring percentage of 5G
  11211. BITS 16-23 :- reserved
  11212. BITS 24-31 :- reserved
  11213. The value of each index must be 0-100
  11214. */
  11215. typedef struct {
  11216. A_UINT32 score_pcnt;
  11217. } wmi_roam_cnd_band_scoring;
  11218. /**
  11219. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  11220. BITS 0-7 :- It contains scoring percentage of 1x1
  11221. BITS 8-15 :- It contains scoring percentage of 2x2
  11222. BITS 16-23 :- It contains scoring percentage of 3x3
  11223. BITS 24-31 :- It contains scoring percentage of 4x4
  11224. The value of each index must be 0-100
  11225. */
  11226. typedef struct {
  11227. A_UINT32 score_pcnt;
  11228. } wmi_roam_cnd_nss_scoring;
  11229. /**
  11230. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  11231. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  11232. BITS 8-15 :- SLOT_1
  11233. BITS 16-23 :- SLOT_2
  11234. BITS 24-31 :- SLOT_3
  11235. BITS 32- ...
  11236. num_slot will equally divide 100. e.g, if num_slot = 4
  11237. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  11238. */
  11239. typedef struct {
  11240. A_UINT32 num_slot; /* max 15 */
  11241. A_UINT32 score_pcnt3_to_0;
  11242. A_UINT32 score_pcnt7_to_4;
  11243. A_UINT32 score_pcnt11_to_8;
  11244. A_UINT32 score_pcnt15_to_12;
  11245. } wmi_roam_cnd_esp_qbss_scoring;
  11246. /**
  11247. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  11248. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  11249. BITS 8-15 :- SLOT_1
  11250. BITS 16-23 :- SLOT_2
  11251. BITS 24-31 :- SLOT_3
  11252. BITS 32- ...
  11253. num_slot will equally divide 100. e.g, if num_slot = 4
  11254. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  11255. */
  11256. typedef struct {
  11257. A_UINT32 num_slot; /* max 15 */
  11258. A_UINT32 score_pcnt3_to_0;
  11259. A_UINT32 score_pcnt7_to_4;
  11260. A_UINT32 score_pcnt11_to_8;
  11261. A_UINT32 score_pcnt15_to_12;
  11262. } wmi_roam_cnd_oce_wan_scoring;
  11263. typedef enum {
  11264. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_NONE = 0, /* Legacy roam score algorithm */
  11265. WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID_RSSI_CU_BASED = 1, /* Roam score algorithm based on RSSI and CU */
  11266. } WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID;
  11267. /**
  11268. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  11269. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  11270. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  11271. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  11272. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  11273. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  11274. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  11275. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  11276. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  11277. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  11278. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  11279. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  11280. rssi_scoring :- RSSI scoring information.
  11281. bw_scoring :- channel BW scoring percentage information.
  11282. band_scoring : - band scording percentage information.
  11283. nss_scoring :- NSS scoring percentage information.
  11284. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  11285. oce_wan_scoring : OCE WAN metrics percentage information
  11286. 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
  11287. 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.
  11288. */
  11289. typedef struct {
  11290. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  11291. A_UINT32 disable_bitmap;
  11292. A_INT32 rssi_weightage_pcnt;
  11293. A_INT32 ht_weightage_pcnt;
  11294. A_INT32 vht_weightage_pcnt;
  11295. A_INT32 he_weightage_pcnt;
  11296. A_INT32 bw_weightage_pcnt;
  11297. A_INT32 band_weightage_pcnt;
  11298. A_INT32 nss_weightage_pcnt;
  11299. A_INT32 esp_qbss_weightage_pcnt;
  11300. A_INT32 beamforming_weightage_pcnt;
  11301. A_INT32 pcl_weightage_pcnt;
  11302. A_INT32 oce_wan_weightage_pcnt;
  11303. wmi_roam_cnd_rssi_scoring rssi_scoring;
  11304. wmi_roam_cnd_bw_scoring bw_scoring;
  11305. wmi_roam_cnd_band_scoring band_scoring;
  11306. wmi_roam_cnd_nss_scoring nss_scoring;
  11307. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  11308. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  11309. A_UINT32 roam_score_delta_pcnt;
  11310. A_UINT32 roam_score_delta_mask;
  11311. /* Vendor specific roam score algorithm ID from WMI_VENDOR_ROAM_SCORE_ALGORITHM_ID enum */
  11312. A_UINT32 vendor_roam_score_algorithm_id;
  11313. } wmi_roam_cnd_scoring_param;
  11314. typedef struct {
  11315. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_score_delta_param */
  11316. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  11317. A_UINT32 roam_trigger_reason;
  11318. /* Roam score delta in %.
  11319. * Consider AP as roam candidate only if AP score is at least
  11320. * roam_score_delta % better than connected AP score.
  11321. * Ex: roam_score_delta = 20, and connected AP score is 4000,
  11322. * then consider candidate AP only if its score is at least
  11323. * 4800 (= 4000 * 120%)
  11324. */
  11325. A_UINT32 roam_score_delta;
  11326. } wmi_roam_score_delta_param;
  11327. typedef struct {
  11328. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param */
  11329. /* Roam trigger reason ID from WMI_ROAM_TRIGGER_REASON_ID */
  11330. A_UINT32 roam_trigger_reason;
  11331. /*
  11332. * Consider AP as roam candidate only if AP rssi is better than
  11333. * candidate_min_rssi
  11334. */
  11335. A_UINT32 candidate_min_rssi; /* units = dbm */
  11336. } wmi_roam_cnd_min_rssi_param;
  11337. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  11338. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  11339. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  11340. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  11341. */
  11342. typedef struct {
  11343. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  11344. /** flags as defined above */
  11345. A_UINT32 flags;
  11346. /**
  11347. * rssi threshold value in dB: the value of the candidate AP should
  11348. * higher by this threshold than the rssi of the currrently associated AP.
  11349. */
  11350. A_UINT32 rssi_threshold;
  11351. /**
  11352. * ssid vlaue to be matched.
  11353. */
  11354. wmi_ssid ssid;
  11355. /**
  11356. * security params to be matched.
  11357. */
  11358. /** authentication mode (defined above) */
  11359. A_UINT32 rsn_authmode;
  11360. /** unicast cipher set */
  11361. A_UINT32 rsn_ucastcipherset;
  11362. /** mcast/group cipher set */
  11363. A_UINT32 rsn_mcastcipherset;
  11364. /** mcast/group management frames cipher set */
  11365. A_UINT32 rsn_mcastmgmtcipherset;
  11366. /**
  11367. * rssi_abs_threshold value: the value of the candidate AP should
  11368. * higher than this absolute RSSI threshold.
  11369. * Zero means no absolute minimum RSSI is required.
  11370. * units are the offset from the noise floor in dB.
  11371. */
  11372. A_UINT32 rssi_abs_thresh;
  11373. /**
  11374. * bg_rssi_threshold value in dB: For background scan the value of
  11375. * the candidate AP should be higher by this threshold than the rssi
  11376. * of the currrently associated AP.
  11377. */
  11378. A_UINT32 bg_rssi_threshold;
  11379. } wmi_ap_profile;
  11380. /** Support early stop roaming scanning when finding a strong candidate AP
  11381. * A 'strong' candidate is
  11382. * 1) Is eligible candidate
  11383. * (all conditions are met in existing candidate selection).
  11384. * 2) Its rssi is better than earlystop threshold.
  11385. * Earlystop threshold will be relaxed as each channel is scanned.
  11386. */
  11387. typedef struct {
  11388. A_UINT32 tlv_header;
  11389. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  11390. A_UINT32 roam_earlystop_thres_min;
  11391. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  11392. A_UINT32 roam_earlystop_thres_max;
  11393. } wmi_roam_earlystop_rssi_thres_param;
  11394. typedef struct {
  11395. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  11396. A_UINT32 tlv_header;
  11397. /** rssi threshold offset under trffic and dense env */
  11398. A_UINT32 roam_dense_rssi_thres_offset;
  11399. /** minimum number of APs to determine dense env */
  11400. A_UINT32 roam_dense_min_aps;
  11401. /** initial dense status detected by host at the time of initial connection */
  11402. A_UINT32 roam_dense_status;
  11403. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  11404. A_UINT32 roam_dense_traffic_thres;
  11405. } wmi_roam_dense_thres_param;
  11406. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  11407. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  11408. * Bit 1-31: Reserved
  11409. */
  11410. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  11411. typedef struct {
  11412. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  11413. A_UINT32 tlv_header;
  11414. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  11415. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  11416. /** 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 */
  11417. A_UINT32 roam_bg_scan_client_bitmap;
  11418. /** roam scan rssi threshold for 2G band.
  11419. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  11420. */
  11421. A_INT32 bad_rssi_thresh_offset_2g;
  11422. /* flags for background roaming */
  11423. A_UINT32 flags;
  11424. } wmi_roam_bg_scan_roaming_param;
  11425. /** Beacon filter wmi command info */
  11426. #define BCN_FLT_MAX_SUPPORTED_IES 256
  11427. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  11428. typedef struct bss_bcn_stats {
  11429. A_UINT32 vdev_id;
  11430. A_UINT32 bss_bcnsdropped;
  11431. A_UINT32 bss_bcnsdelivered;
  11432. } wmi_bss_bcn_stats_t;
  11433. typedef struct bcn_filter_stats {
  11434. A_UINT32 bcns_dropped;
  11435. A_UINT32 bcns_delivered;
  11436. A_UINT32 activefilters;
  11437. wmi_bss_bcn_stats_t bss_stats;
  11438. } wmi_bcnfilter_stats_t;
  11439. typedef struct wmi_add_bcn_filter_cmd {
  11440. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  11441. A_UINT32 vdev_id;
  11442. /*
  11443. * Following this structure is the TLV:
  11444. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  11445. */
  11446. } wmi_add_bcn_filter_cmd_fixed_param;
  11447. typedef struct wmi_rmv_bcn_filter_cmd {
  11448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  11449. A_UINT32 vdev_id;
  11450. } wmi_rmv_bcn_filter_cmd_fixed_param;
  11451. #define WMI_BCN_SEND_DTIM_ZERO 1
  11452. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  11453. typedef struct wmi_bcn_send_from_host {
  11454. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  11455. A_UINT32 vdev_id;
  11456. A_UINT32 data_len;
  11457. union {
  11458. A_UINT32 frag_ptr; /* Physical address of the frame */
  11459. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  11460. };
  11461. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  11462. A_UINT32 dtim_flag; /* to control CABQ traffic */
  11463. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  11464. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  11465. } wmi_bcn_send_from_host_cmd_fixed_param;
  11466. /* cmd to support bcn snd for all vaps at once */
  11467. typedef struct wmi_pdev_send_bcn {
  11468. A_UINT32 num_vdevs;
  11469. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  11470. } wmi_pdev_send_bcn_cmd_t;
  11471. typedef struct wmi_fd_send_from_host {
  11472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  11473. A_UINT32 vdev_id;
  11474. A_UINT32 data_len;
  11475. union {
  11476. A_UINT32 frag_ptr; /* Physical address of the frame */
  11477. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  11478. };
  11479. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  11480. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  11481. } wmi_fd_send_from_host_cmd_fixed_param;
  11482. /*
  11483. * WMI command structure for FILS feature enable/disable
  11484. */
  11485. typedef struct {
  11486. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  11487. /* VDEV identifier */
  11488. A_UINT32 vdev_id;
  11489. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames with this period (in TU), 0 - disable FD frames */
  11490. } wmi_enable_fils_cmd_fixed_param;
  11491. /*
  11492. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  11493. */
  11494. typedef struct {
  11495. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  11496. /** id of AP criteria */
  11497. A_UINT32 id;
  11498. /** unique id identifying the VDEV, generated by the caller */
  11499. A_UINT32 vdev_id;
  11500. /*
  11501. * Following this structure is the TLV:
  11502. * wmi_ap_profile ap_profile; <-- AP profile info
  11503. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  11504. * wmi_roam_score_delta_param roam_score_delta_param_list[]
  11505. * wmi_roam_cnd_min_rssi_param roam_cnd_min_rssi_param_list[]
  11506. */
  11507. } wmi_roam_ap_profile_fixed_param;
  11508. /**
  11509. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  11510. */
  11511. typedef struct {
  11512. /** id of AP criteria */
  11513. A_UINT32 id;
  11514. /** unique id identifying the VDEV, generated by the caller */
  11515. A_UINT32 vdev_id;
  11516. /** AP profile info */
  11517. wmi_ap_profile ap_profile;
  11518. } wmi_ofl_scan_add_ap_profile;
  11519. /**
  11520. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  11521. */
  11522. typedef struct {
  11523. /** id of AP criteria */
  11524. A_UINT32 id;
  11525. /** unique id identifying the VDEV, generated by the caller */
  11526. A_UINT32 vdev_id;
  11527. } wmi_ofl_scan_remove_ap_profile;
  11528. /**
  11529. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  11530. * 0 will disable ofload scan and a very low value will perform a continous
  11531. * scan.
  11532. */
  11533. typedef struct {
  11534. /** offload scan period value, used for scans used when not connected */
  11535. A_UINT32 ofl_scan_period;
  11536. } wmi_ofl_scan_period;
  11537. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  11538. #define ROAM_OFFLOAD_PMK_BYTES (32)
  11539. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  11540. #define ROAM_OFFLOAD_KRK_BYTES (16)
  11541. #define ROAM_OFFLOAD_BTK_BYTES (32)
  11542. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  11543. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  11544. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  11545. typedef struct {
  11546. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  11547. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  11548. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  11549. A_UINT32 select_5g_margin;
  11550. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  11551. A_UINT32 capability;
  11552. A_UINT32 ht_caps_info;
  11553. A_UINT32 ampdu_param;
  11554. A_UINT32 ht_ext_cap;
  11555. A_UINT32 ht_txbf;
  11556. A_UINT32 asel_cap;
  11557. A_UINT32 qos_enabled;
  11558. A_UINT32 qos_caps;
  11559. A_UINT32 wmm_caps;
  11560. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  11561. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  11562. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  11563. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  11564. 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. */
  11565. } wmi_roam_offload_tlv_param;
  11566. /* flags for 11i offload */
  11567. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  11568. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  11569. /* from bit 2 to bit 31 are reserved */
  11570. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  11571. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  11572. } while (0)
  11573. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  11574. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  11575. } while (0)
  11576. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  11577. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  11578. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  11579. do { \
  11580. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  11581. } while (0)
  11582. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  11583. do { \
  11584. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  11585. } while (0)
  11586. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  11587. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  11588. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  11589. typedef struct {
  11590. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  11591. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  11592. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  11593. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  11594. } wmi_roam_11i_offload_tlv_param;
  11595. /* This TLV will be filled only in case of 11R*/
  11596. typedef struct {
  11597. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  11598. A_UINT32 mdie_present;
  11599. A_UINT32 mdid;
  11600. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  11601. A_UINT32 r0kh_id_len;
  11602. 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 */
  11603. A_UINT32 psk_msk_len; /**length of psk_msk*/
  11604. A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/
  11605. A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2];
  11606. A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */
  11607. } wmi_roam_11r_offload_tlv_param;
  11608. /* This TLV will be filled only in case of ESE */
  11609. typedef struct {
  11610. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  11611. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  11612. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  11613. } wmi_roam_ese_offload_tlv_param;
  11614. typedef struct {
  11615. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  11616. A_UINT32 tlv_header;
  11617. /** Blaclisted AP mac address */
  11618. wmi_mac_addr bssid;
  11619. /** How much time in milliseconds to keep AP in blacklist */
  11620. A_UINT32 timeout;
  11621. } wmi_roam_blacklist_with_timeout_tlv_param;
  11622. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  11623. * Ex: AP which sends BTM request with disassoc imminent is set should be
  11624. * moved to blacklist until disassociation timer expires
  11625. */
  11626. typedef struct {
  11627. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  11628. A_UINT32 vdev_id;
  11629. /* This TLV is followed by further TLVs:
  11630. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  11631. */
  11632. } wmi_roam_blacklist_event_fixed_param;
  11633. typedef struct {
  11634. A_UINT32 tlv_header;
  11635. /** candidate AP mac address */
  11636. wmi_mac_addr bssid;
  11637. } wmi_roam_pmkid_request_tlv_param;
  11638. /** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/
  11639. typedef struct {
  11640. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */
  11641. A_UINT32 vdev_id;
  11642. /* This TLV is followed by further TLVs:
  11643. * wmi_roam_pmkid_request_tlv_param pmkid_request[]
  11644. */
  11645. } wmi_roam_pmkid_request_event_fixed_param;
  11646. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  11647. * generated when ever a better AP is found in the recent roam scan (or)
  11648. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  11649. * from the current AP.
  11650. */
  11651. typedef struct {
  11652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  11653. /** unique id identifying the VDEV, generated by the caller */
  11654. A_UINT32 vdev_id;
  11655. /** reason for roam event */
  11656. A_UINT32 reason;
  11657. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  11658. A_UINT32 rssi;
  11659. /** roam notification */
  11660. A_UINT32 notif;
  11661. /** roam notification param
  11662. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  11663. */
  11664. A_UINT32 notif_params;
  11665. /** roam notification param1
  11666. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params1 value.
  11667. */
  11668. A_UINT32 notif_params1;
  11669. } wmi_roam_event_fixed_param;
  11670. /* roam_reason: bits 0-3 */
  11671. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  11672. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  11673. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  11674. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  11675. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  11676. SSID and Security profile in
  11677. WMI_ROAM_AP_PROFILE, found during scan
  11678. triggered upon FINAL_BMISS **/
  11679. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  11680. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  11681. * Result code of WMI_ROAM_INVOKE_CMDID.
  11682. * Any roaming failure before reassociation will be indicated to host
  11683. * with this reason.
  11684. * Any roaming failure after reassociation will be indicated to host with
  11685. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  11686. */
  11687. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  11688. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  11689. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  11690. #define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */
  11691. /* reserved up through 0xF */
  11692. /* subnet status: bits 4-5 */
  11693. typedef enum
  11694. {
  11695. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  11696. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  11697. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  11698. } wmi_roam_subnet_change_status;
  11699. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  11700. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  11701. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  11702. do { \
  11703. (roam_reason) |= \
  11704. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  11705. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  11706. } while (0)
  11707. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  11708. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  11709. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  11710. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  11711. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  11712. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  11713. do { \
  11714. (roam_reason) |= \
  11715. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  11716. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  11717. } while (0)
  11718. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  11719. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  11720. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  11721. /* roaming notification */
  11722. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  11723. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  11724. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  11725. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  11726. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  11727. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  11728. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  11729. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  11730. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  11731. #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 */
  11732. #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 */
  11733. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  11734. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  11735. */
  11736. typedef struct
  11737. {
  11738. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  11739. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  11740. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  11741. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  11742. } wmi_ric_request_fixed_param;
  11743. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  11744. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  11745. */
  11746. typedef struct{
  11747. A_UINT32 tlv_header;
  11748. A_UINT32 ts_info; /** bits value of TS Info field.*/
  11749. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  11750. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  11751. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  11752. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  11753. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  11754. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  11755. A_UINT32 svc_start_time; /**The Service Start Time field*/
  11756. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  11757. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  11758. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  11759. A_UINT32 max_burst_size; /**The Burst Size field*/
  11760. A_UINT32 delay_bound; /**The Delay Bound field*/
  11761. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  11762. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  11763. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  11764. } wmi_ric_tspec;
  11765. /* flags for roam_invoke_cmd */
  11766. /* add this channel into roam cache channel list after this command is finished */
  11767. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  11768. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  11769. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  11770. /* during host-invoked roaming, don't send null data frame to AP */
  11771. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  11772. /* from bit 3 to bit 31 are reserved */
  11773. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  11774. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  11775. } while (0)
  11776. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  11777. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  11778. } while (0)
  11779. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  11780. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  11781. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  11782. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  11783. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  11784. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  11785. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_MAP 4 /* scan cached channel map */
  11786. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  11787. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  11788. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  11789. *
  11790. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  11791. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  11792. This command can be used to add specific channel into roam cached channel list by following
  11793. <roam_scan_ch_mode> = 0
  11794. <roam_ap_sel_mode> = 0
  11795. <roam_delay> = 0
  11796. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  11797. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  11798. <channel_no> = channel list to be added
  11799. */
  11800. typedef struct {
  11801. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  11802. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  11803. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  11804. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  11805. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  11806. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  11807. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  11808. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  11809. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  11810. /**
  11811. * TLV (tag length value) parameters follows roam_invoke_req
  11812. * The TLV's are:
  11813. * A_UINT32 channel_list[]; // in MHz
  11814. * wmi_mac_addr bssid_list[];
  11815. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  11816. * A_UINT8 bcn_prb_frm[];
  11817. */
  11818. } wmi_roam_invoke_cmd_fixed_param;
  11819. /* Definition for op_bitmap */
  11820. enum {
  11821. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  11822. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  11823. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  11824. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  11825. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  11826. };
  11827. /** lca_enable_source_bitmap */
  11828. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  11829. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  11830. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  11831. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  11832. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  11833. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  11834. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  11835. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  11836. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  11837. typedef struct {
  11838. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  11839. A_UINT32 tlv_header;
  11840. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  11841. wmi_mac_addr bssid;
  11842. /** Disallowed AP for certain duration, in units of milliseconds */
  11843. A_UINT32 remaining_disallow_duration;
  11844. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  11845. A_INT32 requested_rssi;
  11846. } wmi_roam_rejection_list_config_param;
  11847. 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 */
  11848. typedef struct {
  11849. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  11850. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  11851. A_UINT32 flags; /** flags for filter */
  11852. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  11853. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  11854. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  11855. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  11856. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  11857. /**
  11858. * TLV (tag length value) parameters follows roam_filter_list_cmd
  11859. * The TLV's are:
  11860. * wmi_mac_addr bssid_black_list[];
  11861. * wmi_ssid ssid_white_list[];
  11862. * wmi_mac_addr bssid_preferred_list[];
  11863. * A_UINT32 bssid_preferred_factor[];
  11864. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  11865. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  11866. */
  11867. } wmi_roam_filter_fixed_param;
  11868. typedef struct {
  11869. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  11870. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  11871. 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 */
  11872. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  11873. 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) */
  11874. } wmi_roam_lca_disallow_config_tlv_param;
  11875. typedef struct {
  11876. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  11877. } WMI_IPV4_ADDR;
  11878. typedef struct _WMI_IPV6_ADDR {
  11879. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  11880. } WMI_IPV6_ADDR;
  11881. /* flags for subnet change detection */
  11882. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  11883. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  11884. /* bit 2 to bit 31 are reserved */
  11885. /* set IPv4 enabled/disabled flag and get the flag */
  11886. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  11887. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11888. } while (0)
  11889. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  11890. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11891. } while (0)
  11892. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  11893. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  11894. /* set IPv6 enabled flag, disabled and get the flag */
  11895. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  11896. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11897. } while (0)
  11898. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  11899. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11900. } while (0)
  11901. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  11902. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  11903. /**
  11904. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  11905. * to FW. FW uses these parameters for subnet change detection.
  11906. */
  11907. typedef struct {
  11908. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  11909. /** unique id identifying the VDEV, generated by the caller */
  11910. A_UINT32 vdev_id;
  11911. /** IPv4/IPv6 enabled/disabled */
  11912. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  11913. A_UINT32 flag;
  11914. /** Gateway MAC address */
  11915. wmi_mac_addr inet_gw_mac_addr;
  11916. /** IP addresses */
  11917. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  11918. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  11919. /** Number of software retries for ARP/Neighbor solicitation request */
  11920. A_UINT32 max_retries;
  11921. /** timeout in milliseconds for each ARP request*/
  11922. A_UINT32 timeout;
  11923. /** number of skipped aps **/
  11924. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  11925. /**
  11926. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  11927. * structure. The TLV's are:
  11928. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  11929. **/
  11930. } wmi_roam_subnet_change_config_fixed_param;
  11931. /**
  11932. * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON:
  11933. * Enable or disable roaming triggers in FW.
  11934. */
  11935. typedef struct {
  11936. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */
  11937. /** unique id identifying the VDEV, generated by the caller */
  11938. A_UINT32 vdev_id;
  11939. /**
  11940. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  11941. * positions) showing for which roam_trigger_reasons are enabled by
  11942. * bit value equal 0x1, and which roam_trigger_reasons are disabled by
  11943. * bit value equal 0x0.
  11944. */
  11945. A_UINT32 trigger_reason_bitmask;
  11946. } wmi_roam_enable_disable_trigger_reason_fixed_param;
  11947. /** WMI_PROFILE_MATCH_EVENT: offload scan
  11948. * generated when ever atleast one of the matching profiles is found
  11949. * in recent NLO scan. no data is carried with the event.
  11950. */
  11951. /** P2P specific commands */
  11952. /**
  11953. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  11954. * FW to generate P2P IE tobe carried in probe response frames.
  11955. * FW will respond to probe requests while in listen state.
  11956. */
  11957. typedef struct {
  11958. /* number of secondary device types,supported */
  11959. A_UINT32 num_secondary_dev_types;
  11960. /**
  11961. * followed by 8 bytes of primary device id and
  11962. * num_secondary_dev_types * 8 bytes of secondary device
  11963. * id.
  11964. */
  11965. } wmi_p2p_dev_set_device_info;
  11966. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  11967. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  11968. * the operating channel of the VDEV.
  11969. */
  11970. typedef struct {
  11971. /* 1:enable disoverability, 0:disable discoverability */
  11972. A_UINT32 enable_discoverability;
  11973. } wmi_p2p_set_discoverability;
  11974. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  11975. * beacons generated by FW. used in FW beacon mode.
  11976. * the FW will add this IE to beacon in addition to the beacon
  11977. * template set by WMI_BCN_TMPL_CMDID command.
  11978. */
  11979. typedef struct {
  11980. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  11981. /** unique id identifying the VDEV, generated by the caller */
  11982. A_UINT32 vdev_id;
  11983. /* ie length */
  11984. A_UINT32 ie_buf_len;
  11985. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  11986. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  11987. */
  11988. } wmi_p2p_go_set_beacon_ie_fixed_param;
  11989. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  11990. * probe response generated by FW. used in FW beacon mode.
  11991. * the FW will add this IE to probe response in addition to the probe response
  11992. * template set by WMI_PRB_TMPL_CMDID command.
  11993. */
  11994. typedef struct {
  11995. /** unique id identifying the VDEV, generated by the caller */
  11996. A_UINT32 vdev_id;
  11997. /* ie length */
  11998. A_UINT32 ie_buf_len;
  11999. /*followed by byte stream of ie data of length ie_buf_len */
  12000. } wmi_p2p_go_set_probe_resp_ie;
  12001. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  12002. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  12003. * and action frames received by the P2P Client.
  12004. * Note: This command is currently used only for Apple P2P implementation.
  12005. */
  12006. typedef struct {
  12007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  12008. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  12009. A_UINT32 p2p_ie_oui_type;
  12010. /** OS specific NoA Attribute ID */
  12011. A_UINT32 p2p_noa_attribute;
  12012. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  12013. /*----P2P disc offload definition ----*/
  12014. typedef struct {
  12015. A_UINT32 pattern_type;
  12016. /**
  12017. * TLV (tag length value) paramerters follow the pattern structure.
  12018. * TLV can contain bssid list, ssid list and
  12019. * ie. the TLV tags are defined above;
  12020. */
  12021. } wmi_p2p_disc_offload_pattern_cmd;
  12022. typedef struct {
  12023. /* unique id identifying the VDEV, generated by the caller */
  12024. A_UINT32 vdev_id;
  12025. /* mgmt type of the ie*/
  12026. A_UINT32 mgmt_type;
  12027. /* ie length */
  12028. A_UINT32 ie_buf_len;
  12029. /*followed by byte stream of ie data of length ie_buf_len */
  12030. } wmi_p2p_disc_offload_appie_cmd;
  12031. typedef struct {
  12032. /* enable/disable p2p find offload*/
  12033. A_UINT32 enable;
  12034. /* unique id identifying the VDEV, generated by the caller */
  12035. A_UINT32 vdev_id;
  12036. /* p2p find type */
  12037. A_UINT32 disc_type;
  12038. /* p2p find perodic */
  12039. A_UINT32 perodic;
  12040. /* p2p find listen channel in MHz */
  12041. A_UINT32 listen_channel;
  12042. /* p2p find full channel number */
  12043. A_UINT32 num_scan_chans;
  12044. /**
  12045. * TLV (tag length value) paramerters follow the pattern structure.
  12046. * TLV contain channel list in MHz
  12047. */
  12048. } wmi_p2p_disc_offload_config_cmd;
  12049. /*----P2P OppPS definition ----*/
  12050. typedef struct {
  12051. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  12052. A_UINT32 tlv_header;
  12053. /* unique id identifying the VDEV, generated by the caller */
  12054. A_UINT32 vdev_id;
  12055. /* OppPS attributes */
  12056. /** Bit 0: Indicate enable/disable of OppPS
  12057. * Bits 7-1: Ctwindow in TUs
  12058. * Bits 31-8: Reserved
  12059. */
  12060. A_UINT32 oppps_attr;
  12061. } wmi_p2p_set_oppps_cmd_fixed_param;
  12062. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  12063. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  12064. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  12065. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  12066. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  12067. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  12068. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  12069. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  12070. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  12071. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  12072. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  12073. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  12074. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  12075. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  12076. typedef enum p2p_lo_start_ctrl_flags_e {
  12077. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  12078. } p2p_lo_start_ctrl_flags;
  12079. #define P2P_LO_PER_DEV_TYPE_LEN 8
  12080. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  12081. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  12082. #define P2P_LO_PROB_RESP_MAX_LEN 512
  12083. typedef struct {
  12084. A_UINT32 tlv_header;
  12085. A_UINT32 vdev_id;
  12086. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  12087. A_UINT32 channel; /* MHz */
  12088. A_UINT32 period; /* ms */
  12089. A_UINT32 interval; /* ms, interval should be larger than period */
  12090. A_UINT32 count; /* 0 means forever */
  12091. /*
  12092. * device_types_len specifies the number of bytes in the
  12093. * device_types_data[] byte-array TLV that follows this TLV.
  12094. * The data in device_types_data[] is in 8-byte elements, so
  12095. * device_types_len will be a multiple of 8.
  12096. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  12097. */
  12098. A_UINT32 device_types_len;
  12099. /*
  12100. * prob_resp_len specifies the number of bytes in the
  12101. * prob_resp_data[] byte-array TLV that follows this TLV.
  12102. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  12103. */
  12104. A_UINT32 prob_resp_len;
  12105. /*
  12106. * Two other TLVs follow this TLV:
  12107. * A_UINT8 device_types_data[device_types_len];
  12108. * A_UINT8 prob_resp_data[prob_resp_len];
  12109. * The information in device_types_data[] and prob_resp_data[]
  12110. * needs to be provided to the target in over-the-air byte order.
  12111. * On a big-endian host, if device_types_data and prob_resp_data
  12112. * are initially in the correct over-the-air byte order,
  12113. * the automatic byteswap for endianness-correction during WMI
  12114. * message download will mess up the byte order.
  12115. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  12116. * within each quad-byte segment of device_types_data[] and
  12117. * prob_resp_data[], so that the automatic byte-swap applied during
  12118. * WMI download from a big-endian host to the little-endian target
  12119. * will restore device_types_data and prob_resp_data into the
  12120. * correct byte ordering.
  12121. */
  12122. } wmi_p2p_lo_start_cmd_fixed_param;
  12123. typedef struct {
  12124. A_UINT32 tlv_header;
  12125. A_UINT32 vdev_id;
  12126. } wmi_p2p_lo_stop_cmd_fixed_param;
  12127. typedef enum p2p_lo_stopped_reason_e {
  12128. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  12129. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  12130. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  12131. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  12132. } p2p_lo_stopped_reason;
  12133. typedef struct {
  12134. A_UINT32 tlv_header;
  12135. A_UINT32 vdev_id;
  12136. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  12137. } wmi_p2p_lo_stopped_event_fixed_param;
  12138. typedef enum {
  12139. WMI_MNT_FILTER_CONFIG_MANAGER,
  12140. WMI_MNT_FILTER_CONFIG_CONTROL,
  12141. WMI_MNT_FILTER_CONFIG_DATA,
  12142. WMI_MNT_FILTER_CONFIG_ALL,
  12143. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  12144. } WMI_MNT_FILTER_CONFIG_TYPE;
  12145. typedef struct {
  12146. A_UINT32 tlv_header;
  12147. A_UINT32 vdev_id;
  12148. A_UINT32 clear_or_set;
  12149. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  12150. } wmi_mnt_filter_cmd_fixed_param;
  12151. typedef struct {
  12152. A_UINT32 time32; /* upper 32 bits of time stamp */
  12153. A_UINT32 time0; /* lower 32 bits of time stamp */
  12154. } A_TIME64;
  12155. typedef enum wmi_peer_sta_kickout_reason {
  12156. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  12157. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  12158. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  12159. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  12160. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  12161. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  12162. } PEER_KICKOUT_REASON;
  12163. typedef struct {
  12164. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  12165. /** peer mac address */
  12166. wmi_mac_addr peer_macaddr;
  12167. /** Reason code, defined as above */
  12168. A_UINT32 reason;
  12169. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  12170. A_UINT32 rssi;
  12171. } wmi_peer_sta_kickout_event_fixed_param;
  12172. #define WMI_WLAN_PROFILE_MAX_HIST 3
  12173. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  12174. typedef struct _wmi_wlan_profile_t {
  12175. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  12176. A_UINT32 id;
  12177. A_UINT32 cnt;
  12178. A_UINT32 tot;
  12179. A_UINT32 min;
  12180. A_UINT32 max;
  12181. A_UINT32 hist_intvl;
  12182. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  12183. } wmi_wlan_profile_t;
  12184. typedef struct _wmi_wlan_profile_ctx_t {
  12185. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  12186. A_UINT32 tot; /* time in us */
  12187. A_UINT32 tx_msdu_cnt;
  12188. A_UINT32 tx_mpdu_cnt;
  12189. A_UINT32 tx_ppdu_cnt;
  12190. A_UINT32 rx_msdu_cnt;
  12191. A_UINT32 rx_mpdu_cnt;
  12192. A_UINT32 bin_count;
  12193. } wmi_wlan_profile_ctx_t;
  12194. typedef struct {
  12195. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  12196. A_UINT32 enable;
  12197. } wmi_wlan_profile_trigger_cmd_fixed_param;
  12198. typedef struct {
  12199. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  12200. A_UINT32 value;
  12201. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  12202. typedef struct {
  12203. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  12204. A_UINT32 profile_id;
  12205. A_UINT32 value;
  12206. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  12207. typedef struct {
  12208. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  12209. A_UINT32 profile_id;
  12210. A_UINT32 enable;
  12211. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  12212. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  12213. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  12214. when comparing wifi header.*/
  12215. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  12216. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  12217. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  12218. #define WOW_DEFAULT_BITMASK_SIZE 146
  12219. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  12220. #define WOW_MAX_BITMAP_FILTERS 32
  12221. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  12222. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  12223. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  12224. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  12225. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  12226. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  12227. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  12228. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  12229. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  12230. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  12231. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  12232. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  12233. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  12234. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  12235. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  12236. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  12237. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  12238. typedef enum pattern_type_e {
  12239. WOW_PATTERN_MIN = 0,
  12240. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  12241. WOW_IPV4_SYNC_PATTERN,
  12242. WOW_IPV6_SYNC_PATTERN,
  12243. WOW_WILD_CARD_PATTERN,
  12244. WOW_TIMER_PATTERN,
  12245. WOW_MAGIC_PATTERN,
  12246. WOW_IPV6_RA_PATTERN,
  12247. WOW_IOAC_PKT_PATTERN,
  12248. WOW_IOAC_TMR_PATTERN,
  12249. WOW_IOAC_SOCK_PATTERN,
  12250. WOW_PATTERN_MAX
  12251. } WOW_PATTERN_TYPE;
  12252. typedef enum event_type_e {
  12253. WOW_BMISS_EVENT = 0,
  12254. WOW_BETTER_AP_EVENT,
  12255. WOW_DEAUTH_RECVD_EVENT,
  12256. WOW_MAGIC_PKT_RECVD_EVENT,
  12257. WOW_GTK_ERR_EVENT,
  12258. WOW_FOURWAY_HSHAKE_EVENT,
  12259. WOW_EAPOL_RECVD_EVENT,
  12260. WOW_NLO_DETECTED_EVENT,
  12261. WOW_DISASSOC_RECVD_EVENT,
  12262. WOW_PATTERN_MATCH_EVENT,
  12263. WOW_CSA_IE_EVENT,
  12264. WOW_PROBE_REQ_WPS_IE_EVENT,
  12265. WOW_AUTH_REQ_EVENT,
  12266. WOW_ASSOC_REQ_EVENT,
  12267. WOW_HTT_EVENT,
  12268. WOW_RA_MATCH_EVENT,
  12269. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  12270. WOW_IOAC_MAGIC_EVENT,
  12271. WOW_IOAC_SHORT_EVENT,
  12272. WOW_IOAC_EXTEND_EVENT,
  12273. WOW_IOAC_TIMER_EVENT,
  12274. WOW_DFS_PHYERR_RADAR_EVENT,
  12275. WOW_BEACON_EVENT,
  12276. WOW_CLIENT_KICKOUT_EVENT,
  12277. WOW_NAN_EVENT,
  12278. WOW_EXTSCAN_EVENT,
  12279. WOW_IOAC_REV_KA_FAIL_EVENT,
  12280. WOW_IOAC_SOCK_EVENT,
  12281. WOW_NLO_SCAN_COMPLETE_EVENT,
  12282. WOW_NAN_DATA_EVENT,
  12283. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  12284. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  12285. WOW_TDLS_CONN_TRACKER_EVENT,
  12286. WOW_CRITICAL_LOG_EVENT,
  12287. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  12288. WOW_11D_SCAN_EVENT,
  12289. WOW_SAP_OBSS_DETECTION_EVENT,
  12290. WOW_BSS_COLOR_COLLISION_DETECT_EVENT,
  12291. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,
  12292. WOW_ROAM_PREAUTH_START_EVENT,
  12293. WOW_ROAM_PMKID_REQUEST_EVENT,
  12294. } WOW_WAKE_EVENT_TYPE;
  12295. typedef enum wake_reason_e {
  12296. WOW_REASON_UNSPECIFIED = -1,
  12297. WOW_REASON_NLOD = 0,
  12298. WOW_REASON_AP_ASSOC_LOST,
  12299. WOW_REASON_LOW_RSSI,
  12300. WOW_REASON_DEAUTH_RECVD,
  12301. WOW_REASON_DISASSOC_RECVD,
  12302. WOW_REASON_GTK_HS_ERR,
  12303. WOW_REASON_EAP_REQ,
  12304. WOW_REASON_FOURWAY_HS_RECV,
  12305. WOW_REASON_TIMER_INTR_RECV,
  12306. WOW_REASON_PATTERN_MATCH_FOUND,
  12307. WOW_REASON_RECV_MAGIC_PATTERN,
  12308. WOW_REASON_P2P_DISC,
  12309. WOW_REASON_WLAN_HB,
  12310. WOW_REASON_CSA_EVENT,
  12311. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  12312. WOW_REASON_AUTH_REQ_RECV,
  12313. WOW_REASON_ASSOC_REQ_RECV,
  12314. WOW_REASON_HTT_EVENT,
  12315. WOW_REASON_RA_MATCH,
  12316. WOW_REASON_HOST_AUTO_SHUTDOWN,
  12317. WOW_REASON_IOAC_MAGIC_EVENT,
  12318. WOW_REASON_IOAC_SHORT_EVENT,
  12319. WOW_REASON_IOAC_EXTEND_EVENT,
  12320. WOW_REASON_IOAC_TIMER_EVENT,
  12321. WOW_REASON_ROAM_HO,
  12322. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  12323. WOW_REASON_BEACON_RECV,
  12324. WOW_REASON_CLIENT_KICKOUT_EVENT,
  12325. WOW_REASON_NAN_EVENT,
  12326. WOW_REASON_EXTSCAN,
  12327. WOW_REASON_RSSI_BREACH_EVENT,
  12328. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  12329. WOW_REASON_IOAC_SOCK_EVENT,
  12330. WOW_REASON_NLO_SCAN_COMPLETE,
  12331. WOW_REASON_PACKET_FILTER_MATCH,
  12332. WOW_REASON_ASSOC_RES_RECV,
  12333. WOW_REASON_REASSOC_REQ_RECV,
  12334. WOW_REASON_REASSOC_RES_RECV,
  12335. WOW_REASON_ACTION_FRAME_RECV,
  12336. WOW_REASON_BPF_ALLOW,
  12337. WOW_REASON_NAN_DATA,
  12338. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  12339. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  12340. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  12341. WOW_REASON_CRITICAL_LOG,
  12342. WOW_REASON_P2P_LISTEN_OFFLOAD,
  12343. WOW_REASON_NAN_EVENT_WAKE_HOST,
  12344. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  12345. WOW_REASON_11D_SCAN,
  12346. WOW_REASON_THERMAL_CHANGE,
  12347. WOW_REASON_OIC_PING_OFFLOAD,
  12348. WOW_REASON_WLAN_DHCP_RENEW,
  12349. WOW_REASON_SAP_OBSS_DETECTION,
  12350. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  12351. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  12352. WOW_REASON_WLAN_MD, /* motion detected */
  12353. WOW_REASON_WLAN_BL, /* baselining done */
  12354. WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */
  12355. WOW_REASON_PKT_CAPTURE_MODE_WAKE,
  12356. WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */
  12357. WOW_REASON_ROAM_PREAUTH_START,
  12358. WOW_REASON_ROAM_PMKID_REQUEST,
  12359. /* add new WOW_REASON_ defs before this line */
  12360. WOW_REASON_MAX,
  12361. WOW_REASON_DEBUG_TEST = 0xFF,
  12362. } WOW_WAKE_REASON_TYPE;
  12363. typedef enum {
  12364. WOW_IFACE_PAUSE_ENABLED,
  12365. WOW_IFACE_PAUSE_DISABLED
  12366. } WOW_IFACE_STATUS;
  12367. enum {
  12368. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  12369. /* WMI_WOW_FLAG_SEND_PM_PME
  12370. * Some platforms have issues if the PM_PME message is sent after WoW,
  12371. * so don't send PM_PME after WoW unless the host uses this flag
  12372. * to request it.
  12373. */
  12374. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  12375. /* Flag to indicate unit test */
  12376. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  12377. /* Force HTC wakeup */
  12378. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  12379. /* Enable L1SS sleep for PCIE DRV case */
  12380. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  12381. };
  12382. typedef struct {
  12383. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  12384. A_UINT32 enable;
  12385. A_UINT32 pause_iface_config;
  12386. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  12387. } wmi_wow_enable_cmd_fixed_param;
  12388. typedef struct {
  12389. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  12390. /** Reserved for future use */
  12391. A_UINT32 reserved0;
  12392. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  12393. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  12394. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  12395. typedef struct {
  12396. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  12397. A_UINT32 vdev_id;
  12398. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  12399. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  12400. typedef struct bitmap_pattern_s {
  12401. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  12402. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  12403. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  12404. A_UINT32 pattern_offset;
  12405. A_UINT32 pattern_len;
  12406. A_UINT32 bitmask_len;
  12407. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  12408. } WOW_BITMAP_PATTERN_T;
  12409. typedef struct ipv4_sync_s {
  12410. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  12411. A_UINT32 ipv4_src_addr;
  12412. A_UINT32 ipv4_dst_addr;
  12413. A_UINT32 tcp_src_prt;
  12414. A_UINT32 tcp_dst_prt;
  12415. } WOW_IPV4_SYNC_PATTERN_T;
  12416. typedef struct ipv6_sync_s {
  12417. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  12418. A_UINT32 ipv6_src_addr[4];
  12419. A_UINT32 ipv6_dst_addr[4];
  12420. A_UINT32 tcp_src_prt;
  12421. A_UINT32 tcp_dst_prt;
  12422. } WOW_IPV6_SYNC_PATTERN_T;
  12423. typedef struct WOW_MAGIC_PATTERN_CMD
  12424. {
  12425. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  12426. wmi_mac_addr macaddr;
  12427. } WOW_MAGIC_PATTERN_CMD;
  12428. typedef enum wow_ioac_pattern_type {
  12429. WOW_IOAC_MAGIC_PATTERN = 1,
  12430. WOW_IOAC_SHORT_PATTERN,
  12431. WOW_IOAC_EXTEND_PATTERN,
  12432. } WOW_IOAC_PATTERN_TYPE;
  12433. typedef struct ioac_sock_pattern_s {
  12434. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  12435. A_UINT32 id;
  12436. A_UINT32 local_ipv4;
  12437. A_UINT32 remote_ipv4;
  12438. A_UINT32 local_port;
  12439. A_UINT32 remote_port;
  12440. A_UINT32 pattern_len; /* units = bytes */
  12441. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  12442. WMI_IPV6_ADDR local_ipv6;
  12443. WMI_IPV6_ADDR remote_ipv6;
  12444. A_UINT32 ack_nak_len;
  12445. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  12446. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  12447. } WOW_IOAC_SOCK_PATTERN_T;
  12448. typedef struct ioac_pkt_pattern_s {
  12449. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  12450. A_UINT32 pattern_type;
  12451. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  12452. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  12453. A_UINT32 pattern_len;
  12454. A_UINT32 random_len;
  12455. } WOW_IOAC_PKT_PATTERN_T;
  12456. typedef struct ioac_tmr_pattern_s {
  12457. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  12458. A_UINT32 wake_in_s;
  12459. A_UINT32 vdev_id;
  12460. } WOW_IOAC_TMR_PATTERN_T;
  12461. typedef struct {
  12462. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  12463. A_UINT32 nID;
  12464. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  12465. typedef struct {
  12466. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  12467. A_UINT32 nID;
  12468. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  12469. typedef struct ioac_keepalive_s {
  12470. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  12471. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  12472. A_UINT32 keepalive_pkt_len;
  12473. A_UINT32 period_in_ms;
  12474. A_UINT32 vdev_id;
  12475. A_UINT32 max_loss_cnt;
  12476. A_UINT32 local_ipv4;
  12477. A_UINT32 remote_ipv4;
  12478. A_UINT32 local_port;
  12479. A_UINT32 remote_port;
  12480. A_UINT32 recv_period_in_ms;
  12481. A_UINT32 rev_ka_size;
  12482. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  12483. WMI_IPV6_ADDR local_ipv6;
  12484. WMI_IPV6_ADDR remote_ipv6;
  12485. } WMI_WOW_IOAC_KEEPALIVE_T;
  12486. typedef struct {
  12487. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  12488. A_UINT32 vdev_id;
  12489. A_UINT32 pattern_type;
  12490. /*
  12491. * Following this struct are these TLVs. Note that they are all array of structures
  12492. * but can have at most one element. Which TLV is empty or has one element depends
  12493. * on the field pattern_type. This is to emulate an union.
  12494. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  12495. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  12496. */
  12497. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  12498. typedef struct {
  12499. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  12500. A_UINT32 vdev_id;
  12501. A_UINT32 pattern_type;
  12502. A_UINT32 pattern_id;
  12503. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  12504. typedef struct {
  12505. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  12506. A_UINT32 vdev_id;
  12507. A_UINT32 pattern_id;
  12508. A_UINT32 pattern_type;
  12509. /*
  12510. * Following this struct are these TLVs. Note that they are all array of structures
  12511. * but can have at most one element. Which TLV is empty or has one element depends
  12512. * on the field pattern_type. This is to emulate an union.
  12513. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  12514. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  12515. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  12516. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  12517. * A_UINT32 pattern_info_timeout[];
  12518. * A_UINT32 ra_ratelimit_interval;
  12519. */
  12520. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  12521. typedef struct {
  12522. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  12523. A_UINT32 vdev_id;
  12524. A_UINT32 pattern_id;
  12525. A_UINT32 pattern_type;
  12526. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  12527. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  12528. typedef struct {
  12529. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  12530. A_UINT32 vdev_id;
  12531. A_UINT32 is_add;
  12532. union {
  12533. A_UINT32 event_bitmap;
  12534. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  12535. };
  12536. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  12537. /*
  12538. * This structure is used to set the pattern to check UDP packet in WOW mode.
  12539. * If match, construct a tx frame in a local buffer to send through the peer
  12540. * AP to the entity in the IP network that sent the UDP packet to this STA.
  12541. */
  12542. typedef struct {
  12543. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  12544. A_UINT32 vdev_id;
  12545. A_UINT32 enable; /* 1: enable, 0: disable*/
  12546. /* dest_port -
  12547. * bits 7:0 contain the LSB of the UDP dest port,
  12548. * bits 15:8 contain the MSB of the UDP dest port
  12549. */
  12550. A_UINT32 dest_port;
  12551. A_UINT32 pattern_len; /* length in byte of pattern[] */
  12552. A_UINT32 response_len; /* length in byte of response[] */
  12553. /* Following this struct are the TLV's:
  12554. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  12555. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  12556. */
  12557. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  12558. /*
  12559. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  12560. */
  12561. typedef struct {
  12562. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  12563. A_UINT32 enable; /* 1: enable, 0: disable */
  12564. A_UINT32 pin; /* pin for host wakeup */
  12565. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  12566. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  12567. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  12568. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  12569. * If init_state is 0, a low --> high transition
  12570. * causes a host wakeup interrupt.
  12571. * If init_state is 1, a high --> low transition
  12572. * causes a host wakeup interrrupt.
  12573. */
  12574. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  12575. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  12576. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  12577. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  12578. typedef enum {
  12579. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  12580. WOW_ACTION_WAKEUP_OPERATION_SET,
  12581. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  12582. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  12583. } WOW_ACTION_WAKEUP_OPERATION;
  12584. typedef struct {
  12585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  12586. A_UINT32 vdev_id;
  12587. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  12588. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  12589. /* This fixed_param TLV is followed by these additional TLV's
  12590. * action_bitmaps_per_category -
  12591. * Each element is a 32-bit bitmap indicating which subcategories
  12592. * for that particular action category are considered for WoW wakeup
  12593. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  12594. * subcategory's bit is 1).
  12595. *
  12596. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  12597. */
  12598. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  12599. typedef struct wow_event_info_s {
  12600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  12601. A_UINT32 vdev_id;
  12602. A_UINT32 flag; /*This is current reserved.*/
  12603. A_INT32 wake_reason;
  12604. A_UINT32 data_len;
  12605. } WOW_EVENT_INFO_fixed_param;
  12606. typedef struct wow_initial_wakeup_event_s {
  12607. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  12608. A_UINT32 vdev_id;
  12609. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  12610. typedef enum {
  12611. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  12612. WOW_EVENT_INFO_TYPE_BITMAP,
  12613. WOW_EVENT_INFO_TYPE_GTKIGTK,
  12614. } WOW_EVENT_INFO_TYPE;
  12615. typedef struct wow_event_info_section_s {
  12616. A_UINT32 data_type;
  12617. A_UINT32 data_len;
  12618. } WOW_EVENT_INFO_SECTION;
  12619. typedef struct wow_event_info_section_packet_s {
  12620. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  12621. } WOW_EVENT_INFO_SECTION_PACKET;
  12622. typedef struct wow_event_info_section_bitmap_s {
  12623. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  12624. A_UINT32 flag; /*This is current reserved.*/
  12625. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  12626. A_UINT32 org_len; /*The length of the orginal packet.*/
  12627. } WOW_EVENT_INFO_SECTION_BITMAP;
  12628. /**
  12629. * This command is sent from WLAN host driver to firmware to
  12630. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  12631. * PCIe link and DDR being active.
  12632. *
  12633. *
  12634. * Entering D0-WOW Mode (based on kernel suspend request):
  12635. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  12636. * target: Take action (e.g. dbglog suspend)
  12637. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  12638. *
  12639. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  12640. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  12641. * target: Take action (e.g. dbglog resume)
  12642. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  12643. *
  12644. * This command is applicable only on the PCIE LL systems
  12645. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  12646. * Decision to enter D0-WOW or WOW is based on active interfaces
  12647. *
  12648. */
  12649. typedef struct {
  12650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  12651. A_UINT32 enable; /* 1 = enable, 0 = disable */
  12652. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  12653. typedef enum extend_wow_type_e {
  12654. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  12655. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  12656. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  12657. EXTWOW_TYPE_APP_PULSETEST,
  12658. EXTWOW_DISABLED = 255,
  12659. } EXTWOW_TYPE;
  12660. typedef struct {
  12661. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  12662. A_UINT32 vdev_id;
  12663. A_UINT32 type;
  12664. A_UINT32 wakeup_pin_num;
  12665. A_UINT32 swol_pulsetest_type;
  12666. A_UINT32 swol_pulsetest_application;
  12667. } wmi_extwow_enable_cmd_fixed_param;
  12668. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  12669. #define SWOL_INDOOR_KEY_LEN 16
  12670. typedef struct {
  12671. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  12672. A_UINT32 vdev_id;
  12673. wmi_mac_addr wakee_mac;
  12674. A_UINT8 ident[8];
  12675. A_UINT8 passwd[16];
  12676. A_UINT32 ident_len;
  12677. A_UINT32 passwd_len;
  12678. /* indoor check parameters */
  12679. /* key for mac addresses specified in swol_indoor_key_mac
  12680. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  12681. * segment of this array, so the bytes will return to their original
  12682. * order when the entire WMI message contents are byte-swapped to
  12683. * convert from big-endian to little-endian format.
  12684. */
  12685. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  12686. /* key length for specified mac address index
  12687. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  12688. * segment of this array, so the bytes will return to their original
  12689. * order when the entire WMI message contents are byte-swapped to
  12690. * convert from big-endian to little-endian format.
  12691. */
  12692. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12693. /* mac address array allowed to wakeup host*/
  12694. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12695. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  12696. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  12697. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  12698. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  12699. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  12700. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  12701. A_UINT32 swol_indoor_exception_app;
  12702. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  12703. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  12704. typedef struct {
  12705. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  12706. A_UINT32 vdev_id;
  12707. A_UINT8 rc4_key[16];
  12708. A_UINT32 rc4_key_len;
  12709. /** ip header parameter */
  12710. A_UINT32 ip_id; /* NC id */
  12711. A_UINT32 ip_device_ip; /* NC IP address */
  12712. A_UINT32 ip_server_ip; /* Push server IP address */
  12713. /** tcp header parameter */
  12714. A_UINT16 tcp_src_port; /* NC TCP port */
  12715. A_UINT16 tcp_dst_port; /* Push server TCP port */
  12716. A_UINT32 tcp_seq;
  12717. A_UINT32 tcp_ack_seq;
  12718. A_UINT32 keepalive_init; /* Initial ping interval */
  12719. A_UINT32 keepalive_min; /* Minimum ping interval */
  12720. A_UINT32 keepalive_max; /* Maximum ping interval */
  12721. A_UINT32 keepalive_inc; /* Increment of ping interval */
  12722. wmi_mac_addr gateway_mac;
  12723. A_UINT32 tcp_tx_timeout_val;
  12724. A_UINT32 tcp_rx_timeout_val;
  12725. /** add extra parameter for backward-compatible */
  12726. /*
  12727. * For all byte arrays, natural order is used. E.g.
  12728. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  12729. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  12730. */
  12731. /* used to encrypt transmit packet such as keep-alive */
  12732. A_UINT8 rc4_write_sandbox[256];
  12733. A_UINT32 rc4_write_x;
  12734. A_UINT32 rc4_write_y;
  12735. /* used to decrypt received packet such as wow data */
  12736. A_UINT8 rc4_read_sandbox[256];
  12737. A_UINT32 rc4_read_x;
  12738. A_UINT32 rc4_read_y;
  12739. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  12740. A_UINT8 ssl_write_seq[8];
  12741. A_UINT8 ssl_sha1_write_key[64];
  12742. A_UINT32 ssl_sha1_write_key_len;
  12743. /* used to calculate HAMC hash for receive packet such as wow data */
  12744. A_UINT8 ssl_read_seq[8];
  12745. A_UINT8 ssl_sha1_read_key[64];
  12746. A_UINT32 ssl_sha1_read_key_len;
  12747. /* optional element for specifying TCP options data to include in
  12748. * transmit packets such as keep-alive
  12749. */
  12750. A_UINT32 tcp_options_len;
  12751. A_UINT8 tcp_options[40];
  12752. A_UINT32 async_id; /* keep-alive request id */
  12753. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  12754. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  12755. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  12756. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  12757. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  12758. #define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/
  12759. typedef enum {
  12760. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  12761. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  12762. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  12763. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  12764. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  12765. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  12766. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  12767. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  12768. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  12769. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  12770. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  12771. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  12772. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  12773. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  12774. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  12775. PKT_PWR_SAVE_ENABLE = 0x80000000,
  12776. } WMI_PKT_PWR_SAVE_TYPE;
  12777. typedef struct {
  12778. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  12779. A_UINT32 num_data; /** length in byte of data[]. */
  12780. /** pdev_id for identifying the MAC
  12781. * See macros starting with WMI_PDEV_ID_ for values.
  12782. */
  12783. A_UINT32 pdev_id;
  12784. /* This structure is used to send Factory Test Mode [FTM] command
  12785. * from host to firmware for integrated chips which are binary blobs.
  12786. * Following this structure is the TLV:
  12787. * A_UINT8 data[]; <-- length in byte given by field num_data.
  12788. */
  12789. } wmi_ftm_intg_cmd_fixed_param;
  12790. typedef struct {
  12791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  12792. A_UINT32 num_data; /** length in byte of data[]. */
  12793. /* This structure is used to receive Factory Test Mode [FTM] event
  12794. * from firmware to host for integrated chips which are binary blobs.
  12795. * Following this structure is the TLV:
  12796. * A_UINT8 data[]; <-- length in byte given by field num_data.
  12797. */
  12798. } wmi_ftm_intg_event_fixed_param;
  12799. #define WMI_MAX_NS_OFFLOADS 2
  12800. #define WMI_MAX_ARP_OFFLOADS 2
  12801. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  12802. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  12803. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  12804. typedef struct {
  12805. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  12806. A_UINT32 flags; /* flags */
  12807. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  12808. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  12809. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  12810. } WMI_ARP_OFFLOAD_TUPLE;
  12811. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  12812. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  12813. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  12814. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  12815. #define WMI_NSOFF_MAX_TARGET_IPS 2
  12816. typedef struct {
  12817. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  12818. A_UINT32 flags; /* flags */
  12819. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  12820. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  12821. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  12822. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  12823. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  12824. } WMI_NS_OFFLOAD_TUPLE;
  12825. typedef struct {
  12826. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  12827. A_UINT32 flags;
  12828. A_UINT32 vdev_id;
  12829. A_UINT32 num_ns_ext_tuples;
  12830. /* Following this structure are the TLVs:
  12831. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  12832. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  12833. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  12834. */
  12835. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  12836. typedef struct {
  12837. A_UINT32 tlv_header;
  12838. A_UINT32 vdev_id;
  12839. A_UINT32 pattern_id;
  12840. A_UINT32 timeout;
  12841. A_UINT32 length;
  12842. /*Following this would be the pattern
  12843. A_UINT8 pattern[] of length specifed by length
  12844. field in the structure.*/
  12845. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  12846. typedef struct {
  12847. A_UINT32 tlv_header;
  12848. A_UINT32 vdev_id;
  12849. A_UINT32 pattern_id;
  12850. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  12851. typedef struct {
  12852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  12853. /** unique id identifying the VDEV, generated by the caller */
  12854. A_UINT32 vdev_id;
  12855. /** peer MAC address */
  12856. wmi_mac_addr peer_macaddr;
  12857. /** Tid number */
  12858. A_UINT32 tid;
  12859. /** Initiator (1) or Responder (0) for this aggregation */
  12860. A_UINT32 initiator;
  12861. /** size of the negotiated window */
  12862. A_UINT32 window_size;
  12863. /** starting sequence number (only valid for initiator) */
  12864. A_UINT32 ssn;
  12865. /** timeout field represents the time to wait for Block Ack in
  12866. * initiator case and the time to wait for BAR in responder
  12867. * case. 0 represents no timeout. */
  12868. A_UINT32 timeout;
  12869. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  12870. A_UINT32 policy;
  12871. } wmi_peer_tid_addba_cmd_fixed_param;
  12872. typedef struct {
  12873. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  12874. /** unique id identifying the VDEV, generated by the caller */
  12875. A_UINT32 vdev_id;
  12876. /** peer MAC address */
  12877. wmi_mac_addr peer_macaddr;
  12878. /** Tid number */
  12879. A_UINT32 tid;
  12880. /** Initiator (1) or Responder (0) for this aggregation */
  12881. A_UINT32 initiator;
  12882. } wmi_peer_tid_delba_cmd_fixed_param;
  12883. typedef struct {
  12884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  12885. /** unique id identifying the VDEV, generated by the caller */
  12886. A_UINT32 vdev_id;
  12887. /** peer MAC address */
  12888. wmi_mac_addr peer_macaddr;
  12889. /** Tid number */
  12890. A_UINT32 tid;
  12891. /** Event status */
  12892. A_UINT32 status;
  12893. } wmi_tx_addba_complete_event_fixed_param;
  12894. typedef struct {
  12895. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  12896. /** unique id identifying the VDEV, generated by the caller */
  12897. A_UINT32 vdev_id;
  12898. /** peer MAC address */
  12899. wmi_mac_addr peer_macaddr;
  12900. /** Tid number */
  12901. A_UINT32 tid;
  12902. /** Event status */
  12903. A_UINT32 status;
  12904. } wmi_tx_delba_complete_event_fixed_param;
  12905. /*
  12906. * Structure to request sequence numbers for a given
  12907. * peer station on different TIDs. The TIDs are
  12908. * indicated in the tidBitMap, tid 0 would
  12909. * be represented by LSB bit 0. tid 1 would be
  12910. * represented by LSB bit 1 etc.
  12911. * The target will retrieve the current sequence
  12912. * numbers for the peer on all the TIDs requested
  12913. * and send back a response in a WMI event.
  12914. */
  12915. typedef struct
  12916. {
  12917. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12918. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  12919. wmi_mac_addr peer_macaddr;
  12920. A_UINT32 tidBitmap;
  12921. } wmi_ba_req_ssn;
  12922. typedef struct {
  12923. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12924. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  12925. /** unique id identifying the VDEV, generated by the caller */
  12926. A_UINT32 vdev_id;
  12927. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  12928. A_UINT32 num_ba_req_ssn;
  12929. /* Following this struc are the TLV's:
  12930. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  12931. */
  12932. } wmi_ba_req_ssn_cmd_fixed_param;
  12933. /*
  12934. * Max transmit categories
  12935. *
  12936. * Note: In future if we need to increase WMI_MAX_TC definition
  12937. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  12938. */
  12939. #define WMI_MAX_TC 8
  12940. /*
  12941. * Structure to send response sequence numbers
  12942. * for a give peer and tidmap.
  12943. */
  12944. typedef struct
  12945. {
  12946. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12947. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  12948. wmi_mac_addr peer_macaddr;
  12949. /* A boolean to indicate if ssn is present */
  12950. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  12951. /* The ssn from target, valid only if
  12952. * ssn_present_for_tid[tidn] equals 1
  12953. */
  12954. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  12955. } wmi_ba_event_ssn;
  12956. typedef struct {
  12957. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12958. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  12959. /** unique id identifying the VDEV, generated by the caller */
  12960. A_UINT32 vdev_id;
  12961. /** Event status, success or failure of the overall operation */
  12962. A_UINT32 status;
  12963. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  12964. A_UINT32 num_ba_event_ssn;
  12965. /* Following this struc are the TLV's:
  12966. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  12967. */
  12968. } wmi_ba_rsp_ssn_event_fixed_param;
  12969. enum wmi_aggr_state_req_type {
  12970. WMI_DISABLE_AGGREGATION,
  12971. WMI_ENABLE_AGGREGATION
  12972. };
  12973. /*
  12974. * This event is generated by the COEX module
  12975. * when esco call is begins the coex module in fw genrated this event to host to
  12976. * disable the RX aggregation and after completion of the esco call fw will indicate to
  12977. * enable back the Rx aggregation .
  12978. */
  12979. typedef struct {
  12980. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  12981. /** unique id identifying the VDEV, generated by the caller */
  12982. A_UINT32 vdev_id;
  12983. /** req_type contains values from enum
  12984. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  12985. A_UINT32 req_type;
  12986. } wmi_aggr_state_trig_event_fixed_param;
  12987. typedef struct {
  12988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  12989. /** unique id identifying the VDEV, generated by the caller */
  12990. A_UINT32 vdev_id;
  12991. /** MAC address used for installing */
  12992. wmi_mac_addr peer_macaddr;
  12993. /** key index */
  12994. A_UINT32 key_ix;
  12995. /** key flags */
  12996. A_UINT32 key_flags;
  12997. /** Event status */
  12998. A_UINT32 status;
  12999. } wmi_vdev_install_key_complete_event_fixed_param;
  13000. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  13001. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  13002. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  13003. WMI_NLO_AUTH_ALGO_WPA = 3,
  13004. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  13005. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  13006. WMI_NLO_AUTH_ALGO_RSNA = 6,
  13007. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  13008. } WMI_NLO_AUTH_ALGORITHM;
  13009. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  13010. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  13011. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  13012. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  13013. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  13014. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  13015. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  13016. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  13017. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  13018. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  13019. } WMI_NLO_CIPHER_ALGORITHM;
  13020. /* SSID broadcast type passed in NLO params */
  13021. typedef enum _WMI_NLO_SSID_BcastNwType
  13022. {
  13023. WMI_NLO_BCAST_UNKNOWN = 0,
  13024. WMI_NLO_BCAST_NORMAL = 1,
  13025. WMI_NLO_BCAST_HIDDEN = 2,
  13026. } WMI_NLO_SSID_BcastNwType;
  13027. #define WMI_NLO_MAX_SSIDS 16
  13028. #define WMI_NLO_MAX_CHAN 48
  13029. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  13030. #define WMI_NLO_CONFIG_START (0x1 << 1)
  13031. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  13032. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  13033. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  13034. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  13035. /* This bit is used to indicate if EPNO Profile is enabled */
  13036. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  13037. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  13038. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  13039. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  13040. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  13041. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  13042. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  13043. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  13044. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  13045. /* Whether PNO event shall be triggered if the network is found on A band */
  13046. #define WMI_ENLO_FLAG_A_BAND 2
  13047. /* Whether PNO event shall be triggered if the network is found on G band */
  13048. #define WMI_ENLO_FLAG_G_BAND 4
  13049. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  13050. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  13051. /* Code for matching the beacon AUTH IE - additional codes TBD */
  13052. /* open */
  13053. #define WMI_ENLO_AUTH_CODE_OPEN 1
  13054. /* WPA_PSK or WPA2PSK */
  13055. #define WMI_ENLO_AUTH_CODE_PSK 2
  13056. /* any EAPOL */
  13057. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  13058. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  13059. typedef struct wmi_nlo_ssid_param
  13060. {
  13061. A_UINT32 valid;
  13062. wmi_ssid ssid;
  13063. } wmi_nlo_ssid_param;
  13064. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  13065. typedef struct wmi_nlo_enc_param
  13066. {
  13067. A_UINT32 valid;
  13068. A_UINT32 enc_type;
  13069. } wmi_nlo_enc_param;
  13070. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  13071. typedef struct wmi_nlo_auth_param
  13072. {
  13073. A_UINT32 valid;
  13074. A_UINT32 auth_type;
  13075. } wmi_nlo_auth_param;
  13076. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  13077. typedef struct wmi_nlo_bcast_nw_param
  13078. {
  13079. A_UINT32 valid;
  13080. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  13081. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  13082. A_UINT32 bcast_nw_type;
  13083. } wmi_nlo_bcast_nw_param;
  13084. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  13085. typedef struct wmi_nlo_rssi_param
  13086. {
  13087. A_UINT32 valid;
  13088. A_INT32 rssi;
  13089. } wmi_nlo_rssi_param;
  13090. typedef struct nlo_configured_parameters {
  13091. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  13092. wmi_nlo_ssid_param ssid;
  13093. wmi_nlo_enc_param enc_type;
  13094. wmi_nlo_auth_param auth_type;
  13095. wmi_nlo_rssi_param rssi_cond;
  13096. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  13097. } nlo_configured_parameters;
  13098. /* Support channel prediction for PNO scan after scanning top_k_num channels
  13099. * if stationary_threshold is met.
  13100. */
  13101. typedef struct nlo_channel_prediction_cfg {
  13102. A_UINT32 tlv_header;
  13103. /* Enable or disable this feature. */
  13104. A_UINT32 enable;
  13105. /* Top K channels will be scanned before deciding whether to further scan
  13106. * or stop. Minimum value is 3 and maximum is 5. */
  13107. A_UINT32 top_k_num;
  13108. /* Preconfigured stationary threshold.
  13109. * Lesser value means more conservative. Bigger value means more aggressive.
  13110. * Maximum is 100 and mininum is 0. */
  13111. A_UINT32 stationary_threshold;
  13112. /* Periodic full channel scan in milliseconds unit.
  13113. * After full_scan_period_ms since last full scan, channel prediction
  13114. * scan is suppressed and will do full scan.
  13115. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  13116. * full scan at all (not recommended).
  13117. */
  13118. A_UINT32 full_scan_period_ms;
  13119. } nlo_channel_prediction_cfg;
  13120. typedef struct enlo_candidate_score_params_t {
  13121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  13122. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  13123. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  13124. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  13125. /* current_connection_bonus:
  13126. * only report when there is a network's score this much higher
  13127. * than the current connection
  13128. */
  13129. A_UINT32 current_connection_bonus;
  13130. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  13131. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  13132. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  13133. } enlo_candidate_score_params;
  13134. typedef struct connected_nlo_bss_band_rssi_pref_t {
  13135. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  13136. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  13137. A_UINT32 band;
  13138. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  13139. A_INT32 rssi_pref;
  13140. } connected_nlo_bss_band_rssi_pref;
  13141. typedef struct connected_nlo_rssi_params_t {
  13142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  13143. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  13144. * the current connected BSS.
  13145. */
  13146. A_INT32 relative_rssi;
  13147. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  13148. A_INT32 relative_rssi_5g_pref;
  13149. } connected_nlo_rssi_params;
  13150. typedef struct wmi_nlo_config {
  13151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  13152. A_UINT32 flags;
  13153. A_UINT32 vdev_id;
  13154. A_UINT32 fast_scan_max_cycles;
  13155. A_UINT32 active_dwell_time;
  13156. A_UINT32 passive_dwell_time; /* PDT in msecs */
  13157. A_UINT32 probe_bundle_size;
  13158. A_UINT32 rest_time; /* ART = IRT */
  13159. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  13160. A_UINT32 scan_backoff_multiplier; /* SBM */
  13161. A_UINT32 fast_scan_period; /* SCBM */
  13162. A_UINT32 slow_scan_period; /* specific to windows */
  13163. A_UINT32 no_of_ssids;
  13164. A_UINT32 num_of_channels;
  13165. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  13166. /** MAC Address to use in Probe Req as SA **/
  13167. wmi_mac_addr mac_addr;
  13168. /** Mask on which MAC has to be randomized **/
  13169. wmi_mac_addr mac_mask;
  13170. /** IE bitmap to use in Probe Req **/
  13171. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  13172. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  13173. A_UINT32 num_vendor_oui;
  13174. /** Number of connected NLO band preferences **/
  13175. A_UINT32 num_cnlo_band_pref;
  13176. /* The TLVs will follow.
  13177. * nlo_configured_parameters nlo_list[];
  13178. * A_UINT32 channel_list[num_of_channels]; // in MHz
  13179. * nlo_channel_prediction_cfg ch_prediction_cfg;
  13180. * enlo_candidate_score_params candidate_score_params;
  13181. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  13182. * connected_nlo_rssi_params cnlo_rssi_params;
  13183. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  13184. */
  13185. } wmi_nlo_config_cmd_fixed_param;
  13186. typedef struct wmi_nlo_event
  13187. {
  13188. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  13189. A_UINT32 vdev_id;
  13190. } wmi_nlo_event;
  13191. /* WMI_PASSPOINT_CONFIG_SET
  13192. * Sets a list for passpoint networks for PNO purposes;
  13193. * it should be matched against any passpoint networks found
  13194. * during regular PNO scan.
  13195. */
  13196. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  13197. /* WMI_PASSPOINT_CONFIG_RESET
  13198. * Reset passpoint network list -
  13199. * no Passpoint networks should be matched after this.
  13200. */
  13201. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  13202. #define PASSPOINT_REALM_LEN 256
  13203. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  13204. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  13205. #define PASSPOINT_PLMN_ID_LEN 3
  13206. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  13207. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  13208. /*
  13209. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  13210. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  13211. * array will end on a 4-byte boundary.
  13212. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  13213. */
  13214. A_COMPILE_TIME_ASSERT(
  13215. check_passpoint_realm_size,
  13216. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  13217. /*
  13218. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  13219. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  13220. * roaming_consortium_ids array below will end on a 4-byte boundary.
  13221. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  13222. */
  13223. A_COMPILE_TIME_ASSERT(
  13224. check_passpoint_roaming_consortium_ids_size,
  13225. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  13226. /* wildcard ID to allow an action (reset) to apply to all networks */
  13227. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  13228. typedef struct wmi_passpoint_config {
  13229. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  13230. /* (network) id
  13231. * identifier of the matched network, report this in event
  13232. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  13233. * that indicates the action should be applied to all networks.
  13234. * Currently, the only action that is applied to all networks is "reset".
  13235. * If a non-wildcard ID is specified, that particular network is configured.
  13236. * If a wildcard ID is specified, all networks are reset.
  13237. */
  13238. A_UINT32 id;
  13239. A_UINT32 req_id;
  13240. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  13241. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  13242. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  13243. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  13244. } wmi_passpoint_config_cmd_fixed_param;
  13245. typedef struct {
  13246. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  13247. A_UINT32 id; /* identifier of the matched network */
  13248. A_UINT32 vdev_id;
  13249. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  13250. wmi_ssid ssid;
  13251. wmi_mac_addr bssid; /* bssid of the network */
  13252. A_UINT32 channel_mhz; /* channel frequency in MHz */
  13253. A_UINT32 rssi; /* rssi value */
  13254. A_UINT32 rtt; /* timestamp in nanoseconds*/
  13255. A_UINT32 rtt_sd; /* standard deviation in rtt */
  13256. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  13257. A_UINT32 capability; /* capabilities advertised in the beacon */
  13258. A_UINT32 ie_length; /* size of the ie_data blob */
  13259. A_UINT32 anqp_length; /* length of ANQP blob */
  13260. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  13261. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  13262. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  13263. * 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.
  13264. */
  13265. } wmi_passpoint_event_hdr;
  13266. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  13267. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  13268. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  13269. /** Disable GTK offload */
  13270. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  13271. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  13272. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  13273. enum wmi_chatter_mode {
  13274. /* Chatter enter/exit happens
  13275. * automatically based on preset
  13276. * params
  13277. */
  13278. WMI_CHATTER_MODE_AUTO,
  13279. /* Chatter enter is triggered
  13280. * manually by the user
  13281. */
  13282. WMI_CHATTER_MODE_MANUAL_ENTER,
  13283. /* Chatter exit is triggered
  13284. * manually by the user
  13285. */
  13286. WMI_CHATTER_MODE_MANUAL_EXIT,
  13287. /* Placeholder max value, always last*/
  13288. WMI_CHATTER_MODE_MAX
  13289. };
  13290. enum wmi_chatter_query_type {
  13291. /*query coalescing filter match counter*/
  13292. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  13293. WMI_CHATTER_QUERY_MAX
  13294. };
  13295. typedef struct {
  13296. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  13297. A_UINT32 chatter_mode;
  13298. } wmi_chatter_set_mode_cmd_fixed_param;
  13299. /** maximum number of filter supported*/
  13300. #define CHATTER_MAX_COALESCING_RULES 11
  13301. /** maximum number of field tests per filter*/
  13302. #define CHATTER_MAX_FIELD_TEST 5
  13303. /** maximum field length in number of DWORDS*/
  13304. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  13305. /** field test kinds*/
  13306. #define CHATTER_COALESCING_TEST_EQUAL 1
  13307. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  13308. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  13309. /** packet type*/
  13310. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  13311. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  13312. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  13313. /** coalescing field test*/
  13314. typedef struct _chatter_pkt_coalescing_hdr_test {
  13315. /** offset from start of mac header, for windows native wifi host driver
  13316. * should assume standard 802.11 frame format without QoS info and address4
  13317. * FW would account for any non-stand fields for final offset value.
  13318. */
  13319. A_UINT32 offset;
  13320. A_UINT32 length; /* length of test field*/
  13321. A_UINT32 test; /*equal, not equal or masked equal*/
  13322. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  13323. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  13324. } chatter_pkt_coalescing_hdr_test;
  13325. /** packet coalescing filter*/
  13326. typedef struct _chatter_pkt_coalescing_filter {
  13327. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  13328. A_UINT32 filter_id; /*unique id assigned by OS*/
  13329. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  13330. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  13331. A_UINT32 num_of_test_field; /*number of field test in table*/
  13332. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  13333. } chatter_pkt_coalescing_filter;
  13334. /** packet coalescing filter add command*/
  13335. typedef struct {
  13336. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  13337. A_UINT32 num_of_filters;
  13338. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  13339. chatter_pkt_coalescing_filter rx_filter[1];*/
  13340. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  13341. /** packet coalescing filter delete command*/
  13342. typedef struct {
  13343. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  13344. A_UINT32 filter_id; /*filter id which will be deleted*/
  13345. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  13346. /** packet coalescing query command*/
  13347. typedef struct {
  13348. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  13349. A_UINT32 type; /*type of query*/
  13350. } wmi_chatter_coalescing_query_cmd_fixed_param;
  13351. /** chatter query reply event*/
  13352. typedef struct {
  13353. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  13354. A_UINT32 type; /*query type*/
  13355. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  13356. } wmi_chatter_query_reply_event_fixed_param;
  13357. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  13358. * cannot be changed without breaking WMI compatibility. */
  13359. #define GTK_OFFLOAD_KEK_BYTES 16
  13360. #define GTK_OFFLOAD_KCK_BYTES 16
  13361. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  13362. #define GTK_REPLAY_COUNTER_BYTES 8
  13363. #define WMI_MAX_KEY_LEN 32
  13364. #define IGTK_PN_SIZE 6
  13365. typedef struct {
  13366. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  13367. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13368. A_UINT32 flags; /* status flags */
  13369. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  13370. /*
  13371. * As with all WMI messages, this message uses little-endian byte
  13372. * ordering within each A_UINT32 field.
  13373. * If a big-endian host is using automatic swapping of the bytes within
  13374. * each 4-byte A_UINT32 to automatically correct the endianness of the
  13375. * A_UINT32 fields as the message is uploaded from target --> host, the
  13376. * big-endian host will have to undo the automatic byte swapping for the
  13377. * below A_UINT8 fields, to restore them to their original order.
  13378. */
  13379. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  13380. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  13381. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  13382. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  13383. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  13384. A_UINT8 gtk_keyIndex; /* GTK key index */
  13385. A_UINT8 gtk_keyLength; /* GTK key length */
  13386. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  13387. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  13388. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  13389. typedef struct {
  13390. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  13391. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13392. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  13393. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  13394. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  13395. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  13396. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  13397. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  13398. typedef struct {
  13399. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  13400. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13401. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  13402. A_UINT32 kek_len;
  13403. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  13404. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  13405. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  13406. } wmi_gtk_offload_fils_tlv_param;
  13407. typedef struct {
  13408. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  13409. A_UINT32 vdev_id;
  13410. A_UINT32 sa_query_retry_interval; /* in msec */
  13411. A_UINT32 sa_query_max_retry_count;
  13412. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  13413. typedef enum {
  13414. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  13415. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  13416. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  13417. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  13418. } WMI_STA_KEEPALIVE_METHOD;
  13419. typedef struct {
  13420. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  13421. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  13422. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  13423. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  13424. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  13425. typedef struct {
  13426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  13427. A_UINT32 vdev_id;
  13428. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  13429. A_UINT32 method; /* keep alive method */
  13430. A_UINT32 interval; /* time interval in seconds */
  13431. /*
  13432. * NOTE: following this structure is the TLV for ARP Resonse:
  13433. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  13434. */
  13435. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  13436. typedef struct {
  13437. A_UINT32 tlv_header;
  13438. A_UINT32 vdev_id;
  13439. A_UINT32 action;
  13440. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  13441. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  13442. typedef struct {
  13443. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  13444. A_UINT32 vdev_id;
  13445. A_UINT32 keepaliveInterval; /* seconds */
  13446. A_UINT32 keepaliveMethod;
  13447. } wmi_vdev_set_keepalive_cmd_fixed_param;
  13448. typedef struct {
  13449. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  13450. A_UINT32 vdev_id;
  13451. } wmi_vdev_get_keepalive_cmd_fixed_param;
  13452. typedef struct {
  13453. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  13454. A_UINT32 vdev_id;
  13455. A_UINT32 keepaliveInterval; /* seconds */
  13456. A_UINT32 keepaliveMethod; /* seconds */
  13457. } wmi_vdev_get_keepalive_event_fixed_param;
  13458. typedef enum {
  13459. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  13460. WMI_START_ARP_STATS_COLLECTION,
  13461. } WMI_ARP_STATS_ACTION;
  13462. typedef enum {
  13463. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  13464. } WMI_ARP_STATS_RX_PKT_TYPE;
  13465. typedef enum {
  13466. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  13467. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  13468. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  13469. typedef enum {
  13470. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  13471. WMI_CONNECTION_STATUS_SUCCESS,
  13472. } WMI_ARP_STATS_CONNECTION_STATUS;
  13473. /* ARP stats set (configure) req */
  13474. typedef struct {
  13475. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  13476. A_UINT32 vdev_id;
  13477. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  13478. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  13479. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  13480. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  13481. /* ARP stats get req */
  13482. typedef struct {
  13483. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  13484. A_UINT32 vdev_id;
  13485. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  13486. /* per vdev based ARP stats */
  13487. typedef struct {
  13488. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  13489. A_UINT32 vdev_id;
  13490. A_UINT32 arp_req_enqueue;
  13491. A_UINT32 arp_req_tx_success;
  13492. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  13493. A_UINT32 arp_rsp_recvd;
  13494. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  13495. A_UINT32 dad_detected; /* duplicate address detection */
  13496. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  13497. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  13498. } wmi_vdev_get_arp_stats_event_fixed_param;
  13499. typedef struct {
  13500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  13501. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  13502. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  13503. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  13504. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  13505. } wmi_vdev_set_connectivity_check_stats;
  13506. /* per vdev dns/icmp/tcp based stats*/
  13507. typedef struct {
  13508. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  13509. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  13510. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  13511. } wmi_vdev_get_connectivity_check_stats;
  13512. typedef struct {
  13513. A_UINT32 tlv_header;
  13514. A_UINT32 vdev_id;
  13515. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  13516. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  13517. A_UINT32 action;
  13518. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  13519. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  13520. typedef struct {
  13521. A_UINT32 tlv_header;
  13522. A_UINT32 vdev_id;
  13523. A_UINT32 mcc_tbttmode;
  13524. wmi_mac_addr mcc_bssid;
  13525. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  13526. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  13527. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  13528. typedef enum
  13529. {
  13530. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  13531. 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 */
  13532. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  13533. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  13534. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  13535. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  13536. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  13537. * to avoid IOT issues due to change in number of Tx and Rx chains
  13538. */
  13539. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  13540. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  13541. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  13542. /* Add any action before this line */
  13543. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  13544. } wmi_vendor_oui_action_id;
  13545. typedef struct {
  13546. A_UINT32 tlv_header;
  13547. /** vendor OUI actions */
  13548. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  13549. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  13550. ** For first command, this value will be used for allocating memory in FW accordingly */
  13551. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  13552. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  13553. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  13554. */
  13555. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  13556. ** first byte contains the index i of structure vendor_oui_ext[]
  13557. ** for which data is coming and length of the data is extracted as
  13558. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  13559. ** N th OUI and (N+1) th OUI.
  13560. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  13561. ** data[0] will hold the index value 0, data[1] through data[17]
  13562. ** will hold the OUI data for this first OUI, data[18] will hold
  13563. ** the index value 1, and the OUI data for the second OUI will
  13564. ** begin at data[19].
  13565. */
  13566. } wmi_pdev_config_vendor_oui_action_fixed_param;
  13567. typedef struct {
  13568. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  13569. /** pdev_id for identifying the MAC
  13570. * See macros starting with WMI_PDEV_ID_ for values.
  13571. */
  13572. A_UINT32 pdev_id;
  13573. /** AC number */
  13574. A_UINT32 ac; /* refer to wmi_traffic_ac */
  13575. /**
  13576. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  13577. * for the specified AC.
  13578. */
  13579. A_UINT32 ac_tx_queue_optimize_enable;
  13580. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  13581. typedef struct {
  13582. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  13583. /** pdev_id for identifying the MAC
  13584. * See macros starting with WMI_PDEV_ID_ for values.
  13585. */
  13586. A_UINT32 pdev_id;
  13587. /** Enable/disable rx filter promiscuous */
  13588. A_UINT32 rx_filter_promiscuous_enable;
  13589. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  13590. typedef enum {
  13591. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  13592. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  13593. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  13594. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  13595. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  13596. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  13597. } wmi_beacon_info_presence_items;
  13598. typedef struct _wmi_vendor_oui_ext {
  13599. A_UINT32 tlv_header;
  13600. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  13601. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  13602. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  13603. 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 */
  13604. A_UINT32 mac_address_length; /* MAC address length in bytes
  13605. ** (This value will always be 6,
  13606. ** but is explicitly specified for sake
  13607. ** of uniformity and completeness).
  13608. */
  13609. A_UINT32 capability_data_length; /* length of capability in bytes */
  13610. } wmi_vendor_oui_ext;
  13611. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  13612. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  13613. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  13614. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  13615. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  13616. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  13617. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  13618. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  13619. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  13620. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  13621. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  13622. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  13623. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  13624. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  13625. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  13626. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  13627. typedef struct {
  13628. A_UINT32 tlv_header;
  13629. A_UINT32 vdev_id; /* home vdev id */
  13630. A_UINT32 meas_token; /* from measure request frame */
  13631. A_UINT32 dialog_token;
  13632. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  13633. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  13634. A_UINT32 burst_cycle; /* times cycle through within one burst */
  13635. A_UINT32 tx_power; /* for path frame */
  13636. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  13637. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  13638. A_UINT32 num_chans;
  13639. /*
  13640. * This fixed_param TLV is followed by other TLVs:
  13641. * A_UINT32 channel_list[num_chans]; // in MHz
  13642. */
  13643. } wmi_vdev_plmreq_start_cmd_fixed_param;
  13644. typedef struct {
  13645. A_UINT32 tlv_header;
  13646. A_UINT32 vdev_id;
  13647. A_UINT32 meas_token; /* same value from req*/
  13648. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  13649. typedef struct {
  13650. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  13651. A_UINT32 tlv_header;
  13652. /* unique id identifying the VDEV, generated by the caller */
  13653. A_UINT32 vdev_id;
  13654. /* enable/disable NoA */
  13655. A_UINT32 enable;
  13656. /** number of NoA desc. In the TLV noa_descriptor[] */
  13657. A_UINT32 num_noa;
  13658. /**
  13659. * TLV (tag length value) paramerters follow the pattern structure.
  13660. * TLV contain NoA desc with num of num_noa
  13661. */
  13662. } wmi_p2p_set_noa_cmd_fixed_param;
  13663. typedef struct {
  13664. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  13665. A_UINT32 tlv_header;
  13666. /* unique id identifying the VDEV, generated by the caller */
  13667. A_UINT32 vdev_id;
  13668. /* Identify the wlan module */
  13669. A_UINT32 module_id;
  13670. /* Num of test arguments passed */
  13671. A_UINT32 num_args;
  13672. /* unique id identifying the unit test cmd, generated by the caller */
  13673. A_UINT32 diag_token;
  13674. /**
  13675. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  13676. * structure. The TLV's are:
  13677. * A_UINT32 args[];
  13678. **/
  13679. } wmi_unit_test_cmd_fixed_param;
  13680. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  13681. * after it received WMI_ROAM_SYNCH_EVENTID.
  13682. */
  13683. typedef struct {
  13684. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  13685. /** unique id identifying the VDEV, generated by the caller */
  13686. A_UINT32 vdev_id;
  13687. } wmi_roam_synch_complete_fixed_param;
  13688. typedef enum {
  13689. RECOVERY_SIM_ASSERT = 0x01,
  13690. RECOVERY_SIM_NO_DETECT = 0x02,
  13691. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  13692. RECOVERY_SIM_EMPTY_POINT = 0x04,
  13693. RECOVERY_SIM_STACK_OV = 0x05,
  13694. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  13695. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  13696. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  13697. } RECOVERY_SIM_TYPE;
  13698. /* WMI_FORCE_FW_HANG_CMDID */
  13699. typedef struct {
  13700. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  13701. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  13702. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  13703. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  13704. typedef enum {
  13705. WMI_MCAST_FILTER_SET = 1,
  13706. WMI_MCAST_FILTER_DELETE
  13707. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  13708. typedef struct {
  13709. A_UINT32 tlv_header;
  13710. A_UINT32 vdev_id;
  13711. A_UINT32 index;
  13712. A_UINT32 action;
  13713. wmi_mac_addr mcastbdcastaddr;
  13714. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  13715. typedef enum {
  13716. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  13717. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  13718. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  13719. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  13720. } WMI_MULTIPLE_MCAST_FILTER_OP;
  13721. typedef struct {
  13722. A_UINT32 tlv_header;
  13723. A_UINT32 vdev_id;
  13724. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  13725. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  13726. /**
  13727. * TLV (tag length value) parameters follow the
  13728. * structure. The TLV's are:
  13729. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  13730. */
  13731. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  13732. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  13733. typedef enum {
  13734. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  13735. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  13736. } WMI_TIME_STAMP_SYNC_MODE;
  13737. typedef struct {
  13738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  13739. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  13740. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  13741. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  13742. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  13743. /* GPIO Command and Event data structures */
  13744. /* WMI_GPIO_CONFIG_CMDID */
  13745. enum {
  13746. WMI_GPIO_PULL_NONE,
  13747. WMI_GPIO_PULL_UP,
  13748. WMI_GPIO_PULL_DOWN,
  13749. };
  13750. enum {
  13751. WMI_GPIO_INTTYPE_DISABLE,
  13752. WMI_GPIO_INTTYPE_RISING_EDGE,
  13753. WMI_GPIO_INTTYPE_FALLING_EDGE,
  13754. WMI_GPIO_INTTYPE_BOTH_EDGE,
  13755. WMI_GPIO_INTTYPE_LEVEL_LOW,
  13756. WMI_GPIO_INTTYPE_LEVEL_HIGH
  13757. };
  13758. typedef struct {
  13759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  13760. A_UINT32 gpio_num; /* GPIO number to be setup */
  13761. A_UINT32 input; /* 0 - Output/ 1 - Input */
  13762. A_UINT32 pull_type; /* Pull type defined above */
  13763. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  13764. /* mux_config_val - configure pin MUX
  13765. * A value of 0x0 for this field means to use the default MUX configuration.
  13766. * Valid non-zero values are as follows:
  13767. * Rome:
  13768. * 0x4 - use the pin as GPIO (rather than UART)
  13769. */
  13770. A_UINT32 mux_config_val;
  13771. } wmi_gpio_config_cmd_fixed_param;
  13772. /* WMI_GPIO_OUTPUT_CMDID */
  13773. typedef struct {
  13774. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  13775. A_UINT32 gpio_num; /* GPIO number to be setup */
  13776. A_UINT32 set; /* Set the GPIO pin*/
  13777. } wmi_gpio_output_cmd_fixed_param;
  13778. /* WMI_GPIO_INPUT_EVENTID */
  13779. typedef struct {
  13780. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  13781. A_UINT32 gpio_num; /* GPIO number which changed state */
  13782. } wmi_gpio_input_event_fixed_param;
  13783. /* WMI_P2P_DISC_EVENTID */
  13784. enum {
  13785. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  13786. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  13787. };
  13788. enum {
  13789. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  13790. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  13791. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  13792. };
  13793. enum {
  13794. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  13795. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  13796. };
  13797. typedef struct {
  13798. A_UINT32 vdev_id;
  13799. A_UINT32 reason; /* P2P DISC wake up reason*/
  13800. } wmi_p2p_disc_event;
  13801. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  13802. typedef enum {
  13803. WMI_FAKE_TXBFER_SEND_NDPA,
  13804. WMI_FAKE_TXBFER_SEND_MU,
  13805. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  13806. WMI_FAKE_TXBFER_NDPA_NCIDX,
  13807. WMI_FAKE_TXBFER_NDPA_POLL,
  13808. WMI_FAKE_TXBFER_NDPA_BW,
  13809. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  13810. WMI_FAKE_TXBFER_NDPA_RATE,
  13811. WMI_FAKE_TXBFER_NDP_BW,
  13812. WMI_FAKE_TXBFER_NDP_NSS,
  13813. WMI_TXBFEE_ENABLE_UPLOAD_H,
  13814. WMI_TXBFEE_ENABLE_CAPTURE_H,
  13815. WMI_TXBFEE_SET_CBF_TBL,
  13816. WMI_TXBFEE_CBF_TBL_LSIG,
  13817. WMI_TXBFEE_CBF_TBL_SIGA1,
  13818. WMI_TXBFEE_CBF_TBL_SIGA2,
  13819. WMI_TXBFEE_CBF_TBL_SIGB,
  13820. WMI_TXBFEE_CBF_TBL_PAD,
  13821. WMI_TXBFEE_CBF_TBL_DUR,
  13822. WMI_TXBFEE_SU_NCIDX,
  13823. WMI_TXBFEE_CBIDX,
  13824. WMI_TXBFEE_NGIDX,
  13825. } WMI_TXBF_PARAM_ID;
  13826. typedef struct {
  13827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  13828. /** parameter id */
  13829. A_UINT32 param_id;
  13830. /** parameter value */
  13831. A_UINT32 param_value;
  13832. } wmi_txbf_cmd_fixed_param;
  13833. typedef struct {
  13834. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  13835. A_UINT32 h_length;
  13836. A_UINT32 cv_length;
  13837. /* This TLV is followed by array of bytes:
  13838. * A_UINT8 bufp[]; <-- h_cv info buffer
  13839. */
  13840. } wmi_upload_h_hdr;
  13841. typedef struct {
  13842. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  13843. A_UINT32 svd_num;
  13844. A_UINT32 tone_num;
  13845. A_UINT32 reserved;
  13846. } wmi_capture_h_event_hdr;
  13847. typedef struct {
  13848. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  13849. A_UINT32 start_freq; /* start frequency, not channel center freq */
  13850. A_UINT32 end_freq; /* end frequency */
  13851. } wmi_avoid_freq_range_desc;
  13852. typedef struct {
  13853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  13854. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  13855. A_UINT32 num_freq_ranges;
  13856. /* The TLVs will follow.
  13857. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  13858. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  13859. */
  13860. } wmi_avoid_freq_ranges_event_fixed_param;
  13861. enum {
  13862. WMI_SAR2_SUCCESS = 0,
  13863. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  13864. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  13865. WMI_SAR2_STATE_ERROR = 4,
  13866. WMI_SAR2_BDF_NO_TABLE = 8,
  13867. };
  13868. typedef struct {
  13869. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  13870. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  13871. } wmi_sar2_result_event_fixed_param;
  13872. typedef struct {
  13873. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  13874. /** Reserved for future use */
  13875. A_UINT32 reserved0;
  13876. A_UINT32 vdev_id;
  13877. } wmi_gtk_rekey_fail_event_fixed_param;
  13878. typedef enum WLAN_COEX_EVENT {
  13879. WLAN_COEX_EVENT_BT_NONE = 0,
  13880. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  13881. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  13882. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  13883. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  13884. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  13885. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  13886. }WLAN_COEX_EVENT;
  13887. typedef struct {
  13888. A_UINT32 tlv_header;
  13889. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  13890. } wmi_coex_bt_activity_event_fixed_param;
  13891. enum wmm_ac_downgrade_policy {
  13892. WMM_AC_DOWNGRADE_DEPRIO,
  13893. WMM_AC_DOWNGRADE_DROP,
  13894. WMM_AC_DOWNGRADE_INVALID,
  13895. };
  13896. /* WMM EDCA Params type */
  13897. #define WMM_PARAM_TYPE_LEGACY 0
  13898. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  13899. #define WMM_PARAM_TYPE_11AX_EDCA 1
  13900. typedef struct {
  13901. A_UINT32 tlv_header;
  13902. A_UINT32 cwmin;
  13903. A_UINT32 cwmax;
  13904. A_UINT32 aifs;
  13905. union {
  13906. A_UINT32 txoplimit;
  13907. A_UINT32 mu_edca_timer;
  13908. };
  13909. A_UINT32 acm;
  13910. A_UINT32 no_ack;
  13911. } wmi_wmm_vparams;
  13912. typedef struct {
  13913. A_UINT32 tlv_header;
  13914. A_UINT32 vdev_id;
  13915. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  13916. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  13917. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  13918. typedef struct {
  13919. A_UINT32 tlv_header;
  13920. A_UINT32 vdev_id;
  13921. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  13922. A_UINT32 userGtxMask; /* host request for GTX mask */
  13923. A_UINT32 gtxPERThreshold; /* default: 10% */
  13924. A_UINT32 gtxPERMargin; /* default: 2% */
  13925. A_UINT32 gtxTPCstep; /* default: 1 */
  13926. A_UINT32 gtxTPCMin; /* default: 5 */
  13927. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  13928. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  13929. typedef struct
  13930. {
  13931. A_UINT32 tlv_header;
  13932. A_UINT32 vdev_id;
  13933. A_UINT32 ac;
  13934. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  13935. A_UINT32 downgrade_type;
  13936. } wmi_vdev_wmm_addts_cmd_fixed_param;
  13937. typedef struct
  13938. {
  13939. A_UINT32 tlv_header;
  13940. A_UINT32 vdev_id;
  13941. A_UINT32 ac;
  13942. } wmi_vdev_wmm_delts_cmd_fixed_param;
  13943. /* DEPRECATED */
  13944. typedef struct {
  13945. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  13946. /** Reserved for future use */
  13947. A_UINT32 reserved0;
  13948. } wmi_pdev_dfs_enable_cmd_fixed_param;
  13949. /* DEPRECATED */
  13950. typedef struct {
  13951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  13952. /** pdev_id for identifying the MAC
  13953. * See macros starting with WMI_PDEV_ID_ for values.
  13954. */
  13955. A_UINT32 pdev_id;
  13956. } wmi_pdev_dfs_disable_cmd_fixed_param;
  13957. typedef struct {
  13958. /** TLV tag and len; tag equals
  13959. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  13960. */
  13961. A_UINT32 tlv_header;
  13962. /** pdev_id for identifying the MAC
  13963. * See macros starting with WMI_PDEV_ID_ for values.
  13964. */
  13965. A_UINT32 pdev_id;
  13966. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  13967. typedef struct {
  13968. /** TLV tag and len; tag equals
  13969. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  13970. */
  13971. A_UINT32 tlv_header;
  13972. /** pdev_id for identifying the MAC
  13973. * See macros starting with WMI_PDEV_ID_ for values.
  13974. */
  13975. A_UINT32 pdev_id;
  13976. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  13977. typedef struct {
  13978. A_UINT32 tlv_header;
  13979. A_UINT32 pdev_id;
  13980. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  13981. typedef struct {
  13982. A_UINT32 tlv_header;
  13983. A_UINT32 pdev_id;
  13984. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  13985. typedef enum {
  13986. QUICK_OCAC = 0,
  13987. EXTENSIVE_OCAC,
  13988. } WMI_ADFS_OCAC_MODE;
  13989. typedef struct {
  13990. A_UINT32 tlv_header;
  13991. A_UINT32 vdev_id;
  13992. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  13993. A_UINT32 min_duration_ms; /* in milliseconds */
  13994. A_UINT32 max_duration_ms; /* in milliseconds */
  13995. A_UINT32 chan_freq; /* in MHz */
  13996. A_UINT32 chan_width; /* in MHz */
  13997. A_UINT32 center_freq; /* in MHz */
  13998. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  13999. typedef struct {
  14000. A_UINT32 tlv_header;
  14001. A_UINT32 vdev_id;
  14002. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  14003. typedef enum {
  14004. IN_SERVICE_MODE = 0,
  14005. OCAC_MODE,
  14006. } WMI_DFS_RADAR_DETECTION_MODE;
  14007. typedef struct {
  14008. A_UINT32 tlv_header;
  14009. A_UINT32 pdev_id;
  14010. /* In-service mode or O-CAC mode */
  14011. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  14012. A_UINT32 chan_freq; /* in MHz */
  14013. A_UINT32 chan_width; /* in MHz */
  14014. A_UINT32 detector_id;
  14015. A_UINT32 segment_id;
  14016. A_UINT32 timestamp;
  14017. A_UINT32 is_chirp;
  14018. A_INT32 freq_offset; /* in MHz */
  14019. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  14020. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  14021. typedef enum {
  14022. OCAC_COMPLETE = 0,
  14023. OCAC_ABORT,
  14024. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  14025. typedef struct {
  14026. A_UINT32 tlv_header;
  14027. A_UINT32 vdev_id;
  14028. A_UINT32 chan_freq; /* in MHz */
  14029. A_UINT32 chan_width; /* in MHz */
  14030. A_UINT32 center_freq; /* in MHz */
  14031. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  14032. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  14033. typedef struct {
  14034. A_UINT32 tlv_header;
  14035. A_UINT32 vdev_id;
  14036. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  14037. /** TDLS COMMANDS */
  14038. /* WMI_TDLS_SET_STATE_CMDID */
  14039. /* TDLS State */
  14040. enum wmi_tdls_state {
  14041. /** TDLS disable */
  14042. WMI_TDLS_DISABLE,
  14043. /** TDLS enabled - no firmware connection tracking/notifications */
  14044. WMI_TDLS_ENABLE_PASSIVE,
  14045. /** TDLS enabled - with firmware connection tracking/notifications */
  14046. WMI_TDLS_ENABLE_ACTIVE,
  14047. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  14048. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  14049. /** TDLS enabled - TDLS connection tracking is done in host */
  14050. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  14051. };
  14052. /* TDLS Options */
  14053. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  14054. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  14055. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  14056. typedef struct {
  14057. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  14058. A_UINT32 tlv_header;
  14059. /** unique id identifying the VDEV */
  14060. A_UINT32 vdev_id;
  14061. /** Enable/Disable TDLS (wmi_tdls_state) */
  14062. A_UINT32 state;
  14063. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  14064. A_UINT32 notification_interval_ms;
  14065. /** number of packets OVER which notify/suggest TDLS Discovery:
  14066. * if current tx pps counter / notification interval >= threshold
  14067. * then a notification will be sent to host to advise TDLS Discovery */
  14068. A_UINT32 tx_discovery_threshold;
  14069. /** number of packets UNDER which notify/suggest TDLS Teardown:
  14070. * if current tx pps counter / notification interval < threshold
  14071. * then a notification will be sent to host to advise TDLS Tear down */
  14072. A_UINT32 tx_teardown_threshold;
  14073. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  14074. A_INT32 rssi_teardown_threshold;
  14075. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  14076. A_INT32 rssi_delta;
  14077. /** TDLS Option Control
  14078. * Off-Channel, Buffer STA, (later)Sleep STA support */
  14079. A_UINT32 tdls_options;
  14080. /* Buffering time in number of beacon intervals */
  14081. A_UINT32 tdls_peer_traffic_ind_window;
  14082. /* Wait time for PTR frame */
  14083. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  14084. /* Self PUAPSD mask */
  14085. A_UINT32 tdls_puapsd_mask;
  14086. /* Inactivity timeout */
  14087. A_UINT32 tdls_puapsd_inactivity_time_ms;
  14088. /* Max of rx frame during SP */
  14089. A_UINT32 tdls_puapsd_rx_frame_threshold;
  14090. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  14091. A_UINT32 teardown_notification_ms;
  14092. /** STA kickout threshold for TDLS peer */
  14093. A_UINT32 tdls_peer_kickout_threshold;
  14094. /* TDLS discovery WAKE timeout in ms.
  14095. * DUT will wake until this timeout to receive TDLS discovery response
  14096. * from peer.
  14097. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  14098. * what wake timeout value to use.
  14099. */
  14100. A_UINT32 tdls_discovery_wake_timeout;
  14101. } wmi_tdls_set_state_cmd_fixed_param;
  14102. /* WMI_TDLS_PEER_UPDATE_CMDID */
  14103. enum wmi_tdls_peer_state {
  14104. /** tx peer TDLS link setup now starting, traffic to DA should be
  14105. * paused (except TDLS frames) until state is moved to CONNECTED (or
  14106. * TEARDOWN on setup failure) */
  14107. WMI_TDLS_PEER_STATE_PEERING,
  14108. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  14109. WMI_TDLS_PEER_STATE_CONNECTED,
  14110. /** tx peer TDLS link tear down started (link paused, any frames
  14111. * queued for DA will be requeued back through the AP)*/
  14112. WMI_TDLS_PEER_STATE_TEARDOWN,
  14113. /** Add peer mac into connection table */
  14114. WMI_TDLS_PEER_ADD_MAC_ADDR,
  14115. /** Remove peer mac from connection table */
  14116. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  14117. };
  14118. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  14119. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  14120. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  14121. typedef struct {
  14122. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  14123. A_UINT32 tlv_header;
  14124. /* Peer's QoS Info - for U-APSD */
  14125. /* AC FLAGS - accessed through macros below */
  14126. /* Ack, SP, More Data Ack - accessed through macros below */
  14127. A_UINT32 peer_qos;
  14128. /*TDLS Peer's U-APSD Buffer STA Support*/
  14129. A_UINT32 buff_sta_support;
  14130. /*TDLS off channel related params */
  14131. A_UINT32 off_chan_support;
  14132. A_UINT32 peer_curr_operclass;
  14133. A_UINT32 self_curr_operclass;
  14134. /* Number of channels available for off channel operation */
  14135. A_UINT32 peer_chan_len;
  14136. A_UINT32 peer_operclass_len;
  14137. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  14138. /* Is peer initiator or responder of TDLS setup request */
  14139. A_UINT32 is_peer_responder;
  14140. /* Preferred off channel number as configured by user */
  14141. A_UINT32 pref_offchan_num;
  14142. /* Preferred off channel bandwidth as configured by user */
  14143. A_UINT32 pref_offchan_bw;
  14144. /* Preferred off channel frequency in MHz as configured by user */
  14145. A_UINT32 pref_offchan_freq;
  14146. /** Followed by the variable length TLV peer_chan_list:
  14147. * wmi_channel peer_chan_list[].
  14148. * Array size would be peer_chan_len.
  14149. * This array is intersected channels which is supported by both peer
  14150. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  14151. * FW shall compute BW for an offchan based on peer's ht/vht cap
  14152. * received in peer_assoc cmd during change STA operation
  14153. */
  14154. } wmi_tdls_peer_capabilities;
  14155. #define WMI_TDLS_QOS_VO_FLAG 0
  14156. #define WMI_TDLS_QOS_VI_FLAG 1
  14157. #define WMI_TDLS_QOS_BK_FLAG 2
  14158. #define WMI_TDLS_QOS_BE_FLAG 3
  14159. #define WMI_TDLS_QOS_ACK_FLAG 4
  14160. #define WMI_TDLS_QOS_SP_FLAG 5
  14161. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  14162. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  14163. (ppeer_caps)->peer_qos |= (1 << flag); \
  14164. } while (0)
  14165. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  14166. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  14167. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  14168. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  14169. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  14170. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  14171. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  14172. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  14173. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  14174. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  14175. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  14176. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  14177. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  14178. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  14179. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  14180. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  14181. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  14182. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  14183. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  14184. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  14185. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  14186. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  14187. /* SP has 2 bits */
  14188. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  14189. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  14190. } while (0)
  14191. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  14192. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  14193. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  14194. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  14195. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  14196. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  14197. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  14198. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  14199. } while (0)
  14200. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  14201. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  14202. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  14203. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  14204. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  14205. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  14206. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  14207. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  14208. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  14209. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  14210. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  14211. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  14212. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  14213. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  14214. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  14215. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  14216. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  14217. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  14218. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  14219. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  14220. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  14221. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  14222. /* SP has 2 bits */
  14223. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  14224. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  14225. } while (0)
  14226. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  14227. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  14228. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  14229. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  14230. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  14231. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  14232. typedef struct {
  14233. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  14234. A_UINT32 tlv_header;
  14235. /** unique id identifying the VDEV */
  14236. A_UINT32 vdev_id;
  14237. /** peer MAC address */
  14238. wmi_mac_addr peer_macaddr;
  14239. /** new TDLS state for peer (wmi_tdls_peer_state) */
  14240. A_UINT32 peer_state;
  14241. /* The TLV for wmi_tdls_peer_capabilities will follow.
  14242. * wmi_tdls_peer_capabilities peer_caps;
  14243. */
  14244. /** Followed by the variable length TLV chan_info:
  14245. * wmi_channel chan_info[] */
  14246. } wmi_tdls_peer_update_cmd_fixed_param;
  14247. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  14248. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  14249. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  14250. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  14251. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  14252. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  14253. enum wmi_tdls_offchan_mode {
  14254. WMI_TDLS_ENABLE_OFFCHANNEL,
  14255. WMI_TDLS_DISABLE_OFFCHANNEL
  14256. };
  14257. typedef struct {
  14258. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  14259. A_UINT32 tlv_header;
  14260. /** unique id identifying the VDEV */
  14261. A_UINT32 vdev_id;
  14262. /** Enable/Disable TDLS offchannel */
  14263. A_UINT32 offchan_mode;
  14264. /** peer MAC address */
  14265. wmi_mac_addr peer_macaddr;
  14266. /* Is peer initiator or responder of TDLS setup request */
  14267. A_UINT32 is_peer_responder;
  14268. /* off channel number*/
  14269. A_UINT32 offchan_num;
  14270. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  14271. A_UINT32 offchan_bw_bitmap;
  14272. /* operating class for offchan */
  14273. A_UINT32 offchan_oper_class;
  14274. /* off channel frequency in MHz */
  14275. A_UINT32 offchan_freq;
  14276. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  14277. /** TDLS EVENTS */
  14278. enum wmi_tdls_peer_notification {
  14279. /** tdls discovery recommended for peer (based
  14280. * on tx bytes per second > tx_discover threshold) */
  14281. WMI_TDLS_SHOULD_DISCOVER,
  14282. /** tdls link tear down recommended for peer
  14283. * due to tx bytes per second below tx_teardown_threshold
  14284. * NB: this notification sent once */
  14285. WMI_TDLS_SHOULD_TEARDOWN,
  14286. /** tx peer TDLS link tear down complete */
  14287. WMI_TDLS_PEER_DISCONNECTED,
  14288. /** TDLS/BT role change notification for connection tracker */
  14289. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  14290. };
  14291. enum wmi_tdls_peer_reason {
  14292. /** tdls teardown recommended due to low transmits */
  14293. WMI_TDLS_TEARDOWN_REASON_TX,
  14294. /** tdls link tear down recommended due to poor RSSI */
  14295. WMI_TDLS_TEARDOWN_REASON_RSSI,
  14296. /** tdls link tear down recommended due to offchannel scan */
  14297. WMI_TDLS_TEARDOWN_REASON_SCAN,
  14298. /** tdls peer disconnected due to peer deletion */
  14299. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  14300. /** tdls peer disconnected due to PTR timeout */
  14301. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  14302. /** tdls peer disconnected due wrong PTR format */
  14303. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  14304. /** tdls peer not responding */
  14305. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  14306. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  14307. WMI_TDLS_ENTER_BUF_STA,
  14308. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  14309. WMI_TDLS_EXIT_BUF_STA,
  14310. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  14311. WMI_TDLS_ENTER_BT_BUSY_MODE,
  14312. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  14313. WMI_TDLS_EXIT_BT_BUSY_MODE,
  14314. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  14315. WMI_TDLS_SCAN_STARTED_EVENT,
  14316. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  14317. WMI_TDLS_SCAN_COMPLETED_EVENT,
  14318. };
  14319. /* WMI_TDLS_PEER_EVENTID */
  14320. typedef struct {
  14321. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  14322. A_UINT32 tlv_header;
  14323. /** peer MAC address */
  14324. wmi_mac_addr peer_macaddr;
  14325. /** TDLS peer status (wmi_tdls_peer_notification)*/
  14326. A_UINT32 peer_status;
  14327. /** TDLS peer reason (wmi_tdls_peer_reason) */
  14328. A_UINT32 peer_reason;
  14329. /** unique id identifying the VDEV */
  14330. A_UINT32 vdev_id;
  14331. } wmi_tdls_peer_event_fixed_param;
  14332. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  14333. don't use this for any new implementations */
  14334. typedef struct {
  14335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  14336. /** unique id identifying the VDEV, generated by the caller */
  14337. A_UINT32 vdev_id;
  14338. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  14339. A_UINT32 new_bcn_intvl;
  14340. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  14341. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  14342. typedef struct {
  14343. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  14344. A_UINT32 tlv_header;
  14345. /** 1: enable fw based adaptive ocs,
  14346. * 0: disable fw based adaptive ocs
  14347. */
  14348. A_UINT32 enable;
  14349. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  14350. union {
  14351. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  14352. /** pdev_id for identifying the MAC
  14353. * See macros starting with WMI_PDEV_ID_ for values.
  14354. */
  14355. A_UINT32 pdev_id;
  14356. };
  14357. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  14358. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  14359. typedef struct {
  14360. /* Frequency of the channel for which the quota is set */
  14361. A_UINT32 chan_mhz;
  14362. /* Requested channel time quota expressed as percentage */
  14363. A_UINT32 channel_time_quota;
  14364. } wmi_resmgr_chan_time_quota;
  14365. typedef struct {
  14366. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  14367. A_UINT32 tlv_header;
  14368. /** number of channel time quota command structures
  14369. * (wmi_resmgr_chan_time_quota) 1 or 2
  14370. */
  14371. A_UINT32 num_chans;
  14372. /* This TLV is followed by another TLV of array of bytes
  14373. * A_UINT8 data[];
  14374. * This data array contains
  14375. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  14376. */
  14377. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  14378. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  14379. typedef struct {
  14380. /* Frequency of the channel for which the latency is set */
  14381. A_UINT32 chan_mhz;
  14382. /* Requested channel latency in milliseconds */
  14383. A_UINT32 latency;
  14384. } wmi_resmgr_chan_latency;
  14385. typedef struct {
  14386. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  14387. A_UINT32 tlv_header;
  14388. /** number of channel latency command structures
  14389. * (wmi_resmgr_chan_latency) 1 or 2
  14390. */
  14391. A_UINT32 num_chans;
  14392. /* This TLV is followed by another TLV of array of bytes
  14393. * A_UINT8 data[];
  14394. * This data array contains
  14395. * num_chans * size of(struct wmi_resmgr_chan_latency)
  14396. */
  14397. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  14398. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  14399. /** STA SMPS Forced Mode */
  14400. typedef enum {
  14401. WMI_SMPS_FORCED_MODE_NONE = 0,
  14402. WMI_SMPS_FORCED_MODE_DISABLED,
  14403. WMI_SMPS_FORCED_MODE_STATIC,
  14404. WMI_SMPS_FORCED_MODE_DYNAMIC
  14405. } wmi_sta_smps_forced_mode;
  14406. typedef struct {
  14407. /** TLV tag and len; tag equals
  14408. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  14409. A_UINT32 tlv_header;
  14410. /** Unique id identifying the VDEV */
  14411. A_UINT32 vdev_id;
  14412. /** The mode of SMPS that is to be forced in the FW. */
  14413. A_UINT32 forced_mode;
  14414. } wmi_sta_smps_force_mode_cmd_fixed_param;
  14415. /** wlan HB commands */
  14416. #define WMI_WLAN_HB_ITEM_UDP 0x1
  14417. #define WMI_WLAN_HB_ITEM_TCP 0x2
  14418. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  14419. must be a multiple of 4 bytes */
  14420. typedef struct {
  14421. /** TLV tag and len; tag equals
  14422. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  14423. A_UINT32 tlv_header; /** TLV header*/
  14424. A_UINT32 vdev_id; /** Vdev ID */
  14425. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  14426. A_UINT32 item; /** 1: UDP, 2: TCP */
  14427. A_UINT32 session; /** Session ID from HOST */
  14428. } wmi_hb_set_enable_cmd_fixed_param;
  14429. typedef struct {
  14430. /** TLV tag and len; tag equals
  14431. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  14432. A_UINT32 tlv_header; /** TLV header*/
  14433. A_UINT32 vdev_id; /** Vdev ID */
  14434. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  14435. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  14436. A_UINT32 seq; /** TCP Sequence no */
  14437. A_UINT32 src_port; /** Source port */
  14438. A_UINT32 dst_port; /** Destination port */
  14439. A_UINT32 interval; /** Keep alive interval */
  14440. A_UINT32 timeout; /** Timeout if keep alive fails */
  14441. A_UINT32 session; /** Session ID from HOST */
  14442. wmi_mac_addr gateway_mac; /** Server Mac Address */
  14443. } wmi_hb_set_tcp_params_cmd_fixed_param;
  14444. typedef struct {
  14445. /** TLV tag and len; tag equals
  14446. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  14447. A_UINT32 tlv_header;
  14448. A_UINT32 vdev_id;
  14449. A_UINT32 length;
  14450. A_UINT32 offset;
  14451. A_UINT32 session;
  14452. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  14453. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  14454. typedef struct {
  14455. /** TLV tag and len; tag equals
  14456. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  14457. A_UINT32 tlv_header;
  14458. A_UINT32 vdev_id;
  14459. A_UINT32 srv_ip;
  14460. A_UINT32 dev_ip;
  14461. A_UINT32 src_port;
  14462. A_UINT32 dst_port;
  14463. A_UINT32 interval;
  14464. A_UINT32 timeout;
  14465. A_UINT32 session;
  14466. wmi_mac_addr gateway_mac;
  14467. } wmi_hb_set_udp_params_cmd_fixed_param;
  14468. typedef struct {
  14469. /** TLV tag and len; tag equals
  14470. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  14471. A_UINT32 tlv_header;
  14472. A_UINT32 vdev_id;
  14473. A_UINT32 length;
  14474. A_UINT32 offset;
  14475. A_UINT32 session;
  14476. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  14477. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  14478. /** wlan HB events */
  14479. typedef enum {
  14480. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  14481. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  14482. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  14483. } WMI_HB_WAKEUP_REASON;
  14484. typedef struct {
  14485. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  14486. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14487. A_UINT32 session; /** Session ID from HOST */
  14488. A_UINT32 reason; /** wakeup reason */
  14489. } wmi_hb_ind_event_fixed_param;
  14490. typedef struct {
  14491. /** TLV tag and len; tag equals
  14492. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  14493. A_UINT32 tlv_header; /** TLV Header */
  14494. A_UINT32 vdev_id; /** Vdev ID */
  14495. A_UINT32 session; /** Session number from the HOST */
  14496. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  14497. A_UINT32 dev_ip; /** IPv4 address of the device */
  14498. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  14499. A_UINT32 src_port; /** Source port */
  14500. A_UINT32 dst_port; /** Destination port */
  14501. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  14502. 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 */
  14503. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  14504. retries[15:0]: Number of TCP level retries of OIC ping request */
  14505. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  14506. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  14507. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  14508. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  14509. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  14510. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  14511. TLS version [15:00] */
  14512. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  14513. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  14514. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  14515. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  14516. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14517. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  14518. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  14519. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  14520. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  14521. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  14522. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  14523. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  14524. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14525. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  14526. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  14527. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  14528. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  14529. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  14530. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  14531. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  14532. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  14533. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  14534. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  14535. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  14536. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  14537. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  14538. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  14539. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  14540. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  14541. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  14542. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14543. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14544. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14545. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  14546. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  14547. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14548. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14549. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14550. } wmi_oic_ping_offload_params_cmd_fixed_param;
  14551. typedef struct {
  14552. /** TLV tag and len; tag equals
  14553. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  14554. A_UINT32 tlv_header; /** TLV Header*/
  14555. A_UINT32 vdev_id; /** Interface number */
  14556. A_UINT32 session; /** Session ID*/
  14557. A_UINT32 enable; /** 1: Enable , 0: Disable */
  14558. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  14559. /** wlan OIC events */
  14560. typedef enum {
  14561. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  14562. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  14563. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  14564. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  14565. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  14566. } WMI_OIC_WAKEUP_REASON;
  14567. typedef struct {
  14568. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  14569. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14570. A_UINT32 session; /** Session ID from driver */
  14571. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  14572. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  14573. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  14574. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  14575. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  14576. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  14577. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  14578. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  14579. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14580. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14581. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14582. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  14583. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  14584. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  14585. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  14586. } wmi_oic_ping_handoff_event;
  14587. typedef struct {
  14588. /** TLV tag and len; tag equals
  14589. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  14590. A_UINT32 tlv_header; /** TLV Header*/
  14591. A_UINT32 vdev_id; /** Vdev ID */
  14592. A_UINT32 enable; /** 1: Enable 0: Disable*/
  14593. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  14594. A_UINT32 client_ip; /** Device IP address (IPv4) */
  14595. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  14596. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  14597. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  14598. /** WLAN DHCP Lease Renew Events */
  14599. typedef enum {
  14600. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  14601. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  14602. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  14603. } WMI_DHCP_RENEW_WAKEUP_REASON;
  14604. typedef struct {
  14605. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  14606. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  14607. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  14608. } wmi_dhcp_lease_renew_event;
  14609. /** WMI_STA_SMPS_PARAM_CMDID */
  14610. typedef enum {
  14611. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  14612. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  14613. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  14614. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  14615. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  14616. /** RSSI threshold to disable SMPS modes */
  14617. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  14618. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  14619. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  14620. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  14621. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  14622. /** Enable/Disable DTIM 1chRx feature */
  14623. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  14624. } wmi_sta_smps_param;
  14625. typedef struct {
  14626. /** TLV tag and len; tag equals
  14627. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  14628. A_UINT32 tlv_header;
  14629. /** Unique id identifying the VDEV */
  14630. A_UINT32 vdev_id;
  14631. /** SMPS parameter (see wmi_sta_smps_param) */
  14632. A_UINT32 param;
  14633. /** Value of SMPS parameter */
  14634. A_UINT32 value;
  14635. } wmi_sta_smps_param_cmd_fixed_param;
  14636. typedef struct {
  14637. /** TLV tag and len; tag equals
  14638. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  14639. A_UINT32 tlv_header;
  14640. /* TX stats */
  14641. A_UINT32 txBytesPushed;
  14642. A_UINT32 txPacketsPushed;
  14643. /* RX stats */
  14644. A_UINT32 rxBytesRcvd;
  14645. A_UINT32 rxPacketsRcvd;
  14646. A_UINT32 rxTimeTotal;
  14647. /** peer MAC address */
  14648. wmi_mac_addr peer_macaddr;
  14649. } wmi_mcc_sched_sta_traffic_stats;
  14650. typedef struct {
  14651. /** TLV tag and len; tag equals
  14652. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  14653. A_UINT32 tlv_header;
  14654. /** Duration over which the host stats were collected */
  14655. A_UINT32 duration;
  14656. /** Number of stations filled in following stats array */
  14657. A_UINT32 num_sta;
  14658. /* Following this struct are the TLVs:
  14659. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  14660. */
  14661. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  14662. typedef struct
  14663. {
  14664. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  14665. /* unique id identifying the VDEV, generated by the caller */
  14666. A_UINT32 vdev_id;
  14667. /*Batch scan enable command parameters*/
  14668. A_UINT32 scanInterval;
  14669. A_UINT32 numScan2Batch;
  14670. A_UINT32 bestNetworks;
  14671. A_UINT32 rfBand;
  14672. A_UINT32 rtt;
  14673. } wmi_batch_scan_enable_cmd_fixed_param;
  14674. typedef struct
  14675. {
  14676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  14677. A_UINT32 supportedMscan;
  14678. } wmi_batch_scan_enabled_event_fixed_param;
  14679. typedef struct
  14680. {
  14681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  14682. /* unique id identifying the VDEV, generated by the caller */
  14683. A_UINT32 vdev_id;
  14684. A_UINT32 param;
  14685. } wmi_batch_scan_disable_cmd_fixed_param;
  14686. typedef struct
  14687. {
  14688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  14689. /** unique id identifying the VDEV, generated by the caller */
  14690. A_UINT32 vdev_id;
  14691. A_UINT32 param;
  14692. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  14693. typedef struct
  14694. {
  14695. A_UINT32 tlv_header;
  14696. wmi_mac_addr bssid; /* BSSID */
  14697. wmi_ssid ssid; /* SSID */
  14698. A_UINT32 ch; /* Channel number */
  14699. A_UINT32 rssi; /* RSSI or Level */
  14700. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  14701. A_UINT32 timestamp;
  14702. A_UINT32 ch_freq; /* Channel frequency in MHz */
  14703. } wmi_batch_scan_result_network_info;
  14704. typedef struct
  14705. {
  14706. A_UINT32 tlv_header;
  14707. A_UINT32 scanId; /* Scan List ID. */
  14708. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  14709. A_UINT32 numNetworksInScanList;
  14710. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  14711. } wmi_batch_scan_result_scan_list;
  14712. #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. */
  14713. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  14714. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  14715. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  14716. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  14717. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  14718. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  14719. #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. */
  14720. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  14721. #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. */
  14722. /*
  14723. * TEMPORARY alias of incorrect old name the correct name.
  14724. * This alias will be removed once all references to the old name have been fixed.
  14725. */
  14726. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  14727. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  14728. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  14729. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  14730. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  14731. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  14732. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  14733. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  14734. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  14735. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  14736. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  14737. #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. */
  14738. #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 */
  14739. #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 */
  14740. #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. */
  14741. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  14742. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  14743. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  14744. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  14745. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  14746. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  14747. typedef struct {
  14748. A_UINT32 tlv_header;
  14749. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  14750. A_UINT32 enable;
  14751. /**LPI snooping mode*/
  14752. A_UINT32 snooping_mode;
  14753. /** LPI interested IEs in snooping context */
  14754. A_UINT32 ie_bitmap;
  14755. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  14756. typedef struct {
  14757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  14758. /** Scan ID */
  14759. A_UINT32 scan_id;
  14760. /** Scan requestor ID */
  14761. A_UINT32 scan_req_id;
  14762. /** VDEV id(interface) that is requesting scan */
  14763. A_UINT32 vdev_id;
  14764. /** LPI interested IEs in scan context */
  14765. A_UINT32 ie_bitmap;
  14766. /** Scan Priority, input to scan scheduler */
  14767. A_UINT32 scan_priority;
  14768. /** dwell time in msec on active channels */
  14769. A_UINT32 dwell_time_active;
  14770. /** dwell time in msec on passive channels */
  14771. A_UINT32 dwell_time_passive;
  14772. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  14773. A_UINT32 min_rest_time;
  14774. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  14775. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  14776. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  14777. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  14778. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  14779. * irrespective of activity. activity is determined by the idle_time parameter.
  14780. */
  14781. A_UINT32 max_rest_time;
  14782. /** time before sending next set of probe requests.
  14783. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  14784. * The number of probe requests specified depends on the ssid_list and bssid_list
  14785. */
  14786. A_UINT32 repeat_probe_time;
  14787. /** time in msec between 2 consequetive probe requests with in a set. */
  14788. A_UINT32 probe_spacing_time;
  14789. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  14790. A_UINT32 idle_time;
  14791. /** maximum time in msec allowed for scan */
  14792. A_UINT32 max_scan_time;
  14793. /** delay in msec before sending first probe request after switching to a channel */
  14794. A_UINT32 probe_delay;
  14795. /** Scan control flags */
  14796. A_UINT32 scan_ctrl_flags;
  14797. /** Burst duration time in msec*/
  14798. A_UINT32 burst_duration;
  14799. /** # if channels to scan. In the TLV channel_list[] */
  14800. A_UINT32 num_chan;
  14801. /** number of bssids. In the TLV bssid_list[] */
  14802. A_UINT32 num_bssid;
  14803. /** number of ssid. In the TLV ssid_list[] */
  14804. A_UINT32 num_ssids;
  14805. /** number of bytes in ie data. In the TLV ie_data[] */
  14806. A_UINT32 ie_len;
  14807. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  14808. A_UINT32 scan_ctrl_flags_ext;
  14809. /**
  14810. * TLV (tag length value) parameters follow the scan_cmd
  14811. * structure. The TLV's are:
  14812. * A_UINT32 channel_list[]; // in MHz
  14813. * wmi_ssid ssid_list[];
  14814. * wmi_mac_addr bssid_list[];
  14815. * A_UINT8 ie_data[];
  14816. */
  14817. } wmi_lpi_start_scan_cmd_fixed_param;
  14818. typedef struct {
  14819. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  14820. /** Scan requestor ID */
  14821. A_UINT32 scan_req_id;
  14822. /** Scan ID */
  14823. A_UINT32 scan_id;
  14824. /**
  14825. * Req Type
  14826. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  14827. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  14828. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  14829. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  14830. */
  14831. A_UINT32 req_type;
  14832. /**
  14833. * vDev ID
  14834. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  14835. */
  14836. A_UINT32 vdev_id;
  14837. } wmi_lpi_stop_scan_cmd_fixed_param;
  14838. typedef enum {
  14839. WMI_LPI_DEVICE_TYPE_AP = 1,
  14840. WMI_LPI_DEVICE_TYPE_P2P = 2,
  14841. WMI_LPI_DEVICE_TYPE_NAN = 3,
  14842. } wmi_lpi_device_type;
  14843. typedef struct
  14844. {
  14845. A_UINT32 tlv_header;
  14846. /** Scan requestor ID */
  14847. A_UINT32 scan_req_id;
  14848. A_UINT32 ie_bitmap;
  14849. A_UINT32 data_len;
  14850. } wmi_lpi_result_event_fixed_param;
  14851. typedef enum {
  14852. /** User scan Request completed */
  14853. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  14854. /** User Request was never serviced */
  14855. WMI_LPI_STATUS_DROPPED_REQ = 1,
  14856. /** Illegal channel Req */
  14857. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  14858. /** Illegal Operation Req */
  14859. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  14860. /** Request Aborted */
  14861. WMI_LPI_STATUS_REQ_ABORTED = 4,
  14862. /** Request Timed Out */
  14863. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  14864. /** Medium Busy, already there
  14865. * is a scan is going on */
  14866. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  14867. /** Extscan is the scan client whose scan complete event is triggered */
  14868. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  14869. } wmi_lpi_staus;
  14870. typedef struct
  14871. {
  14872. A_UINT32 tlv_header;
  14873. wmi_lpi_staus status;
  14874. /** Scan requestor ID */
  14875. A_UINT32 scan_req_id;
  14876. } wmi_lpi_status_event_fixed_param;
  14877. typedef struct
  14878. {
  14879. A_UINT32 tlv_header;
  14880. wmi_mac_addr bssid;
  14881. wmi_ssid ssid;
  14882. A_UINT32 freq;
  14883. A_UINT32 rssi;
  14884. A_UINT32 vdev_id;
  14885. } wmi_lpi_handoff_event_fixed_param;
  14886. typedef struct
  14887. {
  14888. A_UINT32 tlv_header;
  14889. A_UINT32 timestamp; /*timestamp of batch scan event*/
  14890. A_UINT32 numScanLists; /*number of scan in this event*/
  14891. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  14892. } wmi_batch_scan_result_event_fixed_param;
  14893. typedef struct {
  14894. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  14895. A_UINT32 vdev_id;
  14896. /* This TLV is followed by p2p_noa_info for vdev :
  14897. * wmi_p2p_noa_info p2p_noa_info;
  14898. */
  14899. } wmi_p2p_noa_event_fixed_param;
  14900. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  14901. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  14902. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  14903. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  14904. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  14905. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  14906. typedef struct {
  14907. /** TLV tag and len; tag equals
  14908. * */
  14909. A_UINT32 tlv_header;
  14910. /** gpip pin number */
  14911. A_UINT32 gpio_pin_num;
  14912. /** gpio interupt type */
  14913. A_UINT32 int_type;
  14914. /** RF radio status */
  14915. A_UINT32 radio_state;
  14916. } wmi_rfkill_mode_param;
  14917. typedef enum {
  14918. WMI_SET_LED_SYS_POWEROFF,
  14919. WMI_SET_LED_SYS_S3_SUSPEND,
  14920. WMI_SET_LED_SYS_S4_S5,
  14921. WMI_SET_LED_SYS_DRIVER_DISABLE,
  14922. WMI_SET_LED_SYS_WAKEUP,
  14923. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  14924. WMI_SET_LED_SYS_POWERON,
  14925. } wmi_led_sys_state_param;
  14926. typedef enum {
  14927. WMI_CONFIG_LED_TO_VDD = 0,
  14928. WMI_CONFIG_LED_TO_GND = 1,
  14929. } wmi_config_led_connect_type;
  14930. typedef enum {
  14931. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  14932. WMI_CONFIG_LED_WITH_BT = 1,
  14933. } wmi_config_led_with_bt_flag;
  14934. typedef enum {
  14935. WMI_CONFIG_LED_DISABLE = 0,
  14936. WMI_CONFIG_LED_ENABLE = 1,
  14937. } wmi_config_led_enable_flag;
  14938. typedef enum {
  14939. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  14940. WMI_CONFIG_LED_HIGH_OFF = 1,
  14941. WMI_CONFIG_LED_HIGH_ON = 2,
  14942. } wmi_config_led_on_flag;
  14943. typedef enum {
  14944. WMI_CONFIG_LED_UNSPECIFIED = 0,
  14945. WMI_CONFIG_LED_ON = 1,
  14946. WMI_CONFIG_LED_OFF = 2,
  14947. WMI_CONFIG_LED_DIM = 3,
  14948. WMI_CONFIG_LED_BLINK = 4,
  14949. WMI_CONFIG_LED_TXRX = 5,
  14950. } wmi_config_led_operation_type;
  14951. typedef struct {
  14952. /** TLV tag and len; tag equals
  14953. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  14954. A_UINT32 tlv_header;
  14955. /* Set GPIO pin */
  14956. A_UINT32 led_gpio_pin;
  14957. /* Set connect type defined in wmi_config_led_connect_type */
  14958. A_UINT32 connect_type;
  14959. /* Set flag defined in wmi_config_led_with_bt_flag*/
  14960. A_UINT32 with_bt;
  14961. /* Set LED enablement defined in wmi_config_led_enable_flag */
  14962. A_UINT32 led_enable;
  14963. /** pdev_id for identifying the MAC
  14964. * See macros starting with WMI_PDEV_ID_ for values.
  14965. */
  14966. A_UINT32 pdev_id;
  14967. /* see wmi_config_led_operation_type enum */
  14968. A_UINT32 led_operation_type;
  14969. /* see wmi_config_led_on_flag enum */
  14970. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  14971. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  14972. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  14973. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  14974. } wmi_pdev_set_led_config_cmd_fixed_param;
  14975. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  14976. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  14977. /** WMI_PEER_INFO_REQ_CMDID
  14978. * Request FW to provide peer info */
  14979. typedef struct {
  14980. /** TLV tag and len; tag equals
  14981. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  14982. A_UINT32 tlv_header;
  14983. /** In order to get the peer info for a single peer, host shall
  14984. * issue the peer_mac_address of that peer. For getting the
  14985. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  14986. * address. The firmware will return the peer info for all the
  14987. * peers on the specified vdev_id */
  14988. wmi_mac_addr peer_mac_address;
  14989. /** vdev id */
  14990. A_UINT32 vdev_id;
  14991. } wmi_peer_info_req_cmd_fixed_param;
  14992. typedef struct {
  14993. /** TLV tag and len; tag equals
  14994. * WMITLV_TAG_STRUC_wmi_peer_info */
  14995. A_UINT32 tlv_header;
  14996. /** mac addr of the peer */
  14997. wmi_mac_addr peer_mac_address;
  14998. /** data_rate of the peer */
  14999. A_UINT32 data_rate;
  15000. /** rssi of the peer */
  15001. A_UINT32 rssi;
  15002. /** tx fail count */
  15003. A_UINT32 tx_fail_cnt;
  15004. } wmi_peer_info;
  15005. /** FW response with the peer info */
  15006. typedef struct {
  15007. /** TLV tag and len; tag equals
  15008. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  15009. A_UINT32 tlv_header;
  15010. /** number of peers in peer_info */
  15011. A_UINT32 num_peers;
  15012. /* Set to 1 only if vdev_id field is valid */
  15013. A_UINT32 valid_vdev_id;
  15014. /* VDEV to which the peer belongs to */
  15015. A_UINT32 vdev_id;
  15016. /* This TLV is followed by another TLV of array of structs
  15017. * wmi_peer_info peer_info[];
  15018. */
  15019. } wmi_peer_info_event_fixed_param;
  15020. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  15021. * Request FW to provide peer info */
  15022. typedef struct {
  15023. /** TLV tag and len; tag equals
  15024. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  15025. A_UINT32 tlv_header;
  15026. /** In order to get the peer antdiv info for a single peer, host shall
  15027. * issue the peer_mac_address of that peer. For getting the
  15028. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  15029. * address. The firmware will return the peer info for all the
  15030. * peers on the specified vdev_id */
  15031. wmi_mac_addr peer_mac_address;
  15032. /** vdev id */
  15033. A_UINT32 vdev_id;
  15034. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  15035. /** FW response with the peer antdiv info */
  15036. typedef struct {
  15037. /** TLV tag and len; tag equals
  15038. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  15039. A_UINT32 tlv_header;
  15040. /** number of peers in peer_info */
  15041. A_UINT32 num_peers;
  15042. /* VDEV to which the peer belongs to */
  15043. A_UINT32 vdev_id;
  15044. /* This TLV is followed by another TLV of array of structs
  15045. * wmi_peer_antdiv_info peer_antdiv_info[];
  15046. */
  15047. } wmi_peer_antdiv_info_event_fixed_param;
  15048. typedef struct {
  15049. /** TLV tag and len; tag equals
  15050. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  15051. A_UINT32 tlv_header;
  15052. /** mac addr of the peer */
  15053. wmi_mac_addr peer_mac_address;
  15054. /** per chain rssi of the peer, for up to 8 chains.
  15055. * Each chain's entry reports the RSSI for different bandwidths:
  15056. * bits 7:0 -> primary 20 MHz
  15057. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  15058. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  15059. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  15060. * Each of these 8-bit RSSI reports is in dB units, with respect to
  15061. * the noise floor.
  15062. * 0x80 means invalid.
  15063. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  15064. * All unused chain_rssi indices shall be set to 0x80808080.
  15065. */
  15066. A_INT32 chain_rssi[8];
  15067. } wmi_peer_antdiv_info;
  15068. typedef struct {
  15069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  15070. /** tid_number */
  15071. A_UINT32 tid_num;
  15072. /** msduq_mask to set the value
  15073. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  15074. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  15075. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  15076. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  15077. * rest of bits are reserved and set to 0.
  15078. */
  15079. A_UINT32 msduq_update_mask;
  15080. /** Qdepth threshold value
  15081. * If number of msdus in a queue excess over qdepth_thresh_value value
  15082. * while queuing msdu's then we drop new msdus.
  15083. * (Though dropping older (stale) data rather than newer data might be
  15084. * preferable, the dropping is performed by MAC HW, and theres no option
  15085. * to configure the HW to do head dropping rather than tail dropping.)
  15086. */
  15087. A_UINT32 qdepth_thresh_value;
  15088. } wmi_msduq_qdepth_thresh_update;
  15089. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  15090. * Request FW to update msduq qdepth threshold per TID per peer */
  15091. typedef struct {
  15092. /** TLV tag and len; tag equals
  15093. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  15094. */
  15095. A_UINT32 tlv_header;
  15096. /** pdev id
  15097. * The pdev_id can be determined from the vdev_id, but the pdev_id
  15098. * is explicitly provided so it can be used for sanity checking.
  15099. */
  15100. A_UINT32 pdev_id;
  15101. /** vdev id */
  15102. A_UINT32 vdev_id;
  15103. /**
  15104. * To set the peer msduq qdepth threshold update for a single peer,
  15105. * the host shall send mac address for which peer need to be updated.
  15106. */
  15107. wmi_mac_addr peer_mac_address;
  15108. /** number of payload update tlvs */
  15109. A_UINT32 num_of_msduq_updates;
  15110. /** Followed by the variable length TLV msduq_qdepth_updates:
  15111. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  15112. */
  15113. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  15114. /**
  15115. * ACK policy to be followed for the TID
  15116. */
  15117. typedef enum {
  15118. /** Used when the host does not want to configure the ACK policy */
  15119. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  15120. /** Allow ACK for the TID */
  15121. WMI_PEER_TID_CONFIG_ACK,
  15122. /** Do not expect ACK for the TID */
  15123. WMI_PEER_TID_CONFIG_NOACK,
  15124. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  15125. /**
  15126. * Aggregation control policy for the TID
  15127. */
  15128. typedef enum {
  15129. /** Used when the host does not want to configure the aggregation policy */
  15130. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  15131. /** Enable aggregation for the TID */
  15132. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  15133. /** Disable aggregation for the TID */
  15134. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  15135. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  15136. /**
  15137. * Rate control policy for the TID
  15138. */
  15139. typedef enum {
  15140. /** Used when the host does not want to configure the rate control policy */
  15141. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  15142. /** Auto rate control */
  15143. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  15144. /** Fixed rate control */
  15145. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  15146. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  15147. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  15148. /**
  15149. * Set the highest rate cap allowed for this TID.
  15150. * Rate cap is specified in rate code format,
  15151. * i.e. NSS and MCS combined as shown below:
  15152. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  15153. * b'3-b'0 indicate the MCS
  15154. */
  15155. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  15156. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  15157. /**
  15158. * SW retry threshold for the TID
  15159. */
  15160. typedef enum {
  15161. /** Used when the host does not want to configure the SW retry threshold */
  15162. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  15163. WMI_PEER_TID_SW_RETRY_MIN = 1,
  15164. WMI_PEER_TID_SW_RETRY_MAX = 30,
  15165. /** No SW retry for the TID */
  15166. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  15167. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  15168. /*
  15169. * values for tid_config_supported_bitmap field,
  15170. * in wmi_peer_tid_configurations_cmd structure.
  15171. */
  15172. typedef enum {
  15173. /* Used to indicate that disable_rts_cts field is valid */
  15174. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  15175. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  15176. /**
  15177. * Command format for the TID configuration
  15178. */
  15179. typedef struct {
  15180. /** TLV tag and len; tag equals
  15181. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  15182. */
  15183. A_UINT32 tlv_header;
  15184. /** vdev id */
  15185. A_UINT32 vdev_id;
  15186. /** peer MAC address */
  15187. wmi_mac_addr peer_mac_address;
  15188. /** TID number, generated by the caller.
  15189. * Valid range for QoS TID : 0-15
  15190. * Valid range for non QOS/Mgmt TID: 16-19
  15191. * Any other TID number is invalid.
  15192. */
  15193. A_UINT32 tid_num;
  15194. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  15195. A_UINT32 ack_policy;
  15196. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  15197. A_UINT32 aggr_control;
  15198. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  15199. A_UINT32 rate_control;
  15200. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  15201. * This is applicable only when rate_control is
  15202. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  15203. */
  15204. A_UINT32 rcode_rcflags;
  15205. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  15206. * This SW retry threshold limits the total number of retransmits of
  15207. * nacked or unacked MPDUs, but it is up to the FW to decide what
  15208. * tx rate to use during each retransmission.
  15209. */
  15210. A_UINT32 sw_retry_threshold;
  15211. /*--- Start of extended structure ---*/
  15212. /* Bitmap to indicate which fields in the extended structure are valid.
  15213. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  15214. */
  15215. A_UINT32 tid_config_supported_bitmap;
  15216. /* Knob to enable/disable RTS/CTS per TID */
  15217. A_UINT32 disable_rts_cts;
  15218. } wmi_peer_tid_configurations_cmd_fixed_param;
  15219. /* The below enable/disable macros are used for both per peer CFR capture
  15220. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  15221. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  15222. */
  15223. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  15224. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  15225. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  15226. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  15227. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  15228. /* Bandwidth of peer CFR captures */
  15229. typedef enum {
  15230. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  15231. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  15232. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  15233. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  15234. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  15235. WMI_PEER_CFR_CAPTURE_BW_MAX,
  15236. } WMI_PEER_CFR_CAPTURE_BW;
  15237. /* Peer CFR capture method */
  15238. typedef enum {
  15239. /* Send null frame on the requested bw and capture CFR on ACK */
  15240. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  15241. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1,
  15242. WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2,
  15243. /* New methods to be added here */
  15244. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  15245. } WMI_PEER_CFR_CAPTURE_METHOD;
  15246. /*
  15247. * Peer command structure to configure the CFR capture
  15248. */
  15249. typedef struct {
  15250. /** TLV tag and len; tag equals
  15251. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  15252. */
  15253. A_UINT32 tlv_header;
  15254. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  15255. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  15256. */
  15257. A_UINT32 request;
  15258. /* Peer MAC address. In AP mode, this is the address of the connected peer
  15259. * for which CFR capture is needed. In case of STA mode, this is the address
  15260. * of the AP to which the STA is connected
  15261. */
  15262. wmi_mac_addr mac_addr;
  15263. /* vdev id */
  15264. A_UINT32 vdev_id;
  15265. /* Periodicity of measurement in ms.
  15266. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  15267. * capture for the request and no periodic CFR captures.
  15268. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  15269. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  15270. */
  15271. A_UINT32 periodicity;
  15272. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  15273. A_UINT32 bandwidth;
  15274. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  15275. A_UINT32 capture_method;
  15276. } wmi_peer_cfr_capture_cmd_fixed_param;
  15277. typedef enum {
  15278. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  15279. WMI_PEER_IND_OMN, /* operating mode notification */
  15280. WMI_PEER_IND_OMI, /* operating mode indication */
  15281. } WMI_PEER_OPER_MODE_IND;
  15282. typedef struct {
  15283. /** TLV tag and len; tag equals
  15284. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  15285. A_UINT32 tlv_header;
  15286. /** mac addr of the peer */
  15287. wmi_mac_addr peer_mac_address;
  15288. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  15289. A_UINT32 ind_type;
  15290. /** new_rxnss valid for all peer_operating mode ind. */
  15291. A_UINT32 new_rxnss;
  15292. /** new_bw valid for peer_operating mode ind. OMN/OMI
  15293. * value of this bw is as per 11ax/ac standard:
  15294. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  15295. */
  15296. A_UINT32 new_bw;
  15297. /** new_txnss valid for peer_operating mode ind. OMI */
  15298. A_UINT32 new_txnss;
  15299. /** new_disablemu: disable mu mode
  15300. * valid for peer_operating mode ind. OMI
  15301. */
  15302. A_UINT32 new_disablemu;
  15303. } wmi_peer_oper_mode_change_event_fixed_param;
  15304. /** FW response when tx failure count has reached threshold
  15305. * for a peer */
  15306. typedef struct {
  15307. /** TLV tag and len; tag equals
  15308. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  15309. A_UINT32 tlv_header;
  15310. /** vdev id*/
  15311. A_UINT32 vdev_id;
  15312. /** mac address */
  15313. wmi_mac_addr peer_mac_address;
  15314. /** tx failure count - will eventually be removed and not used */
  15315. A_UINT32 tx_fail_cnt;
  15316. /** seq number of the nth tx_fail_event */
  15317. A_UINT32 seq_no;
  15318. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  15319. enum wmi_rmc_mode {
  15320. /** Disable RMC */
  15321. WMI_RMC_MODE_DISABLED = 0,
  15322. /** Enable RMC */
  15323. WMI_RMC_MODE_ENABLED = 1,
  15324. };
  15325. /** Enable RMC transmitter functionality. Upon
  15326. * receiving this, the FW shall mutlicast frames with
  15327. * reliablity. This is a vendor
  15328. * proprietary feature. */
  15329. typedef struct {
  15330. /** TLV tag and len; tag equals
  15331. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  15332. A_UINT32 tlv_header;
  15333. /** vdev id*/
  15334. A_UINT32 vdev_id;
  15335. /** enable_rmc contains values from enum wmi_rmc_mode;
  15336. * Default value: 0 (disabled) */
  15337. A_UINT32 enable_rmc;
  15338. } wmi_rmc_set_mode_cmd_fixed_param;
  15339. /** Configure transmission periodicity of action frames in a
  15340. * RMC network for the multicast transmitter */
  15341. typedef struct {
  15342. /** TLV tag and len; tag equals
  15343. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  15344. A_UINT32 tlv_header;
  15345. /** vdev id */
  15346. A_UINT32 vdev_id;
  15347. /** time period in milliseconds. Default: 300 ms.
  15348. An action frame indicating the current leader is transmitted by the
  15349. RMC transmitter once every 'periodity_msec' */
  15350. A_UINT32 periodicity_msec;
  15351. } wmi_rmc_set_action_period_cmd_fixed_param;
  15352. /** Optimise Leader selection process in RMC functionality. For
  15353. * Enhancement/Debug purposes only */
  15354. typedef struct {
  15355. /** TLV tag and len; tag equals
  15356. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  15357. A_UINT32 tlv_header;
  15358. /** vdev id */
  15359. A_UINT32 vdev_id;
  15360. /** flags ::
  15361. * 0x0001 - Enable beacon averaging
  15362. * 0x0002 - Force leader selection
  15363. * 0x0004 - Enable Timer based leader switch
  15364. * 0x0008 - Use qos/NULL based for multicast reliability */
  15365. A_UINT32 flags;
  15366. /** control leader change timeperiod (in seconds) */
  15367. A_UINT32 peridocity_leader_switch;
  15368. /** control activity timeout value for data rx (in seconds) */
  15369. A_UINT32 data_activity_timeout;
  15370. /** mac address of leader */
  15371. wmi_mac_addr forced_leader_mac_addr;
  15372. } wmi_rmc_config_cmd_fixed_param;
  15373. /** MHF is generally implemented in
  15374. * the kernel. To decrease system power consumption, the
  15375. * driver can enable offloading this to the chipset. In
  15376. * order for the offload, the firmware needs the routing table.
  15377. * The host shall plumb the routing table into FW. The firmware
  15378. * shall perform an IP address lookup and forward the packet to
  15379. * the next hop using next hop's mac address. This is a vendor
  15380. * proprietary feature. */
  15381. enum wmi_mhf_ofl_mode {
  15382. /** Disable MHF offload */
  15383. WMI_MHF_OFL_MODE_DISABLED = 0,
  15384. /** Enable MHF offload */
  15385. WMI_MHF_OFL_MODE_ENABLED = 1,
  15386. };
  15387. typedef struct {
  15388. /** TLV tag and len; tag equals
  15389. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  15390. A_UINT32 tlv_header;
  15391. /** vdev id*/
  15392. A_UINT32 vdev_id;
  15393. /** enable_mhf_ofl contains values from enum
  15394. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  15395. A_UINT32 enable_mhf_ofl;
  15396. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  15397. enum wmi_mhf_ofl_table_action {
  15398. /** Create MHF offload table in FW */
  15399. WMI_MHF_OFL_TBL_CREATE = 0,
  15400. /** Append to existing MHF offload table */
  15401. WMI_MHF_OFL_TBL_APPEND = 1,
  15402. /** Flush entire MHF offload table in FW */
  15403. WMI_MHF_OFL_TBL_FLUSH = 2,
  15404. };
  15405. typedef struct {
  15406. /** TLV tag and len; tag equals
  15407. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  15408. A_UINT32 tlv_header;
  15409. /** vdev id*/
  15410. A_UINT32 vdev_id;
  15411. /** action corresponds to values from enum
  15412. * wmi_mhf_ofl_table_action */
  15413. A_UINT32 action;
  15414. /** number of entries in the table */
  15415. A_UINT32 num_entries;
  15416. /** Followed by the variable length TLV
  15417. * wmi_mhf_offload_routing_table_entry entries[] */
  15418. } wmi_mhf_offload_plumb_routing_table_cmd;
  15419. typedef struct {
  15420. /** TLV tag and len; tag equals
  15421. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  15422. A_UINT32 tlv_header;
  15423. /** Destination node's IP address */
  15424. WMI_IPV4_ADDR dest_ipv4_addr;
  15425. /** Next hop node's MAC address */
  15426. wmi_mac_addr next_hop_mac_addr;
  15427. } wmi_mhf_offload_routing_table_entry;
  15428. enum {
  15429. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  15430. };
  15431. typedef struct {
  15432. /** tlv tag and len, tag equals
  15433. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  15434. A_UINT32 tlv_header;
  15435. /** full 64 tsf timestamp get from MAC tsf timer indicates
  15436. * the time that the radar event uploading to host, split
  15437. * it to high 32 bit and lower 32 bit in fulltsf_high and
  15438. * full_tsf_low
  15439. */
  15440. A_UINT32 upload_fullts_low;
  15441. A_UINT32 upload_fullts_high;
  15442. /** timestamp indicates the time when DFS pulse is detected
  15443. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  15444. */
  15445. A_UINT32 pulse_detect_ts;
  15446. /** the duaration of the pulse in us */
  15447. A_UINT32 pulse_duration;
  15448. /** the center frequency of the radar pulse detected, KHz */
  15449. A_UINT32 pulse_center_freq;
  15450. /** bandwidth of current DFS channel, MHz */
  15451. A_UINT32 ch_bandwidth;
  15452. /** center channel frequency1 of current DFS channel, MHz */
  15453. A_UINT16 ch_center_freq1;
  15454. /** center channel frequency2 of current DFS channel, MHz,
  15455. * reserved for 160 BW mode
  15456. */
  15457. A_UINT16 ch_center_freq2;
  15458. /** flag to indicate if this pulse is chirp */
  15459. A_UINT8 pulse_is_chirp;
  15460. /** RSSI recorded in the ppdu */
  15461. A_UINT8 rssi;
  15462. /** extened RSSI info */
  15463. A_UINT8 rssi_ext;
  15464. union {
  15465. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  15466. /** pdev_id for identifying the MAC
  15467. * See macros starting with WMI_PDEV_ID_ for values.
  15468. */
  15469. A_UINT8 pdev_id;
  15470. };
  15471. /** index of peak magnitude bin (signed) */
  15472. A_INT32 peak_sidx;
  15473. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  15474. A_INT32 pulse_delta_peak;
  15475. /** Max pulse chirp velocity variance in delta bins */
  15476. A_INT32 pulse_delta_diff;
  15477. /** the difference in the FFT peak index between short FFT and the first long FFT
  15478. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  15479. */
  15480. A_INT32 psidx_diff;
  15481. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  15482. * 0x0001 - set if psidx_diff is valid
  15483. */
  15484. A_UINT32 pulse_flags;
  15485. } wmi_dfs_radar_event_fixed_param;
  15486. enum {
  15487. /* DEFAULT - target chooses what action to take, based on its thermal
  15488. * management policy
  15489. * Targets which throttle tx (and potentially rx) based on thermal
  15490. * management thresholds specified by the host will shut down tx
  15491. * if the temperature exceeds upper_thresh_degreeC.
  15492. * Targets which simply inform the host about threshold breaches will
  15493. * send a notification message to the host if the temperature exceeds
  15494. * upper_thresh_degreeC.
  15495. * Conversely, if the temperature was above upper_thresh_degreeC but
  15496. * then drops to below lower_threshold_degreeC, the target will either
  15497. * resume tx, or notify the host.
  15498. */
  15499. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  15500. /* HALT_TRAFFIC -
  15501. * If the temperature rises above upper_thresh_degreeC, the target will
  15502. * halt tx.
  15503. * If the temperature falls back below lower_thresh_degreeC, the target
  15504. * will resume tx.
  15505. */
  15506. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  15507. /* NOTIFY_HOST - the target will notify the host if the temperature
  15508. * either rises above upper_thresh_degreeC or falls below
  15509. * lower_thresh_degreeC.
  15510. */
  15511. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  15512. };
  15513. typedef struct {
  15514. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  15515. /*Thermal thresholds*/
  15516. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  15517. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  15518. /*Enable/Disable Thermal Monitoring for Mitigation*/
  15519. A_UINT32 enable;
  15520. /* action: what the target should do when a thermal upper/lower threshold
  15521. * is crossed.
  15522. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  15523. */
  15524. A_UINT32 action;
  15525. A_UINT32 threshold_warning_degreeC;
  15526. A_UINT32 sample_rate_ms;
  15527. } wmi_thermal_mgmt_cmd_fixed_param;
  15528. typedef struct {
  15529. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  15530. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  15531. } wmi_thermal_mgmt_event_fixed_param;
  15532. /**
  15533. * This command is sent from WLAN host driver to firmware to
  15534. * request firmware to configure auto shutdown timer in fw
  15535. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  15536. */
  15537. typedef struct {
  15538. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  15539. A_UINT32 timer_value; /** timer value; 0=disable */
  15540. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  15541. enum wmi_host_auto_shutdown_reason {
  15542. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  15543. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  15544. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  15545. };
  15546. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  15547. typedef struct{
  15548. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  15549. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  15550. } wmi_host_auto_shutdown_event_fixed_param;
  15551. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  15552. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  15553. * This command is only used by some customer for verification test. It is not for end-user.
  15554. *
  15555. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  15556. *
  15557. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  15558. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  15559. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  15560. * <channel, ack_offset> pair is unique.
  15561. *
  15562. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  15563. * called basic_config_info by bitmap
  15564. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  15565. *
  15566. * '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
  15567. * is ignored.
  15568. * disable will remove preious conditions from FW.
  15569. * conditions from the later command will over write conditions stored from a previous command.
  15570. *
  15571. */
  15572. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  15573. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  15574. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  15575. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  15576. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  15577. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  15578. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  15579. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  15580. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  15581. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  15582. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  15583. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  15584. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  15585. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  15586. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  15587. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  15588. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  15589. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  15590. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  15591. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  15592. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  15593. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  15594. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  15595. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  15596. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  15597. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  15598. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  15599. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  15600. /** Bit map definition for basic_config_info starts */
  15601. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  15602. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  15603. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  15604. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  15605. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  15606. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  15607. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  15608. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  15609. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  15610. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  15611. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  15612. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  15613. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  15614. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  15615. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  15616. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  15617. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  15618. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  15619. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  15620. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  15621. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  15622. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  15623. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  15624. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  15625. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  15626. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  15627. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  15628. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  15629. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  15630. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  15631. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  15632. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  15633. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  15634. /*
  15635. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  15636. * is temporarily maintained as an alias for the correct name
  15637. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15638. */
  15639. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  15640. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  15641. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15642. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  15643. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  15644. /*
  15645. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  15646. * is temporarily maintained as an alias for the correct name
  15647. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  15648. */
  15649. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  15650. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  15651. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  15652. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  15653. /** Bit map definition for basic_config_info ends */
  15654. typedef struct{
  15655. A_UINT32 tlv_header;
  15656. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  15657. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  15658. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  15659. * 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
  15660. * 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
  15661. * 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
  15662. * Bit16 : band condition b'0: 2G, b'1: 5G
  15663. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  15664. * 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
  15665. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  15666. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  15667. * Bit23 ~ Bit31: reserved
  15668. */
  15669. A_UINT32 basic_config_info;
  15670. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  15671. * it depends on Bit14 of basic_config_info
  15672. * Total 24 channels for 5G
  15673. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  15674. * Total 14 channels for 2G
  15675. * 1 ~ 14
  15676. */
  15677. A_UINT32 channel;
  15678. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  15679. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  15680. * Legacy rates , 11b, 11g, 11A
  15681. * 11n one stream (ht20, ht40) 8+8
  15682. * 11n two streams (ht20, ht40) 8+8
  15683. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  15684. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  15685. */
  15686. A_UINT32 rate0;
  15687. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  15688. * 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
  15689. */
  15690. /** 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
  15691. */
  15692. A_UINT32 rate1;
  15693. } wmi_tpc_chainmask_config;
  15694. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  15695. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  15696. typedef struct{
  15697. A_UINT32 tlv_header;
  15698. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  15699. A_UINT32 num_tpc_chainmask_configs;
  15700. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  15701. } wmi_tpc_chainmask_config_cmd_fixed_param;
  15702. typedef struct {
  15703. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  15704. A_UINT32 pdev_id;
  15705. /**
  15706. * Bits 31:0: base address of ring [31:0]
  15707. */
  15708. A_UINT32 base_addr_lo;
  15709. /**
  15710. * Bits 3:0: base address of ring [35:32]
  15711. * Bits 31:4: reserved
  15712. */
  15713. A_UINT32 base_addr_hi;
  15714. /**
  15715. * Bits 31:0: address of head index [31:0]
  15716. */
  15717. A_UINT32 head_idx_addr_lo;
  15718. /**
  15719. * Bits 3:0: address of head index [35:32]
  15720. * Bits 31:4: reserved
  15721. */
  15722. A_UINT32 head_idx_addr_hi;
  15723. /**
  15724. * Bits 31:0: address of tail index [31:0]
  15725. */
  15726. A_UINT32 tail_idx_addr_lo;
  15727. /**
  15728. * Bits 3:0: address of tail index [35:32]
  15729. * Bits 31:4: reserved
  15730. */
  15731. A_UINT32 tail_idx_addr_hi;
  15732. A_UINT32 num_ptr; /** Number of pointers in the ring */
  15733. } wmi_oem_dma_ring_cfg_req_fixed_param;
  15734. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  15735. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  15736. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  15737. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  15738. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  15739. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  15740. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  15741. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  15742. typedef struct {
  15743. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  15744. A_UINT32 pdev_id;
  15745. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  15746. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  15747. typedef struct {
  15748. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  15749. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  15750. /**
  15751. * Bits 31:0: address of data [31:0]
  15752. */
  15753. A_UINT32 addr_lo;
  15754. /**
  15755. * Bits 3:0: address of data [35:32]
  15756. * Bits 11:4: reserved
  15757. * Bits 31:12: opaque host context data [19:0]
  15758. */
  15759. A_UINT32 addr_hi;
  15760. A_UINT32 len; /** Length of data in bytes */
  15761. } wmi_oem_indirect_data;
  15762. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  15763. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  15764. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  15765. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  15766. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  15767. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  15768. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  15769. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  15770. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  15771. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  15772. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  15773. #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)
  15774. typedef struct {
  15775. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  15776. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  15777. } wmi_oem_dma_buf_release_fixed_param;
  15778. typedef struct {
  15779. /**
  15780. * Bits 31:0: address of data [31:0]
  15781. */
  15782. A_UINT32 addr_lo;
  15783. /**
  15784. * Bits 3:0: address of data [35:32]
  15785. * Bits 11:4: reserved
  15786. * Bits 31:12: host context data [19:0]
  15787. */
  15788. A_UINT32 addr_hi;
  15789. } wmi_oem_dma_buf_release_entry;
  15790. typedef struct {
  15791. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */
  15792. A_UINT32 tlv_header;
  15793. /** Unique id identifying the VDEV */
  15794. A_UINT32 vdev_id;
  15795. /** Actual length in byte of data[]. */
  15796. A_UINT32 data_len;
  15797. /** This structure is used to send OEM DATA binary blobs from
  15798. * application/service to firmware where Host driver is pass through.
  15799. * The OEM-specific commands from OEM-specific userspace applications
  15800. * are passed to OEM-specific feature handlers in firmware as OEM DATA
  15801. * binary blobs. The format of the data is per agreement between FW and
  15802. * userspace applications, with the binary blob beginning with a header
  15803. * that identifies to the FW the nature of the remaining data within the
  15804. * blob.
  15805. *
  15806. * Following this structure is the TLV:
  15807. * A_UINT8 data[]; <-- actual length in byte given by field data_len.
  15808. */
  15809. } wmi_oem_data_cmd_fixed_param;
  15810. typedef struct {
  15811. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  15812. A_UINT32 data_len; /** length in byte of data[]. */
  15813. /* This structure is used to send REQ binary blobs
  15814. * from application/service to firmware where Host drv is pass through .
  15815. * Following this structure is the TLV:
  15816. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15817. */
  15818. } wmi_nan_cmd_param;
  15819. typedef struct {
  15820. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  15821. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  15822. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  15823. A_UINT32 reserved:30;
  15824. } wmi_nan_host_config_param_PROTOTYPE;
  15825. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  15826. typedef struct {
  15827. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  15828. A_UINT32 data_len; /** length in byte of data[]. */
  15829. /* This structure is used to send REQ binary blobs
  15830. * from firmware to application/service where Host drv is pass through .
  15831. * Following this structure is the TLV:
  15832. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15833. */
  15834. } wmi_nan_event_hdr;
  15835. typedef struct {
  15836. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  15837. 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 */
  15838. 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 */
  15839. A_UINT32 reserved:31;
  15840. } wmi_nan_event_info_PROTOTYPE;
  15841. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  15842. /**
  15843. * Event to indicate NAN discovery interface created
  15844. */
  15845. typedef struct {
  15846. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  15847. A_UINT32 tlv_header;
  15848. /** Unique id identifying the VDEV */
  15849. A_UINT32 vdev_id;
  15850. /** NAN interface MAC address */
  15851. wmi_mac_addr nan_interface_macaddr;
  15852. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  15853. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  15854. /**
  15855. * Event to indicate NAN discovery interface deleted
  15856. */
  15857. typedef struct {
  15858. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  15859. A_UINT32 tlv_header;
  15860. /** Unique id identifying the VDEV */
  15861. A_UINT32 vdev_id;
  15862. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  15863. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  15864. /**
  15865. * Event to indicate NAN device started new cluster
  15866. */
  15867. typedef struct {
  15868. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  15869. A_UINT32 tlv_header;
  15870. /** Unique id identifying the VDEV */
  15871. A_UINT32 vdev_id;
  15872. /** NAN Cluster ID */
  15873. A_UINT32 nan_cluster_id;
  15874. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  15875. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  15876. /**
  15877. * Event to indicate NAN device joined to cluster
  15878. */
  15879. typedef struct {
  15880. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  15881. A_UINT32 tlv_header;
  15882. /** Unique id identifying the VDEV */
  15883. A_UINT32 vdev_id;
  15884. /** NAN Cluster ID */
  15885. A_UINT32 nan_cluster_id;
  15886. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  15887. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  15888. /** NAN DATA CMD's */
  15889. /**
  15890. * NAN Data get capabilities req
  15891. */
  15892. typedef struct {
  15893. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  15894. A_UINT32 tlv_header;
  15895. /** unique id generated in upper layer for the transaction */
  15896. A_UINT32 transaction_id;
  15897. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  15898. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  15899. /**
  15900. * NDP Response code
  15901. */
  15902. typedef enum {
  15903. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  15904. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  15905. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  15906. } wmi_ndp_rsp_code_PROTOTYPE;
  15907. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  15908. /**
  15909. * NDP Channel configuration type
  15910. */
  15911. typedef enum {
  15912. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  15913. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  15914. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  15915. } wmi_ndp_channel_cfg_PROTOTYPE;
  15916. /*
  15917. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  15918. * WMI compatibility.
  15919. */
  15920. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  15921. typedef struct {
  15922. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  15923. /* Presence of ipv6_intf_addr */
  15924. A_UINT32 ipv6_addr_present;
  15925. /* Presence of transport Port */
  15926. A_UINT32 trans_port_present;
  15927. /* Presence of transport Protocol */
  15928. A_UINT32 trans_proto_present;
  15929. /* ipv6 Interface address */
  15930. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  15931. /* Transport Port */
  15932. A_UINT32 transport_port;
  15933. /* Transport Protocol */
  15934. A_UINT32 transport_protocol;
  15935. } wmi_ndp_transport_ip_param;
  15936. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  15937. typedef struct {
  15938. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  15939. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  15940. } wmi_ndp_channel_info_PROTOTYPE;
  15941. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  15942. typedef struct {
  15943. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  15944. A_UINT32 vdev_id; /* NDI VDEV ID */
  15945. 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 */
  15946. A_UINT32 reserved:31;
  15947. } wmi_ndp_event_param_PROTOTYPE;
  15948. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  15949. /**
  15950. * NDP Initiator requesting a data session
  15951. */
  15952. typedef struct {
  15953. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  15954. A_UINT32 tlv_header;
  15955. /** Unique id identifying the VDEV */
  15956. A_UINT32 vdev_id;
  15957. /** unique id generated in upper layer for the transaction */
  15958. A_UINT32 transaction_id;
  15959. /** Unique Instance Id identifying the Responder's service */
  15960. A_UINT32 service_instance_id;
  15961. /** Discovery MAC addr of the publisher/peer */
  15962. wmi_mac_addr peer_discovery_mac_addr;
  15963. /** Actual number of bytes in TLV ndp_cfg */
  15964. A_UINT32 ndp_cfg_len;
  15965. /** Actual number of bytes in TLV ndp_app_info */
  15966. A_UINT32 ndp_app_info_len;
  15967. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  15968. A_UINT32 ndp_channel_cfg;
  15969. /** NAN Cipher Suite Shared Key */
  15970. A_UINT32 nan_csid;
  15971. /** Actual number of bytes in TLV ndp_pmk */
  15972. A_UINT32 nan_pmk_len;
  15973. /** Actual number of bytes in TLV ndp_passphrase */
  15974. A_UINT32 nan_passphrase_len;
  15975. /** Actual number of bytes in TLV nan_servicename */
  15976. A_UINT32 nan_servicename_len;
  15977. /**
  15978. * TLV (tag length value) parameters follow the ndp_initiator_req
  15979. * structure. The TLV's are:
  15980. * wmi_channel channel;
  15981. * A_UINT8 ndp_cfg[];
  15982. * A_UINT8 ndp_app_info[];
  15983. * A_UINT8 ndp_pmk[];
  15984. * A_INT8 ndp_passphrase[];
  15985. * A_INT8 nan_servicename[];
  15986. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  15987. */
  15988. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  15989. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  15990. /**
  15991. * Initiate a data response on the responder side
  15992. * for data request indication from the peer
  15993. */
  15994. typedef struct {
  15995. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  15996. A_UINT32 tlv_header;
  15997. /** Unique id identifying the VDEV */
  15998. A_UINT32 vdev_id;
  15999. /** unique id generated in upper layer for the transaction */
  16000. A_UINT32 transaction_id;
  16001. /**
  16002. * Unique token Id generated on the initiator/responder
  16003. * side used for a NDP session between two NAN devices
  16004. */
  16005. A_UINT32 ndp_instance_id;
  16006. /** Response Code defined in wmi_ndp_rsp_code */
  16007. A_UINT32 rsp_code;
  16008. /** Number of bytes in TLV ndp_cfg */
  16009. A_UINT32 ndp_cfg_len;
  16010. /** Number of bytes in TLV ndp_app_info */
  16011. A_UINT32 ndp_app_info_len;
  16012. /** NAN Cipher Suite Shared Key */
  16013. A_UINT32 nan_csid;
  16014. /** Actual number of bytes in TLV ndp_pmk */
  16015. A_UINT32 nan_pmk_len;
  16016. /** Actual number of bytes in TLV ndp_passphrase */
  16017. A_UINT32 nan_passphrase_len;
  16018. /** Actual number of bytes in TLV nan_servicename */
  16019. A_UINT32 nan_servicename_len;
  16020. /**
  16021. * TLV (tag length value) parameters follow the ndp_responder_req
  16022. * structure. The TLV's are:
  16023. * A_UINT8 ndp_cfg[];
  16024. * A_UINT8 ndp_app_info[];
  16025. * A_UINT8 ndp_pmk[];
  16026. * A_INT8 ndp_passphrase[];
  16027. * A_INT8 nan_servicename[];
  16028. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16029. */
  16030. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  16031. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  16032. /**
  16033. * NDP end type
  16034. */
  16035. typedef enum {
  16036. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  16037. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  16038. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  16039. } wmi_ndp_end_type_PROTOTYPE;
  16040. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  16041. /**
  16042. * NDP end reason code
  16043. */
  16044. typedef enum {
  16045. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  16046. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  16047. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  16048. } wmi_ndp_end_reason_code_PROTOTYPE;
  16049. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  16050. /**
  16051. * NDP end request
  16052. */
  16053. typedef struct {
  16054. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  16055. A_UINT32 tlv_header;
  16056. /** NDP instance id */
  16057. A_UINT32 ndp_instance_id;
  16058. } wmi_ndp_end_req_PROTOTYPE;
  16059. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  16060. typedef struct {
  16061. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  16062. A_UINT32 vdev_id; /* NDI VDEV ID */
  16063. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  16064. A_UINT32 reserved:31;
  16065. } wmi_ndp_cmd_param_PROTOTYPE;
  16066. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  16067. /**
  16068. * NDP End request
  16069. */
  16070. typedef struct {
  16071. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  16072. A_UINT32 tlv_header;
  16073. /** unique id generated in upper layer for the transaction */
  16074. A_UINT32 transaction_id;
  16075. /**
  16076. * TLV (tag length value) parameters follow the ndp_end_req
  16077. * structure. The TLV's are:
  16078. * wmi_ndp_end_req ndp_end_req_list[];
  16079. */
  16080. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  16081. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  16082. /* NAN DATA RSP EVENTS */
  16083. /**
  16084. * Event to indicate NAN Data Interface capabilities cmd
  16085. */
  16086. typedef struct {
  16087. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  16088. A_UINT32 tlv_header;
  16089. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  16090. A_UINT32 transaction_id;
  16091. /** Max ndi interface support */
  16092. A_UINT32 max_ndi_interfaces;
  16093. /** Max ndp sessions can support */
  16094. A_UINT32 max_ndp_sessions;
  16095. /** Max number of peer's per ndi */
  16096. A_UINT32 max_peers_per_ndi;
  16097. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  16098. A_UINT32 nan_data_supported_bands;
  16099. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  16100. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  16101. /**
  16102. * NDP command response code
  16103. */
  16104. typedef enum {
  16105. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  16106. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  16107. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  16108. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  16109. /**
  16110. * Event response for wmi_ndp_initiator_req
  16111. */
  16112. typedef struct {
  16113. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  16114. A_UINT32 tlv_header;
  16115. /** Unique id identifying the VDEV */
  16116. A_UINT32 vdev_id;
  16117. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  16118. A_UINT32 transaction_id;
  16119. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16120. A_UINT32 rsp_status;
  16121. A_UINT32 reason_code;
  16122. /**
  16123. * Unique token Id generated on the initiator/responder
  16124. * side used for a NDP session between two NAN devices
  16125. */
  16126. A_UINT32 ndp_instance_id;
  16127. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  16128. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  16129. /**
  16130. * Event response for wmi_ndp_responder_req cmd
  16131. */
  16132. typedef struct {
  16133. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  16134. A_UINT32 tlv_header;
  16135. /** Unique id identifying the VDEV */
  16136. A_UINT32 vdev_id;
  16137. /** Copy of transaction_id received in wmi_ndp_responder_req */
  16138. A_UINT32 transaction_id;
  16139. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16140. A_UINT32 rsp_status;
  16141. A_UINT32 reason_code;
  16142. /**
  16143. * Unique token Id generated on the initiator/responder
  16144. * side used for a NDP session between two NAN devices
  16145. */
  16146. A_UINT32 ndp_instance_id;
  16147. /** NDI mac address of the peer */
  16148. wmi_mac_addr peer_ndi_mac_addr;
  16149. /** Host can create peer if this entry is TRUE */
  16150. A_UINT32 create_peer;
  16151. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  16152. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  16153. /**
  16154. * Active ndp instance id
  16155. */
  16156. typedef struct {
  16157. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  16158. A_UINT32 tlv_header;
  16159. /** NDP instance id */
  16160. A_UINT32 ndp_instance_id;
  16161. } wmi_active_ndp_instance_id_PROTOTYPE;
  16162. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  16163. /**
  16164. * NDP end response per ndi
  16165. */
  16166. typedef struct {
  16167. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  16168. A_UINT32 tlv_header;
  16169. /** Unique id identifying the VDEV */
  16170. A_UINT32 vdev_id;
  16171. /** Peer MAC addr */
  16172. wmi_mac_addr peer_mac_addr;
  16173. /** Number of active ndps on this ndi */
  16174. A_UINT32 num_active_ndps_on_ndi;
  16175. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  16176. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  16177. /**
  16178. * Event response for wmi_ndp_end_req cmd
  16179. */
  16180. typedef struct {
  16181. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  16182. A_UINT32 tlv_header;
  16183. /** Copy of transaction_id received in wmi_ndp_end_req */
  16184. A_UINT32 transaction_id;
  16185. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  16186. A_UINT32 rsp_status;
  16187. A_UINT32 reason_code;
  16188. /**
  16189. * TLV (tag length value) parameters follow the ndp_end_rsp
  16190. * structure. The TLV's are:
  16191. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  16192. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  16193. */
  16194. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  16195. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  16196. /** NAN DATA EVENTS */
  16197. /**
  16198. * NDP self role
  16199. */
  16200. typedef enum {
  16201. WMI_NDP_INITIATOR_ROLE,
  16202. WMI_NDP_RESPONDER_ROLE,
  16203. } wmi_ndp_self_role_PROTOTYPE;
  16204. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  16205. /**
  16206. * NDP accept policy
  16207. */
  16208. typedef enum {
  16209. WMI_NDP_ACCEPT_POLICY_NONE,
  16210. WMI_NDP_ACCEPT_POLICY_ALL,
  16211. } wmi_ndp_accept_policy_PROTOTYPE;
  16212. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  16213. /**
  16214. * Event indication received on the responder side when a NDP Initiator request/
  16215. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  16216. *
  16217. * Event indication received on the initiator side when a
  16218. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  16219. */
  16220. typedef struct {
  16221. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  16222. A_UINT32 tlv_header;
  16223. /** Unique id identifying the VDEV */
  16224. A_UINT32 vdev_id;
  16225. /** Self NDP Role defined in wmi_ndp_self_role */
  16226. A_UINT32 self_ndp_role;
  16227. /** Accept policy defined in wmi_ndp_accept_policy */
  16228. A_UINT32 accept_policy;
  16229. /** Unique Instance Id corresponding to a service/session. */
  16230. A_UINT32 service_instance_id;
  16231. /** Discovery MAC addr of the peer/initiator */
  16232. wmi_mac_addr peer_discovery_mac_addr;
  16233. /** NDI mac address of the peer */
  16234. wmi_mac_addr peer_ndi_mac_addr;
  16235. /**
  16236. * Unique token Id generated on the initiator/responder
  16237. * side used for a NDP session between two NAN devices
  16238. */
  16239. A_UINT32 ndp_instance_id;
  16240. /** Number of bytes in TLV wmi_ndp_cfg */
  16241. A_UINT32 ndp_cfg_len;
  16242. /** Number of bytes in TLV wmi_ndp_app_info */
  16243. A_UINT32 ndp_app_info_len;
  16244. /** Peer NAN Cipher Suite Shared Key */
  16245. A_UINT32 nan_csid;
  16246. /** Actual number of bytes in TLV nan_scid */
  16247. A_UINT32 nan_scid_len;
  16248. /** Self NDI mac address */
  16249. wmi_mac_addr self_ndi_mac_addr;
  16250. /**
  16251. * TLV (tag length value) parameters follow the ndp_indication
  16252. * structure. The TLV's are:
  16253. * A_UINT8 ndp_cfg[];
  16254. * A_UINT8 ndp_app_info[];
  16255. * A_UINT8 nan_scid[];
  16256. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16257. */
  16258. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  16259. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  16260. /**
  16261. * Event indication of data confirm is received on both
  16262. * initiator and responder side confirming a NDP session
  16263. */
  16264. typedef struct {
  16265. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  16266. A_UINT32 tlv_header;
  16267. /** Unique id identifying the VDEV */
  16268. A_UINT32 vdev_id;
  16269. /**
  16270. * Unique token Id generated on the initiator/responder
  16271. * side used for a NDP session between two NAN devices
  16272. */
  16273. A_UINT32 ndp_instance_id;
  16274. /** NDI mac address of the peer (required to derive target ipv6 address) */
  16275. wmi_mac_addr peer_ndi_mac_addr;
  16276. /** Response Code defined in wmi_ndp_rsp_code */
  16277. A_UINT32 rsp_code;
  16278. /** Number of bytes in TLV wmi_ndp_cfg */
  16279. A_UINT32 ndp_cfg_len;
  16280. /** Number of bytes in TLV wmi_ndp_app_info */
  16281. A_UINT32 ndp_app_info_len;
  16282. /** Reason Code */
  16283. A_UINT32 reason_code;
  16284. /** Number of active ndps on this peer */
  16285. A_UINT32 num_active_ndps_on_peer;
  16286. /** Number of channels on this peer */
  16287. A_UINT32 num_ndp_channels;
  16288. /**
  16289. * TLV (tag length value) parameters follow the ndp_confirm
  16290. * structure. The TLV's are:
  16291. * A_UINT8 ndp_cfg[];
  16292. * A_UINT8 ndp_app_info[];
  16293. * wmi_channel ndp_channel_list[];
  16294. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  16295. * // since Nss is associated with the channel
  16296. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  16297. */
  16298. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  16299. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  16300. /**
  16301. * Event indication received on the initiator/responder side terminating a NDP session
  16302. */
  16303. typedef struct {
  16304. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  16305. A_UINT32 tlv_header;
  16306. /** type defined in wmi_ndp_end_type */
  16307. A_UINT32 type;
  16308. /** Unique id identifying the VDEV */
  16309. A_UINT32 vdev_id;
  16310. /** reason_code defined in wmi_ndp_end_reason_code */
  16311. A_UINT32 reason_code;
  16312. /** NDP instance id */
  16313. A_UINT32 ndp_instance_id;
  16314. /** NDI MAC addr of the peer */
  16315. wmi_mac_addr peer_ndi_mac_addr;
  16316. /** Number of active ndps on this peer */
  16317. A_UINT32 num_active_ndps_on_peer;
  16318. } wmi_ndp_end_indication_PROTOTYPE;
  16319. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  16320. typedef struct
  16321. {
  16322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  16323. /** Unique id identifying the VDEV */
  16324. A_UINT32 vdev_id;
  16325. /** peer MAC address */
  16326. wmi_mac_addr peer_macaddr;
  16327. /** Flags:
  16328. * Bit 0 -> Nss updated
  16329. * Bit 1 -> channel list updated
  16330. * Bits 2-31 -> Reserved
  16331. */
  16332. A_UINT32 flags;
  16333. /** num of channels */
  16334. A_UINT32 num_channels;
  16335. /** num of ndp instances */
  16336. A_UINT32 num_ndp_instances;
  16337. /**
  16338. * TLV (tag length value) parameters follow the ndl_schedule_update
  16339. * structure. The TLV's are:
  16340. * A_UINT32 ndp_instance_list[];
  16341. * wmi_channel ndl_channel_list[];
  16342. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  16343. * // since Nss is associate with a channel
  16344. */
  16345. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  16346. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  16347. typedef struct {
  16348. A_UINT32 tlv_header;
  16349. A_UINT32 num_data;
  16350. /* followed by WMITLV_TAG_ARRAY_BYTE */
  16351. } wmi_diag_data_container_event_fixed_param;
  16352. enum {
  16353. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  16354. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  16355. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  16356. };
  16357. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  16358. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  16359. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  16360. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  16361. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  16362. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  16363. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  16364. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  16365. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  16366. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  16367. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  16368. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  16369. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  16370. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  16371. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  16372. do { \
  16373. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  16374. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  16375. while (0)
  16376. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  16377. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  16378. /**
  16379. * This command is sent from WLAN host driver to firmware to
  16380. * notify the current modem power state. Host would receive a
  16381. * message from modem when modem is powered on. Host driver
  16382. * would then send this command to firmware. Firmware would then
  16383. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  16384. *
  16385. * This command is only applicable for APQ platform which has
  16386. * modem on the platform. If firmware doesn't support MWS Coex,
  16387. * this command can be dropped by firmware.
  16388. *
  16389. * This is a requirement from modem team that WCN can't toggle
  16390. * UART before modem is powered on.
  16391. */
  16392. typedef struct {
  16393. /** TLV tag and len; tag equals
  16394. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  16395. A_UINT32 tlv_header;
  16396. /** Modem power state parameter */
  16397. A_UINT32 modem_power_state;
  16398. } wmi_modem_power_state_cmd_param;
  16399. enum {
  16400. WMI_MODEM_STATE_OFF = 0,
  16401. WMI_MODEM_STATE_ON
  16402. };
  16403. /**
  16404. * This command is sent from WLAN host driver to firmware to
  16405. * notify the updated Specific Absorption Rate (SAR) limits.
  16406. * A critical regulation for FCC compliance, OEMs require methods to set
  16407. * limits on TX power of WLAN/WWAN.
  16408. * Host would receive instructions on what to set the limits per
  16409. * band/chain/modulation to, it would then interpret and send the limits
  16410. * to FW using this WMI message.
  16411. * Since it is possible to have too many commands to fit into one message,
  16412. * FW will keep receiving the messages, until it finds one with
  16413. * commit_limits = 1, at which point it will apply all the received
  16414. * specifications.
  16415. */
  16416. typedef struct {
  16417. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  16418. A_UINT32 tlv_header;
  16419. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  16420. * with BDF (SET_0 to 4) or WMI
  16421. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  16422. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  16423. */
  16424. A_UINT32 sar_enable;
  16425. /** number of items in sar_limits[] */
  16426. A_UINT32 num_limit_rows;
  16427. /** once received and is set to 1, FW will calculate the power limits
  16428. * and send set_power command to apply them.
  16429. * Otherwise just update local values stored in FW until a future msg
  16430. * with commit_limits=1 arrives.
  16431. */
  16432. A_UINT32 commit_limits;
  16433. /**
  16434. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  16435. * structure. The TLV's are:
  16436. * wmi_sar_limit_cmd_row sar_limits[];
  16437. */
  16438. } wmi_sar_limits_cmd_fixed_param;
  16439. enum wmi_sar_feature_state_flags {
  16440. WMI_SAR_FEATURE_OFF = 0,
  16441. WMI_SAR_FEATURE_ON_SET_0,
  16442. WMI_SAR_FEATURE_ON_SET_1,
  16443. WMI_SAR_FEATURE_ON_SET_2,
  16444. WMI_SAR_FEATURE_ON_SET_3,
  16445. WMI_SAR_FEATURE_ON_SET_4,
  16446. WMI_SAR_FEATURE_NO_CHANGE,
  16447. WMI_SAR_FEATURE_ON_USER_DEFINED,
  16448. WMI_SAR_FEATURE_ON_SAR_V2_0,
  16449. WMI_SAR_FEATURE_ON_SAR_V3,
  16450. };
  16451. typedef struct {
  16452. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  16453. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  16454. * new band_id values .
  16455. */
  16456. A_UINT32 band_id;
  16457. A_UINT32 chain_id;
  16458. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  16459. A_UINT32 mod_id;
  16460. /**
  16461. * To be backwards-compatible with older code use a union with
  16462. * limit_value & limit_index as alternate names / interpretations
  16463. * of the same message information element.
  16464. * The older code still uses limit_value, while the new code will
  16465. * use limit_index.
  16466. * The interpretation of the field as value or index depends on
  16467. * WMI_SAR_FEATURE_ON_*
  16468. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  16469. * still use it as value.
  16470. */
  16471. union {
  16472. /** actual power limit value, in steps of 0.5 dBm */
  16473. A_UINT32 limit_value;
  16474. A_UINT32 limit_index;
  16475. };
  16476. /** in case the OEM doesn't care about one of the qualifiers from above,
  16477. * the bit for that qualifier within the validity_bitmap can be set to 0
  16478. * so that limit is applied to all possible cases of this qualifier
  16479. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  16480. * treated as a wildcard).
  16481. * Current masks:
  16482. * WMI_SAR_BAND_ID_VALID_MASK
  16483. * WMI_SAR_CHAIN_ID_VALID_MASK
  16484. * WMI_SAR_MOD_ID_VALID_MASK
  16485. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  16486. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  16487. * WMI_SAR_MOD_OFDM cases.
  16488. */
  16489. A_UINT32 validity_bitmap;
  16490. } wmi_sar_limit_cmd_row;
  16491. enum wmi_sar_band_id_flags {
  16492. WMI_SAR_2G_ID = 0,
  16493. WMI_SAR_5G_ID
  16494. };
  16495. enum wmi_sar_mod_id_flags {
  16496. WMI_SAR_MOD_CCK = 0,
  16497. WMI_SAR_MOD_OFDM
  16498. };
  16499. /**
  16500. * This message is sent from FW to WLAN host to inform the host of the
  16501. * updated Specific Absorption Rate (SAR) limits currently in use.
  16502. */
  16503. typedef struct {
  16504. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  16505. A_UINT32 tlv_header;
  16506. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  16507. * with BDF (SET_0 to 4) or WMI
  16508. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  16509. */
  16510. A_UINT32 sar_enable;
  16511. /**
  16512. * number of items in sar_limits[].
  16513. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  16514. * Should be zero if any of the BDF sets is activated.
  16515. */
  16516. A_UINT32 num_limit_rows;
  16517. /**
  16518. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  16519. * structure. The TLV's are:
  16520. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  16521. */
  16522. } wmi_sar_get_limits_event_fixed_param;
  16523. typedef struct {
  16524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  16525. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  16526. * new band_id values .
  16527. */
  16528. A_UINT32 band_id;
  16529. A_UINT32 chain_id;
  16530. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  16531. A_UINT32 mod_id;
  16532. /** actual power limit value, in steps of 0.5 dBm */
  16533. A_UINT32 limit_value;
  16534. } wmi_sar_get_limit_event_row;
  16535. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  16536. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  16537. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  16538. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  16539. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  16540. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  16541. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  16542. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  16543. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  16544. /**
  16545. * This command is sent from WLAN host driver to firmware to
  16546. * get current Specific Absorption Rate (SAR) limits status from firmware.
  16547. * The command does not require any parameters as of now.
  16548. */
  16549. typedef struct {
  16550. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  16551. A_UINT32 tlv_header;
  16552. /** currently no parameters are required. Reserved bit field for future use added */
  16553. /* All bits need to be set to 0 while it is a reserved field. */
  16554. A_UINT32 reserved;
  16555. } wmi_sar_get_limits_cmd_fixed_param;
  16556. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  16557. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  16558. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  16559. generated whenever firmware roamed to new AP silently and
  16560. (a) If the host is awake, FW sends the event to the host immediately .
  16561. (b) If host is in sleep then either
  16562. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  16563. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  16564. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  16565. */
  16566. #define GTK_OFFLOAD_KCK_EXTENDED_BYTES 32
  16567. typedef struct {
  16568. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  16569. A_UINT32 tlv_header;
  16570. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  16571. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  16572. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  16573. } wmi_key_material;
  16574. typedef struct {
  16575. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */
  16576. A_UINT32 tlv_header;
  16577. /*
  16578. * key_buffer contains kck,kck2,kek,kek2,replay counter, in order
  16579. * The split between kck vs. kek should be known to host based on akmp.
  16580. */
  16581. A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES];
  16582. } wmi_key_material_ext;
  16583. typedef struct {
  16584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  16585. /** Unique id identifying the VDEV on which roaming is done by firmware */
  16586. A_UINT32 vdev_id;
  16587. /** auth_status: connected or authorized */
  16588. A_UINT32 auth_status;
  16589. /** roam_reason:
  16590. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  16591. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  16592. * bit 6 for HW mode status, set 1 to indicate host to schedule
  16593. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  16594. */
  16595. A_UINT32 roam_reason;
  16596. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  16597. A_UINT32 rssi;
  16598. /** MAC address of roamed AP */
  16599. wmi_mac_addr bssid; /* BSSID */
  16600. /** whether the frame is beacon or probe rsp */
  16601. A_UINT32 is_beacon;
  16602. /** the length of beacon/probe rsp */
  16603. A_UINT32 bcn_probe_rsp_len;
  16604. /** the length of reassoc rsp */
  16605. A_UINT32 reassoc_rsp_len;
  16606. /** the length of reassoc req */
  16607. A_UINT32 reassoc_req_len;
  16608. /**
  16609. * TLV (tag length value) parameters follows roam_synch_event
  16610. * The TLV's are:
  16611. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  16612. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  16613. * wmi_channel chan;
  16614. * wmi_key_material key;
  16615. * A_UINT32 status; subnet changed status not being used currently.
  16616. * will pass the information using roam_status.
  16617. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  16618. * wmi_key_material_ext key_ext
  16619. **/
  16620. } wmi_roam_synch_event_fixed_param;
  16621. /**
  16622. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  16623. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  16624. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  16625. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  16626. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  16627. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  16628. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  16629. * reassoc_rsp_len set to 0.
  16630. */
  16631. typedef struct {
  16632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  16633. /** Unique id identifying the VDEV on which roaming is done by firmware */
  16634. A_UINT32 vdev_id;
  16635. /** More frags to follow? */
  16636. A_UINT32 more_frag;
  16637. /** whether the frame is beacon or probe rsp */
  16638. A_UINT32 is_beacon;
  16639. /** the length of beacon/probe rsp */
  16640. A_UINT32 bcn_probe_rsp_len;
  16641. /** the length of reassoc rsp */
  16642. A_UINT32 reassoc_rsp_len;
  16643. /** the length of reassoc req */
  16644. A_UINT32 reassoc_req_len;
  16645. /**
  16646. * TLV (tag length value) parameters follows roam_synch_event
  16647. * The TLV's are:
  16648. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  16649. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  16650. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  16651. */
  16652. } wmi_roam_synch_frame_event_fixed_param;
  16653. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  16654. typedef struct {
  16655. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  16656. A_UINT32 tlv_header;
  16657. /** MAC address of the peer for which the estimated link speed is required. */
  16658. wmi_mac_addr peer_macaddr;
  16659. /* Set to 1 only if vdev_id field is valid */
  16660. A_UINT32 valid_vdev_id;
  16661. /* VDEV to which the peer belongs to */
  16662. A_UINT32 vdev_id;
  16663. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  16664. typedef struct {
  16665. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  16666. A_UINT32 tlv_header;
  16667. /** MAC address of the peer for which the estimated link speed is required.
  16668. */
  16669. wmi_mac_addr peer_macaddr;
  16670. /* Estimated link speed in kbps.
  16671. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  16672. */
  16673. A_UINT32 est_linkspeed_kbps;
  16674. /* Set to 1 only if vdev_id field is valid */
  16675. A_UINT32 valid_vdev_id;
  16676. /* VDEV to which the peer belongs to */
  16677. A_UINT32 vdev_id;
  16678. } wmi_peer_estimated_linkspeed_event_fixed_param;
  16679. typedef struct {
  16680. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  16681. /* vdev ID */
  16682. A_UINT32 vdev_id;
  16683. A_UINT32 data_len; /** length in byte of data[]. */
  16684. /* This structure is used to send REQ binary blobs
  16685. * from application/service to firmware where Host drv is pass through .
  16686. * Following this structure is the TLV:
  16687. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16688. */
  16689. } wmi_req_stats_ext_cmd_fixed_param;
  16690. typedef struct {
  16691. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  16692. A_UINT32 vdev_id; /** vdev ID */
  16693. A_UINT32 data_len; /** length in byte of data[]. */
  16694. /* This structure is used to send REQ binary blobs
  16695. * from firmware to application/service where Host drv is pass through .
  16696. * Following this structure is the TLV:
  16697. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16698. */
  16699. } wmi_stats_ext_event_fixed_param;
  16700. typedef struct {
  16701. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  16702. /** unique id identifying the VDEV, generated by the caller */
  16703. A_UINT32 vdev_id;
  16704. /** peer MAC address */
  16705. wmi_mac_addr peer_macaddr;
  16706. } wmi_peer_delete_resp_event_fixed_param;
  16707. typedef struct {
  16708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */
  16709. /** unique id identifying the VDEV, generated by the caller */
  16710. A_UINT32 vdev_id;
  16711. /* Status of peer delete all command */
  16712. /*
  16713. * Values for Status:
  16714. * 0 - OK; command successful
  16715. * 1 - EINVAL; Requested invalid vdev_id
  16716. * 2 - EFAILED; Delete all peer failed
  16717. */
  16718. A_UINT32 status;
  16719. } wmi_vdev_delete_all_peer_resp_event_fixed_param;
  16720. typedef struct {
  16721. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  16722. A_UINT32 tlv_header;
  16723. A_UINT32 vdev_id; /* vdev ID */
  16724. /* MAC address of the peer for which the estimated link speed is required.*/
  16725. wmi_mac_addr peer_macaddr;
  16726. A_UINT32 state; /* peer state */
  16727. } wmi_peer_state_event_fixed_param;
  16728. typedef struct {
  16729. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  16730. A_UINT32 tlv_header;
  16731. /* unique id identifying the VDEV, generated by the caller */
  16732. A_UINT32 vdev_id;
  16733. /* peer MAC address */
  16734. wmi_mac_addr peer_macaddr;
  16735. } wmi_peer_assoc_conf_event_fixed_param;
  16736. enum {
  16737. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  16738. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  16739. };
  16740. typedef struct {
  16741. /**
  16742. * TLV tag and len;
  16743. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  16744. */
  16745. A_UINT32 tlv_header;
  16746. A_UINT32 vdev_id;
  16747. /**
  16748. * active or passive. if active all the channels are actively scanned.
  16749. * if passive then all the channels are passively scanned
  16750. */
  16751. A_UINT32 scan_type;
  16752. /**
  16753. * FW can perform multiple scans with in a OBSS scan interval.
  16754. * For each scan,
  16755. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  16756. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  16757. * The unit for these 2 parameters is TUs.
  16758. */
  16759. A_UINT32 obss_scan_passive_dwell;
  16760. A_UINT32 obss_scan_active_dwell;
  16761. /**
  16762. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  16763. * both min and total per channel dwell time requirement
  16764. */
  16765. A_UINT32 bss_channel_width_trigger_scan_interval;
  16766. /**
  16767. * FW can perform multiple scans with in a OBSS scan interval.
  16768. * For each scan,
  16769. * the total per channel dwell time across all scans with in OBSS scan interval should be
  16770. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  16771. * for active scans and ,
  16772. * The unit for these 2 parameters is TUs.
  16773. */
  16774. A_UINT32 obss_scan_passive_total_per_channel;
  16775. A_UINT32 obss_scan_active_total_per_channel;
  16776. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  16777. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  16778. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  16779. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  16780. A_UINT32 current_operating_class; /** STA current operating class */
  16781. /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */
  16782. A_UINT32 channel_len;
  16783. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  16784. A_UINT32 ie_len;
  16785. /**
  16786. * TLV (tag length value) parameters following the fixed param structure
  16787. * A_UINT8 channels[channel_len]; // channel numbers
  16788. * A_UINT8 ie_field[ie_len];
  16789. * A_UINT32 chan_freqs[channel_len] // in MHz
  16790. */
  16791. } wmi_obss_scan_enable_cmd_fixed_param;
  16792. typedef struct {
  16793. /**
  16794. * TLV tag and len;
  16795. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  16796. */
  16797. A_UINT32 tlv_header;
  16798. A_UINT32 vdev_id;
  16799. } wmi_obss_scan_disable_cmd_fixed_param;
  16800. typedef struct {
  16801. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  16802. A_UINT32 tlv_header;
  16803. /** unique id identifying the VDEV */
  16804. A_UINT32 vdev_id;
  16805. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  16806. A_UINT32 tx_status;
  16807. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  16808. typedef enum {
  16809. WMI_FRAME_TX_OK, /* frame tx ok */
  16810. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  16811. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  16812. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  16813. } WMI_FRAME_TX_STATUS;
  16814. /**
  16815. * This command is sent from WLAN host driver to firmware to
  16816. * request firmware to send the latest channel avoidance range
  16817. * to host.
  16818. *
  16819. * This command is only applicable for APQ platform which has
  16820. * modem on the platform. If firmware doesn't support MWS Coex,
  16821. * this command can be dropped by firmware.
  16822. *
  16823. * Host would send this command to firmware to request a channel
  16824. * avoidance information update.
  16825. */
  16826. typedef struct {
  16827. /** TLV tag and len; tag equals
  16828. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  16829. A_UINT32 tlv_header;
  16830. } wmi_chan_avoid_update_cmd_param;
  16831. /* ExtScan operation mode */
  16832. typedef enum {
  16833. WMI_EXTSCAN_MODE_NONE = 0x0000,
  16834. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  16835. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  16836. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  16837. } wmi_extscan_operation_mode;
  16838. /* Channel Mask */
  16839. typedef enum {
  16840. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  16841. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  16842. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  16843. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  16844. } wmi_channel_band_mask;
  16845. typedef enum {
  16846. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  16847. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  16848. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  16849. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  16850. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  16851. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  16852. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  16853. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  16854. WMI_EXTSCAN_EVENT_MAX = 0x8000
  16855. } wmi_extscan_event_type;
  16856. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  16857. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  16858. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  16859. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  16860. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  16861. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  16862. typedef enum {
  16863. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  16864. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  16865. } wmi_extscan_forwarding_flags;
  16866. typedef enum {
  16867. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  16868. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  16869. } wmi_extscan_configuration_flags;
  16870. typedef enum {
  16871. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  16872. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  16873. } wmi_extscan_bucket_configuration_flags;
  16874. typedef enum {
  16875. WMI_EXTSCAN_STATUS_OK = 0,
  16876. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  16877. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  16878. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  16879. } wmi_extscan_start_stop_status;
  16880. typedef struct {
  16881. /** Request ID - to identify command. Cannot be 0 */
  16882. A_UINT32 request_id;
  16883. /** Requestor ID - client requesting ExtScan */
  16884. A_UINT32 requestor_id;
  16885. /** VDEV id(interface) that is requesting scan */
  16886. A_UINT32 vdev_id;
  16887. } wmi_extscan_command_id;
  16888. typedef struct {
  16889. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16890. /** channel in MHz */
  16891. A_UINT32 channel;
  16892. /** dwell time in msec - use defaults if 0 */
  16893. A_UINT32 min_dwell_time;
  16894. A_UINT32 max_dwell_time;
  16895. /** passive/active channel and other flags */
  16896. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  16897. } wmi_extscan_bucket_channel;
  16898. /* Scan Bucket specification */
  16899. typedef struct {
  16900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16901. /** Bucket ID - 0-based */
  16902. A_UINT32 bucket_id;
  16903. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  16904. A_UINT32 notify_extscan_events;
  16905. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  16906. A_UINT32 forwarding_flags;
  16907. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  16908. A_UINT32 configuration_flags;
  16909. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  16910. A_UINT32 base_period_multiplier;
  16911. /** dwell time in msec on active channels - use defaults if 0 */
  16912. A_UINT32 min_dwell_time_active;
  16913. A_UINT32 max_dwell_time_active;
  16914. /** dwell time in msec on passive channels - use defaults if 0 */
  16915. A_UINT32 min_dwell_time_passive;
  16916. A_UINT32 max_dwell_time_passive;
  16917. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  16918. A_UINT32 channel_band;
  16919. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  16920. A_UINT32 num_channels;
  16921. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  16922. A_UINT32 min_period;
  16923. /** period above which exponent is not applied anymore */
  16924. A_UINT32 max_period;
  16925. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  16926. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  16927. */
  16928. A_UINT32 exp_backoff;
  16929. /** number of scans performed at a given periodicity after which exponential back off value is
  16930. * applied to current periodicity to obtain a newer one
  16931. */
  16932. A_UINT32 exp_max_step_count;
  16933. /** Followed by the variable length TLV chan_list:
  16934. * wmi_extscan_bucket_channel chan_list[] */
  16935. } wmi_extscan_bucket;
  16936. typedef struct {
  16937. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  16938. /** Request ID - to identify command. Cannot be 0 */
  16939. A_UINT32 request_id;
  16940. /** Requestor ID - client requesting ExtScan */
  16941. A_UINT32 requestor_id;
  16942. /** VDEV id(interface) that is requesting scan */
  16943. A_UINT32 vdev_id;
  16944. /** table ID - to allow support for multiple simultaneous requests */
  16945. A_UINT32 table_id;
  16946. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  16947. A_UINT32 base_period;
  16948. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  16949. A_UINT32 max_iterations;
  16950. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  16951. A_UINT32 forwarding_flags;
  16952. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  16953. A_UINT32 configuration_flags;
  16954. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  16955. A_UINT32 notify_extscan_events;
  16956. /** Scan Priority, input to scan scheduler */
  16957. A_UINT32 scan_priority;
  16958. /** Maximum number of BSSIDs to cache on each scan cycle */
  16959. A_UINT32 max_bssids_per_scan_cycle;
  16960. /** Minimum RSSI value to report */
  16961. A_UINT32 min_rssi;
  16962. /** Maximum table usage in percentage */
  16963. A_UINT32 max_table_usage;
  16964. /** default dwell time in msec on active channels */
  16965. A_UINT32 min_dwell_time_active;
  16966. A_UINT32 max_dwell_time_active;
  16967. /** default dwell time in msec on passive channels */
  16968. A_UINT32 min_dwell_time_passive;
  16969. A_UINT32 max_dwell_time_passive;
  16970. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  16971. A_UINT32 min_rest_time;
  16972. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  16973. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  16974. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  16975. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  16976. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  16977. * irrespective of activity. activity is determined by the idle_time parameter.
  16978. */
  16979. A_UINT32 max_rest_time;
  16980. /** time before sending next set of probe requests.
  16981. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  16982. * The number of probe requests specified depends on the ssid_list and bssid_list
  16983. */
  16984. /** Max number of probes to be sent */
  16985. A_UINT32 n_probes;
  16986. /** time in msec between 2 sets of probe requests. */
  16987. A_UINT32 repeat_probe_time;
  16988. /** time in msec between 2 consequetive probe requests with in a set. */
  16989. A_UINT32 probe_spacing_time;
  16990. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  16991. A_UINT32 idle_time;
  16992. /** maximum time in msec allowed for scan */
  16993. A_UINT32 max_scan_time;
  16994. /** delay in msec before sending first probe request after switching to a channel */
  16995. A_UINT32 probe_delay;
  16996. /** Scan control flags */
  16997. A_UINT32 scan_ctrl_flags;
  16998. /** Burst duration time in msec*/
  16999. A_UINT32 burst_duration;
  17000. /** number of bssids in the TLV bssid_list[] */
  17001. A_UINT32 num_bssid;
  17002. /** number of ssid in the TLV ssid_list[] */
  17003. A_UINT32 num_ssids;
  17004. /** number of bytes in TLV ie_data[] */
  17005. A_UINT32 ie_len;
  17006. /** number of buckets in the TLV bucket_list[] */
  17007. A_UINT32 num_buckets;
  17008. /** in number of scans, send notifications to host after these many scans */
  17009. A_UINT32 report_threshold_num_scans;
  17010. /** number of channels in channel_list[] determined by the
  17011. sum of wmi_extscan_bucket.num_channels in array */
  17012. /**
  17013. * TLV (tag length value) parameters follow the extscan_cmd
  17014. * structure. The TLV's are:
  17015. * wmi_ssid ssid_list[];
  17016. * wmi_mac_addr bssid_list[];
  17017. * A_UINT8 ie_data[];
  17018. * wmi_extscan_bucket bucket_list[];
  17019. * wmi_extscan_bucket_channel channel_list[];
  17020. */
  17021. } wmi_extscan_start_cmd_fixed_param;
  17022. typedef struct {
  17023. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  17024. /** Request ID - to match running command. 0 matches any request */
  17025. A_UINT32 request_id;
  17026. /** Requestor ID - client requesting stop */
  17027. A_UINT32 requestor_id;
  17028. /** VDEV id(interface) that is requesting scan */
  17029. A_UINT32 vdev_id;
  17030. /** table ID - to allow support for multiple simultaneous requests */
  17031. A_UINT32 table_id;
  17032. } wmi_extscan_stop_cmd_fixed_param;
  17033. enum wmi_extscan_get_cached_results_flags {
  17034. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  17035. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  17036. };
  17037. typedef struct {
  17038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  17039. /** request ID - used to correlate command with events */
  17040. A_UINT32 request_id;
  17041. /** Requestor ID - client that requested results */
  17042. A_UINT32 requestor_id;
  17043. /** VDEV id(interface) that is requesting scan */
  17044. A_UINT32 vdev_id;
  17045. /** table ID - to allow support for multiple simultaneous requests */
  17046. A_UINT32 table_id;
  17047. /** maximum number of results to be returned */
  17048. A_UINT32 max_results;
  17049. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  17050. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  17051. } wmi_extscan_get_cached_results_cmd_fixed_param;
  17052. typedef struct {
  17053. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  17054. /** request ID - used to correlate command with events */
  17055. A_UINT32 request_id;
  17056. /** Requestor ID - client that requested results */
  17057. A_UINT32 requestor_id;
  17058. /** VDEV id(interface) that is requesting scan */
  17059. A_UINT32 vdev_id;
  17060. /** table ID - to allow support for multiple simultaneous requests */
  17061. A_UINT32 table_id;
  17062. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  17063. typedef struct {
  17064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17065. /** bssid */
  17066. wmi_mac_addr bssid;
  17067. /** channel in MHz */
  17068. A_UINT32 channel;
  17069. /** upper RSSI limit */
  17070. A_UINT32 upper_rssi_limit;
  17071. /** lower RSSI limit */
  17072. A_UINT32 lower_rssi_limit;
  17073. } wmi_extscan_wlan_change_bssid_param;
  17074. typedef struct {
  17075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  17076. /** Request ID - to identify command. Cannot be 0 */
  17077. A_UINT32 request_id;
  17078. /** Requestor ID - client requesting wlan change monitoring */
  17079. A_UINT32 requestor_id;
  17080. /** VDEV id(interface) that is requesting scan */
  17081. A_UINT32 vdev_id;
  17082. /** table ID - to allow support for multiple simultaneous tables */
  17083. A_UINT32 table_id;
  17084. /** operation mode: start/stop */
  17085. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17086. /** number of rssi samples to store */
  17087. A_UINT32 max_rssi_samples;
  17088. /** number of samples to use to calculate RSSI average */
  17089. A_UINT32 rssi_averaging_samples;
  17090. /** number of scans to confirm loss of contact with RSSI */
  17091. A_UINT32 lost_ap_scan_count;
  17092. /** number of out-of-range BSSIDs necessary to send event */
  17093. A_UINT32 max_out_of_range_count;
  17094. /** total number of bssid signal descriptors (in all pages) */
  17095. A_UINT32 total_entries;
  17096. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  17097. A_UINT32 first_entry_index;
  17098. /** number of bssid signal descriptors in this page */
  17099. A_UINT32 num_entries_in_page;
  17100. /* Following this structure is the TLV:
  17101. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  17102. * (number of elements given by field num_page_entries)
  17103. */
  17104. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  17105. typedef struct {
  17106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17107. /** bssid */
  17108. wmi_mac_addr bssid;
  17109. /** RSSI min threshold for reporting */
  17110. A_UINT32 min_rssi;
  17111. /** Deprecated entry - channel in MHz */
  17112. A_UINT32 channel;
  17113. /** RSSI max threshold for reporting */
  17114. A_UINT32 max_rssi;
  17115. } wmi_extscan_hotlist_entry;
  17116. typedef struct {
  17117. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  17118. /** Request ID - to identify command. Cannot be 0 */
  17119. A_UINT32 request_id;
  17120. /** Requestor ID - client requesting hotlist monitoring */
  17121. A_UINT32 requestor_id;
  17122. /** VDEV id(interface) that is requesting scan */
  17123. A_UINT32 vdev_id;
  17124. /** table ID - to allow support for multiple simultaneous tables */
  17125. A_UINT32 table_id;
  17126. /** operation mode: start/stop */
  17127. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17128. /** total number of bssids (in all pages) */
  17129. A_UINT32 total_entries;
  17130. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  17131. A_UINT32 first_entry_index;
  17132. /** number of bssids in this page */
  17133. A_UINT32 num_entries_in_page;
  17134. /** number of consecutive scans to confirm loss of contact with AP */
  17135. A_UINT32 lost_ap_scan_count;
  17136. /* Following this structure is the TLV:
  17137. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  17138. */
  17139. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  17140. typedef struct {
  17141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17142. /**ssid */
  17143. wmi_ssid ssid;
  17144. /**band */
  17145. A_UINT32 band;
  17146. /**RSSI threshold for reporting */
  17147. A_UINT32 min_rssi;
  17148. A_UINT32 max_rssi;
  17149. } wmi_extscan_hotlist_ssid_entry;
  17150. typedef struct {
  17151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  17152. /** Request ID - to identify command. Cannot be 0 */
  17153. A_UINT32 request_id;
  17154. /** Requestor ID - client requesting hotlist ssid monitoring */
  17155. A_UINT32 requestor_id;
  17156. /** VDEV id(interface) that is requesting scan */
  17157. A_UINT32 vdev_id;
  17158. /** table ID - to allow support for multiple simultaneous tables */
  17159. A_UINT32 table_id;
  17160. /** operation mode: start/stop */
  17161. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17162. /**total number of ssids (in all pages) */
  17163. A_UINT32 total_entries;
  17164. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  17165. A_UINT32 first_entry_index;
  17166. /**number of ssids in this page */
  17167. A_UINT32 num_entries_in_page;
  17168. /** number of consecutive scans to confirm loss of an ssid **/
  17169. A_UINT32 lost_ap_scan_count;
  17170. /* Following this structure is the TLV:
  17171. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  17172. */
  17173. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  17174. typedef struct {
  17175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17176. /** table ID - to allow support for multiple simultaneous tables */
  17177. A_UINT32 table_id;
  17178. /** size in bytes of scan cache entry */
  17179. A_UINT32 scan_cache_entry_size;
  17180. /** maximum number of scan cache entries */
  17181. A_UINT32 max_scan_cache_entries;
  17182. /** maximum number of buckets per extscan request */
  17183. A_UINT32 max_buckets;
  17184. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  17185. A_UINT32 max_bssid_per_scan;
  17186. /** table usage level at which indication must be sent to host */
  17187. A_UINT32 max_table_usage_threshold;
  17188. } wmi_extscan_cache_capabilities;
  17189. typedef struct {
  17190. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17191. /** table ID - to allow support for multiple simultaneous tables */
  17192. A_UINT32 table_id;
  17193. /** size in bytes of wlan change entry */
  17194. A_UINT32 wlan_change_entry_size;
  17195. /** maximum number of entries in wlan change table */
  17196. A_UINT32 max_wlan_change_entries;
  17197. /** number of RSSI samples used for averaging RSSI */
  17198. A_UINT32 max_rssi_averaging_samples;
  17199. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  17200. A_UINT32 max_rssi_history_entries;
  17201. } wmi_extscan_wlan_change_monitor_capabilities;
  17202. typedef struct {
  17203. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17204. /** table ID - to allow support for multiple simultaneous tables */
  17205. A_UINT32 table_id;
  17206. /** size in bytes of hotlist entry */
  17207. A_UINT32 wlan_hotlist_entry_size;
  17208. /** maximum number of entries in wlan change table */
  17209. A_UINT32 max_hotlist_entries;
  17210. } wmi_extscan_hotlist_monitor_capabilities;
  17211. typedef struct {
  17212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  17213. /** Request ID - matches request ID used to start hot list monitoring */
  17214. A_UINT32 request_id;
  17215. /** Requestor ID - client requesting stop */
  17216. A_UINT32 requestor_id;
  17217. /** number of extscan caches */
  17218. A_UINT32 num_extscan_cache_tables;
  17219. /** number of wlan change lists */
  17220. A_UINT32 num_wlan_change_monitor_tables;
  17221. /** number of hotlists */
  17222. A_UINT32 num_hotlist_monitor_tables;
  17223. /** if one sided rtt data collection is supported */
  17224. A_UINT32 rtt_one_sided_supported;
  17225. /** if 11v data collection is supported */
  17226. A_UINT32 rtt_11v_supported;
  17227. /** if 11mc data collection is supported */
  17228. A_UINT32 rtt_ftm_supported;
  17229. /** number of extscan cache capabilities (one per table) */
  17230. A_UINT32 num_extscan_cache_capabilities;
  17231. /** number of wlan change capabilities (one per table) */
  17232. A_UINT32 num_extscan_wlan_change_capabilities;
  17233. /** number of extscan hotlist capabilities (one per table) */
  17234. A_UINT32 num_extscan_hotlist_capabilities;
  17235. /* Following this structure is the TLV:
  17236. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  17237. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  17238. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  17239. */
  17240. } wmi_extscan_set_capabilities_cmd_fixed_param;
  17241. typedef struct {
  17242. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  17243. /** Request ID - matches request ID used to start hot list monitoring */
  17244. A_UINT32 request_id;
  17245. /** Requestor ID - client requesting capabilities */
  17246. A_UINT32 requestor_id;
  17247. } wmi_extscan_get_capabilities_cmd_fixed_param;
  17248. typedef struct {
  17249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  17250. /** Request ID of the operation that was started/stopped */
  17251. A_UINT32 request_id;
  17252. /** Requestor ID of the operation that was started/stopped */
  17253. A_UINT32 requestor_id;
  17254. /** VDEV id(interface) of the operation that was started/stopped */
  17255. A_UINT32 vdev_id;
  17256. /** extscan WMI command */
  17257. A_UINT32 command;
  17258. /** operation mode: start/stop */
  17259. A_UINT32 mode; /* wmi_extscan_operation_mode */
  17260. /**success/failure */
  17261. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  17262. /** table ID - to allow support for multiple simultaneous requests */
  17263. A_UINT32 table_id;
  17264. } wmi_extscan_start_stop_event_fixed_param;
  17265. typedef struct {
  17266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  17267. /** Request ID of the extscan operation that is currently running */
  17268. A_UINT32 request_id;
  17269. /** Requestor ID of the extscan operation that is currently running */
  17270. A_UINT32 requestor_id;
  17271. /** VDEV id(interface) of the extscan operation that is currently running */
  17272. A_UINT32 vdev_id;
  17273. /** scan event (wmi_scan_event_type) */
  17274. A_UINT32 event; /* wmi_extscan_event_type */
  17275. /** table ID - to allow support for multiple simultaneous requests */
  17276. A_UINT32 table_id;
  17277. /**number of buckets */
  17278. A_UINT32 num_buckets;
  17279. /* Following this structure is the TLV:
  17280. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  17281. */
  17282. } wmi_extscan_operation_event_fixed_param;
  17283. /* Types of extscan tables */
  17284. typedef enum {
  17285. EXTSCAN_TABLE_NONE = 0,
  17286. EXTSCAN_TABLE_BSSID = 1,
  17287. EXTSCAN_TABLE_RSSI = 2,
  17288. } wmi_extscan_table_type;
  17289. typedef struct {
  17290. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  17291. /** Request ID of the extscan operation that is currently running */
  17292. A_UINT32 request_id;
  17293. /** Requestor ID of the extscan operation that is currently running */
  17294. A_UINT32 requestor_id;
  17295. /** VDEV id(interface) of the extscan operation that is currently running */
  17296. A_UINT32 vdev_id;
  17297. /** table ID - to allow support for multiple simultaneous tables */
  17298. A_UINT32 table_id;
  17299. /**see wmi_extscan_table_type for table reporting usage */
  17300. A_UINT32 table_type;
  17301. /**number of entries in use */
  17302. A_UINT32 entries_in_use;
  17303. /**maximum number of entries in table */
  17304. A_UINT32 maximum_entries;
  17305. } wmi_extscan_table_usage_event_fixed_param;
  17306. typedef enum {
  17307. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  17308. this can be used to discard scan results */
  17309. } wmi_scan_status_flags;
  17310. typedef struct {
  17311. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17312. /** RSSI */
  17313. A_UINT32 rssi;
  17314. /** time stamp in milliseconds */
  17315. A_UINT32 tstamp;
  17316. /** Extscan cycle during which this entry was scanned */
  17317. A_UINT32 scan_cycle_id;
  17318. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  17319. A_UINT32 flags;
  17320. /** Bitmask of buckets (i.e. sets of channels) scanned */
  17321. A_UINT32 buckets_scanned;
  17322. } wmi_extscan_rssi_info;
  17323. typedef struct {
  17324. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17325. /** bssid */
  17326. wmi_mac_addr bssid;
  17327. /** ssid */
  17328. wmi_ssid ssid;
  17329. /** channel in MHz */
  17330. A_UINT32 channel;
  17331. /** capabilities */
  17332. A_UINT32 capabilities;
  17333. /** beacon interval in TUs */
  17334. A_UINT32 beacon_interval;
  17335. /** time stamp in milliseconds - time last seen */
  17336. A_UINT32 tstamp;
  17337. /** flags - _tExtScanEntryFlags */
  17338. A_UINT32 flags;
  17339. /** RTT in ns */
  17340. A_UINT32 rtt;
  17341. /** rtt standard deviation */
  17342. A_UINT32 rtt_sd;
  17343. /** rssi information */
  17344. A_UINT32 number_rssi_samples;
  17345. /** IE length */
  17346. A_UINT32 ie_length; /* length of IE data */
  17347. } wmi_extscan_wlan_descriptor;
  17348. typedef struct {
  17349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  17350. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17351. A_UINT32 request_id;
  17352. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17353. A_UINT32 requestor_id;
  17354. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  17355. A_UINT32 vdev_id;
  17356. /** Request ID of the extscan operation that is currently running */
  17357. A_UINT32 extscan_request_id;
  17358. /** Requestor ID of the extscan operation that is currently running */
  17359. A_UINT32 extscan_requestor_id;
  17360. /** VDEV id(interface) of the extscan operation that is currently running */
  17361. A_UINT32 extscan_vdev_id;
  17362. /** table ID - to allow support for multiple simultaneous tables */
  17363. A_UINT32 table_id;
  17364. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  17365. A_UINT32 current_tstamp;
  17366. /**total number of bssids (in all pages) */
  17367. A_UINT32 total_entries;
  17368. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17369. A_UINT32 first_entry_index;
  17370. /**number of bssids in this page */
  17371. A_UINT32 num_entries_in_page;
  17372. /** number of buckets scanned**/
  17373. A_UINT32 buckets_scanned;
  17374. /* Followed by the variable length TLVs
  17375. * wmi_extscan_wlan_descriptor bssid_list[]
  17376. * wmi_extscan_rssi_info rssi_list[]
  17377. * A_UINT8 ie_list[]
  17378. */
  17379. } wmi_extscan_cached_results_event_fixed_param;
  17380. typedef enum {
  17381. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  17382. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  17383. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  17384. } wmi_extscan_wlan_change_flags;
  17385. typedef struct {
  17386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  17387. /**bssid */
  17388. wmi_mac_addr bssid;
  17389. /**time stamp in milliseconds */
  17390. A_UINT32 tstamp;
  17391. /**upper RSSI limit */
  17392. A_UINT32 upper_rssi_limit;
  17393. /**lower RSSI limit */
  17394. A_UINT32 lower_rssi_limit;
  17395. /** channel */
  17396. A_UINT32 channel; /* in MHz */
  17397. /**current RSSI average */
  17398. A_UINT32 rssi_average;
  17399. /**flags - wmi_extscan_wlan_change_flags */
  17400. A_UINT32 flags;
  17401. /**legnth of RSSI history to follow (number of values) */
  17402. A_UINT32 num_rssi_samples;
  17403. } wmi_extscan_wlan_change_result_bssid;
  17404. typedef struct {
  17405. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  17406. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17407. A_UINT32 request_id;
  17408. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17409. A_UINT32 requestor_id;
  17410. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  17411. A_UINT32 vdev_id;
  17412. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17413. A_UINT32 config_request_id;
  17414. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17415. A_UINT32 config_requestor_id;
  17416. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  17417. A_UINT32 config_vdev_id;
  17418. /** table ID - to allow support for multiple simultaneous tables */
  17419. A_UINT32 table_id;
  17420. /**number of entries with RSSI out of range or BSSID not detected */
  17421. A_UINT32 change_count;
  17422. /**total number of bssid signal descriptors (in all pages) */
  17423. A_UINT32 total_entries;
  17424. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  17425. A_UINT32 first_entry_index;
  17426. /**number of bssids signal descriptors in this page */
  17427. A_UINT32 num_entries_in_page;
  17428. /* Following this structure is the TLV:
  17429. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  17430. * (number of descriptors given by field num_entries_in_page)
  17431. * Following this structure is the list of RSSI values (each is an A_UINT8):
  17432. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  17433. */
  17434. } wmi_extscan_wlan_change_results_event_fixed_param;
  17435. enum _tExtScanEntryFlags
  17436. {
  17437. WMI_HOTLIST_FLAG_NONE = 0x00,
  17438. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  17439. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  17440. };
  17441. typedef struct {
  17442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  17443. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17444. A_UINT32 config_request_id;
  17445. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17446. A_UINT32 config_requestor_id;
  17447. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  17448. A_UINT32 config_vdev_id;
  17449. /** table ID - to allow support for multiple simultaneous tables */
  17450. A_UINT32 table_id;
  17451. /**total number of bssids (in all pages) */
  17452. A_UINT32 total_entries;
  17453. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17454. A_UINT32 first_entry_index;
  17455. /**number of bssids in this page */
  17456. A_UINT32 num_entries_in_page;
  17457. /* Following this structure is the TLV:
  17458. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  17459. */
  17460. } wmi_extscan_hotlist_match_event_fixed_param;
  17461. typedef struct {
  17462. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  17463. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17464. A_UINT32 config_request_id;
  17465. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17466. A_UINT32 config_requestor_id;
  17467. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  17468. A_UINT32 config_vdev_id;
  17469. /** table ID - to allow support for multiple simultaneous tables */
  17470. A_UINT32 table_id;
  17471. /**total number of ssids (in all pages) */
  17472. A_UINT32 total_entries;
  17473. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  17474. A_UINT32 first_entry_index;
  17475. /**number of ssids in this page */
  17476. A_UINT32 num_entries_in_page;
  17477. /* Following this structure is the TLV:
  17478. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  17479. */
  17480. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  17481. typedef struct {
  17482. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  17483. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17484. A_UINT32 request_id;
  17485. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17486. A_UINT32 requestor_id;
  17487. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  17488. A_UINT32 vdev_id;
  17489. /** number of extscan caches */
  17490. A_UINT32 num_extscan_cache_tables;
  17491. /** number of wlan change lists */
  17492. A_UINT32 num_wlan_change_monitor_tables;
  17493. /** number of hotlists */
  17494. A_UINT32 num_hotlist_monitor_tables;
  17495. /** if one sided rtt data collection is supported */
  17496. A_UINT32 rtt_one_sided_supported;
  17497. /** if 11v data collection is supported */
  17498. A_UINT32 rtt_11v_supported;
  17499. /** if 11mc data collection is supported */
  17500. A_UINT32 rtt_ftm_supported;
  17501. /** number of extscan cache capabilities (one per table) */
  17502. A_UINT32 num_extscan_cache_capabilities;
  17503. /** number of wlan change capabilities (one per table) */
  17504. A_UINT32 num_extscan_wlan_change_capabilities;
  17505. /** number of extscan hotlist capabilities (one per table) */
  17506. A_UINT32 num_extscan_hotlist_capabilities;
  17507. /* max number of roaming ssid whitelist firmware can support */
  17508. A_UINT32 num_roam_ssid_whitelist;
  17509. /* max number of blacklist bssid firmware can support */
  17510. A_UINT32 num_roam_bssid_blacklist;
  17511. /* max number of preferred list firmware can support */
  17512. A_UINT32 num_roam_bssid_preferred_list;
  17513. /* max number of hotlist ssids firmware can support */
  17514. A_UINT32 num_extscan_hotlist_ssid;
  17515. /* max number of epno networks firmware can support */
  17516. A_UINT32 num_epno_networks;
  17517. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  17518. * supports multiple lists of each type.
  17519. *
  17520. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  17521. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  17522. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  17523. */
  17524. } wmi_extscan_capabilities_event_fixed_param;
  17525. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  17526. typedef struct{
  17527. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  17528. A_UINT32 reserved0; /* for future need */
  17529. } wmi_d0_wow_disable_ack_event_fixed_param;
  17530. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  17531. typedef struct {
  17532. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  17533. /** pdev_id for identifying the MAC
  17534. * See macros starting with WMI_PDEV_ID_ for values.
  17535. */
  17536. A_UINT32 pdev_id;
  17537. } wmi_pdev_resume_event_fixed_param;
  17538. /** value representing all modules */
  17539. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  17540. /* param definitions */
  17541. /**
  17542. * Log level for a given module. Value contains both module id and log level.
  17543. * here is the bitmap definition for value.
  17544. * module Id : 16
  17545. * Flags : reserved
  17546. * Level : 8
  17547. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  17548. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  17549. */
  17550. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  17551. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  17552. (val) |= (lvl & 0xff); \
  17553. } while (0)
  17554. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  17555. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  17556. (val) |= ((mid & 0xffff) << 16); \
  17557. } while (0)
  17558. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  17559. /**
  17560. * Enable the debug log for a given vdev. Value is vdev id
  17561. */
  17562. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  17563. /**
  17564. * Disable the debug log for a given vdev. Value is vdev id
  17565. * All the log level for a given VDEV is disabled except the ERROR log messages
  17566. */
  17567. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  17568. /**
  17569. * set vdev enable bitmap. value is the vden enable bitmap
  17570. */
  17571. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  17572. /**
  17573. * set a given log level to all the modules specified in the module bitmap.
  17574. * and set the log levle for all other modules to DBGLOG_ERR.
  17575. * value: log levelt to be set.
  17576. * module_id_bitmap : identifies the modules for which the log level should be set and
  17577. * modules for which the log level should be reset to DBGLOG_ERR.
  17578. */
  17579. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  17580. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  17581. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  17582. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  17583. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  17584. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  17585. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  17586. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  17587. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  17588. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  17589. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  17590. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  17591. typedef struct {
  17592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  17593. A_UINT32 dbg_log_param; /** param types are defined above */
  17594. A_UINT32 value;
  17595. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  17596. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  17597. */
  17598. } wmi_debug_log_config_cmd_fixed_param;
  17599. typedef struct {
  17600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  17601. A_UINT32 param; /* Reserved for future use */
  17602. /** pdev_id for identifying the MAC
  17603. * See macros starting with WMI_PDEV_ID_ for values.
  17604. */
  17605. A_UINT32 pdev_id;
  17606. } wmi_pdev_get_temperature_cmd_fixed_param;
  17607. typedef struct {
  17608. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  17609. A_INT32 value; /* temprature value in Celcius degree */
  17610. /** pdev_id for identifying the MAC
  17611. * See macros starting with WMI_PDEV_ID_ for values.
  17612. */
  17613. A_UINT32 pdev_id;
  17614. } wmi_pdev_temperature_event_fixed_param;
  17615. typedef enum {
  17616. ANTDIV_HW_CFG_STATUS,
  17617. ANTDIV_SW_CFG_STATUS,
  17618. ANTDIV_MAX_STATUS_TYPE_NUM
  17619. } ANTDIV_STATUS_TYPE;
  17620. typedef struct {
  17621. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  17622. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  17623. /** pdev_id for identifying the MAC
  17624. * See macros starting with WMI_PDEV_ID_ for values.
  17625. */
  17626. A_UINT32 pdev_id;
  17627. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  17628. typedef struct {
  17629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  17630. A_UINT32 support; /* ANT DIV feature enabled or not */
  17631. A_UINT32 chain_num; /* how many chain supported */
  17632. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  17633. /*
  17634. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  17635. * the antennas attached to that tx/rx chain.
  17636. */
  17637. A_UINT32 selectable_ant_mask[8];
  17638. /** pdev_id for identifying the MAC
  17639. * See macros starting with WMI_PDEV_ID_ for values.
  17640. */
  17641. A_UINT32 pdev_id;
  17642. } wmi_pdev_antdiv_status_event_fixed_param;
  17643. typedef struct {
  17644. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  17645. A_UINT32 vdev_id;
  17646. A_UINT32 enable;
  17647. A_UINT32 srv_ipv4; /* server IP */
  17648. A_UINT32 start_lsb; /* starting address assigned to client */
  17649. A_UINT32 num_client; /* number of clients we support */
  17650. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  17651. typedef enum {
  17652. AP_RX_DATA_OFFLOAD = 0x00,
  17653. STA_RX_DATA_OFFLOAD = 0x01,
  17654. } wmi_ipa_offload_types;
  17655. /**
  17656. * This command is sent from WLAN host driver to firmware for
  17657. * enabling/disabling IPA data-path offload features.
  17658. *
  17659. *
  17660. * Enabling data path offload to IPA(based on host INI configuration), example:
  17661. * when STA interface comes up,
  17662. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  17663. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  17664. *
  17665. * Disabling data path offload to IPA, example:
  17666. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  17667. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  17668. *
  17669. *
  17670. * This command is applicable only on the PCIE LL systems
  17671. *
  17672. */
  17673. typedef struct {
  17674. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  17675. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  17676. A_UINT32 vdev_id;
  17677. A_UINT32 enable; /* 1 == enable, 0 == disable */
  17678. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  17679. typedef enum {
  17680. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  17681. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  17682. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  17683. } wmi_set_led_flashing_type;
  17684. /**
  17685. 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.
  17686. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  17687. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  17688. 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
  17689. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  17690. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  17691. Zero is reached, it is skipped and moves on to the next interval.
  17692. */
  17693. typedef struct{
  17694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  17695. A_UINT32 pattern_id; /* pattern identifier */
  17696. A_UINT32 led_x0; /* led flashing parameter0 */
  17697. A_UINT32 led_x1; /* led flashing parameter1 */
  17698. A_UINT32 gpio_num; /* GPIO number */
  17699. } wmi_set_led_flashing_cmd_fixed_param;
  17700. /**
  17701. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  17702. * within small networks that do not include a local name server.
  17703. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  17704. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  17705. * global server.
  17706. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  17707. * by type in a specified domain using standard DNS queries.
  17708. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  17709. */
  17710. typedef struct {
  17711. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  17712. A_UINT32 vdev_id;
  17713. A_UINT32 enable;
  17714. } wmi_mdns_offload_cmd_fixed_param;
  17715. #define WMI_MAX_MDNS_FQDN_LEN 64
  17716. #define WMI_MAX_MDNS_RESP_LEN 512
  17717. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  17718. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  17719. typedef struct {
  17720. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  17721. A_UINT32 vdev_id;
  17722. /** type of fqdn, general or unique */
  17723. A_UINT32 type;
  17724. /** length of fqdn */
  17725. A_UINT32 fqdn_len;
  17726. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  17727. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  17728. */
  17729. } wmi_mdns_set_fqdn_cmd_fixed_param;
  17730. typedef struct {
  17731. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  17732. A_UINT32 vdev_id;
  17733. /** Answer Resource Record count */
  17734. A_UINT32 AR_count;
  17735. /** length of response */
  17736. A_UINT32 resp_len;
  17737. /* Following this structure is the TLV byte stream of resp data of length resp_len
  17738. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  17739. */
  17740. } wmi_mdns_set_resp_cmd_fixed_param;
  17741. typedef struct {
  17742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  17743. A_UINT32 vdev_id;
  17744. } wmi_mdns_get_stats_cmd_fixed_param;
  17745. typedef struct {
  17746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  17747. A_UINT32 vdev_id;
  17748. /** curTimestamp in milliseconds */
  17749. A_UINT32 curTimestamp;
  17750. /** last received Query in milliseconds */
  17751. A_UINT32 lastQueryTimestamp;
  17752. /** last sent Response in milliseconds */
  17753. A_UINT32 lastResponseTimestamp;
  17754. /** stats of received queries */
  17755. A_UINT32 totalQueries;
  17756. /** stats of macth queries */
  17757. A_UINT32 totalMatches;
  17758. /** stats of responses */
  17759. A_UINT32 totalResponses;
  17760. /** indicate the current status of mDNS offload */
  17761. A_UINT32 status;
  17762. } wmi_mdns_stats_event_fixed_param;
  17763. /**
  17764. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  17765. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  17766. * request and create/remove connection even host is suspended.
  17767. * 3 major components are offloaded:
  17768. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  17769. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  17770. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  17771. * Current implementation only supports WPA2 CCMP.
  17772. */
  17773. typedef struct {
  17774. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  17775. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  17776. A_UINT32 vdev_id;
  17777. /** enable/disable sap auth offload */
  17778. A_UINT32 enable;
  17779. /** sap ssid */
  17780. wmi_ssid ap_ssid;
  17781. /** authentication mode (defined above) */
  17782. A_UINT32 rsn_authmode;
  17783. /** unicast cipher set */
  17784. A_UINT32 rsn_ucastcipherset;
  17785. /** mcast/group cipher set */
  17786. A_UINT32 rsn_mcastcipherset;
  17787. /** mcast/group management frames cipher set */
  17788. A_UINT32 rsn_mcastmgmtcipherset;
  17789. /** sap channel */
  17790. A_UINT32 channel;
  17791. /** length of psk */
  17792. A_UINT32 psk_len;
  17793. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  17794. * A_UINT8 psk[];
  17795. */
  17796. } wmi_sap_ofl_enable_cmd_fixed_param;
  17797. typedef struct {
  17798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  17799. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  17800. A_UINT32 vdev_id;
  17801. /** aid (association id) of this station */
  17802. A_UINT32 assoc_id;
  17803. /** peer station's mac addr */
  17804. wmi_mac_addr peer_macaddr;
  17805. /** length of association request frame */
  17806. A_UINT32 data_len;
  17807. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  17808. * A_UINT8 bufp[];
  17809. */
  17810. } wmi_sap_ofl_add_sta_event_fixed_param;
  17811. typedef enum {
  17812. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  17813. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  17814. } wmi_sap_ofl_del_sta_flags;
  17815. typedef struct {
  17816. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  17817. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  17818. A_UINT32 vdev_id;
  17819. /** aid (association id) of this station */
  17820. A_UINT32 assoc_id;
  17821. /** peer station's mac addr */
  17822. wmi_mac_addr peer_macaddr;
  17823. /** disassociation reason */
  17824. A_UINT32 reason;
  17825. /** flags - wmi_sap_ofl_del_sta_flags */
  17826. A_UINT32 flags;
  17827. } wmi_sap_ofl_del_sta_event_fixed_param;
  17828. typedef struct {
  17829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  17830. A_UINT32 vdev_id;
  17831. /* Number of client failure connection attempt */
  17832. A_UINT32 num_retry;
  17833. /* Time in milliseconds to record the client's failure connection attempts */
  17834. A_UINT32 retry_allow_time_ms;
  17835. /* Time in milliseconds to drop the connection request if client is blacklisted */
  17836. A_UINT32 blackout_time_ms;
  17837. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  17838. typedef struct {
  17839. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  17840. A_UINT32 data_len; /** length in byte of data[]. */
  17841. /** This structure is used to send REQ binary blobs
  17842. * from application/service to firmware where Host drv is pass through .
  17843. * Following this structure is the TLV:
  17844. * A_UINT8 data[]; <-- length in byte given by field data_len.
  17845. */
  17846. } wmi_apfind_cmd_param;
  17847. typedef enum apfind_event_type_e {
  17848. APFIND_MATCH_EVENT = 0,
  17849. APFIND_WAKEUP_EVENT,
  17850. } APFIND_EVENT_TYPE;
  17851. typedef struct {
  17852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  17853. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  17854. A_UINT32 data_len; /** length in byte of data[]. */
  17855. /** This structure is used to send event binary blobs
  17856. * from firmware to application/service and Host drv.
  17857. * Following this structure is the TLV:
  17858. * A_UINT8 data[]; <-- length in byte given by field data_len.
  17859. */
  17860. } wmi_apfind_event_hdr;
  17861. /* SAP obss detection offload types */
  17862. typedef enum {
  17863. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  17864. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  17865. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  17866. } WMI_SAP_OBSS_DETECTION_MODE;
  17867. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  17868. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  17869. A_UINT32 vdev_id;
  17870. A_UINT32 detect_period_ms;
  17871. /* detect whether there is 11b ap/ibss */
  17872. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  17873. /* detect whether there is 11b sta connected with other APs */
  17874. A_UINT32 b_sta_detect_mode;
  17875. /* detect whether there is 11g AP */
  17876. A_UINT32 g_ap_detect_mode;
  17877. /* detect whether there is legacy 11a traffic */
  17878. A_UINT32 a_detect_mode;
  17879. /* detect whether there is ap which is ht legacy mode */
  17880. A_UINT32 ht_legacy_detect_mode;
  17881. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  17882. A_UINT32 ht_mixed_detect_mode;
  17883. /* detect whether there is ap which has 20M only station */
  17884. A_UINT32 ht_20mhz_detect_mode;
  17885. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  17886. typedef enum {
  17887. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  17888. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  17889. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  17890. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  17891. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  17892. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  17893. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  17894. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  17895. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  17896. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  17897. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  17898. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  17899. typedef struct wmi_sap_obss_detection_info_evt_s {
  17900. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  17901. A_UINT32 vdev_id;
  17902. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  17903. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  17904. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  17905. } wmi_sap_obss_detection_info_evt_fixed_param;
  17906. /** WMI command to enable STA FW handle bss color change notification from AP */
  17907. typedef struct {
  17908. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  17909. A_UINT32 vdev_id;
  17910. A_UINT32 enable;
  17911. } wmi_bss_color_change_enable_fixed_param;
  17912. typedef enum {
  17913. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  17914. WMI_BSS_COLOR_COLLISION_DETECTION,
  17915. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  17916. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  17917. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  17918. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  17919. typedef struct {
  17920. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  17921. A_UINT32 vdev_id;
  17922. A_UINT32 flags; /* proposed for future use cases */
  17923. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  17924. A_UINT32 current_bss_color;
  17925. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  17926. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  17927. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  17928. } wmi_obss_color_collision_det_config_fixed_param;
  17929. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  17930. typedef struct {
  17931. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  17932. A_UINT32 vdev_id;
  17933. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  17934. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  17935. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  17936. } wmi_obss_color_collision_evt_fixed_param;
  17937. /**
  17938. * OCB DCC types and structures.
  17939. */
  17940. /**
  17941. * DCC types as described in ETSI TS 102 687
  17942. * Type Format stepSize referenceValue numBits
  17943. * -------------------------------------------------------------------------
  17944. * ndlType_acPrio INTEGER (0...7) 1 number 3
  17945. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  17946. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  17947. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  17948. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  17949. * ndlType_datarate INTEGER (0..7) Table 8 3
  17950. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  17951. * ndlType_numberElements INTEGER (0..63) number 6
  17952. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  17953. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  17954. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  17955. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  17956. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  17957. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  17958. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  17959. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  17960. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  17961. * ndlType_queueStatus Enumeration Table A.2 1
  17962. * ndlType_dccMechanism Bitset Table A.2 6
  17963. *
  17964. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  17965. * cannot be changed without breaking WMI compatibility.
  17966. *
  17967. * NOTE: For each of the types, one additional bit is allocated. This
  17968. * leftmost bit is used to indicate that the value is invalid. */
  17969. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  17970. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  17971. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  17972. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  17973. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  17974. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  17975. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  17976. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  17977. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  17978. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  17979. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  17980. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  17981. #define SIZE_NDLTYPE_SNR (1 + 7)
  17982. #define SIZE_NDLTYPE_TIMING (1 + 12)
  17983. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  17984. #define SIZE_NDLTYPE_RATIO (1 + 7)
  17985. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  17986. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  17987. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  17988. #define SIZE_BYTE (8)
  17989. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  17990. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  17991. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  17992. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  17993. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  17994. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  17995. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  17996. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  17997. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  17998. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  17999. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  18000. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  18001. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  18002. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  18003. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  18004. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  18005. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  18006. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  18007. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  18008. /** The MCS_COUNT macro cannot be modified without breaking
  18009. * WMI compatibility. */
  18010. #define MCS_COUNT (8)
  18011. /** Flags for ndlType_dccMechanism. */
  18012. typedef enum {
  18013. DCC_MECHANISM_TPC = 1,
  18014. DCC_MECHANISM_TRC = 2,
  18015. DCC_MECHANISM_TDC = 4,
  18016. DCC_MECHANISM_DSC = 8,
  18017. DCC_MECHANISM_TAC = 16,
  18018. DCC_MECHANISM_RESERVED = 32,
  18019. DCC_MECHANISM_ALL = 0x3f,
  18020. } wmi_dcc_ndl_type_dcc_mechanism;
  18021. /** Values for ndlType_queueStatus. */
  18022. typedef enum {
  18023. DCC_QUEUE_CLOSED = 0,
  18024. DCC_QUEUE_OPEN = 1,
  18025. } wmi_dcc_ndl_type_queue_status;
  18026. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  18027. /** Values for ndlType_datarate */
  18028. typedef enum {
  18029. DCC_DATARATE_3_MBPS = 0,
  18030. DCC_DATARATE_4_5_MBPS = 1,
  18031. DCC_DATARATE_6_MBPS = 2,
  18032. DCC_DATARATE_9_MBPS = 3,
  18033. DCC_DATARATE_12_MBPS = 4,
  18034. DCC_DATARATE_18_MBPS = 5,
  18035. DCC_DATARATE_24_MBPS = 6,
  18036. DCC_DATARATE_27_MBPS = 7,
  18037. } wmi_dcc_ndl_type_datarate;
  18038. /** Data structure for active state configuration. */
  18039. typedef struct {
  18040. /** TLV tag and len; tag equals
  18041. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  18042. A_UINT32 tlv_header;
  18043. /**
  18044. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  18045. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  18046. */
  18047. A_UINT32 state_info;
  18048. /**
  18049. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  18050. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  18051. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  18052. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  18053. */
  18054. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  18055. /**
  18056. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  18057. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  18058. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  18059. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  18060. */
  18061. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  18062. /**
  18063. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  18064. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  18065. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  18066. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  18067. */
  18068. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  18069. /**
  18070. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  18071. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  18072. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  18073. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  18074. */
  18075. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  18076. /**
  18077. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  18078. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  18079. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  18080. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  18081. */
  18082. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  18083. } wmi_dcc_ndl_active_state_config;
  18084. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  18085. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  18086. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  18087. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  18088. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  18089. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  18090. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  18091. #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)
  18092. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  18093. #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)
  18094. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  18095. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  18096. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  18097. #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)
  18098. /** Data structure for EDCA/QOS parameters. */
  18099. typedef struct
  18100. {
  18101. /** TLV tag and len; tag equals
  18102. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  18103. A_UINT32 tlv_header;
  18104. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  18105. A_UINT32 aifsn;
  18106. /** Contention Window minimum. Range: 1 - 10 */
  18107. A_UINT32 cwmin;
  18108. /** Contention Window maximum. Range: 1 - 10 */
  18109. A_UINT32 cwmax;
  18110. } wmi_qos_parameter;
  18111. /** Data structure for information specific to a channel. */
  18112. typedef struct {
  18113. /** TLV tag and len; tag equals
  18114. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  18115. A_UINT32 tlv_header;
  18116. A_UINT32 bandwidth; /* MHz units */
  18117. wmi_mac_addr mac_address;
  18118. } wmi_ocb_channel;
  18119. /** Data structure for an element of the schedule array. */
  18120. typedef struct {
  18121. /** TLV tag and len; tag equals
  18122. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  18123. A_UINT32 tlv_header;
  18124. A_UINT32 channel_freq; /* MHz units */
  18125. A_UINT32 total_duration; /* ms units */
  18126. A_UINT32 guard_interval; /* ms units */
  18127. } wmi_ocb_schedule_element;
  18128. /** Data structure for OCB configuration. */
  18129. typedef struct {
  18130. /** TLV tag and len; tag equals
  18131. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  18132. A_UINT32 tlv_header;
  18133. /** VDEV id(interface) that is being configured */
  18134. A_UINT32 vdev_id;
  18135. A_UINT32 channel_count;
  18136. A_UINT32 schedule_size;
  18137. A_UINT32 flags;
  18138. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  18139. /** This is followed by a TLV array of wmi_channel. */
  18140. /** This is followed by a TLV array of wmi_ocb_channel. */
  18141. /** This is followed by a TLV array of wmi_qos_parameter. */
  18142. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  18143. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  18144. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  18145. } wmi_ocb_set_config_cmd_fixed_param;
  18146. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  18147. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  18148. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  18149. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  18150. typedef struct {
  18151. /** TLV tag and len; tag equals
  18152. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  18153. A_UINT32 tlv_header;
  18154. /* VDEV identifier */
  18155. A_UINT32 vdev_id;
  18156. A_UINT32 status;
  18157. } wmi_ocb_set_config_resp_event_fixed_param;
  18158. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  18159. WMI compatibility. */
  18160. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  18161. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  18162. /** Data structure to set the UTC time. */
  18163. typedef struct {
  18164. /** TLV tag and len; tag equals
  18165. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  18166. A_UINT32 tlv_header;
  18167. /* VDEV identifier */
  18168. A_UINT32 vdev_id;
  18169. /** 10 bytes of the utc time. */
  18170. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  18171. /** 5 bytes of the time error. */
  18172. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  18173. } wmi_ocb_set_utc_time_cmd_fixed_param;
  18174. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  18175. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  18176. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  18177. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  18178. /** Data structure start the timing advertisement. The template for the
  18179. * timing advertisement frame follows this structure in the WMI command.
  18180. */
  18181. typedef struct {
  18182. /** TLV tag and len; tag equals
  18183. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  18184. A_UINT32 tlv_header;
  18185. /* VDEV identifier */
  18186. A_UINT32 vdev_id;
  18187. /** Number of times the TA is sent every 5 seconds. */
  18188. A_UINT32 repeat_rate;
  18189. /** The frequency on which to transmit. */
  18190. A_UINT32 channel_freq; /* MHz units */
  18191. /** The offset into the template of the timestamp. */
  18192. A_UINT32 timestamp_offset;
  18193. /** The offset into the template of the time value. */
  18194. A_UINT32 time_value_offset;
  18195. /** The length of the timing advertisement template. The
  18196. * template is in the TLV data. */
  18197. A_UINT32 timing_advert_template_length;
  18198. /** This is followed by a binary array containing the TA template. */
  18199. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  18200. /** Data structure to stop the timing advertisement. */
  18201. typedef struct {
  18202. /** TLV tag and len; tag equals
  18203. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  18204. A_UINT32 tlv_header;
  18205. /* VDEV identifier */
  18206. A_UINT32 vdev_id;
  18207. A_UINT32 channel_freq; /* MHz units */
  18208. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  18209. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  18210. typedef struct {
  18211. /** TLV tag and len; tag equals
  18212. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  18213. A_UINT32 tlv_header;
  18214. /* VDEV identifier */
  18215. A_UINT32 vdev_id;
  18216. A_UINT32 reserved;
  18217. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  18218. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  18219. typedef struct {
  18220. /** TLV tag and len; tag equals
  18221. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  18222. A_UINT32 tlv_header;
  18223. /* VDEV identifier */
  18224. A_UINT32 vdev_id;
  18225. A_UINT32 tsf_timer_high;
  18226. A_UINT32 tsf_timer_low;
  18227. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  18228. /** Data structure for DCC stats configuration per channel. */
  18229. typedef struct {
  18230. /** TLV tag and len; tag equals
  18231. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  18232. A_UINT32 tlv_header;
  18233. /** The channel for which this applies, 16 bits. */
  18234. /** The dcc_stats_bitmap, 8 bits. */
  18235. A_UINT32 chan_info;
  18236. /** Demodulation model parameters. */
  18237. /**
  18238. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  18239. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  18240. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  18241. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  18242. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  18243. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  18244. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  18245. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  18246. */
  18247. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  18248. /** Communication ranges. */
  18249. /**
  18250. * tx_power, ndlType_txPower, 1+7 bits.
  18251. * datarate, ndlType_datarate, 1+3 bits.
  18252. */
  18253. A_UINT32 tx_power_datarate;
  18254. /**
  18255. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  18256. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  18257. */
  18258. A_UINT32 carrier_sense_est_comm_range;
  18259. /** Channel load measures. */
  18260. /**
  18261. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  18262. * carrierSense, ndlType_rxPower, 1+7 bits.
  18263. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  18264. */
  18265. A_UINT32 dcc_stats;
  18266. /**
  18267. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  18268. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  18269. */
  18270. A_UINT32 packet_stats;
  18271. /**
  18272. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  18273. */
  18274. A_UINT32 channel_busy_time;
  18275. /** Transmit packet statistics. */
  18276. /**
  18277. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  18278. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  18279. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  18280. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  18281. */
  18282. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  18283. /**
  18284. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18285. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18286. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18287. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18288. */
  18289. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  18290. /**
  18291. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  18292. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  18293. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  18294. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  18295. */
  18296. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  18297. /**
  18298. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  18299. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  18300. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  18301. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  18302. */
  18303. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  18304. } wmi_dcc_ndl_stats_per_channel;
  18305. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18306. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18307. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  18308. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  18309. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  18310. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  18311. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18312. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18313. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  18314. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  18315. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  18316. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  18317. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  18318. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  18319. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  18320. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  18321. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  18322. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  18323. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  18324. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  18325. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  18326. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  18327. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  18328. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  18329. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  18330. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  18331. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  18332. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  18333. #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)
  18334. #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)
  18335. #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)
  18336. #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)
  18337. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  18338. #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)
  18339. #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)
  18340. #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)
  18341. /** Bitmap for DCC stats. */
  18342. typedef enum {
  18343. DCC_STATS_DEMODULATION_MODEL = 1,
  18344. DCC_STATS_COMMUNICATION_RANGES = 2,
  18345. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  18346. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  18347. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  18348. DCC_STATS_ALL = 0xff,
  18349. } wmi_dcc_stats_bitmap;
  18350. /** Data structure for getting the DCC stats. */
  18351. typedef struct {
  18352. /** TLV tag and len; tag equals
  18353. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  18354. A_UINT32 tlv_header;
  18355. /* VDEV identifier */
  18356. A_UINT32 vdev_id;
  18357. /** The number of channels for which stats are being requested. */
  18358. A_UINT32 num_channels;
  18359. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  18360. } wmi_dcc_get_stats_cmd_fixed_param;
  18361. typedef struct {
  18362. /** TLV tag and len; tag equals
  18363. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  18364. A_UINT32 tlv_header;
  18365. /** The channel for which this applies. */
  18366. A_UINT32 chan_freq; /* MHz units */
  18367. /** The DCC stats being requested. */
  18368. A_UINT32 dcc_stats_bitmap;
  18369. } wmi_dcc_channel_stats_request;
  18370. /** Data structure for the response with the DCC stats. */
  18371. typedef struct {
  18372. /** TLV tag and len; tag equals
  18373. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  18374. A_UINT32 tlv_header;
  18375. /* VDEV identifier */
  18376. A_UINT32 vdev_id;
  18377. /** Number of channels in the response. */
  18378. A_UINT32 num_channels;
  18379. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  18380. } wmi_dcc_get_stats_resp_event_fixed_param;
  18381. /** Data structure for clearing the DCC stats. */
  18382. typedef struct {
  18383. /** TLV tag and len; tag equals
  18384. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  18385. A_UINT32 tlv_header;
  18386. /* VDEV identifier */
  18387. A_UINT32 vdev_id;
  18388. A_UINT32 dcc_stats_bitmap;
  18389. } wmi_dcc_clear_stats_cmd_fixed_param;
  18390. /** Data structure for the pushed DCC stats */
  18391. typedef struct {
  18392. /** TLV tag and len; tag equals
  18393. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  18394. A_UINT32 tlv_header;
  18395. /* VDEV identifier */
  18396. A_UINT32 vdev_id;
  18397. /** The number of channels in the response. */
  18398. A_UINT32 num_channels;
  18399. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  18400. } wmi_dcc_stats_event_fixed_param;
  18401. /** Data structure for updating NDL per channel. */
  18402. typedef struct {
  18403. /** TLV tag and len; tag equals
  18404. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  18405. A_UINT32 tlv_header;
  18406. /**
  18407. * Channel frequency, 16 bits
  18408. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  18409. */
  18410. A_UINT32 chan_info;
  18411. /**
  18412. * NDL_minDccSampling, 10 bits.
  18413. * Maximum time interval between subsequent checks of the DCC rules.
  18414. */
  18415. A_UINT32 ndl_min_dcc_sampling;
  18416. /**
  18417. * dcc_enable, 1 bit.
  18418. * dcc_stats_enable, 1 bit.
  18419. * dcc_stats_interval, 16 bits.
  18420. */
  18421. A_UINT32 dcc_flags;
  18422. /** General DCC configuration. */
  18423. /**
  18424. * NDL_timeUp, ndlType_timing, 1+12 bits.
  18425. * NDL_timeDown, ndlType_timing, 1+12 bits.
  18426. */
  18427. A_UINT32 general_config;
  18428. /** Transmit power thresholds. */
  18429. /**
  18430. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  18431. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  18432. */
  18433. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  18434. /**
  18435. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  18436. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  18437. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  18438. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  18439. */
  18440. /* see "ETSI TS 102 687" table above for units */
  18441. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  18442. /** Packet timing thresholds. */
  18443. /**
  18444. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18445. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18446. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18447. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18448. */
  18449. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  18450. /**
  18451. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  18452. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  18453. */
  18454. A_UINT32 min_max_packet_interval;
  18455. /**
  18456. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  18457. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  18458. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  18459. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  18460. */
  18461. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  18462. /** Packet datarate thresholds. */
  18463. /**
  18464. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  18465. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  18466. */
  18467. A_UINT32 min_max_datarate;
  18468. /**
  18469. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  18470. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  18471. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  18472. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  18473. */
  18474. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  18475. /** Receive signal thresholds. */
  18476. /**
  18477. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  18478. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  18479. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  18480. */
  18481. A_UINT32 min_max_def_carrier_sense;
  18482. /** Receive model parameter. */
  18483. /**
  18484. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  18485. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  18486. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  18487. */
  18488. A_UINT32 receive_model_parameter;
  18489. /**
  18490. * NDL_minSNR, ndlType_snr, 1+7 bits.
  18491. */
  18492. A_UINT32 receive_model_parameter_2;
  18493. /** Demodulation model parameters. */
  18494. /**
  18495. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  18496. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  18497. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  18498. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  18499. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  18500. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  18501. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  18502. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  18503. */
  18504. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  18505. /** Transmit model parameters. */
  18506. /**
  18507. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  18508. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  18509. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  18510. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  18511. */
  18512. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  18513. /**
  18514. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  18515. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  18516. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  18517. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  18518. */
  18519. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  18520. /**
  18521. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  18522. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  18523. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  18524. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  18525. */
  18526. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  18527. /**
  18528. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  18529. */
  18530. A_UINT32 tm_max_channel_use;
  18531. /**
  18532. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  18533. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  18534. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  18535. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  18536. */
  18537. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  18538. /** Channel load thresholds. */
  18539. /**
  18540. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  18541. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  18542. */
  18543. A_UINT32 min_max_channel_load;
  18544. /** Transmit queue parameters. */
  18545. /**
  18546. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  18547. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  18548. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  18549. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  18550. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  18551. */
  18552. A_UINT32 transmit_queue_parameters;
  18553. /**
  18554. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  18555. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  18556. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  18557. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  18558. */
  18559. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  18560. } wmi_dcc_ndl_chan;
  18561. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  18562. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  18563. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  18564. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  18565. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  18566. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  18567. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  18568. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  18569. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  18570. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  18571. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  18572. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  18573. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  18574. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  18575. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  18576. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  18577. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  18578. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  18579. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  18580. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  18581. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  18582. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  18583. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  18584. #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)
  18585. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  18586. #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)
  18587. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  18588. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  18589. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  18590. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  18591. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  18592. #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)
  18593. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  18594. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  18595. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  18596. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  18597. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  18598. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  18599. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  18600. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  18601. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  18602. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  18603. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  18604. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  18605. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  18606. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  18607. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  18608. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  18609. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  18610. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  18611. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  18612. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  18613. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  18614. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  18615. #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)
  18616. #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)
  18617. #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)
  18618. #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)
  18619. #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)
  18620. #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)
  18621. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  18622. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  18623. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  18624. #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)
  18625. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  18626. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  18627. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  18628. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  18629. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  18630. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  18631. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  18632. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  18633. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  18634. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  18635. /** Data structure for updating the NDL. */
  18636. typedef struct {
  18637. /** TLV tag and len; tag equals
  18638. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  18639. A_UINT32 tlv_header;
  18640. /* VDEV identifier */
  18641. A_UINT32 vdev_id;
  18642. /** The number of channels in the request. */
  18643. A_UINT32 num_channel;
  18644. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  18645. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  18646. } wmi_dcc_update_ndl_cmd_fixed_param;
  18647. typedef struct {
  18648. /** TLV tag and len; tag equals
  18649. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  18650. A_UINT32 tlv_header;
  18651. /* VDEV identifier */
  18652. A_UINT32 vdev_id;
  18653. A_UINT32 status;
  18654. } wmi_dcc_update_ndl_resp_event_fixed_param;
  18655. /* Actions for TSF timestamp */
  18656. typedef enum {
  18657. TSF_TSTAMP_CAPTURE_REQ = 1,
  18658. TSF_TSTAMP_CAPTURE_RESET = 2,
  18659. TSF_TSTAMP_READ_VALUE = 3,
  18660. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  18661. } wmi_tsf_tstamp_action;
  18662. typedef struct {
  18663. /** TLV tag and len; tag equals
  18664. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  18665. A_UINT32 tlv_header;
  18666. /** unique id identifying the VDEV, generated by the caller */
  18667. A_UINT32 vdev_id;
  18668. /* action type, refer to wmi_tsf_tstamp_action */
  18669. A_UINT32 tsf_action;
  18670. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  18671. typedef struct {
  18672. /* TLV tag and len; tag equals
  18673. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  18674. A_UINT32 tlv_header;
  18675. /* VDEV identifier */
  18676. A_UINT32 vdev_id;
  18677. /* low 32bit of tsf */
  18678. A_UINT32 tsf_low;
  18679. /* high 32 bit of tsf */
  18680. A_UINT32 tsf_high;
  18681. /* low 32 bits of qtimer */
  18682. A_UINT32 qtimer_low;
  18683. /* high 32 bits of qtimer */
  18684. A_UINT32 qtimer_high;
  18685. /*
  18686. * tsf_id: TSF ID for the current vdev
  18687. * This field should be ignored unless the tsf_id_valid flag is set.
  18688. */
  18689. A_UINT32 tsf_id;
  18690. A_UINT32 tsf_id_valid;
  18691. /*
  18692. * mac_id: MAC identifier
  18693. * This field should be ignored unless the mac_id_valid flag is set.
  18694. */
  18695. A_UINT32 mac_id;
  18696. A_UINT32 mac_id_valid;
  18697. /* low 32 bits of wlan global tsf */
  18698. A_UINT32 wlan_global_tsf_low;
  18699. /* high 32 bits of wlan global tsf */
  18700. A_UINT32 wlan_global_tsf_high;
  18701. } wmi_vdev_tsf_report_event_fixed_param;
  18702. /* ie_id values:
  18703. * 0 to 255 are used for individual IEEE802.11 Information Element types
  18704. */
  18705. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  18706. /* source values: */
  18707. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  18708. /* band values: */
  18709. typedef enum {
  18710. WMI_SET_VDEV_IE_BAND_ALL = 0,
  18711. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  18712. WMI_SET_VDEV_IE_BAND_5GHZ,
  18713. } wmi_set_vdev_ie_band;
  18714. typedef struct {
  18715. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  18716. A_UINT32 tlv_header;
  18717. /** unique id identifying the VDEV, generated by the caller */
  18718. A_UINT32 vdev_id;
  18719. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  18720. A_UINT32 ie_id;
  18721. /** ie_len corresponds to num of bytes in ie_data[] */
  18722. A_UINT32 ie_len;
  18723. /** source of this command */
  18724. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  18725. /** band for this IE - se wmi_set_vdev_ie_band enum */
  18726. A_UINT32 band;
  18727. /**
  18728. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  18729. * A_UINT8 ie_data[];
  18730. *
  18731. */
  18732. } wmi_vdev_set_ie_cmd_fixed_param;
  18733. /* DISA feature related data structures */
  18734. #define MAX_MAC_HEADER_LEN 32
  18735. typedef enum {
  18736. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  18737. WMI_ENCRYPT = 1,
  18738. WMI_DECRYPT = 2,
  18739. } WMI_ENCRYPT_DECRYPT_FLAG;
  18740. typedef struct {
  18741. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  18742. /** unique id identifying the VDEV, generated by the caller */
  18743. A_UINT32 vdev_id;
  18744. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  18745. A_UINT32 key_idx;
  18746. A_UINT32 key_cipher;
  18747. A_UINT32 key_len; /* units = bytes */
  18748. A_UINT32 key_txmic_len; /* units = bytes */
  18749. A_UINT32 key_rxmic_len; /* units = bytes */
  18750. /** Key: This array needs to be provided in little-endian order */
  18751. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  18752. /** Packet number: This array needs to be provided in little-endian order.
  18753. * If the PN is less than 8 bytes, the PN data shall be placed into this
  18754. * pn[] array starting at byte 0, leaving the MSBs empty.
  18755. */
  18756. A_UINT8 pn[8];
  18757. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  18758. * This array needs to be provided in little-endian order.
  18759. */
  18760. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  18761. A_UINT32 data_len; /** Payload length, units = bytes */
  18762. /*
  18763. * Following this struct are this TLV:
  18764. * A_UINT8 data[]; <-- actual data to be encrypted,
  18765. * needs to be provided in little-endian order
  18766. */
  18767. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  18768. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  18769. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  18770. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  18771. * then on receiving the tx completion for the DISA frame this WMI event
  18772. * will be delivered to HOST with the encrypted frame.
  18773. */
  18774. typedef struct {
  18775. /** TLV tag and len; tag equals
  18776. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  18777. A_UINT32 tlv_header;
  18778. /* VDEV identifier */
  18779. A_UINT32 vdev_id;
  18780. A_INT32 status; /* 0: success, -1: Failure, */
  18781. /* 802.11 header length + encrypted payload length (units = bytes) */
  18782. A_UINT32 data_length;
  18783. /*
  18784. * Following this struct is this TLV:
  18785. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  18786. * 802.11 header + encrypted payload,
  18787. * provided in little-endian order
  18788. */
  18789. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  18790. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  18791. typedef struct {
  18792. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  18793. /** Set Preferred Channel List **/
  18794. /** # of channels to scan */
  18795. A_UINT32 num_chan;
  18796. /**
  18797. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  18798. * structure. The TLV's are:
  18799. * A_UINT32 channel_list[];
  18800. **/
  18801. } wmi_soc_set_pcl_cmd_fixed_param;
  18802. /* Values for channel_weight */
  18803. typedef enum {
  18804. WMI_PCL_WEIGHT_DISALLOW = 0,
  18805. WMI_PCL_WEIGHT_LOW = 1,
  18806. WMI_PCL_WEIGHT_MEDIUM = 2,
  18807. WMI_PCL_WEIGHT_HIGH = 3,
  18808. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  18809. } wmi_pcl_chan_weight;
  18810. typedef struct {
  18811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  18812. /** Set Preferred Channel List **/
  18813. /** pdev_id for identifying the MAC
  18814. * See macros starting with WMI_PDEV_ID_ for values.
  18815. */
  18816. A_UINT32 pdev_id;
  18817. /** # of channels to scan */
  18818. A_UINT32 num_chan;
  18819. /**
  18820. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  18821. * structure. The TLV's are:
  18822. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  18823. **/
  18824. } wmi_pdev_set_pcl_cmd_fixed_param;
  18825. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  18826. typedef struct {
  18827. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  18828. /** Set Hardware Mode **/
  18829. /* Hardware Mode Index */
  18830. A_UINT32 hw_mode_index;
  18831. } wmi_soc_set_hw_mode_cmd_fixed_param;
  18832. typedef struct {
  18833. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  18834. /** pdev_id for identifying the MAC
  18835. * See macros starting with WMI_PDEV_ID_ for values.
  18836. */
  18837. A_UINT32 pdev_id;
  18838. /* start frequency in MHz */
  18839. A_UINT32 start_freq;
  18840. /* end frequency in MHz */
  18841. A_UINT32 end_freq;
  18842. } wmi_pdev_band_to_mac;
  18843. typedef struct {
  18844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  18845. /** Set Hardware Mode **/
  18846. /** pdev_id for identifying the MAC
  18847. * See macros starting with WMI_PDEV_ID_ for values.
  18848. */
  18849. A_UINT32 pdev_id;
  18850. /* Hardware Mode Index */
  18851. A_UINT32 hw_mode_index;
  18852. /* Number of band to mac TLVs */
  18853. A_UINT32 num_band_to_mac;
  18854. /* Followed by TLVs of type
  18855. * num_band_to_mac * wmi_pdev_band_to_mac.
  18856. */
  18857. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  18858. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  18859. typedef struct {
  18860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  18861. /** Set Dual MAC Firmware Configuration **/
  18862. /* Concurrent scan configuration bits */
  18863. A_UINT32 concurrent_scan_config_bits;
  18864. /* Firmware mode configuration bits */
  18865. A_UINT32 fw_mode_config_bits;
  18866. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  18867. typedef struct {
  18868. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  18869. /** Set Dual MAC Firmware Configuration **/
  18870. /** pdev_id for identifying the MAC
  18871. * See macros starting with WMI_PDEV_ID_ for values.
  18872. */
  18873. A_UINT32 pdev_id;
  18874. /* Concurrent scan configuration bits */
  18875. A_UINT32 concurrent_scan_config_bits;
  18876. /* Firmware mode configuration bits */
  18877. A_UINT32 fw_mode_config_bits;
  18878. } wmi_pdev_set_mac_config_cmd_fixed_param;
  18879. typedef struct { /* DEPRECATED */
  18880. A_UINT32 num_tx_chains;
  18881. A_UINT32 num_rx_chains;
  18882. A_UINT32 reserved[2];
  18883. } soc_num_tx_rx_chains;
  18884. typedef struct {
  18885. A_UINT32 num_tx_chains_2g;
  18886. A_UINT32 num_rx_chains_2g;
  18887. A_UINT32 num_tx_chains_5g;
  18888. A_UINT32 num_rx_chains_5g;
  18889. } band_num_tx_rx_chains;
  18890. typedef union { /* DEPRECATED */
  18891. soc_num_tx_rx_chains soc_txrx_chain_setting;
  18892. band_num_tx_rx_chains band_txrx_chain_setting;
  18893. } antenna_num_tx_rx_chains;
  18894. typedef enum {
  18895. ANTENNA_MODE_DISABLED = 0x0,
  18896. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  18897. /* reserved */
  18898. } antenna_mode_reason;
  18899. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  18900. typedef struct {
  18901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  18902. /* the reason for setting antenna mode, refer antenna_mode_reason */
  18903. A_UINT32 reason;
  18904. /*
  18905. * The above reason parameter will select whether the following union
  18906. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  18907. */
  18908. antenna_num_tx_rx_chains num_txrx_chains_setting;
  18909. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  18910. typedef struct {
  18911. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  18912. /** pdev_id for identifying the MAC
  18913. * See macros starting with WMI_PDEV_ID_ for values.
  18914. */
  18915. A_UINT32 pdev_id;
  18916. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  18917. A_UINT32 num_txrx_chains;
  18918. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  18919. /** Data structure for information specific to a VDEV to MAC mapping. */
  18920. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  18921. typedef struct {
  18922. /** TLV tag and len; tag equals
  18923. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  18924. A_UINT32 tlv_header;
  18925. A_UINT32 vdev_id; /* VDEV ID */
  18926. A_UINT32 mac_id; /* MAC ID */
  18927. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  18928. /** Data structure for information specific to a VDEV to MAC mapping. */
  18929. typedef struct {
  18930. /** TLV tag and len; tag equals
  18931. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  18932. A_UINT32 tlv_header;
  18933. /** pdev_id for identifying the MAC
  18934. * See macros starting with WMI_PDEV_ID_ for values.
  18935. */
  18936. A_UINT32 pdev_id;
  18937. A_UINT32 vdev_id;
  18938. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  18939. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  18940. typedef struct {
  18941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  18942. /** Set Hardware Mode Response Event **/
  18943. /* Status of set_hw_mode command */
  18944. /*
  18945. * Values for Status:
  18946. * 0 - OK; command successful
  18947. * 1 - EINVAL; Requested invalid hw_mode
  18948. * 2 - ECANCELED; HW mode change canceled
  18949. * 3 - ENOTSUP; HW mode not supported
  18950. * 4 - EHARDWARE; HW mode change prevented by hardware
  18951. * 5 - EPENDING; HW mode change is pending
  18952. * 6 - ECOEX; HW mode change conflict with Coex
  18953. */
  18954. A_UINT32 status;
  18955. /* Configured Hardware Mode */
  18956. A_UINT32 cfgd_hw_mode_index;
  18957. /* Number of Vdev to Mac entries */
  18958. A_UINT32 num_vdev_mac_entries;
  18959. /**
  18960. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  18961. * structure. The TLV's are:
  18962. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  18963. */
  18964. } wmi_soc_set_hw_mode_response_event_fixed_param;
  18965. typedef struct {
  18966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  18967. /** Set Hardware Mode Response Event **/
  18968. /** pdev_id for identifying the MAC
  18969. * See macros starting with WMI_PDEV_ID_ for values.
  18970. */
  18971. A_UINT32 pdev_id;
  18972. /* Status of set_hw_mode command */
  18973. /*
  18974. * Values for Status:
  18975. * 0 - OK; command successful
  18976. * 1 - EINVAL; Requested invalid hw_mode
  18977. * 2 - ECANCELED; HW mode change canceled
  18978. * 3 - ENOTSUP; HW mode not supported
  18979. * 4 - EHARDWARE; HW mode change prevented by hardware
  18980. * 5 - EPENDING; HW mode change is pending
  18981. * 6 - ECOEX; HW mode change conflict with Coex
  18982. */
  18983. A_UINT32 status;
  18984. /* Configured Hardware Mode */
  18985. A_UINT32 cfgd_hw_mode_index;
  18986. /* Number of Vdev to Mac entries */
  18987. A_UINT32 num_vdev_mac_entries;
  18988. /**
  18989. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  18990. * structure. The TLV's are:
  18991. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  18992. */
  18993. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  18994. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  18995. typedef struct {
  18996. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  18997. /** Hardware Mode Transition Event **/
  18998. /* Original or old Hardware mode */
  18999. A_UINT32 old_hw_mode_index;
  19000. /* New Hardware Mode */
  19001. A_UINT32 new_hw_mode_index;
  19002. /* Number of Vdev to Mac entries */
  19003. A_UINT32 num_vdev_mac_entries;
  19004. /**
  19005. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19006. * structure. The TLV's are:
  19007. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19008. */
  19009. } wmi_soc_hw_mode_transition_event_fixed_param;
  19010. typedef struct {
  19011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  19012. /** Hardware Mode Transition Event **/
  19013. /** pdev_id for identifying the MAC
  19014. * See macros starting with WMI_PDEV_ID_ for values.
  19015. */
  19016. A_UINT32 pdev_id;
  19017. /* Original or old Hardware mode */
  19018. A_UINT32 old_hw_mode_index;
  19019. /* New Hardware Mode */
  19020. A_UINT32 new_hw_mode_index;
  19021. /* Number of Vdev to Mac entries */
  19022. A_UINT32 num_vdev_mac_entries;
  19023. /**
  19024. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  19025. * structure. The TLV's are:
  19026. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  19027. */
  19028. } wmi_pdev_hw_mode_transition_event_fixed_param;
  19029. /**
  19030. * This command is sent from WLAN host driver to firmware for
  19031. * plugging in reorder queue desc to lithium hw.
  19032. *
  19033. * Example: plug-in queue desc for TID 5
  19034. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  19035. * (vdev_id = PEER vdev id,
  19036. * peer_macaddr = PEER mac addr,
  19037. * tid = 5,
  19038. * queue_ptr_lo = queue desc addr lower 32 bits,
  19039. * queue_ptr_hi = queue desc addr higher 32 bits,
  19040. * queue_no = 16-bit number assigned by host for queue,
  19041. * stored in bits 15:0 of queue_no field)
  19042. */
  19043. typedef struct {
  19044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  19045. A_UINT32 vdev_id;
  19046. wmi_mac_addr peer_macaddr; /* peer mac address */
  19047. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  19048. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  19049. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  19050. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  19051. stored in bits 15:0 of queue_no field */
  19052. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  19053. * 0 = Invalid, 1 = Valid */
  19054. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  19055. * Host sends the message when BA session is
  19056. * established or terminated for the TID. */
  19057. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  19058. /**
  19059. * This command is sent from WLAN host driver to firmware for
  19060. * removing one or more reorder queue desc to lithium hw.
  19061. *
  19062. * Example: remove queue desc for all TIDs
  19063. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  19064. * (vdev_id = PEER vdev id,
  19065. * peer_macaddr = PEER mac addr,
  19066. * tid = 0x1FFFF,
  19067. */
  19068. typedef struct {
  19069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  19070. A_UINT32 vdev_id;
  19071. wmi_mac_addr peer_macaddr; /* peer mac address */
  19072. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  19073. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  19074. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  19075. typedef struct {
  19076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  19077. /** Set Dual MAC Config Response Event **/
  19078. /* Status for set_dual_mac_config command */
  19079. /*
  19080. * Values for Status:
  19081. * 0 - OK; command successful
  19082. * 1 - EINVAL; Requested invalid hw_mode
  19083. * 3 - ENOTSUP; HW mode not supported
  19084. * 4 - EHARDWARE; HW mode change prevented by hardware
  19085. * 6 - ECOEX; HW mode change conflict with Coex
  19086. */
  19087. A_UINT32 status;
  19088. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  19089. typedef struct {
  19090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  19091. /** Set Dual MAC Config Response Event **/
  19092. /** pdev_id for identifying the MAC
  19093. * See macros starting with WMI_PDEV_ID_ for values.
  19094. */
  19095. A_UINT32 pdev_id;
  19096. /* Status for set_dual_mac_config command */
  19097. /*
  19098. * Values for Status:
  19099. * 0 - OK; command successful
  19100. * 1 - EINVAL; Requested invalid hw_mode
  19101. * 3 - ENOTSUP; HW mode not supported
  19102. * 4 - EHARDWARE; HW mode change prevented by hardware
  19103. * 6 - ECOEX; HW mode change conflict with Coex
  19104. */
  19105. A_UINT32 status;
  19106. } wmi_pdev_set_mac_config_response_event_fixed_param;
  19107. typedef enum {
  19108. MAWC_MOTION_STATE_UNKNOWN,
  19109. MAWC_MOTION_STATE_STATIONARY,
  19110. MAWC_MOTION_STATE_WALK,
  19111. MAWC_MOTION_STATE_TRANSIT,
  19112. } MAWC_MOTION_STATE;
  19113. typedef enum {
  19114. MAWC_SENSOR_STATUS_OK,
  19115. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  19116. MAWC_SENSOR_STATUS_SHUTDOWN,
  19117. } MAWC_SENSOR_STATUS;
  19118. typedef struct {
  19119. /* TLV tag and len; tag equals
  19120. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  19121. A_UINT32 tlv_header;
  19122. /** new motion state, MAWC_MOTION_STATE */
  19123. A_UINT32 motion_state;
  19124. /** status code of sensor, MAWC_SENSOR_STATUS */
  19125. A_UINT32 sensor_status;
  19126. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  19127. /* MBO flag field definition */
  19128. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  19129. * 1 - Allow to connect to MBO AP only
  19130. * Bit 1-31 : reserved.
  19131. */
  19132. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  19133. typedef struct {
  19134. /* TLV tag and len; tag equals
  19135. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  19136. A_UINT32 tlv_header;
  19137. /** vdev id */
  19138. A_UINT32 vdev_id;
  19139. /** enable or disable MBO */
  19140. A_UINT32 enable;
  19141. /** MBO flags, refer to definition of MBO flags*/
  19142. A_UINT32 flags;
  19143. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  19144. typedef struct {
  19145. /* TLV tag and len; tag equals
  19146. * WMITLV_TAG_ARRAY_STRUC */
  19147. A_UINT32 tlv_header;
  19148. /** Current operating class number */
  19149. A_UINT32 cur_op_class;
  19150. /** Country string of current reg domain,
  19151. * the expected value should be same as country str defined
  19152. * in country IE.
  19153. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  19154. * The ordering of this array must be maintained,
  19155. * even when a big-endian host's WMI messages undergo
  19156. * automatic byte reordering for conversion to the
  19157. * little-endian ordering required by the target.
  19158. * On big-endian hosts, this array may need to be byte-swapped
  19159. * by the host, so the subsequent automatic byte-swap
  19160. * will result in the correct final byte order.
  19161. * global operating class: set country_str[0]=0
  19162. */
  19163. A_UINT8 country_str[4];
  19164. /** Supported operating class number in current regdomain */
  19165. A_UINT32 supp_op_class_num;
  19166. /* The TLVs will follow. */
  19167. /* A_UINT32 supp_op_class_list[] */
  19168. } wmi_supported_operating_class_param;
  19169. typedef struct {
  19170. /* TLV tag and len; tag equals
  19171. * WMITLV_TAG_ARRAY_STRUC */
  19172. A_UINT32 tlv_header;
  19173. /** non preferred channel attribute length */
  19174. A_UINT32 non_prefer_ch_attr_len;
  19175. /* The TLVs will follow. */
  19176. /** A_UINT8 non_prefer_ch_attr[];*/
  19177. } wmi_mbo_non_preferred_channel_report_param;
  19178. typedef struct {
  19179. /* TLV tag and len; tag equals
  19180. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  19181. A_UINT32 tlv_header;
  19182. /* enable(1) or disable(0) */
  19183. A_UINT32 enable;
  19184. } wmi_mawc_enable_sensor_event_fixed_param;
  19185. typedef struct {
  19186. /* TLV tag and len; tag equals
  19187. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  19188. A_UINT32 tlv_header;
  19189. /* Unique id identifying the VDEV */
  19190. A_UINT32 vdev_id;
  19191. /* enable(1) or disable(0) MAWC */
  19192. A_UINT32 enable;
  19193. /* ratio of skipping suppressing scan, skip one out of x */
  19194. A_UINT32 suppress_ratio;
  19195. } wmi_extscan_configure_mawc_cmd_fixed_param;
  19196. typedef struct {
  19197. /* TLV tag and len; tag equals
  19198. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  19199. A_UINT32 tlv_header;
  19200. /* Unique id identifying the VDEV */
  19201. A_UINT32 vdev_id;
  19202. /* enable(1) or disable(0) packet error rate trigger for roaming */
  19203. A_UINT32 enable;
  19204. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  19205. * If PER monitoring as a trigger for roaming is enabled,
  19206. * it is controlled by high_rate_thresh, low_rate_thresh, and
  19207. * pkt_err_rate_thresh_pct.
  19208. * PER monitoring is performed only when the time-averaged throughput
  19209. * is less than high_rate_thresh.
  19210. * During PER monitoring, the target keeps track of the PHY rate for
  19211. * each of the first N PPDUs within a time window.
  19212. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  19213. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  19214. *
  19215. * This PER monitoring as a trigger for roaming is performed
  19216. * concurrently but independently for rx and tx.
  19217. */
  19218. A_UINT32 high_rate_thresh; /* units = Kbps */
  19219. A_UINT32 low_rate_thresh; /* units = Kbps */
  19220. A_UINT32 pkt_err_rate_thresh_pct;
  19221. /*
  19222. * rest time after associating to a new AP before
  19223. * starting to monitor PER as a roaming trigger,
  19224. * (units are seconds)
  19225. */
  19226. A_UINT32 per_rest_time;
  19227. /* This is the total time for which PER monitoring will be run.
  19228. * After completion of time windows, the average PER over the window
  19229. * will be computed.
  19230. * The parameter value stores specifications for both TX and RX
  19231. * monitor times.
  19232. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  19233. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  19234. */
  19235. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  19236. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  19237. A_INT32 min_candidate_rssi; /* units = dBm */
  19238. } wmi_roam_per_config_fixed_param;
  19239. typedef struct {
  19240. /* TLV tag and len; tag equals
  19241. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  19242. A_UINT32 tlv_header;
  19243. /* Unique id identifying the VDEV */
  19244. A_UINT32 vdev_id;
  19245. /* enable(1) or disable(0) MAWC */
  19246. A_UINT32 enable;
  19247. /* ratio of exponential backoff, next = current + current*ratio/100 */
  19248. A_UINT32 exp_backoff_ratio;
  19249. /* initial scan interval(msec) */
  19250. A_UINT32 init_scan_interval;
  19251. /* max scan interval(msec) */
  19252. A_UINT32 max_scan_interval;
  19253. } wmi_nlo_configure_mawc_cmd_fixed_param;
  19254. typedef struct {
  19255. /* TLV tag and len; tag equals
  19256. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  19257. A_UINT32 tlv_header;
  19258. /* Unique id identifying the VDEV */
  19259. A_UINT32 vdev_id;
  19260. /* enable(1) or disable(0) MAWC */
  19261. A_UINT32 enable;
  19262. /* data traffic load (kBps) to register CMC */
  19263. A_UINT32 traffic_load_threshold;
  19264. /* RSSI threshold (dBm) to scan for Best AP */
  19265. A_UINT32 best_ap_rssi_threshold;
  19266. /* high RSSI threshold adjustment in Stationary to suppress scan */
  19267. A_UINT32 rssi_stationary_high_adjust;
  19268. /* low RSSI threshold adjustment in Stationary to suppress scan */
  19269. A_UINT32 rssi_stationary_low_adjust;
  19270. } wmi_roam_configure_mawc_cmd_fixed_param;
  19271. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  19272. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  19273. typedef enum {
  19274. PACKET_FILTER_TYPE_INVALID = 0,
  19275. PACKET_FILTER_TYPE_FILTER_PKT,
  19276. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  19277. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  19278. } WMI_PACKET_FILTER_FILTER_TYPE;
  19279. typedef enum {
  19280. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  19281. /* L2 header */
  19282. PACKET_FILTER_PROTO_TYPE_MAC,
  19283. PACKET_FILTER_PROTO_TYPE_SNAP,
  19284. /* L3 header (EtherType) */
  19285. PACKET_FILTER_PROTO_TYPE_IPV4,
  19286. PACKET_FILTER_PROTO_TYPE_IPV6,
  19287. /* L4 header (IP protocol) */
  19288. PACKET_FILTER_PROTO_TYPE_UDP,
  19289. PACKET_FILTER_PROTO_TYPE_TCP,
  19290. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  19291. PACKET_FILTER_PROTO_TYPE_MAX
  19292. } WMI_PACKET_FILTER_PROTO_TYPE;
  19293. typedef enum {
  19294. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  19295. PACKET_FILTER_CMP_TYPE_EQUAL,
  19296. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  19297. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  19298. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  19299. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  19300. PACKET_FILTER_CMP_TYPE_MAX
  19301. } WMI_PACKET_FILTER_CMP_TYPE;
  19302. typedef enum {
  19303. PACKET_FILTER_SET_INACTIVE = 0,
  19304. PACKET_FILTER_SET_ACTIVE
  19305. } WMI_PACKET_FILTER_ACTION;
  19306. typedef enum {
  19307. PACKET_FILTER_SET_DISABLE = 0,
  19308. PACKET_FILTER_SET_ENABLE
  19309. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  19310. typedef struct {
  19311. A_UINT32 proto_type;
  19312. A_UINT32 cmp_type;
  19313. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  19314. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  19315. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  19316. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  19317. } WMI_PACKET_FILTER_PARAMS_TYPE;
  19318. typedef struct {
  19319. A_UINT32 tlv_header;
  19320. A_UINT32 vdev_id;
  19321. A_UINT32 filter_id;
  19322. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  19323. A_UINT32 filter_type;
  19324. A_UINT32 num_params; /* how many entries in paramsData are valid */
  19325. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  19326. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  19327. /* deprecated0:
  19328. * This field simply provides filler space to retain the original message
  19329. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  19330. * from 10 to 5.
  19331. */
  19332. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  19333. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  19334. /* enable / disable all filters within the specified vdev */
  19335. typedef struct {
  19336. A_UINT32 tlv_header;
  19337. A_UINT32 vdev_id;
  19338. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  19339. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  19340. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  19341. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  19342. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  19343. WMI_SET_BITS(tcp_flag_u32, \
  19344. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  19345. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  19346. tcp_flag_values)
  19347. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  19348. WMI_GET_BITS(tcp_flag_u32, \
  19349. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  19350. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  19351. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  19352. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  19353. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  19354. WMI_SET_BITS(tcp_flag_u32, \
  19355. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  19356. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  19357. tcp_flags_mask)
  19358. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  19359. WMI_GET_BITS(tcp_flag_u32, \
  19360. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  19361. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  19362. typedef struct {
  19363. A_UINT32 tlv_header;
  19364. /**
  19365. * @brief lro_enable - indicates whether lro is enabled
  19366. * [0] LRO Enable
  19367. */
  19368. A_UINT32 lro_enable;
  19369. /**
  19370. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  19371. * values to check for
  19372. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  19373. * the values in this field after masking with TCP flags mask below,
  19374. * LRO eligible will not be set
  19375. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  19376. * provided above with the TCP flags field in the received packet
  19377. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  19378. * macros to isolate the mask field and values field that are packed
  19379. * into this u32 "word".
  19380. */
  19381. A_UINT32 tcp_flag_u32;
  19382. /**
  19383. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19384. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19385. * bytes 0 to 3
  19386. *
  19387. * In this and all the below toeplitz_hash fields, the bytes are
  19388. * specified in little-endian order. For example:
  19389. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  19390. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  19391. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  19392. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  19393. */
  19394. A_UINT32 toeplitz_hash_ipv4_0_3;
  19395. /**
  19396. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19397. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19398. * bytes 4 to 7
  19399. */
  19400. A_UINT32 toeplitz_hash_ipv4_4_7;
  19401. /**
  19402. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19403. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19404. * bytes 8 to 11
  19405. */
  19406. A_UINT32 toeplitz_hash_ipv4_8_11;
  19407. /**
  19408. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19409. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19410. * bytes 12 to 15
  19411. */
  19412. A_UINT32 toeplitz_hash_ipv4_12_15;
  19413. /**
  19414. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  19415. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  19416. * byte 16
  19417. */
  19418. A_UINT32 toeplitz_hash_ipv4_16;
  19419. /**
  19420. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19421. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19422. * bytes 0 to 3
  19423. */
  19424. A_UINT32 toeplitz_hash_ipv6_0_3;
  19425. /**
  19426. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19427. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19428. * bytes 4 to 7
  19429. */
  19430. A_UINT32 toeplitz_hash_ipv6_4_7;
  19431. /**
  19432. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19433. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19434. * bytes 8 to 11
  19435. */
  19436. A_UINT32 toeplitz_hash_ipv6_8_11;
  19437. /**
  19438. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19439. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19440. * bytes 12 to 15
  19441. */
  19442. A_UINT32 toeplitz_hash_ipv6_12_15;
  19443. /**
  19444. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19445. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19446. * bytes 16 to 19
  19447. */
  19448. A_UINT32 toeplitz_hash_ipv6_16_19;
  19449. /**
  19450. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19451. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19452. * bytes 20 to 22
  19453. */
  19454. A_UINT32 toeplitz_hash_ipv6_20_23;
  19455. /**
  19456. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19457. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19458. * bytes 24 to 27
  19459. */
  19460. A_UINT32 toeplitz_hash_ipv6_24_27;
  19461. /**
  19462. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19463. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19464. * bytes 28 to 31
  19465. */
  19466. A_UINT32 toeplitz_hash_ipv6_28_31;
  19467. /**
  19468. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19469. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19470. * bytes 32 to 35
  19471. */
  19472. A_UINT32 toeplitz_hash_ipv6_32_35;
  19473. /**
  19474. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19475. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19476. * bytes 36 to 39
  19477. */
  19478. A_UINT32 toeplitz_hash_ipv6_36_39;
  19479. /**
  19480. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  19481. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  19482. * byte 40
  19483. */
  19484. A_UINT32 toeplitz_hash_ipv6_40;
  19485. /**
  19486. * @brief pdev_id - identifies the MAC
  19487. * See macros starting with WMI_PDEV_ID_ for values.
  19488. */
  19489. A_UINT32 pdev_id;
  19490. } wmi_lro_info_cmd_fixed_param;
  19491. typedef struct {
  19492. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  19493. A_UINT32 offset; /* flash offset to write, starting from 0 */
  19494. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  19495. } wmi_transfer_data_to_flash_cmd_fixed_param;
  19496. typedef struct {
  19497. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  19498. /** Return status. 0 for success, non-zero otherwise */
  19499. A_UINT32 status;
  19500. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  19501. typedef struct {
  19502. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  19503. A_UINT32 offset; /* flash offset to read, starting from 0 */
  19504. A_UINT32 length; /* data length to read, unit: byte */
  19505. } wmi_read_data_from_flash_cmd_fixed_param;
  19506. typedef struct {
  19507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  19508. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  19509. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  19510. A_UINT32 length; /* length of data being reported, unit: byte */
  19511. } wmi_read_data_from_flash_event_fixed_param;
  19512. typedef enum {
  19513. ENHANCED_MCAST_FILTER_DISABLED,
  19514. ENHANCED_MCAST_FILTER_ENABLED
  19515. } ENHANCED_MCAST_FILTER_CONFIG;
  19516. /*
  19517. * Command to enable/disable filtering of multicast IP with unicast mac
  19518. */
  19519. typedef struct {
  19520. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  19521. /* Unique id identifying the VDEV */
  19522. A_UINT32 vdev_id;
  19523. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  19524. A_UINT32 enable;
  19525. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  19526. typedef struct {
  19527. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  19528. A_UINT32 tlv_header;
  19529. /** unique id identifying the VDEV, generated by the caller */
  19530. A_UINT32 vdev_id;
  19531. /** WISA enable / disable mode */
  19532. A_UINT32 wisa_mode;
  19533. } wmi_vdev_wisa_cmd_fixed_param;
  19534. /*
  19535. * This structure is used to report SMPS force mode set complete to host.
  19536. */
  19537. typedef struct {
  19538. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  19539. /* Unique id identifying the VDEV */
  19540. A_UINT32 vdev_id;
  19541. /* Return status. 0 for success, non-zero otherwise */
  19542. A_UINT32 status;
  19543. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  19544. /*
  19545. * This structure is used to report SCPC calibrated data to host.
  19546. */
  19547. typedef struct {
  19548. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  19549. /** number of BDF patches. Each patch contains offset, length and data */
  19550. A_UINT32 num_patch;
  19551. /* This TLV is followed by another TLV of array of bytes
  19552. * A_UINT8 data[];
  19553. * This data array contains, for example
  19554. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  19555. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  19556. *
  19557. */
  19558. } wmi_scpc_event_fixed_param;
  19559. typedef enum {
  19560. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  19561. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  19562. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  19563. } FW_ACTIVE_BPF_MODE;
  19564. /* bpf interface structure */
  19565. typedef struct wmi_bpf_get_capability_cmd_s {
  19566. A_UINT32 tlv_header;
  19567. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  19568. } wmi_bpf_get_capability_cmd_fixed_param;
  19569. typedef struct wmi_bpf_capability_info_evt_s {
  19570. A_UINT32 tlv_header;
  19571. A_UINT32 bpf_version; /* fw's implement version */
  19572. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  19573. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  19574. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  19575. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  19576. } wmi_bpf_capability_info_evt_fixed_param;
  19577. /* bit 0 of flags: report counters */
  19578. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  19579. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  19580. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  19581. A_UINT32 tlv_header;
  19582. A_UINT32 flags;
  19583. A_UINT32 vdev_id;
  19584. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  19585. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  19586. A_UINT32 tlv_header;
  19587. A_UINT32 vdev_id;
  19588. A_UINT32 num_filters;
  19589. A_UINT32 num_checked_pkts;
  19590. A_UINT32 num_dropped_pkts;
  19591. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  19592. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  19593. A_UINT32 tlv_header;
  19594. A_UINT32 vdev_id;
  19595. A_UINT32 filter_id;
  19596. A_UINT32 bpf_version; /* host bpf version */
  19597. A_UINT32 total_length;
  19598. A_UINT32 current_offset;
  19599. A_UINT32 current_length;
  19600. /*
  19601. * The TLV follows:
  19602. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  19603. */
  19604. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  19605. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  19606. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  19607. A_UINT32 tlv_header;
  19608. A_UINT32 vdev_id;
  19609. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  19610. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  19611. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  19612. A_UINT32 tlv_header;
  19613. A_UINT32 vdev_id;
  19614. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  19615. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  19616. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  19617. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  19618. A_UINT32 tlv_header;
  19619. A_UINT32 vdev_id;
  19620. A_UINT32 is_enabled; /* fw assume host default enables */
  19621. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  19622. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  19623. A_UINT32 tlv_header;
  19624. A_UINT32 vdev_id;
  19625. A_UINT32 bpf_version; /* bpf instruction version */
  19626. A_UINT32 program_len; /* the program length may be changed by this command */
  19627. A_UINT32 addr_offset; /* start writing addr in the working memory */
  19628. A_UINT32 length; /* the writing size of this command (byte units) */
  19629. /*
  19630. * The TLV follows:
  19631. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  19632. */
  19633. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  19634. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  19635. A_UINT32 tlv_header;
  19636. A_UINT32 vdev_id;
  19637. A_UINT32 addr_offset; /* start reading addr in the working memory */
  19638. A_UINT32 length; /* reading size from addr (byte units) */
  19639. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  19640. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  19641. A_UINT32 tlv_header;
  19642. A_UINT32 vdev_id;
  19643. A_UINT32 offset; /* read memory offset from start_addr */
  19644. A_UINT32 length; /* read memory length of this command */
  19645. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  19646. /*
  19647. * The TLV follows:
  19648. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  19649. */
  19650. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  19651. #define AES_BLOCK_LEN 16 /* in bytes */
  19652. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  19653. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  19654. #define FIPS_ENCRYPT_CMD 0
  19655. #define FIPS_DECRYPT_CMD 1
  19656. #define FIPS_ENGINE_AES_CTR 0
  19657. #define FIPS_ENGINE_AES_MIC 1
  19658. #define FIPS_ERROR_OPER_TIMEOUT 1
  19659. /* WMI_PDEV_FIPS_CMDID */
  19660. typedef struct {
  19661. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  19662. union {
  19663. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19664. /** pdev_id for identifying the MAC
  19665. * See macros starting with WMI_PDEV_ID_ for values.
  19666. */
  19667. A_UINT32 pdev_id;
  19668. };
  19669. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  19670. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  19671. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  19672. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  19673. A_UINT32 data_len; /* data length */
  19674. /*
  19675. * Following this structure is the TLV:
  19676. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  19677. */
  19678. } wmi_pdev_fips_cmd_fixed_param;
  19679. typedef struct {
  19680. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  19681. union {
  19682. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19683. /** pdev_id for identifying the MAC
  19684. * See macros starting with WMI_PDEV_ID_ for values.
  19685. */
  19686. A_UINT32 pdev_id;
  19687. };
  19688. A_UINT32 enable; /* 1:enable, 0:disable */
  19689. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  19690. A_UINT32 rx_antenna; /* rx antenna */
  19691. A_UINT32 tx_default_antenna; /* tx default antenna */
  19692. /*
  19693. * Following this structure is the TLV:
  19694. * wmi_pdev_smart_ant_gpio_handle
  19695. */
  19696. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  19697. /** GPIO pins/function values to control antennas */
  19698. typedef struct {
  19699. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  19700. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  19701. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  19702. /** pdev_id for identifying the MAC
  19703. * See macros starting with WMI_PDEV_ID_ for values.
  19704. */
  19705. A_UINT32 pdev_id;
  19706. } wmi_pdev_smart_ant_gpio_handle;
  19707. typedef struct {
  19708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  19709. union {
  19710. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19711. /** pdev_id for identifying the MAC
  19712. * See macros starting with WMI_PDEV_ID_ for values.
  19713. */
  19714. A_UINT32 pdev_id;
  19715. };
  19716. A_UINT32 rx_antenna;
  19717. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  19718. typedef struct {
  19719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  19720. /** unique id identifying the vdev, generated by the caller */
  19721. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19722. /** peer MAC address */
  19723. wmi_mac_addr peer_macaddr;
  19724. /*
  19725. * Following this structure is the TLV:
  19726. * wmi_peer_smart_ant_set_tx_antenna_series
  19727. */
  19728. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  19729. typedef struct {
  19730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  19731. /* antenna array */
  19732. A_UINT32 antenna_series;
  19733. } wmi_peer_smart_ant_set_tx_antenna_series;
  19734. typedef struct {
  19735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  19736. /* rate array */
  19737. union {
  19738. /* train_rate_series:
  19739. * original name, used for 8-bit rate-code implementations
  19740. */
  19741. A_UINT32 train_rate_series;
  19742. /* train_rate_series_lo:
  19743. * Contains the lower 32 bits of rate array, for larger rate-code
  19744. * implementations. This field is paired with train_rate_series_hi.
  19745. */
  19746. A_UINT32 train_rate_series_lo;
  19747. };
  19748. /* antenna array */
  19749. A_UINT32 train_antenna_series;
  19750. /* Rate flags */
  19751. /* TODO: For future use? */
  19752. A_UINT32 rc_flags;
  19753. /* rate array -- continued */
  19754. A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */
  19755. } wmi_peer_smart_ant_set_train_antenna_param;
  19756. typedef struct {
  19757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  19758. /** unique id identifying the VDEV, generated by the caller */
  19759. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19760. /** peer MAC address */
  19761. wmi_mac_addr peer_macaddr;
  19762. /* num packets; 0-stop training */
  19763. A_UINT32 num_pkts;
  19764. /*
  19765. * Following this structure is the TLV:
  19766. * wmi_peer_smart_ant_set_train_antenna_param
  19767. */
  19768. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  19769. typedef struct {
  19770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  19771. /** unique id identifying the vdev, generated by the caller */
  19772. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19773. /** peer MAC address */
  19774. wmi_mac_addr peer_macaddr;
  19775. /* command id*/
  19776. A_UINT32 cmd_id;
  19777. /* number of arguments passed */
  19778. A_UINT32 args_count;
  19779. /*
  19780. * Following this structure is the TLV:
  19781. * A_UINT32 args[]; <-- argument list
  19782. */
  19783. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  19784. typedef struct {
  19785. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  19786. A_UINT32 antCtrlChain;
  19787. /** pdev_id for identifying the MAC
  19788. * See macros starting with WMI_PDEV_ID_ for values.
  19789. */
  19790. A_UINT32 pdev_id;
  19791. } wmi_pdev_set_ant_ctrl_chain;
  19792. typedef struct {
  19793. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  19794. A_UINT32 mac_id; /* MAC ID */
  19795. A_UINT32 antCtrlCommon1;
  19796. A_UINT32 antCtrlCommon2;
  19797. /*
  19798. * Following this structure is the TLV:
  19799. * wmi_pdev_set_ant_ctrl_chain
  19800. */
  19801. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  19802. typedef struct {
  19803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  19804. union {
  19805. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19806. /** pdev_id for identifying the MAC
  19807. * See macros starting with WMI_PDEV_ID_ for values.
  19808. */
  19809. A_UINT32 pdev_id;
  19810. };
  19811. /** len of CTL info */
  19812. A_UINT32 ctl_len;
  19813. /* ctl array (len adjusted to number of words).
  19814. * Following this structure is the TLV:
  19815. * A_UINT32 ctl_info[1];
  19816. */
  19817. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  19818. typedef struct {
  19819. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  19820. union {
  19821. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19822. /** pdev_id for identifying the MAC
  19823. * See macros starting with WMI_PDEV_ID_ for values.
  19824. */
  19825. A_UINT32 pdev_id;
  19826. };
  19827. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  19828. /*
  19829. * Bit 7:0 len of array gain table
  19830. * Bit 8 bypass multi chain gain or not
  19831. */
  19832. /* array gain table(s) (len adjusted to number of words).
  19833. * Following this structure is the TLV:
  19834. * A_UINT32 arraygain_tbl[1];
  19835. */
  19836. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  19837. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  19838. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  19839. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  19840. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  19841. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  19842. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  19843. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  19844. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  19845. typedef struct {
  19846. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  19847. /** parameter id */
  19848. A_UINT32 param_id;
  19849. /** parameter value */
  19850. A_UINT32 param_value;
  19851. } wmi_fwtest_set_param_cmd_fixed_param;
  19852. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  19853. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  19854. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  19855. typedef struct {
  19856. /** TLV tag and len; tag equals
  19857. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  19858. A_UINT32 tlv_header;
  19859. wmi_mac_addr peer_macaddr;
  19860. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  19861. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  19862. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  19863. A_UINT32 vdev_id;
  19864. A_UINT32 pdev_id;
  19865. } wmi_atf_peer_info;
  19866. typedef struct {
  19867. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  19868. A_UINT32 num_peers;
  19869. /*
  19870. * Following this structure is the TLV:
  19871. * struct wmi_atf_peer_info peer_info[num_peers];
  19872. */
  19873. } wmi_peer_atf_request_fixed_param;
  19874. /* Structure for Bandwidth Fairness peer information */
  19875. typedef struct {
  19876. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  19877. A_UINT32 tlv_header;
  19878. wmi_mac_addr peer_macaddr;
  19879. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  19880. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  19881. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  19882. A_UINT32 vdev_id;
  19883. A_UINT32 pdev_id;
  19884. } wmi_bwf_peer_info;
  19885. /* Structure for Bandwidth Fairness peer request */
  19886. typedef struct {
  19887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  19888. A_UINT32 num_peers;
  19889. /*
  19890. * Following this structure is the TLV:
  19891. * struct wmi_bwf_peer_info peer_info[num_peers];
  19892. */
  19893. } wmi_peer_bwf_request_fixed_param;
  19894. /* Equal distribution of ATF air time within an VDEV. */
  19895. typedef struct {
  19896. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  19897. A_UINT32 vdev_id;
  19898. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  19899. A_UINT32 pdev_id;
  19900. } wmi_vdev_atf_request_fixed_param;
  19901. typedef struct {
  19902. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  19903. /** pdev_id for identifying the MAC
  19904. * See macros starting with WMI_PDEV_ID_ for values.
  19905. */
  19906. A_UINT32 pdev_id;
  19907. /** parameter */
  19908. A_UINT32 param;
  19909. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  19910. typedef struct {
  19911. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  19912. /** pdev_id for identifying the MAC
  19913. * See macros starting with WMI_PDEV_ID_ for values.
  19914. */
  19915. A_UINT32 pdev_id;
  19916. /** parameter */
  19917. A_UINT32 param;
  19918. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  19919. typedef struct {
  19920. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  19921. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19922. A_UINT32 qb_enable;
  19923. wmi_mac_addr peer_macaddr;
  19924. } WMI_QBOOST_CFG_CMD_fixed_param;
  19925. #define WMI_INST_STATS_INVALID_RSSI 0
  19926. typedef struct {
  19927. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  19928. A_UINT32 iRSSI; /* dB above the noise floor */
  19929. /* peer MAC address */
  19930. wmi_mac_addr peer_macaddr;
  19931. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19932. } wmi_inst_rssi_stats_resp_fixed_param;
  19933. typedef struct {
  19934. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  19935. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  19936. } wmi_peer_cck_ofdm_rate_info;
  19937. typedef struct {
  19938. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  19939. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  19940. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  19941. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  19942. } wmi_peer_mcs_rate_info;
  19943. typedef struct {
  19944. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  19945. wmi_mac_addr peer_macaddr;
  19946. A_UINT32 ratecount; /* Max Rate count for each mode */
  19947. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19948. A_UINT32 pdev_id; /* ID of the pdev this peer belongs to */
  19949. /*
  19950. * Following this structure are the TLV:
  19951. * struct wmi_peer_cck_ofdm_rate_info;
  19952. * struct wmi_peer_mcs_rate_info;
  19953. */
  19954. } wmi_peer_ratecode_list_event_fixed_param;
  19955. typedef struct wmi_wds_addr_event {
  19956. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  19957. A_UINT32 event_type[4];
  19958. wmi_mac_addr peer_mac;
  19959. wmi_mac_addr dest_mac;
  19960. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  19961. } wmi_wds_addr_event_fixed_param;
  19962. typedef struct {
  19963. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  19964. wmi_mac_addr peer_macaddr;
  19965. A_UINT32 peer_ps_state;
  19966. } wmi_peer_sta_ps_statechange_event_fixed_param;
  19967. /* WMI_PDEV_FIPS_EVENTID */
  19968. typedef struct {
  19969. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  19970. union {
  19971. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19972. /** pdev_id for identifying the MAC
  19973. * See macros starting with WMI_PDEV_ID_ for values.
  19974. */
  19975. A_UINT32 pdev_id;
  19976. };
  19977. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  19978. A_UINT32 data_len; /* Data length */
  19979. /*
  19980. * Following this structure is the TLV:
  19981. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  19982. */
  19983. } wmi_pdev_fips_event_fixed_param;
  19984. typedef struct {
  19985. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  19986. union {
  19987. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19988. /** pdev_id for identifying the MAC
  19989. * See macros starting with WMI_PDEV_ID_ for values.
  19990. */
  19991. A_UINT32 pdev_id;
  19992. };
  19993. /* Noise threshold iterations with high values */
  19994. A_UINT32 noise_floor_report_iter;
  19995. /* Total noise threshold iterations */
  19996. A_UINT32 noise_floor_total_iter;
  19997. } wmi_pdev_channel_hopping_event_fixed_param;
  19998. enum {
  19999. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  20000. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  20001. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  20002. };
  20003. typedef struct {
  20004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  20005. union {
  20006. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20007. /** pdev_id for identifying the MAC
  20008. * See macros starting with WMI_PDEV_ID_ for values.
  20009. */
  20010. A_UINT32 pdev_id;
  20011. };
  20012. A_UINT32 rate_flags;
  20013. /**
  20014. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  20015. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  20016. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  20017. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  20018. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  20019. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  20020. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  20021. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  20022. * FLAG_STBC 0x00000100 - STBC is set
  20023. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  20024. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  20025. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  20026. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  20027. * FLAG_RTSENA 0x00001000 - RTS enabled
  20028. * FLAG_CTSENA 0x00002000 - CTS enabled
  20029. * FLAG_LDPC 0x00004000 - LDPC set
  20030. * FLAG_SGI 0x00008000 - Short gaurd interval
  20031. * (0x00010000-0x00080000 unused)
  20032. *------------------
  20033. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  20034. * FLAG_SU 0x00100000 - SU Data
  20035. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  20036. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  20037. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  20038. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  20039. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  20040. *------------------
  20041. * */
  20042. A_UINT32 nss;
  20043. /**
  20044. * NSS 0x0 - 0x7
  20045. * */
  20046. A_UINT32 preamble;
  20047. /**
  20048. * PREAM_OFDM - 0x0
  20049. * PREAM_CCK - 0x1
  20050. * PREAM_HT - 0x2
  20051. * PREAM_VHT - 0x3
  20052. * PREAM_HE - 0x4
  20053. * */
  20054. A_UINT32 hw_rate;
  20055. /**
  20056. * *** HW_OFDM_RATE ***
  20057. * OFDM_48_MBPS - 0x0
  20058. * OFDM_24_MBPS - 0x1
  20059. * OFDM_12_MBPS - 0x2
  20060. * OFDM_6_MBPS - 0x3
  20061. * OFDM_54_MBPS - 0x4
  20062. * OFDM_36_MBPS - 0x5
  20063. * OFDM_18_MBPS - 0x6
  20064. * OFDM_9_MBPS - 0x7
  20065. *
  20066. * *** HW_CCK_RATE ***
  20067. * CCK_11_LONG_MBPS - 0x0
  20068. * CCK_5_5_LONG_MBPS - 0x1
  20069. * CCK_2_LONG_MBPS - 0x2
  20070. * CCK_1_LONG_MBPS - 0x3
  20071. * CCK_11_SHORT_MBPS - 0x4
  20072. * CCK_5_5_SHORT_MBPS - 0x5
  20073. * CCK_2_SHORT_MBPS - 0x6
  20074. *
  20075. * *** HW_HT / VHT_RATE ***
  20076. * MCS 0x0 - 0xb
  20077. * */
  20078. } wmi_pdev_get_tpc_cmd_fixed_param;
  20079. typedef struct {
  20080. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  20081. /** pdev_id for identifying the MAC
  20082. * See macros starting with WMI_PDEV_ID_ for values.
  20083. */
  20084. A_UINT32 pdev_id;
  20085. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  20086. typedef struct {
  20087. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  20088. /** VDEV identifier */
  20089. A_UINT32 vdev_id;
  20090. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  20091. /*
  20092. * wmi mws-coex command IDs
  20093. */
  20094. typedef enum {
  20095. WMI_MWS_COEX_STATE = 0x01,
  20096. WMI_MWS_COEX_DPWB_STATE,
  20097. WMI_MWS_COEX_TDM_STATE,
  20098. WMI_MWS_COEX_IDRX_STATE,
  20099. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  20100. } wmi_mws_coex_cmd_id;
  20101. typedef struct {
  20102. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  20103. /** VDEV identifier */
  20104. A_UINT32 vdev_id;
  20105. /** Command ID (type: wmi_mws_coex_cmd_id) */
  20106. A_UINT32 cmd_id;
  20107. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  20108. typedef struct {
  20109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  20110. /** pdev_id for identifying the MAC
  20111. * See macros starting with WMI_PDEV_ID_ for values.
  20112. */
  20113. A_UINT32 pdev_id;
  20114. /*
  20115. * Following this structure is the TLV:
  20116. * A_UINT32 tpc[2];
  20117. * tpc[0] - maximum power per rate
  20118. * tpc[1] - minimum power per rate
  20119. * Currently this event only provides max and min power limits
  20120. * for a single rate. In the future this event may be expanded
  20121. * to provide the information for multiple rates.
  20122. * At that time, the format of the data will be provided.
  20123. */
  20124. } wmi_pdev_tpc_event_fixed_param;
  20125. typedef struct {
  20126. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  20127. union {
  20128. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  20129. /** pdev_id for identifying the MAC
  20130. * See macros starting with WMI_PDEV_ID_ for values.
  20131. */
  20132. A_UINT32 pdev_id;
  20133. };
  20134. A_UINT32 nfdBr_len;
  20135. A_UINT32 nfdBm_len;
  20136. A_UINT32 freqNum_len;
  20137. /*
  20138. * Following this structure is the TLV:
  20139. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  20140. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  20141. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  20142. */
  20143. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  20144. typedef struct {
  20145. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  20146. A_UINT32 nfdBr;
  20147. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  20148. typedef struct {
  20149. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  20150. A_UINT32 nfdBm;
  20151. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  20152. typedef struct {
  20153. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  20154. A_UINT32 freqNum;
  20155. } wmi_pdev_nfcal_power_all_channels_freqNum;
  20156. typedef struct {
  20157. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  20158. A_UINT32 cck_level;
  20159. } wmi_ani_cck_event_fixed_param;
  20160. typedef enum wmi_power_debug_reg_fmt_type {
  20161. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  20162. * SOC_SYSTEM_SLEEP
  20163. * WLAN_SYSTEM_SLEEP
  20164. * RTC_SYNC_FORCE_WAKE
  20165. * MAC_DMA_ISR
  20166. * MAC_DMA_TXRX_ISR
  20167. * MAC_DMA_ISR_S1
  20168. * MAC_DMA_ISR_S2
  20169. * MAC_DMA_ISR_S3
  20170. * MAC_DMA_ISR_S4
  20171. * MAC_DMA_ISR_S5
  20172. * MAC_DMA_ISR_S6
  20173. * MAC_DMA_ISR_S7
  20174. */
  20175. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  20176. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  20177. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  20178. typedef struct {
  20179. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  20180. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  20181. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  20182. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  20183. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  20184. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  20185. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  20186. /*
  20187. * Following this structure is the TLV:
  20188. * A_UINT32 debug_registers[num_debug_registers];
  20189. */
  20190. } wmi_pdev_chip_power_stats_event_fixed_param;
  20191. typedef struct {
  20192. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  20193. A_UINT32 vdev_id;
  20194. /* total_bcn_cnt
  20195. * total beacon count (tbtt instances)
  20196. * After this value reaches 255 it saturates and stays at 255.
  20197. * This field is used to determine which of the 256 bits in the
  20198. * bmiss_bitmap field are valid.
  20199. */
  20200. A_UINT32 total_bcn_cnt;
  20201. /* total_bmiss_cnt
  20202. * Total beacon miss count in last 255 beacons, max value is 255.
  20203. * This value is the number of bits set within bmiss_bitmap.
  20204. */
  20205. A_UINT32 total_bmiss_cnt;
  20206. /* bmiss_bitmap
  20207. * This bitmap indicates the status of the last 255 beacons.
  20208. * If a bit is set, that means the corresponding beacon was missed.
  20209. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  20210. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  20211. * are valid.
  20212. */
  20213. A_UINT32 bmiss_bitmap[8];
  20214. } wmi_vdev_bcn_recv_stats_fixed_param;
  20215. typedef struct {
  20216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  20217. A_UINT32 vdev_id;
  20218. /* LTE-WLAN coexistence scheme bitmap
  20219. * Indicates the final schemes applied for the currrent Coex scenario.
  20220. * Bit 0 - TDM policy
  20221. * Bit 1 - Forced TDM policy
  20222. * Bit 2 - Dynamic Power Back-off policy
  20223. * Bit 3 - Channel Avoidance policy
  20224. * Bit 4 - Static Power Back-off policy
  20225. */
  20226. A_UINT32 coex_scheme_bitmap;
  20227. /* Active conflict count
  20228. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  20229. */
  20230. A_UINT32 active_conflict_count;
  20231. /* Potential conflict count
  20232. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  20233. */
  20234. A_UINT32 potential_conflict_count;
  20235. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  20236. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  20237. */
  20238. A_UINT32 chavd_group0_bitmap;
  20239. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  20240. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  20241. */
  20242. A_UINT32 chavd_group1_bitmap;
  20243. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  20244. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  20245. */
  20246. A_UINT32 chavd_group2_bitmap;
  20247. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  20248. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  20249. */
  20250. A_UINT32 chavd_group3_bitmap;
  20251. } wmi_vdev_get_mws_coex_state_fixed_param;
  20252. typedef struct {
  20253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  20254. A_UINT32 vdev_id;
  20255. /* Current state of the Dynamic Power Back-off state machine
  20256. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  20257. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  20258. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  20259. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  20260. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  20261. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  20262. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  20263. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  20264. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  20265. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  20266. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  20267. */
  20268. A_UINT32 current_dpwb_state;
  20269. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  20270. * where P(N) is the power applied during current cycle.
  20271. * ranges from 3dBm to 21 dBM
  20272. */
  20273. A_INT32 pnp1_value;
  20274. /* Indicates the duty cycle of current LTE frame.
  20275. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  20276. */
  20277. A_UINT32 lte_dutycycle;
  20278. /* LTE SINR value in dB, when WLAN is ON. */
  20279. A_INT32 sinr_wlan_on;
  20280. /* LTE SINR value in dB, when WLAN is OFF. */
  20281. A_INT32 sinr_wlan_off;
  20282. /* LTE blocks with error for the current bler report.
  20283. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  20284. */
  20285. A_UINT32 bler_count;
  20286. /* Number of LTE blocks considered for bler count report.
  20287. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  20288. */
  20289. A_UINT32 block_count;
  20290. /* WLAN RSSI level
  20291. * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  20292. * 0-Good, 1-Moderate, 2-Low
  20293. */
  20294. A_UINT32 wlan_rssi_level;
  20295. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  20296. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  20297. */
  20298. A_INT32 wlan_rssi;
  20299. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  20300. * 1 - TDM triggered.
  20301. * 0 - TDM not triggered.
  20302. */
  20303. A_UINT32 is_tdm_running;
  20304. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  20305. typedef struct {
  20306. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  20307. A_UINT32 vdev_id;
  20308. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  20309. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  20310. * Bit 0 - SINR TDM policy.
  20311. * Bit 1 - RSSI TDM policy.
  20312. * Bit 2 - Low Rx rate TDM policy
  20313. * Bit 3 - Sticky TDM policy
  20314. */
  20315. A_UINT32 tdm_policy_bitmap;
  20316. /* TDM LTE/WLAN sub-frame bitmap
  20317. * Indicates the bitmap of LTE/WLAN sub-frames.
  20318. * value 0: WLAN slot.
  20319. * value 1: LTE slot.
  20320. */
  20321. A_UINT32 tdm_sf_bitmap;
  20322. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  20323. typedef struct {
  20324. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  20325. A_UINT32 vdev_id;
  20326. /* SUB0 LTE-coex tech.
  20327. *------------------------
  20328. * TECH TECH_ID
  20329. *------------------------
  20330. * LTE 0
  20331. * TDSCDMA 1
  20332. * GSM1 2
  20333. * ONEX 3
  20334. * HDR 4
  20335. * WCDMA 5
  20336. * GSM2 6
  20337. * GSM3 7
  20338. * WCDMA2 8
  20339. * LTE2 9
  20340. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  20341. */
  20342. A_UINT32 sub0_techid;
  20343. /* SUB0 mitigation policy.
  20344. * Indicates the mitigation policy used to coexist with WLAN.
  20345. * 1 - Tx blanking
  20346. * 2 - Static power back-off
  20347. */
  20348. A_UINT32 sub0_policy;
  20349. /* Set if SUB0 is in link critical state.
  20350. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  20351. */
  20352. A_UINT32 sub0_is_link_critical;
  20353. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  20354. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  20355. */
  20356. A_INT32 sub0_static_power;
  20357. /* LTE SUB0 RSSI value in dBm */
  20358. A_INT32 sub0_rssi;
  20359. /* SUB1 LTE-coex tech.
  20360. *------------------------
  20361. * TECH TECH_ID
  20362. *------------------------
  20363. * LTE 0
  20364. * TDSCDMA 1
  20365. * GSM1 2
  20366. * ONEX 3
  20367. * HDR 4
  20368. * WCDMA 5
  20369. * GSM2 6
  20370. * GSM3 7
  20371. * WCDMA2 8
  20372. * LTE2 9
  20373. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  20374. */
  20375. A_UINT32 sub1_techid;
  20376. /* SUB1 mitigation policy.
  20377. * Indicates the mitigation policy used to coexist with WLAN.
  20378. * 1 - Tx blanking
  20379. * 2 - Static power back-off
  20380. */
  20381. A_UINT32 sub1_policy;
  20382. /* Set if SUB1 is in link critical state.
  20383. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  20384. */
  20385. A_UINT32 sub1_is_link_critical;
  20386. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  20387. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  20388. */
  20389. A_INT32 sub1_static_power;
  20390. /* LTE SUB1 RSSI value in dBm */
  20391. A_INT32 sub1_rssi;
  20392. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  20393. typedef struct {
  20394. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  20395. A_UINT32 vdev_id;
  20396. /* BDF values of Coex flags.
  20397. * coexflag 0x1 = MWS Coex enabled
  20398. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  20399. */
  20400. A_UINT32 coex_flags;
  20401. /* BDF values of Coex Antenna sharing config
  20402. * coex_config 0x0 = no Antenna sharing
  20403. * coexconfig 0x1 = switched based Antenna sharing
  20404. * coexconfig 0x2 = splitter based Antenna sharing
  20405. */
  20406. A_UINT32 coex_config;
  20407. /* Tx Chain mask value
  20408. * Bit 0: Tx chain-0
  20409. * Bit 1: Tx Chain-1
  20410. * value: 0x1 - Operating in 1X1
  20411. * value: 0x3 - Operating in 2X2
  20412. */
  20413. A_UINT32 tx_chain_mask;
  20414. /* Rx Chain mask value
  20415. * Bit 0: Rx chain-0
  20416. * Bit 1: Rx Chain-1
  20417. * value: 0x1 - Operating in 1X1
  20418. * value: 0x3 - Operating in 2X2
  20419. */
  20420. A_UINT32 rx_chain_mask;
  20421. /* Currently active Rx Spatial streams
  20422. * Bit 0: Rx Spatial Stream-0
  20423. * Bit 1: Rx Spatial Stream-1
  20424. */
  20425. A_UINT32 rx_nss;
  20426. /* Forced MRC policy type
  20427. * BTC_FORCED (0x01)
  20428. * RSSI_FORCED (0x02)
  20429. * MODEM_ACQ_FORCED (0x04)
  20430. */
  20431. A_UINT32 force_mrc;
  20432. /* RSSI value considered for MRC
  20433. * 1: Data RSSI
  20434. * 2: Beacon RSSI
  20435. */
  20436. A_UINT32 rssi_type;
  20437. /* RSSI value measured at Chain-0 in dBm */
  20438. A_INT32 chain0_rssi;
  20439. /* RSSI value measured at Chain-1 in dBm */
  20440. A_INT32 chain1_rssi;
  20441. /* RSSI value of two chains combined in dBm */
  20442. A_INT32 combined_rssi;
  20443. /* Absolute imbalance between two Rx chains in dB */
  20444. A_UINT32 imbalance;
  20445. /* RSSI threshold defined for the above imbalance value in dBm.
  20446. * Based on the degree of imbalance between the rx chains, different
  20447. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  20448. * Combining) use of multiple rx chains is suitable.
  20449. * This field shows the RSSI threshold below which MRC is used.
  20450. */
  20451. A_INT32 mrc_threshold;
  20452. /* Antenna grant duration to WLAN, in milliseconds */
  20453. A_UINT32 grant_duration;
  20454. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  20455. typedef enum wmi_chip_power_save_failure_reason_code_type {
  20456. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  20457. WMI_HW_POWER_SAVE_FAILURE_REASON,
  20458. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  20459. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  20460. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  20461. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  20462. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  20463. typedef struct {
  20464. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  20465. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  20466. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  20467. } wmi_chip_power_save_failure_detected_fixed_param;
  20468. typedef struct {
  20469. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  20470. A_UINT32 ofdm_level;
  20471. } wmi_ani_ofdm_event_fixed_param;
  20472. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  20473. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  20474. * lower priority when compared to WLAN high priority traffic.
  20475. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  20476. */
  20477. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  20478. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  20479. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  20480. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  20481. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  20482. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  20483. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  20484. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  20485. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  20486. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  20487. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  20488. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  20489. typedef enum wmi_coex_algo_type {
  20490. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  20491. WMI_COEX_ALGO_FREERUN = 1,
  20492. WMI_COEX_ALGO_OCS = 2,
  20493. } WMI_COEX_ALGO_TYPE;
  20494. typedef enum wmi_coex_config_type {
  20495. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  20496. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  20497. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  20498. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  20499. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  20500. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  20501. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  20502. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  20503. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  20504. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  20505. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  20506. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  20507. 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) */
  20508. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  20509. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  20510. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  20511. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  20512. arg1 PTA num,
  20513. arg2 mode (2-wire/3-wire/PTA),
  20514. arg3 first slot time in microsec,
  20515. arg4 BT priority time in microsec,
  20516. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  20517. arg6 PTA priority */
  20518. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  20519. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  20520. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  20521. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  20522. arg2-arg5: BT information parameters */
  20523. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  20524. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  20525. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  20526. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  20527. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  20528. * The arguments are interpreted differently
  20529. * depending on whether the target suppports
  20530. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  20531. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  20532. * arg1 => isolation between BT and WLAN chains,
  20533. * dB units,
  20534. * same isolation for all chains
  20535. * Else:
  20536. * arg1 bits 7:0 - chain 0 isolation, in dB
  20537. * arg1 bits 15:8 - chain 1 isolation, in dB
  20538. * arg1 bits 23:16 - chain 2 isolation, in dB
  20539. * arg1 bits 31:24 - chain 3 isolation, in dB
  20540. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  20541. * 1 => Different isolation b/w BT and each WLAN chain
  20542. */
  20543. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
  20544. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
  20545. arg1 low - lower limit
  20546. arg2 low - upper limit
  20547. arg3 medium - lower limit
  20548. arg4 medium - upper limit
  20549. arg5 high - lower limit
  20550. arg6 high - upper limit */
  20551. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  20552. 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 */
  20553. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  20554. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  20555. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  20556. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  20557. * config to T_PRIO T_DELAY parameter for each case
  20558. * arg1 - wlan/bt state
  20559. * 0: beacon tx
  20560. * 1: wlan connecting
  20561. * 2: wlan in dhcp
  20562. * 3: a2dp critical
  20563. * 4: eSCO
  20564. * arg2 - t_prio for low priority traffic (microsecond units)
  20565. * arg3 - t_delay for low priority traffic (microsecond units)
  20566. * arg4 - t_prio for high priority traffic (microsecond units)
  20567. * arg5 - t_delay for high priority traffic (microsecond units)
  20568. */
  20569. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  20570. /* WMI_COEX_CONFIG_THREE_WAY_COEX_START
  20571. * config to set coex parameters from WLAN host to adjust priorities
  20572. * among wlan/bt/zb
  20573. * arg1 - priority level 1, the serialized coex scenorio ID will be put here
  20574. * arg2 - priority level 2, same parameters rules as arg1
  20575. * arg3 - priority level 3, same parameters rules as arg1
  20576. * arg4 - priority level 4, same parameters rules as arg1
  20577. */
  20578. WMI_COEX_CONFIG_THREE_WAY_COEX_START = 34,
  20579. /* WMI_COEX_CONFIG_MPTA_HELPER_ENABLE
  20580. * config to enable(1)/disable(0) mpta-helper function
  20581. */
  20582. WMI_COEX_CONFIG_MPTA_HELPER_ENABLE = 35,
  20583. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE
  20584. * config zigbee state
  20585. * arg1: zigbee state
  20586. * (idle form-network wait-join join-network network-up HMI)
  20587. */
  20588. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_STATE = 36,
  20589. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS
  20590. * config ocs wlan/nonwlan params after MPTA interrupt fired
  20591. * arg1: wlan duration (ms units) in Shape-OCS
  20592. * arg2: nonwlan duration (ms units) in Shape-OCS
  20593. */
  20594. WMI_COEX_CONFIG_MPTA_HELPER_INT_OCS_PARAMS = 37,
  20595. /* WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS
  20596. * config ocs wlan/nonwlan params during monitor period after
  20597. * interrupt period finished
  20598. * arg1: wlan duration (ms units) in Shape-OCS
  20599. * arg2: nonwlan duration (ms units) in Shape-OCS
  20600. */
  20601. WMI_COEX_CONFIG_MPTA_HELPER_MON_OCS_PARAMS = 38,
  20602. /* WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION
  20603. * config ocs duration in interrupt period and monitor period
  20604. * arg1: duration (ms units) in interrupt period
  20605. * arg2: duration (ms units) in monitor period
  20606. */
  20607. WMI_COEX_CONFIG_MPTA_HELPER_INT_MON_DURATION = 39,
  20608. /* WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL
  20609. * config zigbee channel 11 - 26
  20610. */
  20611. WMI_COEX_CONFIG_MPTA_HELPER_ZIGBEE_CHANNEL = 40,
  20612. /* WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION
  20613. * config msw mute duration (ms units) after MPTA interrupt fired
  20614. */
  20615. WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41,
  20616. /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN
  20617. * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive
  20618. */
  20619. WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42,
  20620. /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR
  20621. * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function
  20622. */
  20623. WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43,
  20624. /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE
  20625. * config BTC separate chain mode or shared mode
  20626. */
  20627. WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44,
  20628. } WMI_COEX_CONFIG_TYPE;
  20629. typedef struct {
  20630. A_UINT32 tlv_header;
  20631. A_UINT32 vdev_id;
  20632. A_UINT32 config_type; /* wmi_coex_config_type enum */
  20633. A_UINT32 config_arg1;
  20634. A_UINT32 config_arg2;
  20635. A_UINT32 config_arg3;
  20636. A_UINT32 config_arg4;
  20637. A_UINT32 config_arg5;
  20638. A_UINT32 config_arg6;
  20639. } WMI_COEX_CONFIG_CMD_fixed_param;
  20640. /**
  20641. * This command is sent from WLAN host driver to firmware to
  20642. * request firmware to enable/disable channel avoidance report
  20643. * to host.
  20644. *
  20645. */
  20646. enum {
  20647. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  20648. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  20649. };
  20650. typedef struct {
  20651. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  20652. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  20653. A_UINT32 rpt_allow;
  20654. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  20655. /*
  20656. * Periodic channel stats WMI command structure
  20657. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  20658. */
  20659. typedef struct {
  20660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  20661. /** 1 = enable, 0 = disable */
  20662. A_UINT32 enable;
  20663. /** periodic stats duration (units are milliseconds) */
  20664. A_UINT32 stats_period;
  20665. /** pdev_id for identifying the MAC
  20666. * See macros starting with WMI_PDEV_ID_ for values.
  20667. */
  20668. A_UINT32 pdev_id;
  20669. } wmi_set_periodic_channel_stats_config_fixed_param;
  20670. typedef struct {
  20671. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  20672. /** pdev_id for identifying the MAC
  20673. * See macros starting with WMI_PDEV_ID_ for values.
  20674. */
  20675. A_UINT32 pdev_id;
  20676. /* Identify the wlan module */
  20677. A_UINT32 module_id;
  20678. /* Num of elements in the following args[] array */
  20679. A_UINT32 num_args;
  20680. /**
  20681. * Following this structure are the TLVs:
  20682. * A_UINT32 args[];
  20683. **/
  20684. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  20685. typedef struct {
  20686. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  20687. /**
  20688. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  20689. * @details
  20690. * Each WMM access category (voice, video, best-effort, background)
  20691. * will have its own timeout value to dictate how long to wait for
  20692. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  20693. * have already been received.
  20694. * This parameter specifies the timeout in milliseconds for each
  20695. * access category.
  20696. * The array elements are indexed by the WMI_AC enum to identify
  20697. * which array element corresponds to which AC / traffic type.
  20698. */
  20699. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  20700. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  20701. /**
  20702. * wlan stats shall be understood as per period.
  20703. * Generally, it is reported periodically based on the period specified by host.
  20704. * But if the variation of one stats of compared to the
  20705. * pervious notification exceeds a threshold,
  20706. * FW will report the wlan stats immediately.
  20707. * The values of the stats becomes the new reference to compute variations.
  20708. * This threshold can be a global setting or per category.
  20709. * Host can enable/disable the mechanism for any stats per bitmap.
  20710. * TX/RX thresholds (percentage value) are shared across ACs,
  20711. * and TX/RX stats comprisons are processed per AC of each peer.
  20712. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  20713. * and the detailed tx_mpdus threshold value is set to 10%,
  20714. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  20715. * and it reaches 110 during the second period,
  20716. * FW will generate and send out a wlan stats event immediately.
  20717. */
  20718. typedef struct {
  20719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  20720. /** Indicate if threshold mechnism is enabled or disabled.
  20721. * It is disabled by default.
  20722. * Host can enable and disable it dynamically.
  20723. */
  20724. A_UINT32 enable_thresh;
  20725. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  20726. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  20727. */
  20728. A_UINT32 use_thresh_bitmap;
  20729. /** global threshold, valid when use_thresh_bitmap equals 0.
  20730. * It takes effect for all counters.
  20731. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  20732. */
  20733. A_UINT32 gbl_thresh;
  20734. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  20735. A_UINT32 cca_thresh_enable_bitmap;
  20736. /** Enable/disable bitmap for threshold mechanism of signal stats */
  20737. A_UINT32 signal_thresh_enable_bitmap;
  20738. /** Enable/disable bitmap for threshold mechanism of TX stats */
  20739. A_UINT32 tx_thresh_enable_bitmap;
  20740. /** Enable/disable bitmap for threshold mechanism of RX stats */
  20741. A_UINT32 rx_thresh_enable_bitmap;
  20742. /* This TLV is followed by TLVs below:
  20743. * wmi_chan_cca_stats_thresh cca_thresh;
  20744. * wmi_peer_signal_stats_thresh signal_thresh;
  20745. * wmi_tx_stats_thresh tx_thresh;
  20746. * wmi_rx_stats_thresh rx_thresh;
  20747. */
  20748. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  20749. typedef enum {
  20750. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  20751. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  20752. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  20753. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  20754. } wmi_wlan_stats_id;
  20755. typedef struct {
  20756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  20757. wmi_wlan_stats_id stats_id;
  20758. } wmi_request_wlan_stats_cmd_fixed_param;
  20759. typedef enum {
  20760. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  20761. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  20762. } wmi_peer_stats_info_request_type;
  20763. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  20764. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  20765. */
  20766. typedef struct {
  20767. /** TLV tag and len; tag equals
  20768. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  20769. A_UINT32 tlv_header;
  20770. /** request_type to indicate if only stats of
  20771. * one peer or all peers of the VDEV are requested,
  20772. * see wmi_peer_stats_info_request_type.
  20773. */
  20774. A_UINT32 request_type;
  20775. /** VDEV identifier */
  20776. A_UINT32 vdev_id;
  20777. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  20778. wmi_mac_addr peer_macaddr;
  20779. /** flag to indicate if FW needs to reset requested peers stats */
  20780. A_UINT32 reset_after_request;
  20781. } wmi_request_peer_stats_info_cmd_fixed_param;
  20782. typedef enum {
  20783. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  20784. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  20785. } wmi_radio_chan_stats_request_type;
  20786. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  20787. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  20788. */
  20789. typedef struct {
  20790. /** TLV tag and len; tag equals
  20791. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  20792. A_UINT32 tlv_header;
  20793. /** request_type to indicate if only stats of
  20794. * one channel or all channels are requested,
  20795. * see wmi_radio_chan_stats_request_type.
  20796. */
  20797. A_UINT32 request_type;
  20798. /** Frequency of channel whose stats is requested,
  20799. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  20800. */
  20801. A_UINT32 chan_mhz;
  20802. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  20803. A_UINT32 reset_after_request;
  20804. } wmi_request_radio_chan_stats_cmd_fixed_param;
  20805. typedef struct {
  20806. /** TLV tag and len; tag equals
  20807. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  20808. A_UINT32 tlv_header;
  20809. /* VDEV identifier */
  20810. A_UINT32 vdev_id;
  20811. /* Leader's mac address */
  20812. wmi_mac_addr leader_mac_addr;
  20813. } wmi_rmc_set_leader_cmd_fixed_param;
  20814. typedef struct {
  20815. /** TLV tag and len; tag equals
  20816. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  20817. A_UINT32 tlv_header;
  20818. /* VDEV identifier */
  20819. A_UINT32 vdev_id;
  20820. /* 0: success
  20821. * 1: selected leader not found in network, able to find using auto selection
  20822. * -1: error
  20823. * non zero value should be return to userspace in case of failure */
  20824. A_INT32 status;
  20825. /* bssid of new leader */
  20826. wmi_mac_addr leader_mac_addr;
  20827. } wmi_rmc_manual_leader_event_fixed_param;
  20828. typedef enum {
  20829. WLAN_2G_CAPABILITY = 0x1,
  20830. WLAN_5G_CAPABILITY = 0x2,
  20831. } WLAN_BAND_CAPABILITY;
  20832. typedef enum wmi_hw_mode_config_type {
  20833. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  20834. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  20835. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  20836. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  20837. * Support for both PHYs within one band is planned for 5G only
  20838. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  20839. * but could be extended to other bands in the future.
  20840. * The separation of the band between the two PHYs needs to be communicated separately.
  20841. */
  20842. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  20843. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  20844. */
  20845. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  20846. } WMI_HW_MODE_CONFIG_TYPE;
  20847. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  20848. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  20849. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  20850. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  20851. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  20852. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  20853. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  20854. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  20855. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  20856. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  20857. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  20858. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  20859. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  20860. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  20861. typedef struct {
  20862. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  20863. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  20864. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  20865. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  20866. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  20867. * though in practice the elements may always be ordered by hw_mode_id */
  20868. A_UINT32 hw_mode_id;
  20869. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  20870. A_UINT32 pdev_id;
  20871. /* phy id. Starts with 0 */
  20872. A_UINT32 phy_id;
  20873. /* supported modulations and number of MU beamformees */
  20874. union {
  20875. struct {
  20876. A_UINT32 supports_11b:1,
  20877. supports_11g:1,
  20878. supports_11a:1,
  20879. supports_11n:1,
  20880. supports_11ac:1,
  20881. supports_11ax:1,
  20882. unused: 22,
  20883. max_mubfee: 4; /* max MU beamformees supported per MAC */
  20884. };
  20885. A_UINT32 supported_flags;
  20886. };
  20887. /* supported bands, enum WLAN_BAND_CAPABILITY */
  20888. A_UINT32 supported_bands;
  20889. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  20890. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  20891. A_UINT32 ampdu_density;
  20892. /* max bw supported 2G, enum wmi_channel_width */
  20893. A_UINT32 max_bw_supported_2G;
  20894. /* WMI HT Capability, WMI_HT_CAP defines */
  20895. A_UINT32 ht_cap_info_2G;
  20896. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  20897. A_UINT32 vht_cap_info_2G;
  20898. /* VHT Supported MCS Set field Rx/Tx same
  20899. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  20900. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20901. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  20902. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  20903. * - 3 indicates that n spatial streams is not supported
  20904. * - bit [15:0] Each NSS takes 2 bit.
  20905. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  20906. * n spatial streams
  20907. * - bit 16 - for NSS 1
  20908. * - bit 17 - for NSS 2
  20909. * - .
  20910. * - .
  20911. * - bit 23 - for NSS 8
  20912. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  20913. * are valid
  20914. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  20915. */
  20916. A_UINT32 vht_supp_mcs_2G;
  20917. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  20918. A_UINT32 he_cap_info_2G;
  20919. /* HE Supported MCS Set field Rx/Tx same
  20920. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  20921. * bit 2-0 indicating max HE MCS of NSS1
  20922. * bit 5-3 indicating max HE MCS of NSS2 and so on
  20923. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  20924. * HE BW less than or equal to 80MHZ is encoded as follows
  20925. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20926. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  20927. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  20928. * - 3 indicates that n spatial streams is not supported
  20929. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  20930. */
  20931. A_UINT32 he_supp_mcs_2G;
  20932. /* Valid Transmit chain mask */
  20933. A_UINT32 tx_chain_mask_2G;
  20934. /* Valid Receive chain mask */
  20935. A_UINT32 rx_chain_mask_2G;
  20936. /* max bw supported 5G, enum wmi_channel_width */
  20937. A_UINT32 max_bw_supported_5G;
  20938. /* WMI HT Capability, WMI_HT_CAP defines */
  20939. A_UINT32 ht_cap_info_5G;
  20940. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  20941. A_UINT32 vht_cap_info_5G;
  20942. /* VHT Supported MCS Set field Rx/Tx same
  20943. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  20944. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20945. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  20946. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  20947. * - 3 indicates that n spatial streams is not supported
  20948. * - bit [15:0] Each NSS takes 2 bit.
  20949. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  20950. * n spatial streams
  20951. * - bit 16 - for NSS 1
  20952. * - bit 17 - for NSS 2
  20953. * - .
  20954. * - .
  20955. * - bit 23 - for NSS 8
  20956. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  20957. * are valid
  20958. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  20959. */
  20960. A_UINT32 vht_supp_mcs_5G;
  20961. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  20962. A_UINT32 he_cap_info_5G;
  20963. /* HE Supported MCS Set field Rx/Tx same
  20964. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  20965. * bit 2-0 indicating max HE MCS of NSS1
  20966. * bit 5-3 indicating max HE MCS of NSS2 and so on
  20967. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  20968. * HE BW less than or equal to 80MHZ is encoded as follows
  20969. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  20970. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  20971. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  20972. * - 3 indicates that n spatial streams is not supported
  20973. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  20974. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  20975. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  20976. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  20977. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  20978. */
  20979. A_UINT32 he_supp_mcs_5G;
  20980. /* Valid Transmit chain mask */
  20981. A_UINT32 tx_chain_mask_5G;
  20982. /* Valid Receive chain mask */
  20983. A_UINT32 rx_chain_mask_5G;
  20984. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  20985. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  20986. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  20987. wmi_ppe_threshold he_ppet2G;
  20988. wmi_ppe_threshold he_ppet5G;
  20989. /* chainmask table to be used for the MAC */
  20990. A_UINT32 chainmask_table_id;
  20991. /* PDEV ID to LMAC ID mapping */
  20992. A_UINT32 lmac_id;
  20993. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  20994. A_UINT32 he_cap_info_2G_ext;
  20995. A_UINT32 he_cap_info_5G_ext;
  20996. /*
  20997. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  20998. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  20999. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  21000. * bit[31:3] : Reserved
  21001. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  21002. */
  21003. A_UINT32 he_cap_info_internal;
  21004. A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */
  21005. A_UINT32 low_2ghz_chan_freq; /* units = MHz */
  21006. A_UINT32 high_2ghz_chan_freq; /* units = MHz */
  21007. A_UINT32 low_5ghz_chan_freq; /* units = MHz */
  21008. A_UINT32 high_5ghz_chan_freq; /* units = MHz */
  21009. } WMI_MAC_PHY_CAPABILITIES;
  21010. typedef struct {
  21011. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  21012. /* hw_mode_id - identify a particular set of HW characteristics,
  21013. * as specified by the subsequent fields */
  21014. A_UINT32 hw_mode_id;
  21015. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  21016. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  21017. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  21018. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  21019. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  21020. A_UINT32 phy_id_map;
  21021. /* hw_mode_config_type
  21022. * Identify a particular type of HW mode such as SBS, DBS etc.
  21023. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  21024. */
  21025. A_UINT32 hw_mode_config_type;
  21026. } WMI_HW_MODE_CAPABILITIES;
  21027. /*
  21028. * The following macros are for the bitfields witihin the supported flags field
  21029. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  21030. * Capabilities for the chainmask
  21031. */
  21032. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  21033. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  21034. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  21035. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  21036. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  21037. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  21038. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  21039. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  21040. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  21041. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  21042. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  21043. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  21044. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  21045. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  21046. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  21047. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  21048. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  21049. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  21050. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  21051. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  21052. /** Definition of valid chainmask and associated capabilities */
  21053. typedef struct {
  21054. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  21055. /* supported flags: Capabilities for this chianmask*/
  21056. union {
  21057. struct {
  21058. A_UINT32 supports_chan_width_20:1,
  21059. supports_chan_width_40:1,
  21060. supports_chan_width_80:1,
  21061. supports_chan_width_160:1,
  21062. supports_chan_width_80P80:1,
  21063. reserved:22, /* bits 26:5 */
  21064. chain_mask_2G:1,
  21065. chain_mask_5G:1,
  21066. chain_mask_tx:1,
  21067. chain_mask_rx:1,
  21068. supports_aDFS:1; /* agile DFS */
  21069. };
  21070. A_UINT32 supported_flags;
  21071. };
  21072. A_UINT32 chainmask;
  21073. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  21074. typedef struct {
  21075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  21076. A_UINT32 chainmask_table_id;
  21077. /* Number of vaild Chainmask in the table */
  21078. A_UINT32 num_valid_chainmask;
  21079. /*
  21080. * This TLV is followed by the below TLVs:
  21081. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  21082. */
  21083. } WMI_MAC_PHY_CHAINMASK_COMBO;
  21084. typedef struct {
  21085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  21086. /* num HW modes */
  21087. A_UINT32 num_hw_modes;
  21088. /* number of unique chainmask combo tables */
  21089. A_UINT32 num_chainmask_tables;
  21090. /*
  21091. * This TLV is followed by the below TLVs:
  21092. *
  21093. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  21094. *
  21095. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  21096. *
  21097. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  21098. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  21099. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  21100. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  21101. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  21102. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  21103. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  21104. * etc.
  21105. */
  21106. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  21107. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  21108. typedef struct {
  21109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  21110. /* phy id */
  21111. A_UINT32 phy_id;
  21112. /* regdomain value specified in EEPROM */
  21113. A_UINT32 eeprom_reg_domain;
  21114. /* regdomain */
  21115. A_UINT32 eeprom_reg_domain_ext;
  21116. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  21117. A_UINT32 regcap1;
  21118. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  21119. A_UINT32 regcap2;
  21120. /* REGDMN MODE, see REGDMN_MODE_ enum */
  21121. A_UINT32 wireless_modes;
  21122. A_UINT32 low_2ghz_chan; /* freq in MHz */
  21123. A_UINT32 high_2ghz_chan; /* freq in MHz */
  21124. A_UINT32 low_5ghz_chan; /* freq in MHz */
  21125. A_UINT32 high_5ghz_chan; /* freq in MHz */
  21126. } WMI_HAL_REG_CAPABILITIES_EXT;
  21127. typedef struct {
  21128. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  21129. A_UINT32 num_phy;
  21130. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  21131. } WMI_SOC_HAL_REG_CAPABILITIES;
  21132. typedef struct {
  21133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  21134. A_UINT32 pdev_id;
  21135. A_UINT32 min_num_ptr;
  21136. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  21137. A_UINT32 min_buf_size;
  21138. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  21139. A_UINT32 min_buf_align;
  21140. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  21141. } WMI_OEM_DMA_RING_CAPABILITIES;
  21142. typedef struct {
  21143. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  21144. /* sar version in bdf */
  21145. A_UINT32 active_version;
  21146. } WMI_SAR_CAPABILITIES;
  21147. typedef struct {
  21148. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  21149. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  21150. A_UINT32 default_adaptive_dwell_mode;
  21151. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  21152. A_UINT32 adapative_lpf_weight;
  21153. /** interval to monitor passive scan in msec */
  21154. A_UINT32 passive_monitor_interval_ms;
  21155. /** % of wifi activity to switch from passive to active 0-100 */
  21156. A_UINT32 wifi_activity_threshold_pct;
  21157. } wmi_scan_adaptive_dwell_parameters_tlv;
  21158. typedef struct {
  21159. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  21160. /* globally enable/disable adaptive dwell */
  21161. A_UINT32 enable;
  21162. /** pdev_id for identifying the MAC
  21163. * See macros starting with WMI_PDEV_ID_ for values.
  21164. * In non-DBDC case host should set it to 0
  21165. */
  21166. A_UINT32 pdev_id;
  21167. /**
  21168. * followed by TLV (tag length value) parameters array
  21169. * The TLV's are:
  21170. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  21171. */
  21172. } wmi_scan_adaptive_dwell_config_fixed_param;
  21173. typedef struct {
  21174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  21175. /** module_id **/
  21176. A_UINT32 module_id;
  21177. /** number of dbs scans */
  21178. A_UINT32 num_dbs_scans;
  21179. /** number of non-dbs scans */
  21180. A_UINT32 num_non_dbs_scans;
  21181. } wmi_scan_dbs_duty_cycle_tlv_param;
  21182. typedef struct {
  21183. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  21184. /* number of scan client dutycycle param elements */
  21185. A_UINT32 num_clients;
  21186. /** pdev_id for identifying the MAC
  21187. * See macros starting with WMI_PDEV_ID_ for values.
  21188. * In non-DBDC case host should set it to 0
  21189. */
  21190. A_UINT32 pdev_id;
  21191. /**
  21192. * followed by TLV (tag length value) parameters array
  21193. * The TLV's are:
  21194. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  21195. */
  21196. } wmi_scan_dbs_duty_cycle_fixed_param;
  21197. typedef struct {
  21198. /** TLV tag and len; tag equals
  21199. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  21200. A_UINT32 tlv_header;
  21201. /**
  21202. * temperature sensor value in celsius when to exit to lower zone,
  21203. * this value can be lower than HWM of lower zone as zone overlapping
  21204. * is permitted by design to provide hysteresis
  21205. */
  21206. A_UINT32 temp_lwm;
  21207. /**
  21208. * temperature sensor value in celsius when to exit to higher zone,
  21209. * this value can be higher than LWM of higher zone as zone overlapping
  21210. * is permitted by design to provide hysteresis
  21211. */
  21212. A_UINT32 temp_hwm;
  21213. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  21214. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  21215. * Prioritization:
  21216. * 0 = disable all data tx queues, No Prioritization defined
  21217. * 1 = disable BK tx queue
  21218. * 2 = disable BK+BE tx queues
  21219. * 3 = disable BK+BE+VI tx queues
  21220. */
  21221. A_UINT32 prio;
  21222. } wmi_therm_throt_level_config_info;
  21223. typedef struct {
  21224. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  21225. A_UINT32 pdev_id; /* config for each pdev */
  21226. A_UINT32 enable; /* 0:disable, 1:enable */
  21227. A_UINT32 dc; /* duty cycle in ms */
  21228. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  21229. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  21230. /*
  21231. * Following this structure is the TLV:
  21232. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  21233. */
  21234. } wmi_therm_throt_config_request_fixed_param;
  21235. /** FW response with the stats event id for every pdev and zones */
  21236. typedef struct {
  21237. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  21238. A_UINT32 tlv_header;
  21239. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  21240. A_UINT32 temp; /* Temperature reading in celsius */
  21241. A_UINT32 level; /* current thermal throttling level */
  21242. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  21243. /* This TLV is followed by another TLV of array of structs
  21244. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  21245. */
  21246. } wmi_therm_throt_stats_event_fixed_param;
  21247. typedef struct {
  21248. /** TLV tag and len; tag equals
  21249. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  21250. A_UINT32 tlv_header;
  21251. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  21252. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  21253. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  21254. } wmi_therm_throt_level_stats_info;
  21255. typedef enum {
  21256. WMI_REG_EXT_FCC_MIDBAND = 0,
  21257. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  21258. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  21259. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  21260. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  21261. WMI_REG_EXT_FCC_CH_144 = 5,
  21262. } WMI_REG_EXT_BITMAP;
  21263. #ifdef WMI_CMD_STRINGS
  21264. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  21265. {
  21266. switch (wmi_command) {
  21267. /* initialize the wlan sub system */
  21268. WMI_RETURN_STRING(WMI_INIT_CMDID);
  21269. /* Scan specific commands */
  21270. /* start scan request to FW */
  21271. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  21272. /* stop scan request to FW */
  21273. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  21274. /* full list of channels as defined by the regulatory
  21275. * that will be used by scanner */
  21276. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  21277. /* overwrite default priority table in scan scheduler */
  21278. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  21279. /* This command to adjust the priority and min.max_rest_time
  21280. * of an on ongoing scan request.
  21281. */
  21282. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  21283. /* PDEV(physical device) specific commands */
  21284. /* set regulatorty ctl id used by FW to determine the exact
  21285. * ctl power limits */
  21286. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  21287. /* set channel. mainly used for supporting monitor mode */
  21288. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  21289. /* set pdev specific parameters */
  21290. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  21291. /* enable packet log */
  21292. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  21293. /* disable packet log*/
  21294. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  21295. /* set wmm parameters */
  21296. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  21297. /* set HT cap ie that needs to be carried probe requests
  21298. * HT/VHT channels */
  21299. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  21300. /* set VHT cap ie that needs to be carried on probe
  21301. * requests on VHT channels */
  21302. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  21303. /* Command to send the DSCP-to-TID map to the target */
  21304. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  21305. /* set quiet ie parameters. primarily used in AP mode */
  21306. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  21307. /* Enable/Disable Green AP Power Save */
  21308. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  21309. /* get TPC config for the current operating channel */
  21310. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  21311. /* set the base MAC address for the physical device before
  21312. * a VDEV is created. For firmware that does not support
  21313. * this feature and this command, the pdev MAC address will
  21314. * not be changed. */
  21315. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  21316. /* eeprom content dump , the same to bdboard data */
  21317. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  21318. /* VDEV(virtual device) specific commands */
  21319. /* vdev create */
  21320. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  21321. /* vdev delete */
  21322. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  21323. /* vdev start request */
  21324. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  21325. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  21326. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  21327. /* vdev up request */
  21328. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  21329. /* vdev stop request */
  21330. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  21331. /* vdev down request */
  21332. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  21333. /* set a vdev param */
  21334. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  21335. /* set a key (used for setting per peer unicast
  21336. * and per vdev multicast) */
  21337. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  21338. /* wnm sleep mode command */
  21339. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  21340. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  21341. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  21342. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  21343. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  21344. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  21345. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  21346. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  21347. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  21348. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  21349. /* peer specific commands */
  21350. /** create a peer */
  21351. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  21352. /** delete a peer */
  21353. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  21354. /** delete all peer (excluding bss peer) */
  21355. WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID);
  21356. /** flush specific tid queues of a peer */
  21357. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  21358. /** set a parameter of a peer */
  21359. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  21360. /* set peer to associated state. will cary all parameters
  21361. * determined during assocication time */
  21362. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  21363. /* add a wds (4 address ) entry. used only for testing
  21364. * WDS feature on AP products */
  21365. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  21366. /* remove wds (4 address ) entry. used only for testing WDS
  21367. * feature on AP products */
  21368. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  21369. /* set up mcast info for multicast to unicast conversion */
  21370. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  21371. /* request peer info from FW to get PEER_INFO_EVENTID */
  21372. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  21373. /* unmap response for a peer */
  21374. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  21375. /* beacon/management specific commands */
  21376. /* transmit beacon by reference. used for transmitting beacon
  21377. * on low latency interface like pcie */
  21378. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  21379. /* transmit beacon by value */
  21380. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  21381. /* set the beacon template. used in beacon offload mode to setup
  21382. * the common beacon template with the FW to be used by FW to
  21383. * generate beacons */
  21384. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  21385. /* set beacon filter with FW */
  21386. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  21387. /* enable/disable filtering of probe requests in the firmware */
  21388. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  21389. /* transmit management frame by value. will be deprecated */
  21390. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  21391. /* set the probe response template. used in beacon offload mode
  21392. * to setup the common probe response template with the FW to
  21393. * be used by FW to generate probe responses */
  21394. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  21395. /* commands to directly control ba negotiation directly from
  21396. * host. only used in test mode */
  21397. /* turn off FW Auto addba mode and let host control addba */
  21398. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  21399. /* send add ba request */
  21400. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  21401. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  21402. /* send del ba */
  21403. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  21404. /* set add ba response will be used by FW to generate
  21405. * addba response*/
  21406. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  21407. /* send single VHT MPDU with AMSDU */
  21408. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  21409. /* Station power save specific config */
  21410. /* enable/disable station powersave */
  21411. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  21412. /* set station power save specific parameter */
  21413. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  21414. /* set station mimo powersave mode */
  21415. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  21416. /* DFS-specific commands */
  21417. /* enable DFS (radar detection)*/
  21418. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  21419. /* disable DFS (radar detection)*/
  21420. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  21421. /* enable DFS phyerr/parse filter offload */
  21422. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  21423. /* enable DFS phyerr/parse filter offload */
  21424. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  21425. /* Roaming specific commands */
  21426. /* set roam scan mode */
  21427. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  21428. /* set roam scan rssi threshold below which roam
  21429. * scan is enabled */
  21430. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  21431. /* set roam scan period for periodic roam scan mode */
  21432. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  21433. /* set roam scan trigger rssi change threshold */
  21434. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  21435. /* set roam AP profile */
  21436. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  21437. /* set channel list for roam scans */
  21438. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  21439. /* offload scan specific commands */
  21440. /* set offload scan AP profile */
  21441. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  21442. /* remove offload scan AP profile */
  21443. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  21444. /* set offload scan period */
  21445. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  21446. /* P2P specific commands */
  21447. /* set P2P device info. FW will used by FW to create P2P IE
  21448. * to be carried in probe response generated during p2p listen
  21449. * and for p2p discoverability */
  21450. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  21451. /* enable/disable p2p discoverability on STA/AP VDEVs */
  21452. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  21453. /* set p2p ie to be carried in beacons generated by FW for GO */
  21454. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  21455. /* set p2p ie to be carried in probe response frames generated
  21456. * by FW for GO */
  21457. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  21458. /* set the vendor specific p2p ie data.
  21459. * FW will use this to parse the P2P NoA
  21460. * attribute in the beacons/probe responses received.
  21461. */
  21462. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  21463. /* set the configure of p2p find offload */
  21464. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  21465. /* set the vendor specific p2p ie data for p2p find offload */
  21466. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  21467. /* set the BSSID/device name pattern of p2p find offload */
  21468. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  21469. /* set OppPS related parameters **/
  21470. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  21471. /* AP power save specific config
  21472. * set AP power save specific param */
  21473. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  21474. /* set AP UAPSD coex specific param */
  21475. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  21476. /* Rate-control specific commands */
  21477. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  21478. /* WLAN Profiling commands. */
  21479. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  21480. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  21481. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  21482. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  21483. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  21484. /* Suspend resume command Ids */
  21485. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  21486. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  21487. /* Beacon filter commands */
  21488. /* add a beacon filter */
  21489. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  21490. /* remove a beacon filter */
  21491. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  21492. /* WOW Specific WMI commands */
  21493. /* add pattern for awake */
  21494. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  21495. /* deleta a wake pattern */
  21496. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  21497. /* enable/deisable wake event */
  21498. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  21499. /* enable WOW */
  21500. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  21501. /* host woke up from sleep event to FW. Generated in response
  21502. * to WOW Hardware event */
  21503. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  21504. /* RTT measurement related cmd */
  21505. /* reques to make an RTT measurement */
  21506. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  21507. /* reques to report a tsf measurement */
  21508. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  21509. /* spectral scan command */
  21510. /* configure spectral scan */
  21511. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  21512. /* enable/disable spectral scan and trigger */
  21513. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  21514. /* F/W stats */
  21515. /* one time request for stats */
  21516. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  21517. /* Push MCC Adaptive Scheduler Stats to Firmware */
  21518. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  21519. /* ARP OFFLOAD REQUEST*/
  21520. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  21521. /* Proactive ARP Response Add Pattern Command*/
  21522. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  21523. /* Proactive ARP Response Del Pattern Command*/
  21524. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  21525. /* NS offload confid*/
  21526. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  21527. /* GTK offload Specific WMI commands */
  21528. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  21529. /* CSA offload Specific WMI commands */
  21530. /* csa offload enable */
  21531. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  21532. /* chan switch command */
  21533. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  21534. /* Chatter commands */
  21535. /* Change chatter mode of operation */
  21536. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  21537. /* chatter add coalescing filter command */
  21538. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  21539. /* chatter delete coalescing filter command */
  21540. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  21541. /* chatter coalecing query command */
  21542. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  21543. /* addba specific commands */
  21544. /* start the aggregation on this TID */
  21545. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  21546. /* stop the aggregation on this TID */
  21547. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  21548. /* set station mimo powersave method */
  21549. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  21550. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  21551. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  21552. /* Configure the Keep Alive Parameters */
  21553. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  21554. /* Request ssn from target for a sta/tid pair */
  21555. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  21556. /* misc command group */
  21557. /* echo command mainly used for testing */
  21558. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  21559. /* !!IMPORTANT!!
  21560. * If you need to add a new WMI command to the
  21561. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  21562. * please make sure you add it BEHIND
  21563. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  21564. * as we MUST have a fixed value here to maintain compatibility between
  21565. * UTF and the ART2 driver
  21566. */
  21567. /* UTF WMI commands */
  21568. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  21569. /* set debug log config */
  21570. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  21571. /* QVIT specific command id */
  21572. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  21573. /* Factory Testing Mode request command
  21574. * used for integrated chipsets */
  21575. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  21576. /* set and get keepalive parameters command */
  21577. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  21578. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  21579. /* For fw recovery test command */
  21580. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  21581. /* Set Mcast/Bdcast filter */
  21582. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  21583. /* set thermal management params */
  21584. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  21585. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  21586. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  21587. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  21588. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  21589. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  21590. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  21591. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  21592. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  21593. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  21594. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  21595. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  21596. /* GPIO Configuration */
  21597. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  21598. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  21599. /* Txbf configuration command */
  21600. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  21601. /* FWTEST Commands */
  21602. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  21603. /* set NoA descs */
  21604. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  21605. /* TDLS Configuration */
  21606. /* enable/disable TDLS */
  21607. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  21608. /* set tdls peer state */
  21609. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  21610. /* Resmgr Configuration */
  21611. /* Adaptive OCS is enabled by default in the FW.
  21612. * This command is used to disable FW based adaptive OCS.
  21613. */
  21614. WMI_RETURN_STRING
  21615. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  21616. /* set the requested channel time quota for the home channels */
  21617. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  21618. /* set the requested latency for the home channels */
  21619. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  21620. /* STA SMPS Configuration */
  21621. /* force SMPS mode */
  21622. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  21623. /* set SMPS parameters */
  21624. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  21625. /* Wlan HB commands */
  21626. /* enalbe/disable wlan HB */
  21627. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  21628. /* set tcp parameters for wlan HB */
  21629. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  21630. /* set tcp pkt filter for wlan HB */
  21631. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  21632. /* set udp parameters for wlan HB */
  21633. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  21634. /* set udp pkt filter for wlan HB */
  21635. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  21636. /* Wlan RMC commands*/
  21637. /* enable/disable RMC */
  21638. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  21639. /* configure action frame period */
  21640. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  21641. /* For debug/future enhancement purposes only,
  21642. * configures/finetunes RMC algorithms */
  21643. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  21644. /* WLAN MHF offload commands */
  21645. /* enable/disable MHF offload */
  21646. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  21647. /* Plumb routing table for MHF offload */
  21648. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  21649. /* location scan commands */
  21650. /* start batch scan */
  21651. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  21652. /* stop batch scan */
  21653. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  21654. /* get batch scan result */
  21655. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  21656. /* OEM related cmd */
  21657. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  21658. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  21659. /* NAN request cmd */
  21660. WMI_RETURN_STRING(WMI_NAN_CMDID);
  21661. /* Modem power state cmd */
  21662. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  21663. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  21664. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  21665. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  21666. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  21667. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  21668. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  21669. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  21670. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  21671. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  21672. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  21673. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  21674. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  21675. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  21676. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  21677. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  21678. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  21679. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  21680. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  21681. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  21682. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  21683. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  21684. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  21685. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  21686. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  21687. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  21688. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  21689. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  21690. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  21691. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  21692. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  21693. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  21694. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  21695. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  21696. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  21697. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  21698. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  21699. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  21700. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  21701. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  21702. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  21703. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  21704. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  21705. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  21706. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  21707. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  21708. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  21709. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  21710. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  21711. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  21712. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  21713. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  21714. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  21715. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  21716. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  21717. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  21718. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  21719. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  21720. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  21721. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  21722. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  21723. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  21724. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  21725. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  21726. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  21727. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  21728. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  21729. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  21730. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  21731. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  21732. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  21733. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  21734. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  21735. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  21736. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  21737. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  21738. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  21739. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  21740. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  21741. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  21742. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  21743. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  21744. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  21745. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  21746. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  21747. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  21748. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  21749. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  21750. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  21751. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  21752. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  21753. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  21754. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  21755. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  21756. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  21757. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  21758. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  21759. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  21760. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  21761. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  21762. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  21763. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  21764. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  21765. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  21766. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  21767. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  21768. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  21769. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  21770. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  21771. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  21772. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  21773. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  21774. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  21775. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  21776. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  21777. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  21778. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  21779. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  21780. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  21781. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  21782. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  21783. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  21784. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  21785. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  21786. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  21787. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  21788. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  21789. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  21790. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  21791. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  21792. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  21793. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  21794. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  21795. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  21796. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  21797. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  21798. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  21799. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  21800. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  21801. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  21802. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  21803. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  21804. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  21805. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  21806. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  21807. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  21808. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  21809. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  21810. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  21811. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  21812. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  21813. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  21814. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  21815. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  21816. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  21817. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  21818. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  21819. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  21820. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  21821. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  21822. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  21823. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  21824. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  21825. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  21826. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  21827. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  21828. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  21829. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  21830. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  21831. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  21832. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  21833. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  21834. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  21835. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  21836. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  21837. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  21838. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  21839. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  21840. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  21841. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  21842. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  21843. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  21844. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  21845. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  21846. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  21847. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  21848. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  21849. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  21850. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  21851. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  21852. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  21853. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  21854. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  21855. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  21856. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  21857. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  21858. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  21859. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  21860. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  21861. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  21862. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  21863. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  21864. WMI_RETURN_STRING(WMI_NDP_CMDID);
  21865. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  21866. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  21867. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  21868. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  21869. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  21870. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  21871. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  21872. WMI_RETURN_STRING(WMI_PDEV_SET_RAP_CONFIG_CMDID);
  21873. WMI_RETURN_STRING(WMI_STA_TDCC_CONFIG_CMDID);
  21874. WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID);
  21875. WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID);
  21876. WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID);
  21877. WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID);
  21878. WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID);
  21879. WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID);
  21880. WMI_RETURN_STRING(WMI_OEM_DATA_CMDID);
  21881. WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID);
  21882. WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID);
  21883. WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID);
  21884. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID);
  21885. WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID);
  21886. WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID);
  21887. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID);
  21888. WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID);
  21889. WMI_RETURN_STRING(WMI_CFR_CAPTURE_FILTER_CMDID);
  21890. }
  21891. return "Invalid WMI cmd";
  21892. }
  21893. #endif /* WMI_CMD_STRINGS */
  21894. /** WMI commands/events for the regulatory offload */
  21895. /** Host indicating current country code to FW */
  21896. typedef struct {
  21897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  21898. A_UINT32 pdev_id;
  21899. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  21900. } wmi_set_current_country_cmd_fixed_param;
  21901. typedef enum {
  21902. WMI_COUNTRYCODE_ALPHA2,
  21903. WMI_COUNTRYCODE_COUNTRY_ID,
  21904. WMI_COUNTRYCODE_DOMAIN_CODE,
  21905. } WMI_COUNTRYCODE_TYPE;
  21906. typedef struct {
  21907. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  21908. A_UINT32 pdev_id;
  21909. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  21910. union {
  21911. struct {
  21912. /* Three character for alpha2. The first two is ISO name for country the last one
  21913. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  21914. A_UINT32 alpha2:24,
  21915. unused:8;
  21916. };
  21917. A_UINT32 country_id; /* Country ID */
  21918. A_UINT32 domain_code; /* Domain code */
  21919. } country_code;
  21920. } wmi_set_init_country_cmd_fixed_param;
  21921. /* Freq units in MHz */
  21922. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  21923. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  21924. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  21925. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  21926. /* BW in MHz */
  21927. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  21928. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  21929. /* regpower in dBm */
  21930. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  21931. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  21932. /* antenna gain */
  21933. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  21934. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  21935. typedef enum {
  21936. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  21937. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  21938. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  21939. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  21940. } WMI_REGULATORY_FLAGS;
  21941. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  21942. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  21943. typedef struct {
  21944. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  21945. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  21946. * bits 31:16 = u16 end_freq
  21947. * (both in MHz units) */
  21948. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  21949. bits 23:16 = u8 reg_power (dBm units),
  21950. bits 31:24 = u8 ant_gain (dB units) */
  21951. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  21952. bits 31:16 reserved */
  21953. } wmi_regulatory_rule_struct;
  21954. typedef enum {
  21955. WMI_REG_DFS_UNINIT_REGION = 0,
  21956. WMI_REG_DFS_FCC_REGION = 1,
  21957. WMI_REG_DFS_ETSI_REGION = 2,
  21958. WMI_REG_DFS_MKK_REGION = 3,
  21959. WMI_REG_DFS_CN_REGION = 4,
  21960. WMI_REG_DFS_KR_REGION = 5,
  21961. /* Add new items above */
  21962. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  21963. } WMI_REG_DFS_REGION;
  21964. typedef enum {
  21965. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  21966. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  21967. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  21968. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  21969. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  21970. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  21971. } WMI_REGULATORY_PHYBITMAP;
  21972. typedef enum {
  21973. WMI_REG_SET_CC_STATUS_PASS = 0,
  21974. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  21975. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  21976. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  21977. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  21978. WMI_REG_SET_CC_STATUS_FAIL = 5,
  21979. } WMI_REG_SET_CC_STATUS_CODE;
  21980. typedef struct {
  21981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  21982. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  21983. A_UINT32 phy_id;
  21984. A_UINT32 alpha2;
  21985. A_UINT32 num_phy;
  21986. A_UINT32 country_id;
  21987. A_UINT32 domain_code;
  21988. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  21989. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  21990. A_UINT32 min_bw_2g; /* BW in MHz */
  21991. A_UINT32 max_bw_2g; /* BW in MHz */
  21992. A_UINT32 min_bw_5g; /* BW in MHz */
  21993. A_UINT32 max_bw_5g; /* BW in MHz */
  21994. A_UINT32 num_2g_reg_rules;
  21995. A_UINT32 num_5g_reg_rules;
  21996. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  21997. } wmi_reg_chan_list_cc_event_fixed_param;
  21998. typedef struct {
  21999. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  22000. A_UINT32 vdev_id;
  22001. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  22002. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  22003. } wmi_11d_scan_start_cmd_fixed_param;
  22004. typedef struct {
  22005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  22006. A_UINT32 vdev_id;
  22007. } wmi_11d_scan_stop_cmd_fixed_param;
  22008. /** FW indicating new current country code to Host */
  22009. typedef struct {
  22010. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  22011. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  22012. } wmi_11d_new_country_event_fixed_param;
  22013. typedef struct {
  22014. /** TLV tag and len; tag equals
  22015. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  22016. A_UINT32 tlv_header;
  22017. /* Currently there are no parameters for this message. */
  22018. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  22019. typedef struct {
  22020. /** TLV tag and len; tag equals
  22021. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  22022. A_UINT32 tlv_header;
  22023. /** pdev_id for identifying the MAC
  22024. * See macros starting with WMI_PDEV_ID_ for values.
  22025. */
  22026. A_UINT32 pdev_id;
  22027. } wmi_pdev_get_nfcal_power_fixed_param;
  22028. typedef struct {
  22029. /** TLV tag and len; tag equals
  22030. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  22031. A_UINT32 tlv_header;
  22032. /** 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.
  22033. * Currently the HW descriptor only supports 4 chains at most.
  22034. * Further isolation_chainX elements can be added in the future
  22035. * for additional chains, if needed.
  22036. */
  22037. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  22038. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  22039. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  22040. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  22041. } wmi_coex_report_isolation_event_fixed_param;
  22042. typedef enum {
  22043. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  22044. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  22045. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  22046. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  22047. } wmi_rcpi_measurement_type;
  22048. typedef struct {
  22049. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  22050. A_UINT32 tlv_header;
  22051. /* VDEV identifier */
  22052. A_UINT32 vdev_id;
  22053. /* peer MAC address */
  22054. wmi_mac_addr peer_macaddr;
  22055. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  22056. A_UINT32 measurement_type;
  22057. } wmi_request_rcpi_cmd_fixed_param;
  22058. typedef struct {
  22059. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  22060. A_UINT32 tlv_header;
  22061. /* VDEV identifier */
  22062. A_UINT32 vdev_id;
  22063. /* peer MAC address */
  22064. wmi_mac_addr peer_macaddr;
  22065. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  22066. A_UINT32 measurement_type;
  22067. /* Measured RCPI in dBm of the peer requested by host */
  22068. A_INT32 rcpi;
  22069. /** status
  22070. * 0 - Requested peer RCPI available
  22071. * 1 - Requested peer RCPI not available
  22072. */
  22073. A_UINT32 status;
  22074. } wmi_update_rcpi_event_fixed_param;
  22075. /* Definition of mask for various package id */
  22076. #define WMI_PKGID_MASK_AUTO 0x00000080
  22077. typedef struct {
  22078. /** TLV tag and len; tag equals*/
  22079. A_UINT32 tlv_header;
  22080. /**
  22081. * The value field is filled with WMI_PKGID_MASK values.
  22082. * Currently, the only flag used within values is
  22083. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  22084. */
  22085. A_UINT32 value;
  22086. } wmi_pkgid_event_fixed_param;
  22087. typedef struct {
  22088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  22089. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  22090. /* enable is set to 1 if mac randomization to be enabled */
  22091. A_UINT32 enable;
  22092. /* randomization mac address if randomization is enabled */
  22093. wmi_mac_addr mac_addr;
  22094. /* To get the PMAC from freq param */
  22095. A_UINT32 freq; /* units in MHz */
  22096. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  22097. typedef struct {
  22098. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  22099. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  22100. A_UINT32 status; /* status is 1 if success and 0 if failed */
  22101. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  22102. /* Definition of HW data filtering */
  22103. typedef enum {
  22104. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  22105. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  22106. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  22107. typedef struct {
  22108. A_UINT32 tlv_header;
  22109. A_UINT32 vdev_id;
  22110. A_UINT32 enable; /* 1 . enable, 0- disable */
  22111. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  22112. } wmi_hw_data_filter_cmd_fixed_param;
  22113. /* This command is used whenever host wants to restart multiple
  22114. * VDEVs using single command and the VDEV that are restarted will
  22115. * need to have same properties they had before restart except for the
  22116. * operating channel
  22117. */
  22118. typedef struct {
  22119. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  22120. /** pdev_id for identifying the MAC
  22121. * See macros starting with WMI_PDEV_ID_ for values.
  22122. * In non-DBDC case host should set it to 0
  22123. */
  22124. A_UINT32 pdev_id;
  22125. /** unique id identifying the module, generated by the caller */
  22126. A_UINT32 requestor_id;
  22127. /** Disable H/W ack.
  22128. * During CAC, Our HW shouldn't ack directed frames
  22129. */
  22130. A_UINT32 disable_hw_ack;
  22131. /* Determine the duration of CAC on the given channel 'chan' */
  22132. A_UINT32 cac_duration_ms;
  22133. A_UINT32 num_vdevs;
  22134. /* The TLVs follows this structure:
  22135. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  22136. * wmi_channel chan; <------ WMI channel
  22137. */
  22138. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  22139. typedef struct {
  22140. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  22141. A_UINT32 tlv_header;
  22142. /** pdev_id for identifying the MAC
  22143. * See macros starting with WMI_PDEV_ID_ for values.
  22144. * In non-DBDC case host should set it to 0
  22145. */
  22146. A_UINT32 pdev_id;
  22147. /** CSA switch count value in the last transmitted beacon */
  22148. A_UINT32 current_switch_count;
  22149. A_UINT32 num_vdevs;
  22150. /* The TLVs follows this structure:
  22151. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  22152. */
  22153. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  22154. typedef struct {
  22155. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  22156. A_UINT32 vdev_id;
  22157. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  22158. } wmi_csc_vdev_list;
  22159. typedef struct {
  22160. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  22161. A_UINT32 tlv_header;
  22162. /** pdev_id for identifying the MAC
  22163. * See macros starting with WMI_PDEV_ID_ for values.
  22164. * In non-DBDC case host should set it to 0
  22165. */
  22166. A_UINT32 pdev_id;
  22167. /** CSC switch count value in the last transmitted beacon */
  22168. A_UINT32 current_switch_count;
  22169. /* The TLVs follows this structure:
  22170. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  22171. */
  22172. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  22173. /* Operation types for packet routing command */
  22174. typedef enum {
  22175. WMI_PDEV_ADD_PKT_ROUTING,
  22176. WMI_PDEV_DEL_PKT_ROUTING,
  22177. } wmi_pdev_pkt_routing_op_code;
  22178. /* Packet routing types based on specific data types */
  22179. typedef enum {
  22180. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  22181. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  22182. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  22183. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  22184. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  22185. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  22186. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV4,
  22187. WMI_PDEV_ROUTING_TYPE_DNS_TCP_IPV6,
  22188. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV4,
  22189. WMI_PDEV_ROUTING_TYPE_DNS_UDP_IPV6,
  22190. WMI_PDEV_ROUTING_TYPE_ICMP_IPV4,
  22191. WMI_PDEV_ROUTING_TYPE_ICMP_IPV6,
  22192. WMI_PDEV_ROUTING_TYPE_TCP_IPV4,
  22193. WMI_PDEV_ROUTING_TYPE_TCP_IPV6,
  22194. WMI_PDEV_ROUTING_TYPE_UDP_IPV4,
  22195. WMI_PDEV_ROUTING_TYPE_UDP_IPV6,
  22196. WMI_PDEV_ROUTING_TYPE_IPV4,
  22197. WMI_PDEV_ROUTING_TYPE_IPV6,
  22198. WMI_PDEV_ROUTING_TYPE_EAP,
  22199. } wmi_pdev_pkt_routing_type;
  22200. typedef enum {
  22201. WMI_PDEV_WIFIRXCCE_USE_CCE_E = 0,
  22202. WMI_PDEV_WIFIRXCCE_USE_ASPT_E = 1,
  22203. WMI_PDEV_WIFIRXCCE_USE_FT_E = 2,
  22204. WMI_PDEV_WIFIRXCCE_USE_CCE2_E = 3,
  22205. } wmi_pdev_dest_ring_handler_type;
  22206. /* 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 */
  22207. typedef struct {
  22208. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  22209. A_UINT32 tlv_header;
  22210. /** Identifies pdev on which routing needs to be applied */
  22211. A_UINT32 pdev_id;
  22212. /** Indicates the routing operation type: add/delete */
  22213. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  22214. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  22215. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  22216. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  22217. * packet needs to be routed.
  22218. */
  22219. A_UINT32 dest_ring;
  22220. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  22221. * CCE copies this back in RX_MSDU_END_TLV.
  22222. */
  22223. A_UINT32 meta_data;
  22224. /**
  22225. * Indicates the dest ring handler type: CCE, APST, FT, CCE2
  22226. * Refer to wmi_pdev_dest_ring_handler_type / WMI_PDEV_WIFIRXCCE_USE_xxx
  22227. */
  22228. A_UINT32 dest_ring_handler;
  22229. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  22230. typedef enum {
  22231. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  22232. WMI_CALIBRATION_OK, /* The calibration status is OK */
  22233. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  22234. } WMI_CALIBRATION_STATUS;
  22235. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  22236. /**
  22237. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  22238. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  22239. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  22240. * null-terminator
  22241. */
  22242. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  22243. typedef struct {
  22244. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  22245. A_UINT32 software_cal_version; /* Current software level calibration data version */
  22246. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  22247. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  22248. /* board_mcn_detail:
  22249. * Provides board's MCN (Material Control Number) information for the host
  22250. * to display. This is used to track the Hardware level revisions/versions.
  22251. * This array carries the ASCII values of the MCN to the host. And host
  22252. * would just print this in a string format whenever user requests.
  22253. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  22254. * of a WMI message will be automatically byteswapped by the copy engine
  22255. * as the messages are transferred between host and target, to convert
  22256. * between the target's little-endianness and the host's big-endianness.
  22257. * Consequently, a big-endian host will have to manually unswap the bytes
  22258. * within the board_mcn_detail string buffer to get the bytes back into
  22259. * the desired natural order.
  22260. */
  22261. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  22262. /** pdev_id for identifying the MAC
  22263. * See macros starting with WMI_PDEV_ID_ for values.
  22264. */
  22265. A_UINT32 pdev_id;
  22266. } wmi_pdev_check_cal_version_event_fixed_param;
  22267. typedef struct {
  22268. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  22269. /** pdev_id for identifying the MAC
  22270. * See macros starting with WMI_PDEV_ID_ for values.
  22271. */
  22272. A_UINT32 pdev_id;
  22273. } wmi_pdev_check_cal_version_cmd_fixed_param;
  22274. typedef struct {
  22275. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  22276. /** Identifies pdev on which diversity gain to be applied */
  22277. A_UINT32 pdev_id;
  22278. /** The number of spatial stream */
  22279. A_UINT32 nss;
  22280. /** The number of gains */
  22281. A_UINT32 num_gains;
  22282. /*
  22283. * This fixed_param TLV is followed by other TLVs:
  22284. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  22285. */
  22286. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  22287. /* flags for unit_test_event */
  22288. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  22289. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  22290. /* from bit 2 to bit 31 are reserved */
  22291. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  22292. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  22293. } while (0)
  22294. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  22295. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  22296. } while (0)
  22297. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  22298. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  22299. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  22300. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  22301. } while (0)
  22302. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  22303. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  22304. } while (0)
  22305. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  22306. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  22307. typedef struct {
  22308. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  22309. A_UINT32 tlv_header;
  22310. /* unique id identifying the VDEV, generated by the caller */
  22311. A_UINT32 vdev_id;
  22312. /* Identify the wlan module */
  22313. A_UINT32 module_id;
  22314. /* unique id identifying the unit test cmd, generated by the caller */
  22315. A_UINT32 diag_token;
  22316. /* flag for the status of the unit_test_cmd */
  22317. A_UINT32 flag;
  22318. /* data length number of bytes for current dump */
  22319. A_UINT32 payload_len;
  22320. /* TLV/Payload after this structure is sent in little endian
  22321. * format for the length mentioned in this structure.
  22322. * A_UINT8 payload[1];
  22323. */
  22324. } wmi_unit_test_event_fixed_param;
  22325. /* Definition of latency levels */
  22326. typedef enum {
  22327. WMI_WLM_LL_NORMAL = 0x0,
  22328. WMI_WLM_LL_MODERATE = 0x1,
  22329. WMI_WLM_LL_LOW = 0x2,
  22330. WMI_WLM_LL_ULTRA_LOW = 0x3,
  22331. } WMI_WLM_LATENCY_LEVEL;
  22332. /*
  22333. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  22334. *
  22335. * |31 19| 18 | 17|16 14| 13 | 12| 11 | 10 | 9 | 8 |7 6|5 4|3 2| 1 | 0 |
  22336. * +-----+-----+---+-----+----+---+----+----+-----+----+----+----+----+---+---+
  22337. * | RSVD|SRATE|RTS| NSS |EDCA|TRY|SSLP|CSLP|DBMPS|RSVD|Roam|RSVD|DWLT|DFS|SUP|
  22338. * +------------------------------+---------------+---------+-----------------+
  22339. * | WAL | PS | Roam | Scan |
  22340. *
  22341. * Flag values:
  22342. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  22343. * based on the traffic's latency level
  22344. * (0) default tx retry behavior
  22345. * EDCA: (1) Apply VO parameters on BE
  22346. * (0) default behavior
  22347. * NSS: (0) no Nss limits, other than those negotiatied during association
  22348. * (1) during 2-chain operation, tx only a single spatial stream
  22349. * (2) - (7) reserved / invalid
  22350. * RTS: (0) default protection
  22351. * (1) always enable RTS/CTS protection
  22352. * SRATE: (0) default secondary rate policy
  22353. * (1) disable secondary rate
  22354. */
  22355. /* bit 0-3 of flags is used for scan operation */
  22356. /* bit 0: WLM_FLAGS_SCAN_SUPPRESS, suppress all scan and other bits would be ignored if bit is set */
  22357. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  22358. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  22359. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  22360. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  22361. (b3 b2)
  22362. (0 0 ): Default dwell time
  22363. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  22364. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  22365. overall scan duration.
  22366. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  22367. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  22368. the accuracy of scan result.
  22369. (1 1 ): reserved
  22370. */
  22371. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  22372. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  22373. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  22374. /* bit 4-5: reserved for scan */
  22375. /* bit 6-7 of flags is used for roaming operation */
  22376. /* bit 6-7: define roaming policy:
  22377. (b7 b6)
  22378. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  22379. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  22380. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  22381. (1 1 ): reserved
  22382. */
  22383. #define WLM_FLAGS_ROAM_ALLOW 0
  22384. #define WLM_FLAGS_ROAM_SUPPRESS 1
  22385. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  22386. /* bit 8: reserved for roaming */
  22387. /* bit 9-11 of flags is used for powersave operation */
  22388. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  22389. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  22390. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  22391. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  22392. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  22393. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  22394. /* bit 17-31 of flags is reserved for powersave and WAL */
  22395. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  22396. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  22397. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  22398. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  22399. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  22400. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  22401. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  22402. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  22403. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  22404. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  22405. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  22406. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  22407. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  22408. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  22409. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  22410. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  22411. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  22412. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  22413. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  22414. #define WLM_FLAGS_WAL_ALWAYS_RTS_PROTECTION(flag) WMI_GET_BITS(flag, 17, 1)
  22415. #define WLM_FLAGS_WAL_RTS_PROTECTION_SET(flag, val) WMI_SET_BITS(flag, 17, 1, val)
  22416. #define WLM_FLAGS_WAL_DISABLE_SECONDARY_RATE(flag) WMI_GET_BITS(flag, 18, 1)
  22417. #define WLM_FLAGS_WAL_SECONDARY_RATE_SET(flag, val) WMI_SET_BITS(flag, 18, 1, val)
  22418. typedef struct {
  22419. /** TLV tag and len; tag equals
  22420. * WMI_WLM_CONFIG_CMD_fixed_param */
  22421. A_UINT32 tlv_header;
  22422. /* VDEV identifier */
  22423. A_UINT32 vdev_id;
  22424. /* Refer to WMI_WLM_LATENCY_LEVEL
  22425. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  22426. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  22427. * operation to support lower latency of WLAN.
  22428. */
  22429. A_UINT32 latency_level;
  22430. /* represent uplink latency in ms
  22431. * This parameter will be used by STAPS module to decide timing parameters, like
  22432. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  22433. * durations.
  22434. */
  22435. A_UINT32 ul_latency;
  22436. /* represent downlink latency in ms
  22437. * Similar usage as ul_latency
  22438. */
  22439. A_UINT32 dl_latency;
  22440. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  22441. A_UINT32 flags;
  22442. } wmi_wlm_config_cmd_fixed_param;
  22443. /* Broadcast TWT enable/disable */
  22444. #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1)
  22445. #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  22446. /* legacy MBSSID enable/disable */
  22447. #define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1)
  22448. #define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  22449. /* 11ax MBSSID enable/disable */
  22450. #define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1)
  22451. #define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val)
  22452. typedef struct {
  22453. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  22454. /** 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
  22455. */
  22456. A_UINT32 pdev_id;
  22457. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  22458. A_UINT32 mbss_support; /* Reserved */
  22459. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  22460. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  22461. /*
  22462. * The congestion parameters below are in percent of occupied airtime.
  22463. */
  22464. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  22465. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  22466. /*
  22467. * The interference parameters below use an abstract method of evaluating
  22468. * interference. The parameters are in percent, ranging from 0 for no
  22469. * interference, to 100 for interference extreme enough to completely
  22470. * block the signal of interest.
  22471. */
  22472. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  22473. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  22474. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  22475. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  22476. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  22477. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  22478. 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) */
  22479. /*
  22480. * The below interval parameters have units of milliseconds.
  22481. */
  22482. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  22483. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  22484. A_UINT32 remove_sta_slot_interval; /* Interval between decisions making to remove TWT slot of STAs */
  22485. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  22486. } wmi_twt_enable_cmd_fixed_param;
  22487. /* status code of enabling TWT */
  22488. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  22489. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  22490. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  22491. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  22492. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  22493. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  22494. } WMI_ENABLE_TWT_STATUS_T;
  22495. typedef struct {
  22496. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  22497. /** 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 */
  22498. A_UINT32 pdev_id;
  22499. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  22500. } wmi_twt_enable_complete_event_fixed_param;
  22501. typedef struct {
  22502. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  22503. /** 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 */
  22504. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  22505. A_UINT32 flags; /* enable/disable flags, refer to MACROs TWT_EN_DIS_FLAGS_* (TWT_EN_DIS_FLAGS_GET_BTWT etc.) */
  22506. } wmi_twt_disable_cmd_fixed_param;
  22507. typedef struct {
  22508. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  22509. A_UINT32 reserved0; /* unused right now */
  22510. } wmi_twt_disable_complete_event_fixed_param;
  22511. /* from IEEE 802.11ah section 9.4.2.200 */
  22512. typedef enum _WMI_TWT_COMMAND_T {
  22513. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  22514. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  22515. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  22516. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  22517. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  22518. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  22519. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  22520. WMI_TWT_COMMAND_REJECT_TWT = 7,
  22521. } WMI_TWT_COMMAND_T;
  22522. /* TWT command, refer to WMI_TWT_COMMAND_T */
  22523. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  22524. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  22525. /* 0 means Individual TWT, 1 means Broadcast TWT */
  22526. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  22527. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  22528. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  22529. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  22530. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  22531. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  22532. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  22533. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  22534. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  22535. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  22536. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  22537. /* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */
  22538. #define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1)
  22539. #define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  22540. typedef struct {
  22541. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  22542. A_UINT32 vdev_id; /* VDEV identifier */
  22543. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22544. A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */
  22545. /* 1. wake_intvl_mantis must be <= 0xFFFF
  22546. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  22547. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  22548. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  22549. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  22550. */
  22551. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  22552. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  22553. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  22554. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */
  22555. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  22556. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  22557. /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog,
  22558. * indicates for how long(in units of TBTTs) current B-TWT session
  22559. * parameters will not be changed.
  22560. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  22561. */
  22562. A_UINT32 b_twt_persistence;
  22563. /* Broadcast TWT(B-TWT) Recommendation, refer to section
  22564. * "9.4.2.199 TWT element" of latest 11ax draft
  22565. */
  22566. A_UINT32 b_twt_recommendation;
  22567. } wmi_twt_add_dialog_cmd_fixed_param;
  22568. /* status code of adding TWT dialog */
  22569. typedef enum _WMI_ADD_TWT_STATUS_T {
  22570. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  22571. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  22572. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  22573. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22574. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  22575. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22576. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22577. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  22578. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  22579. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  22580. } WMI_ADD_TWT_STATUS_T;
  22581. typedef struct {
  22582. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  22583. A_UINT32 vdev_id; /* VDEV identifier */
  22584. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22585. A_UINT32 dialog_id; /* TWT dialog ID */
  22586. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  22587. } wmi_twt_add_dialog_complete_event_fixed_param;
  22588. typedef struct {
  22589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  22590. A_UINT32 vdev_id; /* VDEV identifier */
  22591. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22592. A_UINT32 dialog_id; /* TWT dialog ID */
  22593. /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog,
  22594. * indicates for how long(in units of TBTTs) current B-TWT session
  22595. * parameters will be present.
  22596. * Refer to 11ax spec session "9.4.2.199 TWT element" for more info.
  22597. */
  22598. A_UINT32 b_twt_persistence;
  22599. } wmi_twt_del_dialog_cmd_fixed_param;
  22600. /* status code of deleting TWT dialog */
  22601. typedef enum _WMI_DEL_TWT_STATUS_T {
  22602. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  22603. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22604. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22605. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22606. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22607. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22608. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  22609. } WMI_DEL_TWT_STATUS_T;
  22610. typedef struct {
  22611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  22612. A_UINT32 vdev_id; /* VDEV identifier */
  22613. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22614. A_UINT32 dialog_id; /* TWT dialog ID */
  22615. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  22616. } wmi_twt_del_dialog_complete_event_fixed_param;
  22617. typedef struct {
  22618. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  22619. A_UINT32 vdev_id; /* VDEV identifier */
  22620. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22621. A_UINT32 dialog_id; /* TWT dialog ID */
  22622. } wmi_twt_pause_dialog_cmd_fixed_param;
  22623. /* status code of pausing TWT dialog */
  22624. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  22625. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  22626. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22627. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22628. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22629. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22630. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22631. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  22632. } WMI_PAUSE_TWT_STATUS_T;
  22633. typedef struct {
  22634. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  22635. A_UINT32 vdev_id; /* VDEV identifier */
  22636. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22637. A_UINT32 dialog_id; /* TWT dialog ID */
  22638. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  22639. } wmi_twt_pause_dialog_complete_event_fixed_param;
  22640. typedef struct {
  22641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  22642. A_UINT32 vdev_id; /* VDEV identifier */
  22643. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22644. A_UINT32 dialog_id; /* TWT dialog ID */
  22645. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  22646. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax sectin "9.4.1.60 TWT Information field" */
  22647. } wmi_twt_resume_dialog_cmd_fixed_param;
  22648. /* status code of resuming TWT dialog */
  22649. typedef enum _WMI_RESUME_TWT_STATUS_T {
  22650. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  22651. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22652. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  22653. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22654. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  22655. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22656. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  22657. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  22658. } WMI_RESUME_TWT_STATUS_T;
  22659. typedef struct {
  22660. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  22661. A_UINT32 vdev_id; /* VDEV identifier */
  22662. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22663. A_UINT32 dialog_id; /* TWT dialog ID */
  22664. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  22665. } wmi_twt_resume_dialog_complete_event_fixed_param;
  22666. typedef struct {
  22667. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */
  22668. A_UINT32 vdev_id; /* VDEV identifier */
  22669. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22670. A_UINT32 dialog_id; /* TWT dialog ID */
  22671. } wmi_twt_btwt_invite_sta_cmd_fixed_param;
  22672. /* status code of inviting STA to B-TWT dialog */
  22673. typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T {
  22674. WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */
  22675. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22676. WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  22677. WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22678. WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */
  22679. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22680. WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  22681. WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  22682. } WMI_TWT_BTWT_INVITE_STA_STATUS_T;
  22683. typedef struct {
  22684. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */
  22685. A_UINT32 vdev_id; /* VDEV identifier */
  22686. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22687. A_UINT32 dialog_id; /* TWT dialog ID */
  22688. A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */
  22689. } wmi_twt_btwt_invite_sta_complete_event_fixed_param;
  22690. typedef struct {
  22691. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */
  22692. A_UINT32 vdev_id; /* VDEV identifier */
  22693. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22694. A_UINT32 dialog_id; /* TWT dialog ID */
  22695. } wmi_twt_btwt_remove_sta_cmd_fixed_param;
  22696. /* status code of removing STA from B-TWT dialog */
  22697. typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T {
  22698. WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */
  22699. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  22700. WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */
  22701. WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  22702. WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */
  22703. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */
  22704. WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */
  22705. WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */
  22706. } WMI_TWT_BTWT_REMOVE_STA_STATUS_T;
  22707. typedef struct {
  22708. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */
  22709. A_UINT32 vdev_id; /* VDEV identifier */
  22710. wmi_mac_addr peer_macaddr; /* peer MAC address */
  22711. A_UINT32 dialog_id; /* TWT dialog ID */
  22712. A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */
  22713. } wmi_twt_btwt_remove_sta_complete_event_fixed_param;
  22714. typedef enum {
  22715. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  22716. WMI_DMA_RING_CONFIG_MODULE_RTT,
  22717. } WMI_DMA_RING_SUPPORTED_MODULE;
  22718. typedef struct {
  22719. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  22720. A_UINT32 pdev_id;
  22721. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22722. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  22723. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  22724. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  22725. } WMI_DMA_RING_CAPABILITIES;
  22726. typedef struct {
  22727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */
  22728. /**
  22729. * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best
  22730. * [11:8] : channel BW - This bit-field uses values compatible with
  22731. * enum definitions used internally within the target's
  22732. * halphy code. This bit field uses wmi_channel_width.
  22733. * [15:12]: Reserved
  22734. * [31:16]: Frequency - Center frequency of the channel for which
  22735. * the RF characterisation info applies (MHz)
  22736. */
  22737. A_UINT32 freq_info;
  22738. } WMI_CHAN_RF_CHARACTERIZATION_INFO;
  22739. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff
  22740. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0
  22741. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00
  22742. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8
  22743. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000
  22744. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16
  22745. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \
  22746. WMI_F_RMW((dword)->freq_info,(val), \
  22747. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  22748. #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \
  22749. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC)
  22750. #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \
  22751. WMI_F_RMW((dword)->freq_info,(val), \
  22752. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  22753. #define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \
  22754. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW)
  22755. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \
  22756. WMI_F_RMW((dword)->freq_info,(val), \
  22757. WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  22758. #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \
  22759. WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ)
  22760. #define WMI_DMA_RING_PADDR_LO_S 0
  22761. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  22762. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22763. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22764. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22765. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22766. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  22767. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  22768. #define WMI_DMA_RING_PADDR_HI_S 0
  22769. #define WMI_DMA_RING_PADDR_HI 0xffff
  22770. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22771. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22772. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22773. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22774. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  22775. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  22776. typedef struct {
  22777. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  22778. A_UINT32 pdev_id;
  22779. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22780. /**
  22781. * Bits 31:0: base address of ring [31:0]
  22782. */
  22783. A_UINT32 base_paddr_lo;
  22784. /**
  22785. * Bits 15:0: base address of ring [47:32]
  22786. * Bits 31:16: reserved (set to 0x0)
  22787. */
  22788. A_UINT32 base_paddr_hi;
  22789. /**
  22790. * Bits 31:0: address of head index [31:0]
  22791. */
  22792. A_UINT32 head_idx_paddr_lo;
  22793. /**
  22794. * Bits 15:0: address of head index [47:32]
  22795. * Bits 31:16: reserved (set to 0x0)
  22796. */
  22797. A_UINT32 head_idx_paddr_hi;
  22798. /**
  22799. * Bits 31:0: address of tail index [31:0]
  22800. */
  22801. A_UINT32 tail_idx_paddr_lo;
  22802. /**
  22803. * Bits 15:0: address of tail index [47:32]
  22804. * Bits 31:16: reserved (set to 0x0)
  22805. */
  22806. A_UINT32 tail_idx_paddr_hi;
  22807. A_UINT32 num_elems; /** Number of elems in the ring */
  22808. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  22809. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  22810. /**
  22811. * This parameter specifies the timeout in milliseconds.
  22812. * Target should timeout and send whatever resp it has if this time expires.
  22813. */
  22814. A_UINT32 event_timeout_ms;
  22815. } wmi_dma_ring_cfg_req_fixed_param;
  22816. typedef struct {
  22817. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  22818. A_UINT32 pdev_id;
  22819. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22820. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  22821. } wmi_dma_ring_cfg_rsp_fixed_param;
  22822. typedef struct {
  22823. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  22824. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  22825. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  22826. A_UINT32 num_buf_release_entry;
  22827. A_UINT32 num_meta_data_entry;
  22828. /* This TLV is followed by another TLV of array of structs.
  22829. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  22830. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  22831. */
  22832. } wmi_dma_buf_release_fixed_param;
  22833. typedef struct {
  22834. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  22835. /**
  22836. * Bits 31:0: address of data [31:0]
  22837. */
  22838. A_UINT32 paddr_lo;
  22839. /**
  22840. * Bits 11:0: address of data [43:32]
  22841. * Bits 31:12: host context data [19:0]
  22842. */
  22843. A_UINT32 paddr_hi;
  22844. } wmi_dma_buf_release_entry;
  22845. typedef struct {
  22846. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  22847. /**
  22848. * meta data information.
  22849. * Host uses the noise floor values as one of the major parameter
  22850. * to classify the spectral data.
  22851. * This information will not be provided by ucode unlike the fft reports
  22852. * which gets DMAed to DDR buffer.
  22853. * Hence sending the NF values in dBm units as meta data information.
  22854. */
  22855. A_INT32 noise_floor[WMI_MAX_CHAINS];
  22856. /**
  22857. * The time taken by target in micro seconds to complete the reset routine
  22858. * and re-initiate the spectral scan.
  22859. * If the delay is 0, the WAR to bookkeep the timestamp wont be exercised
  22860. * in HOST.
  22861. */
  22862. A_UINT32 reset_delay;
  22863. /**
  22864. * Current center freq1 (MHz units)
  22865. */
  22866. A_UINT32 freq1;
  22867. /**
  22868. * Current center freq2 (MHz units)
  22869. */
  22870. A_UINT32 freq2;
  22871. /**
  22872. * Channel Width (MHz units)
  22873. */
  22874. A_UINT32 ch_width;
  22875. } wmi_dma_buf_release_spectral_meta_data;
  22876. typedef enum {
  22877. NO_SCALING = 0, /* No bin scaling*/
  22878. /**
  22879. * scaled_bin_mag = bin_mag *
  22880. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  22881. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  22882. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  22883. */
  22884. AGC_GAIN_RSSI_CORR_BASED = 1,
  22885. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  22886. typedef struct {
  22887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  22888. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  22889. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  22890. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  22891. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  22892. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  22893. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  22894. } wmi_spectral_bin_scaling_params;
  22895. typedef struct {
  22896. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  22897. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  22898. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  22899. } wmi_pdev_ctl_failsafe_check_fixed_param;
  22900. typedef struct {
  22901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  22902. A_UINT32 enable; /* Enable/disable */
  22903. /* Thermal Thresholds,
  22904. * DPD recalibration will be triggered, when current temperature is
  22905. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  22906. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  22907. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  22908. */
  22909. A_UINT32 dlt_tmpt_c_h;
  22910. A_UINT32 dlt_tmpt_c_l;
  22911. /* cooling_time_ms
  22912. * The time (in milliseconds) expected to be needed for the unit
  22913. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  22914. */
  22915. A_UINT32 cooling_time_ms;
  22916. /* Max duration for dpd re-cal. Unit: ms */
  22917. A_UINT32 dpd_dur_max_ms;
  22918. } wmi_runtime_dpd_recal_cmd_fixed_param;
  22919. typedef enum {
  22920. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  22921. WMI_ROAM_TRIGGER_REASON_PER,
  22922. WMI_ROAM_TRIGGER_REASON_BMISS,
  22923. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  22924. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  22925. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  22926. WMI_ROAM_TRIGGER_REASON_MAWC,
  22927. WMI_ROAM_TRIGGER_REASON_DENSE,
  22928. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  22929. WMI_ROAM_TRIGGER_REASON_FORCED,
  22930. WMI_ROAM_TRIGGER_REASON_BTM,
  22931. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  22932. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  22933. WMI_ROAM_TRIGGER_REASON_DEAUTH,
  22934. WMI_ROAM_TRIGGER_REASON_IDLE,
  22935. WMI_ROAM_TRIGGER_REASON_MAX,
  22936. } WMI_ROAM_TRIGGER_REASON_ID;
  22937. /* value for DENSE roam trigger */
  22938. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  22939. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  22940. typedef struct {
  22941. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  22942. /* interpretation of trigger value is as follows, for different trigger IDs
  22943. * ID = PER -> value = PER percentage
  22944. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  22945. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  22946. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  22947. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  22948. * ID = PERIODIC -> value = periodicity in ms
  22949. *
  22950. * for other IDs trigger_value would be 0 (invalid)
  22951. */
  22952. A_UINT32 trigger_value;
  22953. } wmi_roam_scan_trigger_reason;
  22954. typedef struct {
  22955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  22956. A_UINT32 vdev_id;
  22957. } wmi_request_roam_scan_stats_cmd_fixed_param;
  22958. /** BSS load configuration parameters for roam trigger */
  22959. typedef struct {
  22960. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  22961. A_UINT32 vdev_id;
  22962. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  22963. A_UINT32 beacons_min_count;
  22964. /** Monitor time window in seconds */
  22965. A_UINT32 monitor_time_window;
  22966. /** BSS load threshold after which roam scan should trigger */
  22967. A_UINT32 bss_load_threshold;
  22968. /** rssi_2g_threshold
  22969. * If connected AP is in 2.4Ghz, then consider bss load roam triggered
  22970. * only if load % > bss_load_threshold && connected AP rssi is worse
  22971. * than rssi_2g_threshold.
  22972. */
  22973. A_INT32 rssi_2g_threshold; /* units = dbm */
  22974. /** rssi_5g_threshold
  22975. * If connected AP is in 5Ghz, then consider bss load roam triggered
  22976. * only if load % > bss_load_threshold && connected AP rssi is worse
  22977. * than rssi_5g_threshold.
  22978. */
  22979. A_INT32 rssi_5g_threshold; /* units = dbm */
  22980. } wmi_roam_bss_load_config_cmd_fixed_param;
  22981. /** Deauth roam trigger parameters */
  22982. typedef struct {
  22983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_deauth_config_cmd_fixed_param */
  22984. A_UINT32 vdev_id;
  22985. /* 1-Enable, 0-Disable */
  22986. A_UINT32 enable;
  22987. } wmi_roam_deauth_config_cmd_fixed_param;
  22988. /** IDLE roam trigger parameters */
  22989. typedef struct {
  22990. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param */
  22991. A_UINT32 vdev_id;
  22992. /* 1-Enable, 0-Disable */
  22993. A_UINT32 enable;
  22994. /* Connected AP band. 0 - Any Band, 1 - 2.4Ghz Band, 2 - 5Ghz Band */
  22995. A_UINT32 band;
  22996. /* Trigger Idle roaming only if rssi change of connected AP is within rssi_delta during idle time */
  22997. A_UINT32 rssi_delta; /* units = dB */
  22998. /* Trigger idle roam only if connected RSSI is better than min_rssi */
  22999. A_INT32 min_rssi; /* units = dBm */
  23000. /* Inactive/Idle time duration
  23001. * After screen is OFF (or whatever condition is suitable in a given
  23002. * system as an indication that the system is likely idle)
  23003. * and if below conditions are met then idle roaming will be triggered.
  23004. * 1. Connected AP band is matching with band value configured
  23005. * 2. No TX/RX data for more than idle_time configured
  23006. * or TX/RX data packets count is less than data_packet_count
  23007. * during idle_time
  23008. * 3. Connected AP rssi change is not more than rssi_delta
  23009. * 4. Connected AP rssi is better than min_rssi.
  23010. * The purpose of this trigger for idle scan is to issue the scan
  23011. * even if (moreover, particularly if) the connection to the
  23012. * existing AP is still good, to keep the STA from getting locked
  23013. * onto the current good AP and thus missing out on an available
  23014. * even better AP. This min_rssi threshold can be used to adjust
  23015. * the connection quality level at which the STA considers doing an
  23016. * idle scan.
  23017. */
  23018. A_UINT32 idle_time; /* units = seconds */
  23019. /* Maximum allowed data packets count during idle time */
  23020. A_UINT32 data_packet_count;
  23021. } wmi_roam_idle_config_cmd_fixed_param;
  23022. /** trigger to start/stop monitoring if system is idle command parameters */
  23023. typedef struct {
  23024. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param */
  23025. /* idle_trigger_monitor values are from WMI_IDLE_TRIGGER_MONITOR_ID */
  23026. A_UINT32 idle_trigger_monitor;
  23027. } wmi_idle_trigger_monitor_cmd_fixed_param;
  23028. typedef enum {
  23029. WMI_IDLE_TRIGGER_MONITOR_NONE = 0, /* no-op */
  23030. /* IDLE_TRIGGER_MONITOR_ON
  23031. * The host's screen has turned off (or some other event indicating that
  23032. * the system is likely idle) -
  23033. * start monitoring to check if the system is idle.
  23034. */
  23035. WMI_IDLE_TRIGGER_MONITOR_ON,
  23036. /* IDLE_TRIGGER_MONITOR_OFF
  23037. * The host's screen has turned on (or some other event indicating that
  23038. * the system is not idle)
  23039. */
  23040. WMI_IDLE_TRIGGER_MONITOR_OFF,
  23041. } WMI_SCREEN_STATUS_NOTIFY_ID;
  23042. typedef struct {
  23043. /** TLV tag and len; tag equals wmi_pdev_dsm_filter_fixed_param */
  23044. A_UINT32 tlv_header;
  23045. /**
  23046. * TLV (tag length value) parameter's following pdev_dsm_filter_cmd are,
  23047. *
  23048. * wmi_pdev_bssid_disallow_list_config_param bssid_disallow_list[];
  23049. * i.e array containing all disallow AP filter lists including
  23050. * the new DSM lists (avoidlist / driver_blacklist) and existing
  23051. * lists (supplicant_blacklist / rssi_rejectlist etc.)
  23052. */
  23053. } wmi_pdev_dsm_filter_fixed_param;
  23054. typedef struct {
  23055. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param */
  23056. A_UINT32 tlv_header;
  23057. /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc.
  23058. see WMI_BSSID_DISALLOW_LIST_TYPE **/
  23059. A_UINT32 bssid_type;
  23060. /** mac address of disallow BSSID */
  23061. wmi_mac_addr bssid;
  23062. /** Disallow AP for certain duration, in units of milliseconds */
  23063. A_UINT32 remaining_disallow_duration;
  23064. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  23065. A_INT32 expected_rssi;
  23066. } wmi_pdev_bssid_disallow_list_config_param;
  23067. typedef enum {
  23068. /* USER_SPACE_BLACK_LIST
  23069. * Black Listed AP's by host's user space
  23070. */
  23071. WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 1,
  23072. /* DRIVER_BLACK_LIST
  23073. * Black Listed AP's by host driver
  23074. * used for data stall migitation
  23075. */
  23076. WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST,
  23077. /* USER_SPACE_AVOID_LIST
  23078. * Avoid List AP's by host's user space
  23079. * used for data stall migitation
  23080. */
  23081. WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST,
  23082. /* DRIVER_AVOID_LIST
  23083. * Avoid List AP's by host driver
  23084. * used for data stall migitation
  23085. */
  23086. WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST,
  23087. /* RSSI_REJECT_LIST
  23088. * OCE AP's
  23089. */
  23090. WMI_BSSID_DISALLOW_RSSI_REJECT_LIST,
  23091. } WMI_BSSID_DISALLOW_LIST_TYPE;
  23092. /* WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST:
  23093. * Maximum number of BSSID disallow entries which host is allowed to send
  23094. * to firmware within the WMI_PDEV_DSM_FILTER_CMDID message.
  23095. */
  23096. #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28
  23097. /** Roam Pre-Authentication completion status */
  23098. typedef struct {
  23099. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */
  23100. A_UINT32 vdev_id;
  23101. /* preauth_status, 0 - Success, Non Zero - Failure
  23102. * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values.
  23103. */
  23104. A_UINT32 preauth_status;
  23105. /* AP BSSID for which pre-authentication is completed */
  23106. wmi_mac_addr candidate_ap_bssid;
  23107. /**
  23108. * This fixed_param TLV is followed by the below TLVs:
  23109. *
  23110. * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success
  23111. * A_UINT8 pmkid[];
  23112. *
  23113. * PMK computed after successful pre-authentication. This is valid only if preauth_status is success
  23114. * A_UINT8 pmk[];
  23115. */
  23116. } wmi_roam_preauth_status_cmd_fixed_param;
  23117. /** Roam Pre-Authentication start event */
  23118. typedef struct {
  23119. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */
  23120. A_UINT32 vdev_id;
  23121. /* AP BSSID for which host needs to start pre-authentication */
  23122. wmi_mac_addr candidate_ap_bssid;
  23123. } wmi_roam_preauth_start_event_fixed_param;
  23124. typedef struct {
  23125. /*
  23126. * The timestamp is in units of ticks of a 19.2MHz clock.
  23127. * The timestamp is taken at roam scan start.
  23128. */
  23129. A_UINT32 lower32bit;
  23130. A_UINT32 upper32bit;
  23131. } wmi_roaming_timestamp;
  23132. typedef struct {
  23133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  23134. A_UINT32 vdev_id;
  23135. /* number of roam scans */
  23136. A_UINT32 num_roam_scans;
  23137. /* This TLV is followed by TLV's:
  23138. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  23139. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  23140. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  23141. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  23142. * The num_channels[] elements specify how many elements there are
  23143. * within chan_info[] for each scan.
  23144. * For example, if num_channels = [2, 3] then chan_info will have 5
  23145. * elements, with the first 2 elements from the first scan, and
  23146. * the last 3 elements from the second scan.
  23147. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  23148. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  23149. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  23150. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  23151. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  23152. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  23153. * The num_of_roam_candidates[] elements specify how many elements
  23154. * there are within bssid[] for each scan.
  23155. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  23156. * have 5 elements, with the first 2 elements from the first scan,
  23157. * and the last 3 elements from the second scan.
  23158. * A_UINT32 score[]; score of candidates in each roam scan
  23159. * The num_of_roam_candidates[] elements specify how many elements
  23160. * there are within score[] for each scan.
  23161. * For example, if num_of_roam_candidates = [2, 3] then score will
  23162. * have 5 elements, with the first 2 elements from the first scan,
  23163. * and the last 3 elements from the second scan.
  23164. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  23165. * The num_of_roam_candidates[] elements specify how many elements
  23166. * there are within channel[] for each scan.
  23167. * For example, if num_of_roam_candidates = [2, 3] then channel will
  23168. * have 5 elements, with the first 2 elements from the first scan,
  23169. * and the last 3 elements from the second scan.
  23170. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  23171. * in each roam scan.
  23172. * The num_of_roam_candidates[] elements specify how many elements
  23173. * there are within rssi[] for each scan.
  23174. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  23175. * have 5 elements, with the first 2 elements from the first scan,
  23176. * and the last 3 elements from the second scan.
  23177. */
  23178. } wmi_roam_scan_stats_event_fixed_param;
  23179. typedef struct {
  23180. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  23181. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  23182. /* The mode value has the following meaning :
  23183. * 0 : 11a
  23184. * 1 : 11bg
  23185. * 2 : 11b
  23186. * 3 : 11g only
  23187. * 4 : 11a HT20
  23188. * 5 : 11g HT20
  23189. * 6 : 11a HT40
  23190. * 7 : 11g HT40
  23191. * 8 : 11a VHT20
  23192. * 9 : 11a VHT40
  23193. * 10 : 11a VHT80
  23194. * 11 : 11g VHT20
  23195. * 12 : 11g VHT40
  23196. * 13 : 11g VHT80
  23197. * 14 : unknown
  23198. */
  23199. A_UINT32 mode;
  23200. A_UINT32 rate; /* rate index */
  23201. A_UINT32 nss; /* number of spatial stream */
  23202. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  23203. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  23204. A_UINT32 chain_index; /* index for the antenna */
  23205. } wmi_get_tpc_power_cmd_fixed_param;
  23206. typedef struct {
  23207. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  23208. A_UINT32 request_id; /* request ID set by the command */
  23209. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  23210. } wmi_get_tpc_power_evt_fixed_param;
  23211. /* below structures are related to Motion Detection. */
  23212. typedef struct {
  23213. /** TLV tag and len; tag equals
  23214. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  23215. A_UINT32 tlv_header; /** TLV Header */
  23216. A_UINT32 vdev_id; /** Vdev ID */
  23217. A_UINT32 time_t1; /** Time gap of successive bursts of
  23218. * measurement frames during coarse
  23219. * motion detection (in ms) */
  23220. A_UINT32 time_t2; /** Time gap of successive bursts of
  23221. * measurement frames during fine
  23222. * motion detection (in ms) */
  23223. A_UINT32 n1; /** number of measurement frames in one
  23224. * burst, for coarse detection */
  23225. A_UINT32 n2; /** number of measurement frames in one
  23226. * burst, for fine detection */
  23227. A_UINT32 time_t1_gap; /** gap between measurement frames in
  23228. * course detection (in ms) */
  23229. A_UINT32 time_t2_gap; /** gap between measurement frames in
  23230. * fine detection (in ms) */
  23231. A_UINT32 coarse_K; /** number of times motion detection has to
  23232. * be performed for coarse detection */
  23233. A_UINT32 fine_K; /** number of times motion detection has to
  23234. * be performed for fine detection */
  23235. A_UINT32 coarse_Q; /** number of times motion is expected
  23236. * to be detected for success case in
  23237. * coarse detection */
  23238. A_UINT32 fine_Q; /** number of times motion is expected
  23239. * to be detected for success case in
  23240. * fine detection */
  23241. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  23242. * from host to FW, which will be used in
  23243. * coarse detection phase of motion detection.
  23244. * This is the threshold for the correlation
  23245. * of the old RF local-scattering environment
  23246. * with the current RF local-scattering
  23247. * environment. A value of 100(%) indicates
  23248. * that neither the transceiver nor any
  23249. * nearby objects have changed position. */
  23250. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  23251. * from host to FW, which will be used in
  23252. * fine detection phase of motion detection.
  23253. * This is the threshold for correlation
  23254. * between the old and current RF environments,
  23255. * as explained above. */
  23256. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  23257. * for immediate detection of motion in
  23258. * coarse detection phase.
  23259. * This is the threshold for correlation
  23260. * between the old and current RF environments,
  23261. * as explained above. */
  23262. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  23263. * for immediate detection of motion in
  23264. * fine detection phase.
  23265. * This is the threshold for correlation
  23266. * between the old and current RF environments,
  23267. * as explained above. */
  23268. } wmi_motion_det_config_params_cmd_fixed_param;
  23269. typedef struct {
  23270. /** TLV tag and len; tag equals
  23271. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  23272. A_UINT32 tlv_header; /** TLV Header */
  23273. A_UINT32 vdev_id; /** Vdev ID */
  23274. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  23275. * Every bl_time_t, bl_n packets are sent */
  23276. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  23277. * (in ms) */
  23278. A_UINT32 bl_n; /** number of measurement frames to be sent
  23279. * during one baseline */
  23280. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  23281. * to be done */
  23282. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  23283. typedef struct {
  23284. /** TLV tag and len; tag equals
  23285. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  23286. A_UINT32 tlv_header; /** TLV Header */
  23287. A_UINT32 vdev_id; /** Vdev ID */
  23288. A_UINT32 enable; /** start = 1, stop =0 */
  23289. } wmi_motion_det_start_stop_cmd_fixed_param;
  23290. typedef struct {
  23291. /** TLV tag and len; tag equals
  23292. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  23293. A_UINT32 tlv_header; /** TLV Header */
  23294. A_UINT32 vdev_id; /** Vdev ID */
  23295. A_UINT32 enable; /** start = 1, stop =0 */
  23296. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  23297. typedef struct {
  23298. /** TLV tag and len; tag equals
  23299. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  23300. A_UINT32 tlv_header; /** TLV Header */
  23301. A_UINT32 vdev_id; /** Vdev ID */
  23302. A_UINT32 status; /** status = 1 -> motion detected */
  23303. } wmi_motion_det_event;
  23304. typedef struct {
  23305. /** TLV tag and len; tag equals
  23306. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  23307. A_UINT32 tlv_header; /** TLV Header */
  23308. A_UINT32 vdev_id; /** Vdev ID */
  23309. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  23310. * during baselining phase (in %) */
  23311. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  23312. * phase (in %); reserved for future */
  23313. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  23314. * phase (in %); reserved for future */
  23315. } wmi_motion_det_base_line_event;
  23316. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  23317. typedef struct {
  23318. /** TLV tag and len; tag equals
  23319. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  23320. A_UINT32 tlv_header;
  23321. /** Enable/Disable Spatial Reuse */
  23322. A_UINT32 enable;
  23323. /*
  23324. * In the below fields, "OBSS level" refers to the power of the
  23325. * signals received from "Other BSS".
  23326. * Spatial reuse will only be permitted if the Other BSS's signal power
  23327. * is witin the min to max range specified by the below fields.
  23328. */
  23329. /** Minimum OBSS level to use */
  23330. A_INT32 obss_min; /* RSSI in dBm */
  23331. /** Maximum OBSS level to use */
  23332. A_INT32 obss_max; /* RSSI in dBm */
  23333. /** Vdev id*/
  23334. A_UINT32 vdev_id;
  23335. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  23336. /*
  23337. * Below structure is related to WMI CMD that configures the default
  23338. * mimimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dbm)
  23339. * for VDEV of a give type (STA or AP). These thresholds are configured
  23340. * within the Host and passed down to the FW. FW will use these
  23341. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  23342. * from the AP does not include spatial reuse parameter set Info Element.
  23343. */
  23344. typedef struct {
  23345. /** TLV tag and len; tag equals
  23346. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  23347. */
  23348. A_UINT32 tlv_header;
  23349. /*
  23350. * In the below fields, "OBSS level" refers to the power of the
  23351. * signals received from "Other BSS".
  23352. * Spatial reuse will only be permitted if the Other BSS's signal power
  23353. * is witin the min to max range specified by the below fields.
  23354. */
  23355. /** Minimum OBSS level to use */
  23356. A_INT32 obss_min; /* RSSI in dBm */
  23357. /** Maximum OBSS level to use */
  23358. A_INT32 obss_max; /* RSSI in dBm */
  23359. /** Type of VDEV for which these threshold are applicable.
  23360. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  23361. */
  23362. A_UINT32 vdev_type;
  23363. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  23364. typedef struct {
  23365. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  23366. wmi_mac_addr peer_macaddr;
  23367. A_UINT32 chan_width; /* wmi_channel_width */
  23368. } wmi_chan_width_peer_list;
  23369. typedef struct {
  23370. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  23371. A_UINT32 num_peers;
  23372. /*
  23373. * Following this structure is the TLV:
  23374. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  23375. */
  23376. } wmi_peer_chan_width_switch_cmd_fixed_param;
  23377. typedef struct {
  23378. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  23379. A_UINT32 tlv_header;
  23380. /* enable or disable HE TB Action frame */
  23381. A_UINT32 enable;
  23382. /* length of action frame body in bytes */
  23383. A_UINT32 data_len;
  23384. /* This TLV is followed by another TLV of array of bytes
  23385. * A_UINT8 data[];
  23386. * This data array contains the action frame raw data
  23387. */
  23388. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  23389. typedef struct {
  23390. /** TLV tag and len; tag equals
  23391. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  23392. A_UINT32 tlv_header; /** TLV Header */
  23393. A_UINT32 vdev_id; /** Vdev ID */
  23394. A_UINT32 start; /** Start/Stop */
  23395. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  23396. * pulse should be synced. */
  23397. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  23398. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  23399. * pulse in units of beacon interval.
  23400. * Valid for clock slaves only. */
  23401. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  23402. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  23403. } wmi_hpcs_pulse_start_cmd_fixed_param;
  23404. typedef struct {
  23405. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */
  23406. A_UINT32 tlv_header; /** TLV Header */
  23407. A_UINT32 pdev_id;
  23408. /*
  23409. * The following per-AC arrays are indexed using the
  23410. * WMI_AC_xxx / wmi_traffic_ac enum values.
  23411. */
  23412. /* aifsn
  23413. * Arbitration inter frame spacing number (AIFSN)
  23414. * Values are integers used for back off computation.
  23415. */
  23416. A_UINT32 aifsn[WMI_AC_MAX];
  23417. /* ecwmin
  23418. * Exponent form of ContentionWindow min (ECWmin)
  23419. * Values are integers used for back off computation.
  23420. */
  23421. A_UINT32 ecwmin[WMI_AC_MAX];
  23422. /* ecwmax
  23423. * Exponent form of ContentionWindow max (ECWmax)
  23424. * Values are integers used for back off computation.
  23425. */
  23426. A_UINT32 ecwmax[WMI_AC_MAX];
  23427. /* muedca_expiration_time
  23428. * MU EDCA Expiration time refers to the length of time after the most
  23429. * recent UL trigger time. The MU EDCA Timer field indicates the time
  23430. * limit, in units of 8 TUs
  23431. */
  23432. A_UINT32 muedca_expiration_time[WMI_AC_MAX];
  23433. } wmi_muedca_params_config_event_fixed_param;
  23434. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  23435. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  23436. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  23437. /* TWT required */
  23438. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  23439. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  23440. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  23441. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  23442. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  23443. /* VHT Operation Information Present */
  23444. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  23445. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  23446. /* Co-Located BSS */
  23447. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  23448. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  23449. /* ER SU Disable */
  23450. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  23451. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  23452. /* bit17 - bit23 are reserved */
  23453. /* BSS color */
  23454. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  23455. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  23456. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  23457. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  23458. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  23459. /* when set to 1 disables use of BSS color */
  23460. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  23461. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  23462. /* PHY Capabilities Information field */
  23463. /* bit 0 reserved */
  23464. /*
  23465. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  23466. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  23467. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  23468. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  23469. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  23470. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  23471. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  23472. * 242-tone RU mapping in 40 MHz and 80
  23473. * MHz channel width in 5 GHz. Otherwise Reserved.
  23474. * B6: Reserved
  23475. */
  23476. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  23477. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  23478. /*
  23479. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  23480. * where in the preamble only the secondary 20 MHz is punctured
  23481. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  23482. * where in the preamble only one of the two 20 MHz sub-channels in the
  23483. * secondary 40 MHz is punctured
  23484. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  23485. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  23486. * secondary 20 MHz is punctured
  23487. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  23488. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  23489. * primary 40 MHz is present
  23490. */
  23491. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  23492. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  23493. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  23494. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  23495. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  23496. /* Indicates support of transmission and reception of LDPC encoded packets */
  23497. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  23498. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  23499. /*
  23500. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  23501. */
  23502. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  23503. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  23504. /*
  23505. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  23506. * when a midamble is present in the Data field.
  23507. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  23508. * when a midamble is present in the Data field.
  23509. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  23510. * supported for transmission and reception when a midamble is present in the Data field.
  23511. */
  23512. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  23513. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  23514. /*
  23515. * B0: For a transmitting STA acting as beamformee, it indicates support of
  23516. * NDP reception using 4x LTF and 3.2 us guard interval duration
  23517. */
  23518. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  23519. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  23520. /*
  23521. * indicates support for the transmission of an HE TB PPDU that has a
  23522. * bandwidth less than or equal to 80 MHz and is using STBC and with
  23523. * one spatial stream
  23524. */
  23525. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  23526. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  23527. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  23528. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  23529. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  23530. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  23531. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  23532. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  23533. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  23534. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  23535. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  23536. /*
  23537. * If the transmitting STA is an AP:
  23538. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  23539. * transmission.
  23540. * If the transmitting STA is a non-AP STA:
  23541. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  23542. * transmission.
  23543. */
  23544. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  23545. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  23546. /*
  23547. * If the transmitting STA is an AP:
  23548. * indicates STA supports of reception of UL MUMIMO transmission on an
  23549. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  23550. * If the transmitting STA is a non-AP STA:
  23551. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  23552. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  23553. */
  23554. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  23555. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  23556. /* Tx DCM
  23557. * B0:B1
  23558. * 00: Does not support DCM
  23559. * 01: BPSK
  23560. * 10: QPSK
  23561. * 11: 16-QAM
  23562. * B2 signals maximum number of spatial streams with DCM
  23563. * 0: 1 spatial stream
  23564. * 1: 2 spatial streams
  23565. */
  23566. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  23567. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  23568. /* Rx DCM
  23569. * B0:B1
  23570. * 00: Does not support DCM
  23571. * 01: BPSK
  23572. * 10: QPSK
  23573. * 11: 16-QAM
  23574. * B2 signals maximum number of spatial streams with DCM
  23575. * 0: 1 spatial stream
  23576. * 1: 2 spatial streams
  23577. */
  23578. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  23579. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  23580. /*
  23581. * Indicates that the STA supports the reception of an HE MU PPDU payload
  23582. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  23583. */
  23584. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  23585. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  23586. /* Indicates support for operation as an SU beamformer */
  23587. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  23588. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  23589. /* Indicates support for operation as an SU beamformee */
  23590. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  23591. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  23592. /* Indicates support for operation as an MU Beamformer */
  23593. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  23594. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  23595. /*
  23596. * Num STS -1 for <= 80MHz (min val 3)
  23597. * The maximum number of space-time streams minus 1 that the STA can
  23598. * receive in an HE NDP
  23599. */
  23600. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  23601. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  23602. /*
  23603. * Num STS -1 for > 80MHz (min val 3)
  23604. * The maximum number of space-time streams minus 1 that the STA can
  23605. * receive in an HE NDP
  23606. */
  23607. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  23608. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  23609. /*
  23610. * Number Of Sounding Dimensions For <= 80 MHz
  23611. * If SU beamformer capable, set to the maximum supported value of the
  23612. * TXVECTOR parameter NUM_STS minus 1.
  23613. * Otherwise, reserved.
  23614. */
  23615. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  23616. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  23617. /*
  23618. * Number Of Sounding Dimensions For > 80 MHz
  23619. * If SU beamformer capable, set to the maximum supported value of the
  23620. * TXVECTOR parameter NUM_STS minus 1.
  23621. * Otherwise, reserved.
  23622. */
  23623. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  23624. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  23625. /*
  23626. * Indicates if the HE beamformee is capable of feedback with tone
  23627. * grouping of 16 in the HE Compressed Beamforming Report field for
  23628. * a SU-type feedback.
  23629. */
  23630. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  23631. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  23632. /*
  23633. * Indicates if the HE beamformee is capable of feedback with tone
  23634. * grouping of 16 in the HE Compressed Beamforming Report field for
  23635. * a MU-type feedback.
  23636. */
  23637. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  23638. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  23639. /*
  23640. * Indicates if HE beamformee is capable of feedback with codebook
  23641. * size {4, 2} in the HECompressed Beamforming Report field for
  23642. * a SU-type feedback.
  23643. */
  23644. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  23645. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  23646. /*
  23647. * Indicates if HE beamformee is capable of feedback with codebook
  23648. * size {7, 5} in the HE Compressed Beamforming Report field for
  23649. * a MU-type feedback.
  23650. */
  23651. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  23652. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  23653. /*
  23654. * Beamforming Feedback With Trigger Frame
  23655. * If the transmitting STA is an AP STA:
  23656. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  23657. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  23658. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  23659. * If the transmitting STA is a non-AP STA:
  23660. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  23661. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  23662. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  23663. */
  23664. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  23665. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  23666. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  23667. * over the right 106-tone RU or partial BW ER
  23668. */
  23669. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  23670. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  23671. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  23672. * where the RU does not span the entire PPDU bandwidth.
  23673. */
  23674. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  23675. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  23676. /* Indicates whether or not the PPE Threshold field is present */
  23677. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  23678. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  23679. /* Indicates that the STA supports SRP-based SR operation */
  23680. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  23681. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  23682. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  23683. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  23684. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  23685. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  23686. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  23687. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  23688. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  23689. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  23690. * minus 1. Otherwise, reserved.
  23691. */
  23692. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  23693. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  23694. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  23695. * STBC with one spatial stream
  23696. */
  23697. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  23698. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  23699. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  23700. * STBC with one spatial stream
  23701. */
  23702. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  23703. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  23704. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  23705. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  23706. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  23707. /*
  23708. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  23709. * 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.
  23710. */
  23711. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  23712. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  23713. /*
  23714. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  23715. * 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.
  23716. */
  23717. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  23718. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  23719. /*
  23720. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  23721. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  23722. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  23723. * 160 MHz HE TB PPDU.
  23724. */
  23725. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  23726. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  23727. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  23728. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  23729. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  23730. /*
  23731. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  23732. * 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
  23733. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  23734. *
  23735. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  23736. * in HE TB PPDU when allowed.
  23737. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  23738. * 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
  23739. * 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
  23740. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  23741. */
  23742. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  23743. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  23744. /*
  23745. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  23746. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  23747. *
  23748. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  23749. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  23750. *
  23751. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  23752. * subfield is reserved.
  23753. *
  23754. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  23755. */
  23756. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  23757. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  23758. /*
  23759. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  23760. * in the HE SIG-B field is greater than 16.
  23761. */
  23762. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  23763. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  23764. /*
  23765. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  23766. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  23767. */
  23768. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  23769. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  23770. /*
  23771. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  23772. * Reserved for an AP.
  23773. */
  23774. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  23775. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  23776. /*
  23777. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  23778. */
  23779. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  23780. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  23781. /*
  23782. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  23783. * compressed HE-SIG-B format.
  23784. */
  23785. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  23786. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  23787. /*
  23788. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  23789. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  23790. */
  23791. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  23792. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  23793. /* HE MAC Capabilities Information field format */
  23794. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  23795. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  23796. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  23797. /* set to 1 to for TWT Requestor support */
  23798. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  23799. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  23800. /* set to 1 to for TWT Responder support */
  23801. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  23802. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  23803. /* Level of frag support
  23804. Set to 0 for no support for dynamic fragmentation.
  23805. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  23806. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  23807. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  23808. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  23809. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  23810. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  23811. */
  23812. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  23813. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  23814. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  23815. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  23816. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  23817. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  23818. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  23819. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  23820. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  23821. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  23822. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  23823. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  23824. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  23825. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  23826. /* Indicates support for link adaptation using the HLA Control subfield. */
  23827. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  23828. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  23829. /* Set to 1 for reception of AllAck support */
  23830. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  23831. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  23832. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  23833. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  23834. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  23835. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  23836. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  23837. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  23838. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  23839. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  23840. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  23841. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  23842. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  23843. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  23844. /* Set to 1 if the STA supports MU cascading operation */
  23845. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  23846. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  23847. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  23848. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  23849. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  23850. /* bit 24 - reserved */
  23851. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  23852. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  23853. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  23854. /*1 if OFDMA Random Access Supported */
  23855. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  23856. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  23857. /* Maximum AMPDU Length Exponent.
  23858. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  23859. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  23860. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  23861. * padding is not included in this limit.
  23862. */
  23863. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  23864. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  23865. /* A-MSDU Fragmentation Support */
  23866. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  23867. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  23868. /* Flexible TWT Schedule Support */
  23869. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  23870. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  23871. /* Rx Control Frame to MultiBSS */
  23872. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  23873. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  23874. /* 2nd DWORD of HE MAC Capabilities */
  23875. /* BSRP A-MPDU Aggregation
  23876. * maintaining compatability since we dont support this now so not wasting memory
  23877. */
  23878. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  23879. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  23880. /* Quiet Time Period (QTP) operation
  23881. * maintaining compatability since we dont support this now so not wasting memory
  23882. */
  23883. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  23884. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  23885. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  23886. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  23887. * that contains a BQR in the A-Control subfield
  23888. * maintaining compatability since we dont support this now so not wasting memory
  23889. */
  23890. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  23891. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  23892. /* Indicates support by the STA for the role of SRP Responder.*/
  23893. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  23894. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  23895. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  23896. * the NDP Feedback Report Poll Trigger frame.
  23897. */
  23898. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  23899. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  23900. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  23901. * frames or TIM frames as described in AP operation for opportunistic power save.
  23902. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  23903. */
  23904. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  23905. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  23906. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  23907. * a QoS Data frame for which no block ack agreement exists.
  23908. */
  23909. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  23910. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  23911. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  23912. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  23913. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  23914. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  23915. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  23916. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  23917. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  23918. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  23919. * Info field indicating 2x996-tone.
  23920. */
  23921. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  23922. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  23923. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  23924. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  23925. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  23926. /* Indicates the spatial multiplexing power save mode after receiving a
  23927. * Trigger frame that is in operation immediately after (re)association.
  23928. */
  23929. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  23930. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  23931. /* Indicates support for Punctured Sounding */
  23932. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  23933. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  23934. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  23935. * receiving a Trigger frame in a VHT PPDU
  23936. */
  23937. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  23938. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  23939. /*
  23940. * The following conditionally-defined macros can be used in systems
  23941. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  23942. * but not both, and which make this D2 vs. D3 selection at build time.
  23943. */
  23944. #ifdef SUPPORT_11AX_D3
  23945. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  23946. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  23947. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  23948. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  23949. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  23950. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  23951. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  23952. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  23953. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  23954. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  23955. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  23956. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  23957. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  23958. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  23959. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  23960. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  23961. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  23962. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  23963. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  23964. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  23965. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  23966. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  23967. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  23968. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  23969. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  23970. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  23971. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  23972. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  23973. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  23974. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  23975. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  23976. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  23977. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  23978. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  23979. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  23980. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  23981. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  23982. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  23983. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  23984. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  23985. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  23986. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  23987. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  23988. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  23989. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  23990. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  23991. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  23992. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  23993. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  23994. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  23995. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  23996. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  23997. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  23998. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  23999. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  24000. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  24001. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  24002. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  24003. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  24004. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  24005. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  24006. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  24007. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  24008. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  24009. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  24010. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  24011. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  24012. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  24013. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  24014. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  24015. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  24016. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  24017. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  24018. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  24019. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  24020. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  24021. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  24022. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  24023. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  24024. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  24025. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  24026. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  24027. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  24028. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  24029. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  24030. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  24031. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  24032. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  24033. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  24034. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  24035. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  24036. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  24037. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  24038. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  24039. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  24040. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  24041. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  24042. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  24043. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  24044. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  24045. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  24046. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  24047. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  24048. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  24049. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  24050. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  24051. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  24052. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  24053. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  24054. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  24055. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  24056. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  24057. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  24058. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  24059. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  24060. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  24061. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  24062. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  24063. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  24064. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  24065. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  24066. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  24067. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  24068. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  24069. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  24070. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  24071. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  24072. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  24073. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  24074. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  24075. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  24076. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  24077. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  24078. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  24079. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  24080. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  24081. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  24082. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  24083. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  24084. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  24085. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  24086. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  24087. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  24088. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  24089. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  24090. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  24091. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  24092. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  24093. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  24094. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  24095. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  24096. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  24097. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  24098. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  24099. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  24100. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  24101. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  24102. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  24103. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  24104. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24105. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24106. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  24107. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  24108. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  24109. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  24110. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  24111. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  24112. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  24113. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  24114. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  24115. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  24116. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24117. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24118. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  24119. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  24120. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  24121. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  24122. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  24123. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  24124. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  24125. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  24126. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  24127. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  24128. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  24129. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  24130. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  24131. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  24132. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  24133. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  24134. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  24135. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  24136. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  24137. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  24138. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  24139. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  24140. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  24141. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  24142. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  24143. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  24144. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  24145. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  24146. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  24147. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  24148. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  24149. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  24150. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  24151. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  24152. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  24153. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  24154. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  24155. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  24156. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  24157. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  24158. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  24159. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  24160. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  24161. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  24162. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  24163. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  24164. #else /* SUPPORT_11AX_D3 vs. D2 */
  24165. /* D2 and D2- */
  24166. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  24167. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  24168. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  24169. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  24170. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  24171. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  24172. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */
  24173. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */
  24174. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  24175. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  24176. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  24177. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  24178. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  24179. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  24180. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  24181. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  24182. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  24183. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  24184. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  24185. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  24186. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  24187. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  24188. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  24189. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  24190. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  24191. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  24192. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  24193. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  24194. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  24195. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  24196. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  24197. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  24198. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  24199. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  24200. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  24201. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  24202. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  24203. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  24204. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  24205. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  24206. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  24207. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  24208. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  24209. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  24210. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  24211. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  24212. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  24213. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  24214. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  24215. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  24216. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  24217. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  24218. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  24219. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  24220. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  24221. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  24222. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  24223. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  24224. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  24225. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  24226. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  24227. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  24228. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  24229. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  24230. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  24231. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  24232. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  24233. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  24234. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  24235. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  24236. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  24237. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  24238. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  24239. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  24240. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  24241. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  24242. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  24243. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  24244. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  24245. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  24246. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  24247. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  24248. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  24249. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  24250. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  24251. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  24252. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  24253. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  24254. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  24255. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  24256. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  24257. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  24258. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  24259. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  24260. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  24261. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  24262. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  24263. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  24264. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  24265. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  24266. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  24267. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  24268. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  24269. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  24270. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  24271. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  24272. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  24273. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  24274. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  24275. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  24276. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  24277. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  24278. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  24279. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  24280. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  24281. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  24282. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  24283. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  24284. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  24285. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  24286. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  24287. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  24288. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  24289. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  24290. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  24291. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  24292. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  24293. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  24294. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  24295. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  24296. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  24297. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  24298. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  24299. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  24300. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  24301. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  24302. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  24303. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  24304. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  24305. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  24306. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  24307. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  24308. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  24309. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  24310. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  24311. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  24312. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  24313. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  24314. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  24315. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  24316. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  24317. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  24318. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  24319. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  24320. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  24321. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  24322. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  24323. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  24324. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  24325. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  24326. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  24327. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  24328. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  24329. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  24330. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  24331. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  24332. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  24333. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  24334. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  24335. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  24336. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  24337. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  24338. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  24339. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  24340. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  24341. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  24342. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  24343. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  24344. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  24345. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  24346. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  24347. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  24348. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  24349. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  24350. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  24351. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  24352. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  24353. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  24354. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  24355. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  24356. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  24357. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  24358. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  24359. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  24360. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  24361. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  24362. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  24363. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  24364. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  24365. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  24366. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  24367. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  24368. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  24369. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  24370. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  24371. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  24372. #endif /* SUPPORT_11AX_D3 */
  24373. typedef struct {
  24374. /** TLV tag and len; tag equals
  24375. * WMITLV_TAG_STRUC_wmi_cfr_capture_event_fixed_param */
  24376. A_UINT32 tlv_header;
  24377. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  24378. A_UINT32 capture_method;
  24379. /* VDEV identifier */
  24380. A_UINT32 vdev_id;
  24381. /* Peer MAC address. In AP mode, this is the address of the connected peer
  24382. * for which CFR capture is needed. In case of STA mode, this is the address
  24383. * of the AP to which the STA is connected
  24384. */
  24385. wmi_mac_addr mac_addr;
  24386. /* primary 20 MHz channel frequency in mhz */
  24387. A_UINT32 chan_mhz;
  24388. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  24389. A_UINT32 bandwidth;
  24390. /* phy mode WLAN_PHY_MODE of the channel defined in wlan_defs.h*/
  24391. A_UINT32 phy_mode;
  24392. /* Center frequency 1 in MHz*/
  24393. A_UINT32 band_center_freq1;
  24394. /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  24395. A_UINT32 band_center_freq2;
  24396. /* Number of spatial streams */
  24397. A_UINT32 sts_count;
  24398. /* Bits 31:0: address of data from wmi_dma_buf_release_entry [31:0] */
  24399. A_UINT32 correlation_info_1;
  24400. /* Bits 11:0: address of data from wmi_dma_buf_release_entry [43:32]
  24401. * Bits 15:12: reserved (set to 0x0)
  24402. * Bits 31:16: hardware PPDU ID [15:0]
  24403. */
  24404. A_UINT32 correlation_info_2;
  24405. /* Bits 1:0: TX status (if any); values defined in enum
  24406. * WMI_FRAME_TX_STATUS
  24407. * Bits 30:2: reserved (set to 0x0)
  24408. * Bit 31: Status of the CFR capture of the peer
  24409. * 1 (True) - Successful; 0 (False) - Not successful
  24410. */
  24411. A_UINT32 status;
  24412. /* Timestamp in microseconds at which the CFR was captured in the hardware.
  24413. * The clock used for this timestamp is private to the target and
  24414. * is not visible to the host i.e., Host can interpret only the
  24415. * relative timestamp deltas from one message to the next,
  24416. * but can't interpret the absolute timestamp from a single message.
  24417. */
  24418. A_UINT32 timestamp_us;
  24419. /*
  24420. * Count of the current CFR capture from FW.
  24421. * This is helpful to identify any drops in FW.
  24422. */
  24423. A_UINT32 counter;
  24424. /* Per chain RSSI of the peer, for up to WMI_MAX_CHAINS.
  24425. * Each chain's entry reports the RSSI for different bands in dBm units.
  24426. * Use WMI_UNIFIED_CHAIN_RSSI_GET to extract the value for a particular
  24427. * band.
  24428. * A band value of 0x80 (-128) is invalid.
  24429. */
  24430. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  24431. } wmi_peer_cfr_capture_event_fixed_param;
  24432. #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff
  24433. #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \
  24434. ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK))
  24435. #define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \
  24436. (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value))
  24437. typedef struct {
  24438. /** TLV tag and len; tag equals
  24439. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */
  24440. A_UINT32 tlv_header;
  24441. /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS.
  24442. * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for
  24443. * a particular chain.
  24444. * Only lower 2 bytes will contain phase data for a particular chain.
  24445. * The values in phase data will be from 0 1023 as mapping of
  24446. * 0-359 degrees using the formula -
  24447. * phase data = phase in degrees * 1024 / 360
  24448. *
  24449. * Target will set 0xFFFF for all invalid chains.
  24450. *
  24451. * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access
  24452. * the valid portion of the 4-byte word containing the chain phase data.
  24453. */
  24454. A_UINT32 chain_phase[WMI_MAX_CHAINS];
  24455. } wmi_peer_cfr_capture_event_phase_fixed_param;
  24456. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000
  24457. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31
  24458. /* Failed to capture CFR as peer is in power save mode */
  24459. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000
  24460. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30
  24461. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003
  24462. #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0
  24463. /**
  24464. * wmi_cold_boot_cal_data config flags
  24465. * BIT 0 : 1 means more data will come, 0 means last event
  24466. * BIT 1-31 : Reserved
  24467. */
  24468. #define WMI_COLD_BOOT_CAL_DATA_SET_IS_MORE_DATA(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  24469. #define WMI_COLD_BOOT_CAL_DATA_GET_IS_MORE_DATA(flags) WMI_GET_BITS(flags, 0, 1)
  24470. typedef struct {
  24471. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_cold_boot_cal_data_fixed_param */
  24472. A_UINT32 data_len; /** length in byte of data[]. */
  24473. A_UINT32 flags; /** config flags : Only 0th bit is used, bit 1-31 are reserved */
  24474. /* Following this structure is the TLV:
  24475. * A_UINT8 data[]; <-- length in byte given by field data_len.
  24476. * This data array contains cold boot data calibration raw data.
  24477. */
  24478. } wmi_cold_boot_cal_data_fixed_param;
  24479. typedef struct {
  24480. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param */
  24481. /** pdev_id for identifying the MAC, the default value is WMI_PDEV_ID_SOC
  24482. * See macros starting with WMI_PDEV_ID_ for values.
  24483. */
  24484. A_UINT32 pdev_id;
  24485. A_UINT32 type; /** type of the rogue ap, see WMI_ROGUE_AP_TYPE */
  24486. wmi_mac_addr bssid; /** bssid of the rogue ap */
  24487. } wmi_pdev_rap_info_event_fixed_param;
  24488. /*
  24489. * WMI API for Firmware to indicate iface combinations which Firmware
  24490. * support to Host
  24491. */
  24492. typedef struct {
  24493. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */
  24494. /* common part */
  24495. /* Consider DBS/DBDC for this new implementation */
  24496. A_UINT32 pdev_n;
  24497. /* iface combinations part -
  24498. * Use subsequent TLV arrays to list supported combinations of interfaces.
  24499. */
  24500. /*
  24501. * The TLVs listing interface combinations, will follow this TLV.
  24502. * The number of combinations can be calculated by dividing the
  24503. * TLV array length by the TLV array element length.
  24504. *
  24505. * The fixed_param TLV is directly followed by a list of
  24506. * wlanfw_iface_combination elements:
  24507. * wlanfw_iface_combination combinations[0];
  24508. * wlanfw_iface_combination combinations[1];
  24509. * ...
  24510. * wlanfw_iface_combination combinations[N];
  24511. *
  24512. * After the list of wlanfw_iface_combinations is a list of interface limits.
  24513. * The cmb_limits field of each wlanfw_iface_combination show which of the
  24514. * limits within the "wlanfw_ifact_limit limits" list belong to that
  24515. * iface_combination:
  24516. * limits[0] <- cmb 0, limit 0
  24517. * ...
  24518. * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N
  24519. * limits[cmb[0].cmb_limits] <- cmb 1, limit 0
  24520. * ...
  24521. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N
  24522. * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0
  24523. * ...
  24524. */
  24525. } wmi_wlanfw_iface_cmb_ind_event_fixed_param;
  24526. typedef struct {
  24527. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */
  24528. /*
  24529. * How many vdevs can work as below vdev_type/vdev_subtype
  24530. * in one combination.
  24531. */
  24532. A_UINT32 vdev_limit_n;
  24533. /*
  24534. * Indicate what role above vdevs can work as.
  24535. * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx"
  24536. * for roles definition.
  24537. */
  24538. A_UINT32 vdev_type;
  24539. A_UINT32 vdev_subtype;
  24540. } wlanfw_iface_limit;
  24541. /**
  24542. * @brief specific configuration of valid_fields for host.
  24543. * These flags are used for indicating which fields in wlanfw_iface_combination
  24544. * contains valid value for Host Driver.
  24545. * 0: Host can ignore this field
  24546. * 1: field contains valid value for Host Driver
  24547. */
  24548. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0
  24549. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1
  24550. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1
  24551. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2
  24552. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2
  24553. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4
  24554. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3
  24555. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8
  24556. #define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \
  24557. do { \
  24558. (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  24559. (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \
  24560. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \
  24561. } while (0)
  24562. #define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \
  24563. (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \
  24564. WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S)
  24565. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \
  24566. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value))
  24567. #define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \
  24568. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX)
  24569. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \
  24570. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value))
  24571. #define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \
  24572. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH)
  24573. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \
  24574. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value))
  24575. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \
  24576. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN)
  24577. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \
  24578. WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value))
  24579. #define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \
  24580. WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N)
  24581. typedef struct {
  24582. A_UINT32 tlv_header;
  24583. /*
  24584. * Max num Peers can be supported in this combination.
  24585. * It excludes the self-peers associated with each vdev.
  24586. * It's the number of real remote peers.
  24587. * eg: when working as AP mode, indicating how many clients can be
  24588. * supported to connect with this AP.
  24589. */
  24590. A_UINT32 peer_max;
  24591. /* Home Channels supported on one single phy concurrently */
  24592. A_UINT32 channel_n;
  24593. /*
  24594. * The number of "wlanfw_iface_limit" for a specified combination.
  24595. * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this
  24596. * cmb_limits will be 2 for this combination.
  24597. */
  24598. A_UINT32 cmb_limits;
  24599. /*
  24600. * Beacon intervals for STA and AP types need to be match or not.
  24601. * 1: need to be match
  24602. * 0: not need
  24603. */
  24604. A_UINT32 sta_ap_bcn_int_match;
  24605. /*
  24606. * This combination supports different beacon intervals or not.
  24607. * 0: Beacon interval is same for all interface
  24608. * !0: STA Beacon interval AND GCD of AP Beacon intervals
  24609. * should be greater or equal to this value.
  24610. */
  24611. A_UINT32 bcn_int_min;
  24612. /*
  24613. * Number of different Beacon intervals
  24614. */
  24615. A_UINT32 bcn_int_n;
  24616. /*
  24617. * This indicates which field in this struct
  24618. * contains valid value for Host Driver.
  24619. * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx".
  24620. */
  24621. A_UINT32 valid_fields;
  24622. } wlanfw_iface_combination;
  24623. typedef struct {
  24624. /** TLV tag and len; tag equals
  24625. * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */
  24626. A_UINT32 tlv_header;
  24627. /* VDEV identifier */
  24628. A_UINT32 vdev_id;
  24629. /** 1-Enable, 0-Disable */
  24630. A_UINT32 en_dis;
  24631. } wmi_set_elna_bypass_cmd_fixed_param;
  24632. typedef struct {
  24633. /** TLV tag and len; tag equals
  24634. * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */
  24635. A_UINT32 tlv_header;
  24636. /* VDEV identifier */
  24637. A_UINT32 vdev_id;
  24638. } wmi_get_elna_bypass_cmd_fixed_param;
  24639. typedef struct {
  24640. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */
  24641. /* VDEV identifier */
  24642. A_UINT32 vdev_id;
  24643. /** 1-Enable, 0-Disable */
  24644. A_UINT32 en_dis;
  24645. } wmi_get_elna_bypass_event_fixed_param;
  24646. /* This command is to specify to enable/disable audio frame aggr */
  24647. typedef struct {
  24648. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */
  24649. A_UINT32 aggr_enable; /* enable aggregation for audio frame */
  24650. A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */
  24651. } wmi_audio_aggr_enable_cmd_fixed_param;
  24652. typedef struct wmi_audio_aggr_rate_set_s {
  24653. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */
  24654. A_UINT32 mcs;
  24655. A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */
  24656. } WMI_AUDIO_AGGR_RATE_SET_T;
  24657. typedef struct {
  24658. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */
  24659. A_UINT32 group_id; /* id of audio group */
  24660. wmi_mac_addr multicast_addr; /* multicast address of audio group */
  24661. } wmi_audio_aggr_add_group_cmd_fixed_param;
  24662. typedef struct {
  24663. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */
  24664. A_UINT32 group_id;
  24665. } wmi_audio_aggr_del_group_cmd_fixed_param;
  24666. typedef struct {
  24667. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */
  24668. A_UINT32 group_id;
  24669. /**
  24670. * TLV (tag length value) parameters follow the
  24671. * structure. The TLV's are:
  24672. * WMI_AUDIO_AGGR_RATE_SET_T rate_set[];
  24673. **/
  24674. } wmi_audio_aggr_set_group_rate_cmd_fixed_param;
  24675. typedef struct {
  24676. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */
  24677. A_UINT32 group_id;
  24678. A_UINT32 retry_thresh;
  24679. } wmi_audio_aggr_set_group_retry_cmd_fixed_param;
  24680. #define WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS 0
  24681. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS 1
  24682. #define WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS 2
  24683. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS 3
  24684. #define WMI_CFR_GROUP_BW_VALID_BIT_POS 4
  24685. #define WMI_CFR_GROUP_NSS_VALID_BIT_POS 5
  24686. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS 6
  24687. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS 7
  24688. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS 8
  24689. /* The bits in this mask mapped to WMI_PEER_CFR_CAPTURE_BW enum */
  24690. #define WMI_CFR_GROUP_BW_MASK_NUM_BITS 5
  24691. #define WMI_CFR_GROUP_BW_BIT_POS 0
  24692. /* The bits in this mask correspond to the values as below
  24693. * bit 0 -> Nss 1
  24694. * bit 1 -> Nss 2
  24695. * ...
  24696. * bit 7 -> Nss 8
  24697. */
  24698. #define WMI_CFR_GROUP_NSS_MASK_NUM_BITS 8
  24699. #define WMI_CFR_GROUP_NSS_BIT_POS 16
  24700. #define WMI_CFR_GROUP_TA_ADDR_VALID_SET(param, value) \
  24701. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1, value)
  24702. #define WMI_CFR_GROUP_TA_ADDR_VALID_GET(param) \
  24703. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_VALID_BIT_POS, 1)
  24704. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_SET(param, value) \
  24705. WMI_SET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1, value)
  24706. #define WMI_CFR_GROUP_TA_ADDR_MASK_VALID_GET(param) \
  24707. WMI_GET_BITS(param, WMI_CFR_GROUP_TA_ADDR_MASK_VALID_BIT_POS, 1)
  24708. #define WMI_CFR_GROUP_RA_ADDR_VALID_SET(param, value) \
  24709. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1, value)
  24710. #define WMI_CFR_GROUP_RA_ADDR_VALID_GET(param) \
  24711. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_VALID_BIT_POS, 1)
  24712. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_SET(param, value) \
  24713. WMI_SET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1, value)
  24714. #define WMI_CFR_GROUP_RA_ADDR_MASK_VALID_GET(param) \
  24715. WMI_GET_BITS(param, WMI_CFR_GROUP_RA_ADDR_MASK_VALID_BIT_POS, 1)
  24716. #define WMI_CFR_GROUP_BW_VALID_SET(param, value) \
  24717. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1, value)
  24718. #define WMI_CFR_GROUP_BW_VALID_GET(param) \
  24719. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_VALID_BIT_POS, 1)
  24720. #define WMI_CFR_GROUP_NSS_VALID_SET(param, value) \
  24721. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1, value)
  24722. #define WMI_CFR_GROUP_NSS_VALID_GET(param) \
  24723. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_VALID_BIT_POS, 1)
  24724. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_SET(param, value) \
  24725. WMI_SET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1, value)
  24726. #define WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_GET(param) \
  24727. WMI_GET_BITS(param, WMI_CFR_GROUP_MGMT_SUBTYPE_VALID_BIT_POS, 1)
  24728. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_SET(param, value) \
  24729. WMI_SET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1, value)
  24730. #define WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_GET(param) \
  24731. WMI_GET_BITS(param, WMI_CFR_GROUP_CTRL_SUBTYPE_VALID_BIT_POS, 1)
  24732. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_SET(param, value) \
  24733. WMI_SET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1, value)
  24734. #define WMI_CFR_GROUP_DATA_SUBTYPE_VALID_GET(param) \
  24735. WMI_GET_BITS(param, WMI_CFR_GROUP_DATA_SUBTYPE_VALID_BIT_POS, 1)
  24736. #define WMI_CFR_GROUP_BW_SET(param, value) \
  24737. WMI_SET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS, value)
  24738. #define WMI_CFR_GROUP_BW_GET(param) \
  24739. WMI_GET_BITS(param, WMI_CFR_GROUP_BW_BIT_POS, WMI_CFR_GROUP_BW_MASK_NUM_BITS)
  24740. #define WMI_CFR_GROUP_NSS_SET(param, value) \
  24741. WMI_SET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS, value)
  24742. #define WMI_CFR_GROUP_NSS_GET(param) \
  24743. WMI_GET_BITS(param, WMI_CFR_GROUP_NSS_BIT_POS, WMI_CFR_GROUP_NSS_MASK_NUM_BITS)
  24744. typedef struct {
  24745. /* Filter group number for which the below filters needs to be applied */
  24746. A_UINT32 filter_group_id;
  24747. /* Indicates which of the below filter's value is valid
  24748. * Bit 0: Ta_addr is valid if set
  24749. * Bit 1: Ta_addr_mask is valid if set
  24750. * Bit 2: Ra_addr is valid if set
  24751. * Bit 3: Ra_addr_mask is valid if set
  24752. * Bit 4: Bandwidth is valid if set
  24753. * Bit 5: NSS is valid if set
  24754. * Bit 6: Mgmt_subtype is valid if set
  24755. * Bit 7: Ctrl_subtype is valid if set
  24756. * Bit 8: Data_subtype is valid if set
  24757. * Bits 31:9 Reserved for future use
  24758. */
  24759. A_UINT32 filter_set_valid_mask;
  24760. /* ta_addr:
  24761. * Packets matching the TA_mac addr will be filtered in by MAC
  24762. * for CFR capture.
  24763. */
  24764. wmi_mac_addr ta_addr;
  24765. /* ta_addr_mask:
  24766. * Packets matching the TA_mac addr Mask will be filtered in by MAC
  24767. * for CFR capture.
  24768. */
  24769. wmi_mac_addr ta_addr_mask;
  24770. /* ra_addr:
  24771. * Packets matching the RA_mac addr will be filtered in by MAC
  24772. * for CFR capture.
  24773. */
  24774. wmi_mac_addr ra_addr;
  24775. /* ra_addr_mask:
  24776. * Packets matching the RA_mac addr Mask will be filtered in by MAC
  24777. * for CFR capture.
  24778. */
  24779. wmi_mac_addr ra_addr_mask;
  24780. /* bw_nss_filter:
  24781. * Indicates which bw and nss packets will be filtered for CFR capture
  24782. * Bits 4:0 CFR capture will be done for packets matching the bandwidths
  24783. * specified within this bitmask
  24784. * Bits 15:5 Reserved for future
  24785. * Bits 23:16 CFR capture will be done for packets matching the Nss
  24786. * specified within this bitmask
  24787. * Bits 31:24 Reserved for future
  24788. */
  24789. A_UINT32 bw_nss_filter;
  24790. /* mgmt_subtype_filter:
  24791. * Managments Packets matching the subtype filter categories will be
  24792. * filtered in by MAC for CFR capture.
  24793. * This is a bitmask, in which each bit represents the corresponding
  24794. * mgmt subtype value as per ieee80211_defs.h
  24795. */
  24796. A_UINT32 mgmt_subtype_filter;
  24797. /* ctrl_subtype_filter:
  24798. * Control Packets matching the subtype filter category will be
  24799. * filtered in by MAC for CFR capture.
  24800. * This is a bitmask, in which each bit represents the corresponding
  24801. * ctrl subtype value as per ieee80211_defs.h
  24802. */
  24803. A_UINT32 ctrl_subtype_filter;
  24804. /* data_subtype_filter:
  24805. * Data Packets matching the subtype filter category will be
  24806. * filtered in by MAC for CFR capture.
  24807. * This is a bitmask, in which each bit represents the corresponding
  24808. * data subtype value as per ieee80211_defs.h
  24809. */
  24810. A_UINT32 data_subtype_filter;
  24811. } wmi_cfr_filter_group_config;
  24812. #define WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS 0
  24813. #define WMI_CFR_ALL_FTM_ACK_EN_BIT_POS 1
  24814. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS 2
  24815. #define WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS 3
  24816. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS 4
  24817. #define WMI_CFR_ALL_PACKET_EN_BIT_POS 5
  24818. #define WMI_CFR_CAPTURE_INTERVAL_NUM_BITS 24
  24819. #define WMI_CFR_CAPTURE_INTERVAL_BIT_POS 0
  24820. #define WMI_CFR_CAPTURE_DURATION_NUM_BITS 24
  24821. #define WMI_CFR_CAPTURE_DURATION_BIT_POS 0
  24822. #define WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS 16
  24823. #define WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS 0
  24824. #define WMI_CFR_UL_MU_USER_UPPER_NUM_BITS 5
  24825. #define WMI_CFR_UL_MU_USER_UPPER_BIT_POS 0
  24826. #define WMI_CFR_FREEZE_DELAY_CNT_EN_MASK 1
  24827. #define WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS 0
  24828. #define WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS 8
  24829. #define WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS 1
  24830. #define WMI_CFR_DIRECTED_FTM_ACK_EN_SET(param, value) \
  24831. WMI_SET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1, value)
  24832. #define WMI_CFR_DIRECTED_FTM_ACK_EN_GET(param) \
  24833. WMI_GET_BITS(param, WMI_CFR_DIRECTED_FTM_ACK_EN_BIT_POS, 1)
  24834. #define WMI_CFR_ALL_FTM_ACK_EN_SET(param, value) \
  24835. WMI_SET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1, value)
  24836. #define WMI_CFR_ALL_FTM_ACK_EN_GET(param) \
  24837. WMI_GET_BITS(param, WMI_CFR_ALL_FTM_ACK_EN_BIT_POS, 1)
  24838. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_SET(param, value) \
  24839. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1, value)
  24840. #define WMI_CFR_NDPA_NDP_DIRECTED_EN_GET(param) \
  24841. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_DIRECTED_EN_BIT_POS, 1)
  24842. #define WMI_CFR_NDPA_NDP_ALL_EN_SET(param, value) \
  24843. WMI_SET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1, value)
  24844. #define WWMI_CFR_NDPA_NDP_ALL_EN_GET(param) \
  24845. WMI_GET_BITS(param, WMI_CFR_NDPA_NDP_ALL_EN_BIT_POS, 1)
  24846. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_SET(param, value) \
  24847. WMI_SET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1, value)
  24848. #define WMI_CFR_TA_RA_TYPE_FILTER_EN_GET(param) \
  24849. WMI_GET_BITS(param, WMI_CFR_TA_RA_TYPE_FILTER_EN_BIT_POS, 1)
  24850. #define WWMI_CFR_ALL_PACKET_EN_SET(param, value) \
  24851. WMI_SET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1, value)
  24852. #define WMI_CFR_ALL_PACKET_EN_GET(param) \
  24853. WMI_GET_BITS(param, WMI_CFR_ALL_PACKET_EN_BIT_POS, 1)
  24854. #define WMI_CFR_CAPTURE_INTERVAL_SET(param, value) \
  24855. WMI_SET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS, value)
  24856. #define WMI_CFR_CAPTURE_INTERVAL_GET(param) \
  24857. WMI_GET_BITS(param, WMI_CFR_CAPTURE_INTERVAL_BIT_POS, WMI_CFR_CAPTURE_INTERVAL_NUM_BITS)
  24858. #define WMI_CFR_CAPTURE_DURATION_SET(param, value) \
  24859. WMI_SET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS, value)
  24860. #define WMI_CFR_CAPTURE_DURATION_GET(param) \
  24861. WMI_GET_BITS(param, WMI_CFR_CAPTURE_DURATION_BIT_POS, WMI_CFR_CAPTURE_DURATION_NUM_BITS)
  24862. #define WMI_CFR_FILTER_GROUP_BITMAP_SET(param, value) \
  24863. WMI_SET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS, value)
  24864. #define WMI_CFR_FILTER_GROUP_BITMAP_GET(param) \
  24865. WMI_GET_BITS(param, WMI_CFR_FILTER_GROUP_BITMAP_BIT_POS, WMI_CFR_FILTER_GROUP_BITMAP_NUM_BITS)
  24866. #define WMI_CFR_UL_MU_USER_UPPER_SET(param, value) \
  24867. WMI_SET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS, value)
  24868. #define WMI_CFR_UL_MU_USER_UPPER_GET(param) \
  24869. WMI_GET_BITS(param, WMI_CFR_UL_MU_USER_UPPER_BIT_POS, WMI_CFR_UL_MU_USER_UPPER_NUM_BITS)
  24870. #define WMI_CFR_FREEZE_DELAY_CNT_EN_SET(param, value) \
  24871. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK, value)
  24872. #define WMI_CFR_FREEZE_DELAY_CNT_EN_GET(param) \
  24873. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_EN_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_EN_MASK)
  24874. #define WMI_CFR_FREEZE_DELAY_CNT_THR_SET(param, value) \
  24875. WMI_SET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS, value)
  24876. #define WMI_CFR_FREEZE_DELAY_CNT_THR_GET(param) \
  24877. WMI_GET_BITS(param, WMI_CFR_FREEZE_DELAY_CNT_THR_BIT_POS, WMI_CFR_FREEZE_DELAY_CNT_THR_NUM_BITS)
  24878. typedef struct {
  24879. /** TLV tag and len; tag equals
  24880. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_filter_cmd_fixed_param */
  24881. A_UINT32 tlv_header;
  24882. /** pdev_id for identifying the MAC
  24883. * See macros starting with WMI_PDEV_ID_ for values.
  24884. * In non-DBDC case host should set it to 0
  24885. */
  24886. A_UINT32 pdev_id;
  24887. /* filter_type:
  24888. * Indicates the type of filter to be enabled
  24889. * Bit 0: Filter Directed FTM ACK frames for CFR capture
  24890. * Bit 1: Filter All FTM ACK frames for CFR capture
  24891. * Bit 2: Filter NDPA NDP Directed Frames for CFR capture
  24892. * Bit 3: Filter Frames based on TA/RA/Subtype as provided
  24893. * in CFR Group config
  24894. * Bit 4: Filter in All packets for CFR Capture
  24895. * Bits 31:5 Reserved for future use
  24896. */
  24897. A_UINT32 filter_type;
  24898. /* capture_interval:
  24899. * Capture interval field which is time in between consecutive
  24900. * CFR capture, in microsecond units
  24901. * Bits 23:0 Capture interval
  24902. * Bits 31:24 Reserved for future use
  24903. */
  24904. A_UINT32 capture_interval;
  24905. /* capture_duration:
  24906. * Capture Duration field for which CFR capture has to happen,
  24907. * in microsecond units
  24908. * Bits 23:0 Capture Duration
  24909. * Bits 31:24 Reserved for future use
  24910. */
  24911. A_UINT32 capture_duration;
  24912. /* Bitfields set indicates which of the CFR group config is enabled
  24913. * Bits 15:0 Filter Group enable Bits
  24914. * Bits 31:16 Reserved for future use
  24915. * If Bit 0 is set, then CFR filter group 0 alone is enabled and so on
  24916. */
  24917. A_UINT32 filter_group_bitmap;
  24918. /* ul_mu_user_mask_lower:
  24919. * Bitfields indicates which of the users in the current UL MU
  24920. * tranmission are enabled for CFR capture.
  24921. * Bits 31 to 0 indicates user indexes for 32 users in a UL MU transmission.
  24922. * If bit 0 is set, then the CFR capture will happen for user index 0
  24923. * in the current UL MU Transmission.
  24924. * If bits 0,2 are set, then CFR capture for UL MU TX corresponds to
  24925. * user indices 0 and 2.
  24926. */
  24927. A_UINT32 ul_mu_user_mask_lower;
  24928. /* ul_mu_user_mask_upper:
  24929. * This is contiuation of the above lower mask.
  24930. * Bits 4:0 Bitfields indicates user indices from 33 to 37 users.
  24931. * Bits 31:5 Reserved for future use
  24932. * If bit 0 is set, then CFR capture is enabled for user index 33
  24933. * in a UL MU transmission.
  24934. */
  24935. A_UINT32 ul_mu_user_mask_upper;
  24936. /* freeze_tlv_delay_cnt
  24937. * Indicates the number of consecutive Rx packets to be skipped
  24938. * before CFR capture is enabled again.
  24939. * Bits 8:0 Freeze Delay Count value
  24940. * Bits 31:9 Reserved for future use
  24941. */
  24942. A_UINT32 freeze_tlv_delay_cnt;
  24943. /*
  24944. * A variable-length TLV array of wmi_cfr_filter_group_config will
  24945. * follow this fixed_param TLV
  24946. * wmi_cfr_filter_group_config filter_group_config[];
  24947. */
  24948. } wmi_cfr_capture_filter_cmd_fixed_param;
  24949. /* ADD NEW DEFS HERE */
  24950. /*****************************************************************************
  24951. * The following structures are deprecated. DO NOT USE THEM!
  24952. */
  24953. /** Max number of channels in the schedule. */
  24954. #define OCB_CHANNEL_MAX (5)
  24955. /* NOTE: Make sure these data structures are identical to those
  24956. * defined in sirApi.h */
  24957. typedef struct
  24958. {
  24959. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  24960. A_UINT32 aifsn;
  24961. /** Contention Window minimum. Range: 1 - 10 */
  24962. A_UINT32 cwmin;
  24963. /** Contention Window maximum. Range: 1 - 10 */
  24964. A_UINT32 cwmax;
  24965. } wmi_qos_params_t;
  24966. typedef struct
  24967. {
  24968. /** Channel frequency in MHz */
  24969. A_UINT32 chan_freq;
  24970. /** Channel duration in ms */
  24971. A_UINT32 duration;
  24972. /** Start guard interval in ms */
  24973. A_UINT32 start_guard_interval;
  24974. /** End guard interval in ms */
  24975. A_UINT32 end_guard_interval;
  24976. /** Transmit power in dBm, range 0 - 23 */
  24977. A_UINT32 tx_power;
  24978. /** Transmit datarate in Mbps */
  24979. A_UINT32 tx_rate;
  24980. /** QoS parameters for each AC */
  24981. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  24982. /** 1 to enable RX stats for this channel, 0 otherwise */
  24983. A_UINT32 rx_stats;
  24984. } wmi_ocb_channel_t;
  24985. typedef struct {
  24986. /** TLV tag and len; tag equals
  24987. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  24988. A_UINT32 tlv_header;
  24989. /* VDEV identifier */
  24990. A_UINT32 vdev_id;
  24991. /** Number of valid channels in the channels array */
  24992. A_UINT32 num_channels;
  24993. /** The array of channels */
  24994. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  24995. /** 1 to allow off-channel tx, 0 otherwise */
  24996. A_UINT32 off_channel_tx; /* Not supported */
  24997. } wmi_ocb_set_sched_cmd_fixed_param;
  24998. typedef struct {
  24999. /** Return status. 0 for success, non-zero otherwise */
  25000. A_UINT32 status;
  25001. } wmi_ocb_set_sched_event_fixed_param;
  25002. /*****************************************************************************
  25003. * END DEPRECATED
  25004. */
  25005. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  25006. #ifdef __cplusplus
  25007. }
  25008. #endif
  25009. #endif /*_WMI_UNIFIED_H_*/
  25010. /**@}*/