wmi_unified.h 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509
  1. /*
  2. * Copyright (c) 2010-2018 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_ID;
  236. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  237. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  238. /**
  239. * Command IDs and commange events
  240. */
  241. typedef enum {
  242. /** initialize the wlan sub system */
  243. WMI_INIT_CMDID = 0x1,
  244. /* Scan specific commands */
  245. /** start scan request to FW */
  246. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  247. /** stop scan request to FW */
  248. WMI_STOP_SCAN_CMDID,
  249. /** full list of channels as defined by the regulatory that will be used by scanner */
  250. WMI_SCAN_CHAN_LIST_CMDID,
  251. /** overwrite default priority table in scan scheduler */
  252. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  253. /** This command to adjust the priority and min.max_rest_time
  254. * of an on ongoing scan request.
  255. */
  256. WMI_SCAN_UPDATE_REQUEST_CMDID,
  257. /** set OUI to be used in probe request if enabled */
  258. WMI_SCAN_PROB_REQ_OUI_CMDID,
  259. /** config adaptive dwell scan */
  260. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  261. /** Only applicable to DBS capable product */
  262. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  263. /* PDEV(physical device) specific commands */
  264. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  265. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  266. /** set channel. mainly used for supporting monitor mode */
  267. WMI_PDEV_SET_CHANNEL_CMDID,
  268. /** set pdev specific parameters */
  269. WMI_PDEV_SET_PARAM_CMDID,
  270. /** enable packet log */
  271. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  272. /** disable packet log*/
  273. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  274. /** set wmm parameters */
  275. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  276. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  277. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  278. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  279. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  280. /** Command to send the DSCP-to-TID map to the target */
  281. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  282. /** set quiet ie parameters. primarily used in AP mode */
  283. WMI_PDEV_SET_QUIET_MODE_CMDID,
  284. /** Enable/Disable Green AP Power Save */
  285. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  286. /** get TPC config for the current operating channel */
  287. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  288. /** set the base MAC address for the physical device before a VDEV is created.
  289. * For firmware that doesn't support this feature and this command, the pdev
  290. * MAC address will not be changed. */
  291. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  292. /* eeprom content dump , the same to bdboard data */
  293. WMI_PDEV_DUMP_CMDID,
  294. /* set LED configuration */
  295. WMI_PDEV_SET_LED_CONFIG_CMDID,
  296. /* Get Current temprature of chip in Celcius degree*/
  297. WMI_PDEV_GET_TEMPERATURE_CMDID,
  298. /* Set LED flashing behavior */
  299. WMI_PDEV_SET_LED_FLASHING_CMDID,
  300. /** Enable/Disable Smart Antenna */
  301. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  302. /** Set Smart Antenna RX antenna*/
  303. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  304. /** Override the antenna switch table */
  305. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  306. /** Override the CTL table */
  307. WMI_PDEV_SET_CTL_TABLE_CMDID,
  308. /** Override the array gain table */
  309. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  310. /** FIPS test mode command */
  311. WMI_PDEV_FIPS_CMDID,
  312. /** get CCK ANI level */
  313. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  314. /** get OFDM ANI level */
  315. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  316. /** NF Cal Power dBr/dBm */
  317. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  318. /** TxPPDU TPC */
  319. WMI_PDEV_GET_TPC_CMDID,
  320. /** Set to enable MIB stats collection */
  321. WMI_MIB_STATS_ENABLE_CMDID,
  322. /** Set preferred channel list for DBS Mgr */
  323. WMI_PDEV_SET_PCL_CMDID,
  324. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  325. WMI_PDEV_SET_HW_MODE_CMDID,
  326. /** Set DFS, SCAN modes and other FW configurations */
  327. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  328. /** Set per band and per pdev antenna chains */
  329. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  330. /** Periodic channel stats request command */
  331. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  332. /** WMI command for power debug framework */
  333. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  334. /** set per-AC rx reorder timeouts */
  335. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  336. /** WMI command for WOW gpio and type */
  337. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  338. /* Get current ANT's per chain's RSSI info */
  339. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  340. /** WMI command for getting Chip Power Stats */
  341. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  342. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  343. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  344. /** vdev restart request for multiple vdevs */
  345. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  346. /** Pdev update packet routing command */
  347. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  348. /** Get Calibration data version details */
  349. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  350. /** Set Diversity Gain */
  351. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  352. /** Get chain RSSI and antena index command */
  353. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  354. /** get bss chan info */
  355. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  356. /** update pmk cache info */
  357. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  358. /** update fils HLP */
  359. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  360. /** update ctltable request **/
  361. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  362. /** Command to set beacon OUI **/
  363. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  364. /** enable/disable per-AC tx queue optimizations */
  365. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  366. /** enable/disable rx promiscuous mode */
  367. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  368. /* set a generic direct DMA ring config */
  369. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  370. /* VDEV (virtual device) specific commands */
  371. /** vdev create */
  372. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  373. /** vdev delete */
  374. WMI_VDEV_DELETE_CMDID,
  375. /** vdev start request */
  376. WMI_VDEV_START_REQUEST_CMDID,
  377. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  378. WMI_VDEV_RESTART_REQUEST_CMDID,
  379. /** vdev up request */
  380. WMI_VDEV_UP_CMDID,
  381. /** vdev stop request */
  382. WMI_VDEV_STOP_CMDID,
  383. /** vdev down request */
  384. WMI_VDEV_DOWN_CMDID,
  385. /* set a vdev param */
  386. WMI_VDEV_SET_PARAM_CMDID,
  387. /* set a key (used for setting per peer unicast and per vdev multicast) */
  388. WMI_VDEV_INSTALL_KEY_CMDID,
  389. /* wnm sleep mode command */
  390. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  391. WMI_VDEV_WMM_ADDTS_CMDID,
  392. WMI_VDEV_WMM_DELTS_CMDID,
  393. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  394. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  395. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  396. WMI_VDEV_PLMREQ_START_CMDID,
  397. WMI_VDEV_PLMREQ_STOP_CMDID,
  398. /* TSF timestamp action for specified vdev */
  399. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  400. /** set the additional IEs in probe requests for scan or
  401. * assoc req etc for frames FW locally generates */
  402. WMI_VDEV_SET_IE_CMDID,
  403. WMI_VDEV_RATEMASK_CMDID,
  404. /** ATF VDEV REQUEST commands. */
  405. WMI_VDEV_ATF_REQUEST_CMDID,
  406. /** Command to send the DSCP-to-TID map to the target for VAP */
  407. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  408. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  409. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  410. /** set quiet ie parameters. primarily used in AP mode */
  411. WMI_VDEV_SET_QUIET_MODE_CMDID,
  412. /** To set custom aggregation size for per vdev */
  413. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  414. /* DISA feature: Encrypt-decrypt data request */
  415. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  416. /** Command to enable mac randomizaton **/
  417. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  418. /** WMI commands related to dbg arp stats */
  419. WMI_VDEV_SET_ARP_STAT_CMDID,
  420. WMI_VDEV_GET_ARP_STAT_CMDID,
  421. /** get tx power for the current vdev */
  422. WMI_VDEV_GET_TX_POWER_CMDID,
  423. /* limit STA offchannel activity */
  424. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  425. /** To set custom software retries per-AC for vdev */
  426. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  427. /* peer specific commands */
  428. /** create a peer */
  429. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  430. /** delete a peer */
  431. WMI_PEER_DELETE_CMDID,
  432. /** flush specific tid queues of a peer */
  433. WMI_PEER_FLUSH_TIDS_CMDID,
  434. /** set a parameter of a peer */
  435. WMI_PEER_SET_PARAM_CMDID,
  436. /** set peer to associated state. will cary all parameters determined during assocication time */
  437. WMI_PEER_ASSOC_CMDID,
  438. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  439. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  440. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  441. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  442. /** set up mcast group infor for multicast to unicast conversion */
  443. WMI_PEER_MCAST_GROUP_CMDID,
  444. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  445. WMI_PEER_INFO_REQ_CMDID,
  446. /** request the estimated link speed for the peer. FW shall respond with
  447. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  448. */
  449. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  450. /** Set the conditions to report peer justified rate to driver
  451. * The justified rate means the user-rate is justified by PER.
  452. */
  453. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  454. /** update a wds (4 address) entry */
  455. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  456. /** add a proxy sta entry */
  457. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  458. /** Set Smart Antenna TX antenna */
  459. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  460. /** Set Smart Antenna TX train info */
  461. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  462. /** Set SA node config options */
  463. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  464. /** ATF PEER REQUEST commands */
  465. WMI_PEER_ATF_REQUEST_CMDID,
  466. /** bandwidth fairness (BWF) peer configuration request command */
  467. WMI_PEER_BWF_REQUEST_CMDID,
  468. /** rx reorder queue setup for peer/tid */
  469. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  470. /** rx reorder queue remove for peer/tid */
  471. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  472. /** specify a limit for rx A-MPDU block size */
  473. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  474. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  475. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  476. /*
  477. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  478. * placed here, amongst the CMDID defs.
  479. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  480. * EVENTID section, but to preserve backwards compatibility, the value
  481. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  482. * is kept reserved/deprecated.
  483. *
  484. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  485. * WMI peer event message ID, though it will be simpler to instead add
  486. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  487. */
  488. WMI_PEER_RESERVED0_CMDID,
  489. /** Peer/Tid/Msduq threshold update */
  490. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  491. /** TID specific configurations per peer of type
  492. * wmi_peer_tid_configurations_cmd_fixed_param
  493. */
  494. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  495. /** Peer configuration for Channel Frequency Response (CFR) capture
  496. * of type wmi_peer_cfr_capture_cmd. The CFR capture is communicated
  497. * through HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  498. */
  499. WMI_PEER_CFR_CAPTURE_CMDID,
  500. /* beacon/management specific commands */
  501. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  502. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  503. /** transmit beacon by value */
  504. WMI_PDEV_SEND_BCN_CMDID,
  505. /** set the beacon template. used in beacon offload mode to setup the
  506. * the common beacon template with the FW to be used by FW to generate beacons */
  507. WMI_BCN_TMPL_CMDID,
  508. /** set beacon filter with FW */
  509. WMI_BCN_FILTER_RX_CMDID,
  510. /* enable/disable filtering of probe requests in the firmware */
  511. WMI_PRB_REQ_FILTER_RX_CMDID,
  512. /** transmit management frame by value. will be deprecated */
  513. WMI_MGMT_TX_CMDID,
  514. /** set the probe response template. used in beacon offload mode to setup the
  515. * the common probe response template with the FW to be used by FW to generate
  516. * probe responses */
  517. WMI_PRB_TMPL_CMDID,
  518. /** Transmit Mgmt frame by reference */
  519. WMI_MGMT_TX_SEND_CMDID,
  520. /** Transmit data frame by reference */
  521. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  522. /** transmit FILS Discovery frame by value */
  523. WMI_PDEV_SEND_FD_CMDID,
  524. /** Cmd to enable/disable offloaded beacons */
  525. WMI_BCN_OFFLOAD_CTRL_CMDID,
  526. /** Cmd to enable FW handling BSS color change notification from AP. */
  527. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  528. /** commands to directly control ba negotiation directly from host. only used in test mode */
  529. /** turn off FW Auto addba mode and let host control addba */
  530. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  531. /** send add ba request */
  532. WMI_ADDBA_SEND_CMDID,
  533. WMI_ADDBA_STATUS_CMDID,
  534. /** send del ba */
  535. WMI_DELBA_SEND_CMDID,
  536. /** set add ba response will be used by FW to generate addba response*/
  537. WMI_ADDBA_SET_RESP_CMDID,
  538. /** send single VHT MPDU with AMSDU */
  539. WMI_SEND_SINGLEAMSDU_CMDID,
  540. /** Station power save specific config */
  541. /** enable/disable station powersave */
  542. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  543. /** set station power save specific parameter */
  544. WMI_STA_POWERSAVE_PARAM_CMDID,
  545. /** set station mimo powersave mode */
  546. WMI_STA_MIMO_PS_MODE_CMDID,
  547. /** DFS-specific commands */
  548. /** enable DFS (radar detection)*/
  549. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  550. /** disable DFS (radar detection)*/
  551. WMI_PDEV_DFS_DISABLE_CMDID,
  552. /** enable DFS phyerr/parse filter offload */
  553. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  554. /** enable DFS phyerr/parse filter offload */
  555. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  556. /** enable DFS phyerr processing offload */
  557. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  558. /** disable DFS phyerr processing offload */
  559. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  560. /** set ADFS channel config */
  561. WMI_VDEV_ADFS_CH_CFG_CMDID,
  562. /** abort ADFS off-channel-availability-check currently in progress */
  563. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  564. /* Roaming specific commands */
  565. /** set roam scan mode */
  566. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  567. /** set roam scan rssi threshold below which roam scan is enabled */
  568. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  569. /** set roam scan period for periodic roam scan mode */
  570. WMI_ROAM_SCAN_PERIOD,
  571. /** set roam scan trigger rssi change threshold */
  572. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  573. /** set roam AP profile */
  574. WMI_ROAM_AP_PROFILE,
  575. /** set channel list for roam scans */
  576. WMI_ROAM_CHAN_LIST,
  577. /** Stop scan command */
  578. WMI_ROAM_SCAN_CMD,
  579. /** roaming sme offload sync complete */
  580. WMI_ROAM_SYNCH_COMPLETE,
  581. /** set ric request element for 11r roaming */
  582. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  583. /** Invoke roaming forcefully */
  584. WMI_ROAM_INVOKE_CMDID,
  585. /** roaming filter cmd to allow further filtering of roaming candidate */
  586. WMI_ROAM_FILTER_CMDID,
  587. /** set gateway ip, mac and retries for subnet change detection */
  588. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  589. /** configure thresholds for MAWC */
  590. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  591. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  592. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  593. /** configure packet error rate threshold for triggering roaming */
  594. WMI_ROAM_PER_CONFIG_CMDID,
  595. /** configure BSS Transition Management (BTM) offload for roaming */
  596. WMI_ROAM_BTM_CONFIG_CMDID,
  597. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  598. WMI_ENABLE_FILS_CMDID,
  599. /** Request for roam scan stats */
  600. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  601. /** offload scan specific commands */
  602. /** set offload scan AP profile */
  603. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  604. /** remove offload scan AP profile */
  605. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  606. /** set offload scan period */
  607. WMI_OFL_SCAN_PERIOD,
  608. /* P2P specific commands */
  609. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  610. * generated during p2p listen and for p2p discoverability */
  611. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  612. /** enable/disable p2p discoverability on STA/AP VDEVs */
  613. WMI_P2P_DEV_SET_DISCOVERABILITY,
  614. /** set p2p ie to be carried in beacons generated by FW for GO */
  615. WMI_P2P_GO_SET_BEACON_IE,
  616. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  617. WMI_P2P_GO_SET_PROBE_RESP_IE,
  618. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  619. * attribute in the beacons/probe responses received.
  620. * Note: This command is currently used only for Apple P2P implementation.
  621. */
  622. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  623. /** set the configure of p2p find offload */
  624. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  625. /** set the vendor specific p2p ie data for p2p find offload using */
  626. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  627. /** set the BSSID/device name pattern of p2p find offload */
  628. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  629. /** set OppPS related parameters **/
  630. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  631. /** set listen offload start related parameters */
  632. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  633. /** set listen offload stop related parameters */
  634. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  635. /** AP power save specific config */
  636. /** set AP power save specific param */
  637. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  638. /** set AP UAPSD coex pecific param */
  639. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  640. /** set Enhanced Green AP param */
  641. WMI_AP_PS_EGAP_PARAM_CMDID,
  642. /** Rate-control specific commands */
  643. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  644. /** WLAN Profiling commands. */
  645. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  646. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  647. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  648. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  649. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  650. /** Suspend resume command Ids */
  651. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  652. WMI_PDEV_RESUME_CMDID,
  653. /* Beacon filter commands */
  654. /** add a beacon filter */
  655. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  656. /** remove a beacon filter */
  657. WMI_RMV_BCN_FILTER_CMDID,
  658. /* WOW Specific WMI commands*/
  659. /** add pattern for awake */
  660. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  661. /** deleta a wake pattern */
  662. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  663. /** enable/deisable wake event */
  664. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  665. /** enable WOW */
  666. WMI_WOW_ENABLE_CMDID,
  667. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  668. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  669. /* IOAC add keep alive cmd. */
  670. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  671. /* IOAC del keep alive cmd. */
  672. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  673. /* IOAC add pattern for awake */
  674. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  675. /* IOAC deleta a wake pattern */
  676. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  677. /* D0-WOW enable or disable cmd */
  678. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  679. /* enable extend WoW */
  680. WMI_EXTWOW_ENABLE_CMDID,
  681. /* Extend WoW command to configure app type1 parameter */
  682. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  683. /* Extend WoW command to configure app type2 parameter */
  684. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  685. /* enable ICMPv6 Network advertisement filtering */
  686. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  687. /*
  688. * Set a pattern to match UDP packet in WOW mode.
  689. * If match, construct a tx frame in a local buffer
  690. * to send through the peer AP to the entity in the
  691. * IP network that sent the UDP packet to this STA.
  692. */
  693. WMI_WOW_UDP_SVC_OFLD_CMDID,
  694. /* configure WOW host wakeup PIN pattern */
  695. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  696. /* Set which action category should wake the host from suspend */
  697. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  698. /* RTT measurement related cmd */
  699. /** request to make an RTT measurement */
  700. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  701. /** request to report a tsf measurement */
  702. WMI_RTT_TSF_CMDID,
  703. /** spectral scan command */
  704. /** configure spectral scan */
  705. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  706. /** enable/disable spectral scan and trigger */
  707. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  708. /* F/W stats */
  709. /** one time request for stats */
  710. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  711. /** Push MCC Adaptive Scheduler Stats to Firmware */
  712. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  713. /** one time request for txrx stats */
  714. WMI_REQUEST_STATS_EXT_CMDID,
  715. /* Link Layer stats */
  716. /** Request for link layer stats */
  717. WMI_REQUEST_LINK_STATS_CMDID,
  718. /** Request for setting params to link layer stats */
  719. WMI_START_LINK_STATS_CMDID,
  720. /** Request to clear stats*/
  721. WMI_CLEAR_LINK_STATS_CMDID,
  722. /** Request for getting the Firmware Memory Dump */
  723. WMI_GET_FW_MEM_DUMP_CMDID,
  724. /** Request to flush of the buffered debug messages */
  725. WMI_DEBUG_MESG_FLUSH_CMDID,
  726. /** Cmd to configure the verbose level */
  727. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  728. /** One time request for wlan stats */
  729. WMI_REQUEST_WLAN_STATS_CMDID,
  730. /** Request for getting RCPI of peer */
  731. WMI_REQUEST_RCPI_CMDID,
  732. /** One time request for peer stats info */
  733. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  734. /** One time request for radio channel stats */
  735. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  736. /** ARP OFFLOAD REQUEST*/
  737. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  738. /** Proactive ARP Response Add Pattern Command*/
  739. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  740. /** Proactive ARP Response Del Pattern Command*/
  741. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  742. /** NS offload confid*/
  743. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  744. /** APFIND Config */
  745. WMI_APFIND_CMDID,
  746. /** Passpoint list config */
  747. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  748. /** configure supprssing parameters for MAWC */
  749. WMI_NLO_CONFIGURE_MAWC_CMDID,
  750. /* GTK offload Specific WMI commands*/
  751. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  752. /* CSA offload Specific WMI commands*/
  753. /** csa offload enable */
  754. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  755. /** chan switch command */
  756. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  757. /* Chatter commands*/
  758. /* Change chatter mode of operation */
  759. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  760. /** chatter add coalescing filter command */
  761. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  762. /** chatter delete coalescing filter command */
  763. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  764. /** chatter coalecing query command */
  765. WMI_CHATTER_COALESCING_QUERY_CMDID,
  766. /**addba specific commands */
  767. /** start the aggregation on this TID */
  768. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  769. /** stop the aggregation on this TID */
  770. WMI_PEER_TID_DELBA_CMDID,
  771. /** set station mimo powersave method */
  772. WMI_STA_DTIM_PS_METHOD_CMDID,
  773. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  774. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  775. /** Configure the Keep Alive Parameters */
  776. WMI_STA_KEEPALIVE_CMDID,
  777. /* Request ssn from target for a sta/tid pair */
  778. WMI_BA_REQ_SSN_CMDID,
  779. /* misc command group */
  780. /** echo command mainly used for testing */
  781. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  782. /* !!IMPORTANT!!
  783. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  784. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  785. * as we MUST have a fixed value here to maintain compatibility between
  786. * UTF and the ART2 driver
  787. */
  788. /** UTF WMI commands */
  789. WMI_PDEV_UTF_CMDID,
  790. /** set debug log config */
  791. WMI_DBGLOG_CFG_CMDID,
  792. /* QVIT specific command id */
  793. WMI_PDEV_QVIT_CMDID,
  794. /* Factory Testing Mode request command
  795. * used for integrated chipsets */
  796. WMI_PDEV_FTM_INTG_CMDID,
  797. /* set and get keepalive parameters command */
  798. WMI_VDEV_SET_KEEPALIVE_CMDID,
  799. WMI_VDEV_GET_KEEPALIVE_CMDID,
  800. /* For fw recovery test command */
  801. WMI_FORCE_FW_HANG_CMDID,
  802. /* Set Mcast/Bdcast filter */
  803. WMI_SET_MCASTBCAST_FILTER_CMDID,
  804. /** set thermal management params **/
  805. WMI_THERMAL_MGMT_CMDID,
  806. /** set host auto shutdown params **/
  807. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  808. /** set tpc chainmask config command */
  809. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  810. /** set Antenna diversity command */
  811. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  812. /** Set OCB Sched Request, deprecated */
  813. WMI_OCB_SET_SCHED_CMDID,
  814. /** Set rssi monitoring config command */
  815. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  816. /** Enable/disable Large Receive Offload processing; provide cfg params */
  817. WMI_LRO_CONFIG_CMDID,
  818. /** transfer data from host to firmware to write flash */
  819. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  820. /** Command to enable/disable filtering of multicast IP with unicast mac */
  821. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  822. /** Command to control WISA mode */
  823. WMI_VDEV_WISA_CMDID,
  824. /** set debug log time stamp sync up with host */
  825. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  826. /** Command for host to set/delete multiple mcast filters */
  827. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  828. /** upload a requested section of data from firmware flash to host */
  829. WMI_READ_DATA_FROM_FLASH_CMDID,
  830. /* Thermal Throttling SET CONF commands */
  831. WMI_THERM_THROT_SET_CONF_CMDID,
  832. /* set runtime dpd recalibration params */
  833. WMI_RUNTIME_DPD_RECAL_CMDID,
  834. /* get TX power for input HALPHY parameters */
  835. WMI_GET_TPC_POWER_CMDID,
  836. /* Offload 11k related requests */
  837. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  838. /* invoke neighbor report from FW */
  839. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  840. /* GPIO Configuration */
  841. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  842. WMI_GPIO_OUTPUT_CMDID,
  843. /* Txbf configuration command */
  844. WMI_TXBF_CMDID,
  845. /* FWTEST Commands */
  846. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  847. /** set NoA descs **/
  848. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  849. /* UNIT Tests */
  850. WMI_UNIT_TEST_CMDID,
  851. /* set debug and tuning parameters */
  852. WMI_FWTEST_CMDID,
  853. /* Q-Boost configuration test commands */
  854. WMI_QBOOST_CFG_CMDID,
  855. /** TDLS Configuration */
  856. /** enable/disable TDLS */
  857. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  858. /** set tdls peer state */
  859. WMI_TDLS_PEER_UPDATE_CMDID,
  860. /** TDLS Offchannel control */
  861. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  862. /** Resmgr Configuration */
  863. /** Adaptive OCS is enabled by default in the FW. This command is used to
  864. * disable FW based adaptive OCS.
  865. */
  866. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  867. /** set the requested channel time quota for the home channels */
  868. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  869. /** set the requested latency for the home channels */
  870. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  871. /** STA SMPS Configuration */
  872. /** force SMPS mode */
  873. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  874. /** set SMPS parameters */
  875. WMI_STA_SMPS_PARAM_CMDID,
  876. /* Wlan HB commands*/
  877. /* enalbe/disable wlan HB */
  878. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  879. /* set tcp parameters for wlan HB */
  880. WMI_HB_SET_TCP_PARAMS_CMDID,
  881. /* set tcp pkt filter for wlan HB */
  882. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  883. /* set udp parameters for wlan HB */
  884. WMI_HB_SET_UDP_PARAMS_CMDID,
  885. /* set udp pkt filter for wlan HB */
  886. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  887. /* OIC ping keep alive */
  888. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  889. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  890. /* WMI commands related to DHCP Lease Renew Offload **/
  891. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  892. /** Wlan RMC commands*/
  893. /** enable/disable RMC */
  894. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  895. /** configure action frame period */
  896. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  897. /** For debug/future enhancement purposes only,
  898. * configures/finetunes RMC algorithms */
  899. WMI_RMC_CONFIG_CMDID,
  900. /** select manual leader */
  901. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  902. /** WLAN MHF offload commands */
  903. /** enable/disable MHF offload */
  904. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  905. /** Plumb routing table for MHF offload */
  906. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  907. /*location scan commands*/
  908. /*start batch scan*/
  909. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  910. /*stop batch scan*/
  911. WMI_BATCH_SCAN_DISABLE_CMDID,
  912. /*get batch scan result*/
  913. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  914. /* OEM related cmd */
  915. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  916. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  917. /* OEM related cmd used for Low Power ranging */
  918. WMI_LPI_OEM_REQ_CMDID,
  919. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  920. /** Nan Request */
  921. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  922. /** Modem power state command */
  923. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  924. WMI_CHAN_AVOID_UPDATE_CMDID,
  925. WMI_COEX_CONFIG_CMDID,
  926. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  927. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  928. WMI_SAR_LIMITS_CMDID,
  929. WMI_SAR_GET_LIMITS_CMDID,
  930. /**
  931. * OBSS scan offload enable/disable commands
  932. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  933. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  934. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  935. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  936. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  937. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  938. */
  939. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  940. WMI_OBSS_SCAN_DISABLE_CMDID,
  941. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  942. /**LPI commands*/
  943. /**LPI mgmt snooping config command*/
  944. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  945. /**LPI scan start command*/
  946. WMI_LPI_START_SCAN_CMDID,
  947. /**LPI scan stop command*/
  948. WMI_LPI_STOP_SCAN_CMDID,
  949. /** ExtScan commands */
  950. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  951. WMI_EXTSCAN_STOP_CMDID,
  952. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  953. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  954. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  955. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  956. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  957. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  958. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  959. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  960. /** DHCP server offload commands */
  961. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  962. /** IPA Offload features related commands */
  963. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  964. /** mDNS responder offload commands */
  965. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  966. WMI_MDNS_SET_FQDN_CMDID,
  967. WMI_MDNS_SET_RESPONSE_CMDID,
  968. WMI_MDNS_GET_STATS_CMDID,
  969. /* enable/disable AP Authentication offload */
  970. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  971. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  972. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  973. /** Out-of-context-of-BSS (OCB) commands */
  974. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  975. WMI_OCB_SET_UTC_TIME_CMDID,
  976. WMI_OCB_START_TIMING_ADVERT_CMDID,
  977. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  978. WMI_OCB_GET_TSF_TIMER_CMDID,
  979. WMI_DCC_GET_STATS_CMDID,
  980. WMI_DCC_CLEAR_STATS_CMDID,
  981. WMI_DCC_UPDATE_NDL_CMDID,
  982. /* System-On-Chip commands */
  983. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  984. WMI_SOC_SET_HW_MODE_CMDID,
  985. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  986. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  987. /* packet filter commands */
  988. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  989. WMI_PACKET_FILTER_ENABLE_CMDID,
  990. /** Motion Aided WiFi Connectivity (MAWC) commands */
  991. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  992. /** WMI commands related to PMF 11w Offload */
  993. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  994. /** WMI commands related to pkt filter (BPF) offload */
  995. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  996. WMI_BPF_GET_VDEV_STATS_CMDID,
  997. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  998. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  999. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1000. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1001. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1002. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1003. /** WMI commands related to monitor mode. */
  1004. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1005. /** WMI commands related to regulatory offload */
  1006. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1007. WMI_11D_SCAN_START_CMDID,
  1008. WMI_11D_SCAN_STOP_CMDID,
  1009. WMI_SET_INIT_COUNTRY_CMDID,
  1010. /**
  1011. * Nan Data commands
  1012. * NDI - NAN Data Interface
  1013. * NDP - NAN Data Path
  1014. */
  1015. /* Commands in prototyping phase */
  1016. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1017. WMI_NDP_INITIATOR_REQ_CMDID,
  1018. WMI_NDP_RESPONDER_REQ_CMDID,
  1019. WMI_NDP_END_REQ_CMDID,
  1020. /** WMI commands related to HW data filtering **/
  1021. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1022. /** WMI commands related to WLAN latency module **/
  1023. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1024. /** WMI commands related to STA & AP TWT module **/
  1025. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1026. WMI_TWT_DISABLE_CMDID,
  1027. WMI_TWT_ADD_DIALOG_CMDID,
  1028. WMI_TWT_DEL_DIALOG_CMDID,
  1029. WMI_TWT_PAUSE_DIALOG_CMDID,
  1030. WMI_TWT_RESUME_DIALOG_CMDID,
  1031. /** WMI commands related to motion detection **/
  1032. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1033. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1034. WMI_MOTION_DET_START_STOP_CMDID,
  1035. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1036. /** WMI commands related to OBSS PD Spatial Reuse **/
  1037. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1038. } WMI_CMD_ID;
  1039. typedef enum {
  1040. /** WMI service is ready; after this event WMI messages can be sent/received */
  1041. WMI_SERVICE_READY_EVENTID = 0x1,
  1042. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1043. WMI_READY_EVENTID,
  1044. /** Specify what WMI services the target supports (for services beyond
  1045. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1046. */
  1047. WMI_SERVICE_AVAILABLE_EVENTID,
  1048. /** Scan specific events */
  1049. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1050. /* PDEV specific events */
  1051. /** TPC config for the current operating channel */
  1052. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1053. /** Channel stats event */
  1054. WMI_CHAN_INFO_EVENTID,
  1055. /** PHY Error specific WMI event */
  1056. WMI_PHYERR_EVENTID,
  1057. /** eeprom dump event */
  1058. WMI_PDEV_DUMP_EVENTID,
  1059. /** traffic pause event */
  1060. WMI_TX_PAUSE_EVENTID,
  1061. /** DFS radar event */
  1062. WMI_DFS_RADAR_EVENTID,
  1063. /** track L1SS entry and residency event */
  1064. WMI_PDEV_L1SS_TRACK_EVENTID,
  1065. /** Report current temprature of the chip in Celcius degree */
  1066. WMI_PDEV_TEMPERATURE_EVENTID,
  1067. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1068. WMI_SERVICE_READY_EXT_EVENTID,
  1069. /** FIPS test mode event */
  1070. WMI_PDEV_FIPS_EVENTID,
  1071. /** Channel hopping avoidance */
  1072. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1073. /** CCK ANI level event */
  1074. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1075. /** OFDM ANI level event */
  1076. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1077. /** Tx PPDU params */
  1078. WMI_PDEV_TPC_EVENTID,
  1079. /** NF Cal Power in DBR/DBM for all channels */
  1080. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1081. /** SOC/PDEV events */
  1082. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1083. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1084. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1085. /** Report ANT DIV feature's status */
  1086. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1087. /** Chip level Power stats */
  1088. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1089. /** Power Save Failure Detected */
  1090. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1091. /* Event to report the switch count in csa of one or more VDEVs */
  1092. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1093. /** Report the caldata version to host */
  1094. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1095. /** Report chain RSSI and antenna index to host */
  1096. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1097. /** provide noise floor and cycle counts for a channel */
  1098. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1099. /** Response received the ctl table to host */
  1100. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1101. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1102. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1103. /* VDEV specific events */
  1104. /** VDEV started event in response to VDEV_START request */
  1105. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1106. /** vdev stopped event , generated in response to VDEV_STOP request */
  1107. WMI_VDEV_STOPPED_EVENTID,
  1108. /* Indicate the set key (used for setting per
  1109. * peer unicast and per vdev multicast)
  1110. * operation has completed */
  1111. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1112. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1113. don't use this for any new implementations */
  1114. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1115. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1116. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1117. /* Return the TSF timestamp of specified vdev */
  1118. WMI_VDEV_TSF_REPORT_EVENTID,
  1119. /* FW response to Host for vdev delete cmdid */
  1120. WMI_VDEV_DELETE_RESP_EVENTID,
  1121. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1122. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1123. /** event to report mac randomization success **/
  1124. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1125. /* event for ARP stats collection */
  1126. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1127. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1128. WMI_VDEV_GET_TX_POWER_EVENTID,
  1129. /* peer specific events */
  1130. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1131. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1132. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1133. WMI_PEER_INFO_EVENTID,
  1134. /** Event indicating that TX fail count reaching threshold */
  1135. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1136. /* Return the estimate link speed for the Peer specified in the
  1137. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1138. */
  1139. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1140. /* Return the peer state
  1141. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1142. */
  1143. WMI_PEER_STATE_EVENTID,
  1144. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1145. * After that, host will send Mx message.
  1146. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1147. */
  1148. WMI_PEER_ASSOC_CONF_EVENTID,
  1149. /* FW response to Host for peer delete cmdid */
  1150. WMI_PEER_DELETE_RESP_EVENTID,
  1151. /** Valid rate code list for peer */
  1152. WMI_PEER_RATECODE_LIST_EVENTID,
  1153. WMI_WDS_PEER_EVENTID,
  1154. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1155. /** Peer Ant Div Info Event with rssi per chain, etc */
  1156. WMI_PEER_ANTDIV_INFO_EVENTID,
  1157. /*
  1158. * WMI_PEER_RESERVED_EVENTID
  1159. * These values are used for placeholders, to allow the subsequent
  1160. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1161. * as it had in its original location, when it was mistakenly placed
  1162. * amongst the WMI_PEER CMDID defs.
  1163. *
  1164. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1165. * event message IDs, though it will be simpler to instead add new
  1166. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1167. */
  1168. WMI_PEER_RESERVED0_EVENTID,
  1169. WMI_PEER_RESERVED1_EVENTID,
  1170. WMI_PEER_RESERVED2_EVENTID,
  1171. WMI_PEER_RESERVED3_EVENTID,
  1172. WMI_PEER_RESERVED4_EVENTID,
  1173. WMI_PEER_RESERVED5_EVENTID,
  1174. WMI_PEER_RESERVED6_EVENTID,
  1175. WMI_PEER_RESERVED7_EVENTID,
  1176. WMI_PEER_RESERVED8_EVENTID,
  1177. WMI_PEER_RESERVED9_EVENTID,
  1178. WMI_PEER_RESERVED10_EVENTID,
  1179. /** Peer operating mode change indication sent to host to update stats */
  1180. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1181. /* beacon/mgmt specific events */
  1182. /** RX management frame. the entire frame is carried along with the event. */
  1183. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1184. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1185. use only in host beacon mode */
  1186. WMI_HOST_SWBA_EVENTID,
  1187. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1188. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1189. staggered beacon transmission mode */
  1190. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1191. /** event after the first beacon is transmitted following
  1192. a change in the template.*/
  1193. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1194. /** event after the first probe response is transmitted following
  1195. a change in the template.*/
  1196. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1197. /** Event for Mgmt TX completion event */
  1198. WMI_MGMT_TX_COMPLETION_EVENTID,
  1199. /** Event for Mgmt TX bundle completion event */
  1200. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1201. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1202. * Use this event if number of vdevs > 32.
  1203. */
  1204. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1205. /** Event for offchan data TX completion event */
  1206. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1207. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1208. WMI_HOST_SWFDA_EVENTID,
  1209. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1210. * Used only in host beacon mode. */
  1211. WMI_HOST_SWBA_V2_EVENTID,
  1212. /* ADDBA Related WMI Events*/
  1213. /** Indication the completion of the prior
  1214. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1215. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1216. /** Indication the completion of the prior
  1217. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1218. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1219. /* Seq num returned from hw for a sta/tid pair */
  1220. WMI_BA_RSP_SSN_EVENTID,
  1221. /* Aggregation state requested by BTC */
  1222. WMI_AGGR_STATE_TRIG_EVENTID,
  1223. /** Roam event to trigger roaming on host */
  1224. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1225. /** matching AP found from list of profiles */
  1226. WMI_PROFILE_MATCH,
  1227. /** roam synch event */
  1228. WMI_ROAM_SYNCH_EVENTID,
  1229. /** roam synch frame event */
  1230. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1231. /** various roam scan stats */
  1232. WMI_ROAM_SCAN_STATS_EVENTID,
  1233. /** P2P disc found */
  1234. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1235. /** send noa info to host when noa is changed for beacon tx offload enable */
  1236. WMI_P2P_NOA_EVENTID,
  1237. /** send p2p listen offload stopped event with different reason */
  1238. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1239. /** Send EGAP Info to host */
  1240. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1241. /* send pdev resume event to host after pdev resume. */
  1242. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1243. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1244. will cary wake reason */
  1245. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1246. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1247. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1248. /*RTT related event ID*/
  1249. /** RTT measurement report */
  1250. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1251. /** TSF measurement report */
  1252. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1253. /** RTT error report */
  1254. WMI_RTT_ERROR_REPORT_EVENTID,
  1255. /*STATS specific events*/
  1256. /** txrx stats event requested by host */
  1257. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1258. /** FW iface link stats Event */
  1259. WMI_IFACE_LINK_STATS_EVENTID,
  1260. /** FW iface peer link stats Event */
  1261. WMI_PEER_LINK_STATS_EVENTID,
  1262. /** FW Update radio stats Event */
  1263. WMI_RADIO_LINK_STATS_EVENTID,
  1264. /** Firmware memory dump Complete event*/
  1265. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1266. /** Event indicating the DIAG logs/events supported by FW */
  1267. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1268. /** Instantaneous RSSI event */
  1269. WMI_INST_RSSI_STATS_EVENTID,
  1270. /** FW update tx power levels event */
  1271. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1272. /** This event is used to report wlan stats to host.
  1273. * It is triggered under 3 conditions:
  1274. * (a) Periodic timer timed out, based on the period specified
  1275. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1276. * (b) Whenever any of the (enabled) stats thresholds specified
  1277. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1278. * within the current stats period.
  1279. * (c) In response to the one-time wlan stats request of
  1280. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1281. *
  1282. * If this event is triggered by condition a or b,
  1283. * the stats counters are cleared at the start of each period.
  1284. * But if it is triggered by condition c, stats counters won't be cleared.
  1285. */
  1286. WMI_REPORT_STATS_EVENTID,
  1287. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1288. WMI_UPDATE_RCPI_EVENTID,
  1289. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1290. * and report peer stats info to host */
  1291. WMI_PEER_STATS_INFO_EVENTID,
  1292. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1293. * and report radio channel stats to host */
  1294. WMI_RADIO_CHAN_STATS_EVENTID,
  1295. /* NLO specific events */
  1296. /** NLO match event after the first match */
  1297. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1298. /** NLO scan complete event */
  1299. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1300. /** APFIND specific events */
  1301. WMI_APFIND_EVENTID,
  1302. /** passpoint network match event */
  1303. WMI_PASSPOINT_MATCH_EVENTID,
  1304. /** GTK offload stautus event requested by host */
  1305. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1306. /** GTK offload failed to rekey event */
  1307. WMI_GTK_REKEY_FAIL_EVENTID,
  1308. /* CSA IE received event */
  1309. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1310. /*chatter query reply event*/
  1311. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1312. /** DFS related events */
  1313. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1314. /** Indicate channel-availability-check completion event to host */
  1315. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1316. /** Indicate off-channel-availability-check completion event to host */
  1317. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1318. /** echo event in response to echo command */
  1319. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1320. /* !!IMPORTANT!!
  1321. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1322. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1323. * as we MUST have a fixed value here to maintain compatibility between
  1324. * UTF and the ART2 driver
  1325. */
  1326. /** UTF specific WMI event */
  1327. WMI_PDEV_UTF_EVENTID,
  1328. /** event carries buffered debug messages */
  1329. WMI_DEBUG_MESG_EVENTID,
  1330. /** FW stats(periodic or on shot) */
  1331. WMI_UPDATE_STATS_EVENTID,
  1332. /** debug print message used for tracing FW code while debugging */
  1333. WMI_DEBUG_PRINT_EVENTID,
  1334. /** DCS wlan or non-wlan interference event
  1335. */
  1336. WMI_DCS_INTERFERENCE_EVENTID,
  1337. /** VI spoecific event */
  1338. WMI_PDEV_QVIT_EVENTID,
  1339. /** FW code profile data in response to profile request */
  1340. WMI_WLAN_PROFILE_DATA_EVENTID,
  1341. /* Factory Testing Mode request event
  1342. * used for integrated chipsets */
  1343. WMI_PDEV_FTM_INTG_EVENTID,
  1344. /* avoid list of frequencies .
  1345. */
  1346. WMI_WLAN_FREQ_AVOID_EVENTID,
  1347. /* Indicate the keepalive parameters */
  1348. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1349. /*Thermal Management event*/
  1350. WMI_THERMAL_MGMT_EVENTID,
  1351. /* Container for DIAG event and log data */
  1352. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1353. /* host auto shutdown event */
  1354. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1355. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1356. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1357. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1358. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1359. WMI_DIAG_EVENTID,
  1360. /** Set OCB Sched Response, deprecated */
  1361. WMI_OCB_SET_SCHED_EVENTID,
  1362. /** event to indicate the flush of the buffered debug messages is complete*/
  1363. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1364. /** event to report mix/max RSSI breach events */
  1365. WMI_RSSI_BREACH_EVENTID,
  1366. /** event to report completion of data storage into flash memory */
  1367. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1368. /** event to report SCPC calibrated data to host */
  1369. WMI_PDEV_UTF_SCPC_EVENTID,
  1370. /** event to provide requested data from the target's flash memory */
  1371. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1372. /** event to report rx aggregation failure frame information */
  1373. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1374. /** event to upload a PKGID to host to identify chip for various products */
  1375. WMI_PKGID_EVENTID,
  1376. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1377. WMI_THERM_THROT_STATS_EVENTID,
  1378. /* WMI UNIT TEST event */
  1379. WMI_UNIT_TEST_EVENTID,
  1380. /** event to report result of host configure SAR2 */
  1381. WMI_SAR2_RESULT_EVENTID,
  1382. /** event to get TX power per input HALPHY parameters */
  1383. WMI_GET_TPC_POWER_EVENTID,
  1384. /* GPIO Event */
  1385. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1386. /** upload H_CV info WMI event
  1387. * to indicate uploaded H_CV info to host
  1388. */
  1389. WMI_UPLOADH_EVENTID,
  1390. /** capture H info WMI event
  1391. * to indicate captured H info to host
  1392. */
  1393. WMI_CAPTUREH_EVENTID,
  1394. /* hw RFkill */
  1395. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1396. /* TDLS Event */
  1397. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1398. /** STA SMPS Event */
  1399. /** force SMPS mode */
  1400. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1401. /*location scan event*/
  1402. /*report the firmware's capability of batch scan*/
  1403. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1404. /*batch scan result*/
  1405. WMI_BATCH_SCAN_RESULT_EVENTID,
  1406. /* OEM Event */
  1407. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1408. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1409. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1410. WMI_OEM_RESPONSE_EVENTID,
  1411. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1412. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1413. /* NAN Event */
  1414. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1415. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1416. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1417. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1418. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1419. /* Coex Event */
  1420. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1421. WMI_SAR_GET_LIMITS_EVENTID,
  1422. /* LPI Event */
  1423. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1424. WMI_LPI_STATUS_EVENTID,
  1425. WMI_LPI_HANDOFF_EVENTID,
  1426. /* ExtScan events */
  1427. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1428. WMI_EXTSCAN_OPERATION_EVENTID,
  1429. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1430. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1431. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1432. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1433. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1434. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1435. /* mDNS offload events */
  1436. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1437. /* SAP Authentication offload events */
  1438. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1439. WMI_SAP_OFL_DEL_STA_EVENTID,
  1440. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1441. /* OBSS Offloads events */
  1442. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1443. /** Out-of-context-of-bss (OCB) events */
  1444. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1445. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1446. WMI_DCC_GET_STATS_RESP_EVENTID,
  1447. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1448. WMI_DCC_STATS_EVENTID,
  1449. /* System-On-Chip events */
  1450. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1451. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1452. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1453. /** Motion Aided WiFi Connectivity (MAWC) events */
  1454. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1455. /** pkt filter (BPF) offload relevant events */
  1456. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1457. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1458. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1459. /* RMC specific event */
  1460. /* RMC manual leader selected event */
  1461. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1462. /** WMI events related to regulatory offload */
  1463. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1464. WMI_11D_NEW_COUNTRY_EVENTID,
  1465. /** Events for TWT(Target Wake Time) of STA and AP */
  1466. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1467. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1468. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1469. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1470. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1471. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1472. /** Events in Prototyping phase */
  1473. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1474. WMI_NDP_INITIATOR_RSP_EVENTID,
  1475. WMI_NDP_RESPONDER_RSP_EVENTID,
  1476. WMI_NDP_END_RSP_EVENTID,
  1477. WMI_NDP_INDICATION_EVENTID,
  1478. WMI_NDP_CONFIRM_EVENTID,
  1479. WMI_NDP_END_INDICATION_EVENTID,
  1480. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1481. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1482. /** WMI events related to motion detection */
  1483. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  1484. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  1485. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  1486. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  1487. } WMI_EVT_ID;
  1488. /* defines for OEM message sub-types */
  1489. #define WMI_OEM_CAPABILITY_REQ 0x01
  1490. #define WMI_OEM_CAPABILITY_RSP 0x02
  1491. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1492. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1493. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1494. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1495. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1496. #define WMI_OEM_NAN_PEER_INFO 0x08
  1497. #define WMI_OEM_CONFIGURE_LCR 0x09
  1498. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1499. #define WMI_CHAN_LIST_TAG 0x1
  1500. #define WMI_SSID_LIST_TAG 0x2
  1501. #define WMI_BSSID_LIST_TAG 0x3
  1502. #define WMI_IE_TAG 0x4
  1503. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1504. typedef struct {
  1505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1506. /** primary 20 MHz channel frequency in mhz */
  1507. A_UINT32 mhz;
  1508. /** Center frequency 1 in MHz*/
  1509. A_UINT32 band_center_freq1;
  1510. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1511. A_UINT32 band_center_freq2;
  1512. /** channel info described below */
  1513. A_UINT32 info;
  1514. /** contains min power, max power, reg power and reg class id. */
  1515. A_UINT32 reg_info_1;
  1516. /** contains antennamax */
  1517. A_UINT32 reg_info_2;
  1518. } wmi_channel;
  1519. typedef enum {
  1520. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1521. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1522. } wmi_channel_change_cause;
  1523. /** channel info consists of 6 bits of channel mode */
  1524. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1525. (pwmi_channel)->info &= 0xffffffc0; \
  1526. (pwmi_channel)->info |= (val); \
  1527. } while (0)
  1528. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1529. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1530. #define WMI_CHAN_FLAG_PASSIVE 7
  1531. #define WMI_CHAN_ADHOC_ALLOWED 8
  1532. #define WMI_CHAN_AP_DISABLED 9
  1533. #define WMI_CHAN_FLAG_DFS 10
  1534. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1535. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1536. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1537. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1538. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1539. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1540. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1541. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1542. (pwmi_channel)->info |= (1 << flag); \
  1543. } while (0)
  1544. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1545. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1546. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1547. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1548. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1549. } while (0)
  1550. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1551. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1552. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1553. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1554. } while (0)
  1555. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1556. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1557. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1558. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1559. } while (0)
  1560. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1561. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1562. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1563. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1564. } while (0)
  1565. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1566. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1567. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1568. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1569. } while (0)
  1570. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1571. /* max tx power is in 1 dBm units */
  1572. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1573. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1574. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1575. } while (0)
  1576. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1577. /** HT Capabilities*/
  1578. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1579. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1580. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1581. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1582. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1583. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1584. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1585. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1586. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1587. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1588. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1589. #define WMI_HT_CAP_HT40_SGI 0x0800
  1590. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1591. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1592. /* These macros should be used when we wish to advertise STBC support for
  1593. * only 1SS or 2SS or 3SS. */
  1594. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1595. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1596. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1597. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1598. WMI_HT_CAP_HT20_SGI | \
  1599. WMI_HT_CAP_HT40_SGI | \
  1600. WMI_HT_CAP_TX_STBC | \
  1601. WMI_HT_CAP_RX_STBC | \
  1602. WMI_HT_CAP_LDPC | \
  1603. WMI_HT_CAP_TX_LDPC | \
  1604. WMI_HT_CAP_RX_LDPC)
  1605. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1606. field. The fields not defined here are not supported, or reserved.
  1607. Do not change these masks and if you have to add new one follow the
  1608. bitmask as specified by 802.11ac draft.
  1609. */
  1610. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1611. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1612. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1613. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1614. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1615. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1616. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1617. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1618. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1619. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1620. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1621. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1622. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1623. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1624. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1625. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1626. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1627. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1628. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1629. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1630. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1631. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1632. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1633. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1634. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1635. /* TEMPORARY:
  1636. * Preserve the incorrect old name as an alias for the correct new name
  1637. * until all references to the old name have been removed from all hosts
  1638. * and targets.
  1639. */
  1640. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1641. /* These macros should be used when we wish to advertise STBC support for
  1642. * only 1SS or 2SS or 3SS. */
  1643. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1644. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1645. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1646. /* TEMPORARY:
  1647. * Preserve the incorrect old name as an alias for the correct new name
  1648. * until all references to the old name have been removed from all hosts
  1649. * and targets.
  1650. */
  1651. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1652. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1653. WMI_VHT_CAP_SGI_80MHZ | \
  1654. WMI_VHT_CAP_TX_STBC | \
  1655. WMI_VHT_CAP_RX_STBC_MASK | \
  1656. WMI_VHT_CAP_RX_LDPC | \
  1657. WMI_VHT_CAP_TX_LDPC | \
  1658. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1659. WMI_VHT_CAP_RX_FIXED_ANT | \
  1660. WMI_VHT_CAP_TX_FIXED_ANT)
  1661. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1662. 802.11ac
  1663. */
  1664. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1665. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1666. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1667. /** 11ax capabilities */
  1668. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1669. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1670. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1671. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1672. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1673. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1674. */
  1675. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1676. /* fragmentation support field value */
  1677. enum {
  1678. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1679. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1680. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1681. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1682. };
  1683. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1684. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1685. #define WMI_MAX_NUM_RU MAX_HE_RU
  1686. /*
  1687. * Figure 8 554ae: -PPE Threshold Info field format
  1688. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1689. *
  1690. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1691. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1692. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1693. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1694. *
  1695. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1696. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1697. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1698. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1699. *
  1700. * etc.
  1701. */
  1702. /*
  1703. * Note that in these macros, "ru" is one-based, not zero-based, while
  1704. * nssm1 is zero-based.
  1705. */
  1706. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1707. do { \
  1708. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1709. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1710. } while (0)
  1711. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1712. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1713. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1714. do { \
  1715. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1716. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1717. } while (0)
  1718. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1719. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1720. typedef struct _wmi_ppe_threshold {
  1721. A_UINT32 numss_m1; /** NSS - 1*/
  1722. union {
  1723. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1724. A_UINT32 ru_mask; /** RU index mask */
  1725. };
  1726. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1727. } wmi_ppe_threshold;
  1728. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1729. */
  1730. #define WMI_SYS_CAP_ENABLE 0x00000001
  1731. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1732. /*
  1733. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1734. * Bits 5:0 are reserved
  1735. */
  1736. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1737. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1738. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1739. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1740. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1741. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1742. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1743. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1744. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1745. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1746. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1747. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1748. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1749. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1750. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1751. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1752. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1753. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1754. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1755. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1756. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1757. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1758. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1759. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1760. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1761. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1762. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1763. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1764. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1765. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1766. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1767. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1768. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1769. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1770. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1771. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1772. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1773. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1774. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1775. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1776. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1777. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1778. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1779. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1780. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1781. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1782. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1783. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1784. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1785. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1786. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1787. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1788. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1789. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1790. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1791. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1792. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1793. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1794. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1795. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1796. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1797. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1798. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1799. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1800. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1801. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1802. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1803. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1804. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1805. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1806. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1807. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1808. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1809. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1810. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1811. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1812. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1813. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1814. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1815. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1816. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1817. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  1818. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  1819. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1820. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1821. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1822. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1823. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1824. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1825. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1826. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1827. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1828. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  1829. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  1830. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  1831. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  1832. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  1833. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  1834. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1835. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1836. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1837. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1838. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  1839. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1840. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  1841. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1842. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  1843. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1844. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1845. typedef struct _wmi_abi_version {
  1846. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  1847. A_UINT32 abi_version_1; /** WMI change revision */
  1848. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  1849. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  1850. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  1851. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  1852. } wmi_abi_version;
  1853. /*
  1854. * maximum number of memroy requests allowed from FW.
  1855. */
  1856. #define WMI_MAX_MEM_REQS 16
  1857. /* !!NOTE!!:
  1858. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1859. * Please don't change it.
  1860. */
  1861. #define HW_BD_INFO_SIZE 5
  1862. /**
  1863. * PDEV ID to identify the physical device,
  1864. * value 0 reserved for SOC level commands/event
  1865. */
  1866. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1867. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1868. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1869. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1870. /*
  1871. * Enum regarding which BDF elements are provided in which elements of the
  1872. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  1873. */
  1874. typedef enum {
  1875. BDF_VERSION = 0,
  1876. REF_DESIGN_ID = 1,
  1877. CUSTOMER_ID = 2,
  1878. PROJECT_ID = 3,
  1879. BOARD_DATA_REV = 4,
  1880. } wmi_hw_bd_info_e;
  1881. /*
  1882. * Macros to get/set BDF details within the
  1883. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  1884. */
  1885. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  1886. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  1887. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  1888. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  1889. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  1890. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  1891. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  1892. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  1893. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  1894. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  1895. /**
  1896. * The following struct holds optional payload for
  1897. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1898. * device capability to the host.
  1899. */
  1900. typedef struct {
  1901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1902. A_UINT32 fw_build_vers; /* firmware build number */
  1903. wmi_abi_version fw_abi_vers;
  1904. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1905. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1906. A_UINT32 num_rf_chains;
  1907. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1908. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1909. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1910. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1911. A_UINT32 hw_min_tx_power;
  1912. A_UINT32 hw_max_tx_power;
  1913. /* sys_cap_info:
  1914. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  1915. * bits 31:2 - reserved (must be set to zero)
  1916. */
  1917. A_UINT32 sys_cap_info;
  1918. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1919. /** Max beacon and Probe Response IE offload size (includes
  1920. * optional P2P IEs) */
  1921. A_UINT32 max_bcn_ie_size;
  1922. /*
  1923. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  1924. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  1925. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  1926. * by DMA.
  1927. */
  1928. A_UINT32 num_mem_reqs;
  1929. /* Max No. scan channels target can support
  1930. * If FW is too old and doesn't indicate this number, host side value will default to
  1931. * 0, and host will take the original compatible value (62) for future scan channel
  1932. * setup.
  1933. */
  1934. A_UINT32 max_num_scan_channels;
  1935. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  1936. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  1937. */
  1938. A_UINT32 hw_bd_id;
  1939. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  1940. /*
  1941. * Number of MACs supported, i.e. a DBS-capable device will return 2
  1942. */
  1943. A_UINT32 max_supported_macs;
  1944. /*
  1945. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  1946. */
  1947. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  1948. /*
  1949. * Number of Dual Band Simultaneous (DBS) hardware modes
  1950. */
  1951. A_UINT32 num_dbs_hw_modes;
  1952. /*
  1953. * txrx_chainmask
  1954. * [7:0] - 2G band tx chain mask
  1955. * [15:8] - 2G band rx chain mask
  1956. * [23:16] - 5G band tx chain mask
  1957. * [31:24] - 5G band rx chain mask
  1958. *
  1959. */
  1960. A_UINT32 txrx_chainmask;
  1961. /*
  1962. * default Dual Band Simultaneous (DBS) hardware mode
  1963. */
  1964. A_UINT32 default_dbs_hw_mode_index;
  1965. /*
  1966. * Number of msdu descriptors target would use
  1967. */
  1968. A_UINT32 num_msdu_desc;
  1969. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  1970. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  1971. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1972. * wlan_host_mem_req mem_reqs[];
  1973. * wlan_dbs_hw_mode_list[];
  1974. */
  1975. } wmi_service_ready_event_fixed_param;
  1976. typedef enum {
  1977. WMI_RXTX_LED_ENABLE = 0x00000001,
  1978. WMI_RFKILL_ENABLE = 0x00000002,
  1979. } WMI_LEDRFKILL_FLAGS;
  1980. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  1981. typedef struct {
  1982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  1983. /*
  1984. * The wmi_service_segment offset field specifies the position within the
  1985. * logical bitmap of WMI service flags at which the WMI service flags
  1986. * specified within this message begin.
  1987. * Since the first 128 WMI service flags are specified within the
  1988. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  1989. * the wmi_service_segment_offset value is expected to be 128 or more.
  1990. */
  1991. A_UINT32 wmi_service_segment_offset;
  1992. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  1993. } wmi_service_available_event_fixed_param;
  1994. typedef struct {
  1995. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  1996. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  1997. A_UINT32 default_conc_scan_config_bits;
  1998. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  1999. A_UINT32 default_fw_config_bits;
  2000. wmi_ppe_threshold ppet;
  2001. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2002. /*
  2003. * An HT STA shall not allow transmission of more than one MPDU start
  2004. * within the time limit described in the MPDU maximum density field.
  2005. */
  2006. A_UINT32 mpdu_density; /* units are microseconds */
  2007. /*
  2008. * Maximum no of BSSID based RX filters host can program
  2009. * Value 0 means FW hasn't given any limit to host.
  2010. */
  2011. A_UINT32 max_bssid_rx_filters;
  2012. /*
  2013. * Extended FW build version information:
  2014. * bits 27:0 -> reserved
  2015. * bits 31:28 -> CRM sub ID
  2016. */
  2017. A_UINT32 fw_build_vers_ext;
  2018. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2019. * This limit is the maximum number of SSIDs that can be configured in the
  2020. * target for Network List Offload (i.e. scanning for a preferred network).
  2021. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2022. * If this value is non-zero, the host should send back in the
  2023. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2024. * is equal to or less than the target capability limit reported here.
  2025. */
  2026. A_UINT32 max_nlo_ssids;
  2027. /* ref to section 8.4.2.48 Multiple BSSID element
  2028. * The Max BSSID Indicator field contains a value assigned to n,
  2029. * where 2^n is the maximum number of BSSIDs
  2030. */
  2031. A_UINT32 max_bssid_indicator;
  2032. /* 2nd DWORD of HE MAC Capabilities */
  2033. A_UINT32 he_cap_info_ext;
  2034. } wmi_service_ready_ext_event_fixed_param;
  2035. typedef enum {
  2036. WMI_FW_STA_RTT_INITR = 0x00000001,
  2037. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2038. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2039. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2040. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2041. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2042. WMI_FW_AP_RTT_INITR = 0x00000040,
  2043. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2044. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2045. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2046. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2047. /*
  2048. * New fw sub feature capabilites before
  2049. * WMI_FW_MAX_SUB_FEAT_CAP
  2050. */
  2051. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2052. } WMI_FW_SUB_FEAT_CAPS;
  2053. typedef enum {
  2054. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2055. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2056. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2057. } WMI_HWBD_ID;
  2058. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2059. #define ATH_BD_DATA_REV_SHIFT 0
  2060. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2061. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2062. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2063. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2064. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2065. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2066. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2067. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2068. #define GET_BD_DATA_REV(bd_data_ver) \
  2069. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2070. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2071. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2072. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2073. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2074. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2075. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2076. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2077. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2078. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2079. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2080. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2081. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2082. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2083. typedef struct {
  2084. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2085. A_UINT32 end_freq; /* end frequency */
  2086. } avoid_freq_range_desc;
  2087. typedef struct {
  2088. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2089. A_UINT32 num_freq_ranges;
  2090. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2091. avoid_freq_range_desc avd_freq_range[0];
  2092. } wmi_wlan_avoid_freq_ranges_event;
  2093. #endif
  2094. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2095. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2096. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2097. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2098. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2099. typedef A_UINT32 WLAN_INIT_STATUS;
  2100. typedef struct {
  2101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2102. wmi_abi_version fw_abi_vers;
  2103. /*
  2104. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2105. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2106. * for cases where the target specifies one MAC address per pdev
  2107. * (so the host can treat the pdevs within the target as separately
  2108. * as possible) rather than one MAC address for the whole SOC.
  2109. */
  2110. wmi_mac_addr mac_addr;
  2111. A_UINT32 status;
  2112. A_UINT32 num_dscp_table;
  2113. /* num_extra_mac_addr -
  2114. * how many additional MAC addresses besides the above mac_addr
  2115. * are provided in the subsequent mac_addr_list TLV
  2116. */
  2117. A_UINT32 num_extra_mac_addr;
  2118. /*
  2119. * Total number of "real" peers (remote peers of an AP vdev,
  2120. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2121. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2122. * total number of peers.
  2123. */
  2124. A_UINT32 num_total_peers;
  2125. /*
  2126. * Number of extra peers that Firmware adds.
  2127. * These are self peers and/or other FW only peers that don't represent
  2128. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2129. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2130. * to allow each tx queue to belong to a peer object.
  2131. * Peer ID can be up to num_total_peers + num_extra_peers.
  2132. */
  2133. A_UINT32 num_extra_peers;
  2134. /*
  2135. * This fixed_param TLV is followed by these additional TLVs:
  2136. * mac_addr_list[num_extra_mac_addr];
  2137. */
  2138. } wmi_ready_event_fixed_param;
  2139. typedef struct {
  2140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2141. /**
  2142. * @brief num_vdev - number of virtual devices (VAPs) to support
  2143. */
  2144. A_UINT32 num_vdevs;
  2145. /**
  2146. * @brief num_peers - number of peer nodes to support
  2147. */
  2148. A_UINT32 num_peers;
  2149. /*
  2150. * @brief In offload mode target supports features like WOW, chatter and other
  2151. * protocol offloads. In order to support them some functionalities like
  2152. * reorder buffering, PN checking need to be done in target. This determines
  2153. * maximum number of peers suported by target in offload mode
  2154. */
  2155. A_UINT32 num_offload_peers;
  2156. /* @brief Number of reorder buffers available for doing target based reorder
  2157. * Rx reorder buffering
  2158. */
  2159. A_UINT32 num_offload_reorder_buffs;
  2160. /**
  2161. * @brief num_peer_keys - number of keys per peer
  2162. */
  2163. A_UINT32 num_peer_keys;
  2164. /**
  2165. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2166. */
  2167. A_UINT32 num_tids;
  2168. /**
  2169. * @brief ast_skid_limit - max skid for resolving hash collisions
  2170. * @details
  2171. * The address search table is sparse, so that if two MAC addresses
  2172. * result in the same hash value, the second of these conflicting
  2173. * entries can slide to the next index in the address search table,
  2174. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2175. * specifies the upper bound on how many subsequent indices to search
  2176. * over to find an unoccupied space.
  2177. */
  2178. A_UINT32 ast_skid_limit;
  2179. /**
  2180. * @brief tx_chain_mask - the nominal chain mask for transmit
  2181. * @details
  2182. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2183. * a reduced number of chains if no clients are associated.
  2184. * This configuration parameter specifies the nominal chain-mask that
  2185. * should be used when not operating with a reduced set of tx chains.
  2186. */
  2187. A_UINT32 tx_chain_mask;
  2188. /**
  2189. * @brief rx_chain_mask - the nominal chain mask for receive
  2190. * @details
  2191. * The chain mask may be modified dynamically, e.g. for a client to use
  2192. * a reduced number of chains for receive if the traffic to the client
  2193. * is low enough that it doesn't require downlink MIMO or antenna
  2194. * diversity.
  2195. * This configuration parameter specifies the nominal chain-mask that
  2196. * should be used when not operating with a reduced set of rx chains.
  2197. */
  2198. A_UINT32 rx_chain_mask;
  2199. /**
  2200. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2201. * @details
  2202. * Each WMM access class (voice, video, best-effort, background) will
  2203. * have its own timeout value to dictate how long to wait for missing
  2204. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2205. * been received.
  2206. * This parameter specifies the timeout in milliseconds for each class .
  2207. * NOTE: the number of class (defined as 4) cannot be
  2208. * changed in the future without breaking WMI compatibility.
  2209. */
  2210. A_UINT32 rx_timeout_pri[4];
  2211. /**
  2212. * @brief rx_decap mode - what mode the rx should decap packets to
  2213. * @details
  2214. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2215. * THis setting also determines the default TX behavior, however TX
  2216. * behavior can be modified on a per VAP basis during VAP init
  2217. */
  2218. A_UINT32 rx_decap_mode;
  2219. /**
  2220. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2221. */
  2222. A_UINT32 scan_max_pending_req;
  2223. /**
  2224. * @brief maximum VDEV that could use BMISS offload
  2225. */
  2226. A_UINT32 bmiss_offload_max_vdev;
  2227. /**
  2228. * @brief maximum VDEV that could use offload roaming
  2229. */
  2230. A_UINT32 roam_offload_max_vdev;
  2231. /**
  2232. * @brief maximum AP profiles that would push to offload roaming
  2233. */
  2234. A_UINT32 roam_offload_max_ap_profiles;
  2235. /**
  2236. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2237. * @details
  2238. * The target's WAL maintains a table to hold information regarding which
  2239. * peers belong to a given multicast group, so that if multicast->unicast
  2240. * conversion is enabled, the target can convert multicast tx frames to a
  2241. * series of unicast tx frames, to each peer within the multicast group.
  2242. * This num_mcast_groups configuration parameter tells the target how
  2243. * many multicast groups to provide storage for within its multicast
  2244. * group membership table.
  2245. */
  2246. A_UINT32 num_mcast_groups;
  2247. /**
  2248. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2249. * @details
  2250. * This num_mcast_table_elems configuration parameter tells the target
  2251. * how many peer elements it needs to provide storage for in its
  2252. * multicast group membership table.
  2253. * These multicast group membership table elements are shared by the
  2254. * multicast groups stored within the table.
  2255. */
  2256. A_UINT32 num_mcast_table_elems;
  2257. /**
  2258. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2259. * @details
  2260. * This configuration parameter specifies whether the target should
  2261. * perform multicast --> unicast conversion on transmit, and if so,
  2262. * what to do if it finds no entries in its multicast group membership
  2263. * table for the multicast IP address in the tx frame.
  2264. * Configuration value:
  2265. * 0 -> Do not perform multicast to unicast conversion.
  2266. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2267. * from the tx frame is found in the multicast group membership
  2268. * table. If the IP multicast address is not found, drop the frame.
  2269. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2270. * from the tx frame is found in the multicast group membership
  2271. * table. If the IP multicast address is not found, transmit the
  2272. * frame as multicast.
  2273. */
  2274. A_UINT32 mcast2ucast_mode;
  2275. /**
  2276. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2277. * @details
  2278. * This parameter controls how much memory the target will allocate to
  2279. * store a log of tx PPDU meta-information (how large the PPDU was,
  2280. * when it was sent, whether it was successful, etc.)
  2281. */
  2282. A_UINT32 tx_dbg_log_size;
  2283. /**
  2284. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2285. */
  2286. A_UINT32 num_wds_entries;
  2287. /**
  2288. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2289. * this limit can be 0 -default, 1 256B
  2290. */
  2291. A_UINT32 dma_burst_size;
  2292. /**
  2293. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2294. * to account for interface latency to avoid underrun.
  2295. */
  2296. A_UINT32 mac_aggr_delim;
  2297. /**
  2298. * @brief rx_skip_defrag_timeout_dup_detection_check
  2299. * @details
  2300. * determine whether target is responsible for detecting duplicate
  2301. * non-aggregate MPDU and timing out stale fragments.
  2302. *
  2303. * A-MPDU reordering is always performed on the target.
  2304. *
  2305. * 0: target responsible for frag timeout and dup checking
  2306. * 1: host responsible for frag timeout and dup checking
  2307. */
  2308. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2309. /**
  2310. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2311. * and Max no of descriptors for each Video link (node).
  2312. */
  2313. A_UINT32 vow_config;
  2314. /**
  2315. * @brief maximum VDEV that could use GTK offload
  2316. */
  2317. A_UINT32 gtk_offload_max_vdev;
  2318. /**
  2319. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2320. */
  2321. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2322. /**
  2323. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2324. * @details
  2325. * This parameter controls the max number of Tx fragments per MSDU.
  2326. * This is sent by the target as part of the WMI_SERVICE_READY event
  2327. * and is overriden by the OS shim as required.
  2328. */
  2329. A_UINT32 max_frag_entries;
  2330. /**
  2331. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2332. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2333. */
  2334. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2335. /**
  2336. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2337. * @details
  2338. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2339. * peers in a connection tracking table for possible TDLS link creation
  2340. * or deletion. This controls the number of tracked peers per vdev.
  2341. */
  2342. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2343. A_UINT32 beacon_tx_offload_max_vdev;
  2344. A_UINT32 num_multicast_filter_entries;
  2345. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2346. /**
  2347. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2348. * from host.
  2349. */
  2350. A_UINT32 num_keep_alive_pattern;
  2351. /**
  2352. * @brief keep_alive_pattern_size - keep alive pattern size.
  2353. */
  2354. A_UINT32 keep_alive_pattern_size;
  2355. /**
  2356. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2357. * @details
  2358. * Each TDLS STA can become a sleep STA independently. This parameter
  2359. * mentions how many such sleep STAs can be supported concurrently.
  2360. */
  2361. A_UINT32 max_tdls_concurrent_sleep_sta;
  2362. /**
  2363. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2364. * @details
  2365. * Each TDLS STA can become a buffer STA independently. This parameter
  2366. * mentions how many such buffer STAs can be supported concurrently.
  2367. */
  2368. A_UINT32 max_tdls_concurrent_buffer_sta;
  2369. /**
  2370. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2371. */
  2372. A_UINT32 wmi_send_separate;
  2373. /**
  2374. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2375. */
  2376. A_UINT32 num_ocb_vdevs;
  2377. /**
  2378. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2379. */
  2380. A_UINT32 num_ocb_channels;
  2381. /**
  2382. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2383. */
  2384. A_UINT32 num_ocb_schedules;
  2385. /**
  2386. * @brief specific configuration from host, such as per platform configuration
  2387. */
  2388. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2389. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2390. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2391. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2392. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2393. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2394. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2395. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2396. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2397. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2398. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2399. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2400. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2401. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2402. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2403. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2404. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2405. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2406. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2407. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2408. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2409. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2410. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2411. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2412. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  2413. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  2414. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  2415. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  2416. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  2417. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  2418. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  2419. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  2420. /*
  2421. * If the AC override valid bit is set then this field will specify the
  2422. * access category to use for EAPOL frames
  2423. * 0 - WMM_AC_BE
  2424. * 1 - WMM_AC_BK
  2425. * 2 - WMM_AC_VI
  2426. * 3 - WMM_AC_VO
  2427. */
  2428. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  2429. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  2430. A_UINT32 flag1;
  2431. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2432. * @details
  2433. * 1 - Smart antenna is enabled.
  2434. * 0 - Smart antenna is disabled.
  2435. * In future this can contain smart antenna specifc capabilities.
  2436. */
  2437. A_UINT32 smart_ant_cap;
  2438. /**
  2439. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2440. * during init
  2441. */
  2442. A_UINT32 BK_Minfree;
  2443. A_UINT32 BE_Minfree;
  2444. A_UINT32 VI_Minfree;
  2445. A_UINT32 VO_Minfree;
  2446. /**
  2447. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2448. * descriptor memory allocation.
  2449. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2450. * If host wants to transmit data packet at its desired rate,
  2451. * this field must be set.
  2452. * 0 - Don't allocate fragment descriptor for data packet.
  2453. */
  2454. A_UINT32 alloc_frag_desc_for_data_pkt;
  2455. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2456. A_UINT32 num_ns_ext_tuples_cfg;
  2457. /**
  2458. * size (in bytes) of the buffer the FW shall allocate per vdev
  2459. * firmware can dynamic allocate memory (or disable)
  2460. * packet filtering feature.
  2461. * 0 - fw chooses its default value
  2462. * -1 (0XFFFFFFFF) - disable APF
  2463. */
  2464. A_UINT32 bpf_instruction_size;
  2465. /**
  2466. * Maximum no of BSSID based RX filters host would program
  2467. * Value 0 means host doesn't given any limit to FW.
  2468. */
  2469. A_UINT32 max_bssid_rx_filters;
  2470. /**
  2471. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2472. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2473. */
  2474. A_UINT32 use_pdev_id;
  2475. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2476. A_UINT32 max_num_dbs_scan_duty_cycle;
  2477. /** Maximum number of Multi group key to support */
  2478. A_UINT32 max_num_group_keys;
  2479. /**
  2480. * HTT peer map/unmap V2 format support
  2481. * 0 -> host doesn't support HTT peer map/unmap v2 format.
  2482. * 1 -> host supports HTT peer map/unmap v2 format; the target is
  2483. * allowed but not required to use peer map/unmap v2 format.
  2484. */
  2485. A_UINT32 peer_map_unmap_v2_support;
  2486. /** Sched config params for all pdevs
  2487. * These tx scheduling configuration parameters are currently only
  2488. * used for internal testing purposes; therefore the non-default
  2489. * values for this field are not currently documented.
  2490. * For regular use, this field should be set to 0x0.
  2491. */
  2492. A_UINT32 sched_params;
  2493. /* Number of MAC on which AP TWT feature is supported */
  2494. A_UINT32 twt_ap_pdev_count;
  2495. /* Max no of STA with which TWT sessions can be formed by the AP */
  2496. A_UINT32 twt_ap_sta_count;
  2497. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2498. * This parameter provides the final specification for the maximum number
  2499. * of SSIDs for the target to support for Network List Offload's scanning
  2500. * for preferred networks.
  2501. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  2502. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  2503. * (If the target didn't provide a max_nlo_ssids field in the
  2504. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  2505. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  2506. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  2507. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  2508. * the host does not support dynamic negotiation of max NLO SSIDs.
  2509. * In such a case, the target will respond as follows:
  2510. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  2511. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  2512. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  2513. * abort its boot-up, due to receiving an invalid/unsupported
  2514. * configuration specification.
  2515. */
  2516. A_UINT32 max_nlo_ssids;
  2517. /**
  2518. * num_packet_filters: the num that host requests fw to support for
  2519. * pktfilter in total, then firmware can dynamic allocate
  2520. * memory(or disable) pktfilter feature.
  2521. *
  2522. * 0 - fw chooses its default value.
  2523. * -1(0XFFFFFFFF)- disable pktfilter.
  2524. */
  2525. A_UINT32 num_packet_filters;
  2526. /**
  2527. * num_max_sta_vdevs: the max num for the sta vdevs
  2528. * fw will use it to config the memory of offload features that
  2529. * are only for sta vdevs.
  2530. * p2p client should be included.
  2531. *
  2532. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  2533. */
  2534. A_UINT32 num_max_sta_vdevs;
  2535. /* ref to section 8.4.2.48 Multiple BSSID element
  2536. * The Max BSSID Indicator field contains a value assigned to n,
  2537. * where 2^n is the maximum number of BSSIDs
  2538. */
  2539. A_UINT32 max_bssid_indicator;
  2540. } wmi_resource_config;
  2541. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2542. do { \
  2543. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2544. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2545. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2546. } while (0)
  2547. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2548. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2549. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2550. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2551. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2552. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2553. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2554. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2555. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2556. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2557. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2558. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2559. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2560. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2561. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2562. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2563. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2564. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2565. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2566. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2567. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2568. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2569. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2570. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2571. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2572. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2573. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2574. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2575. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2576. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2577. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2578. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2579. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2580. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2581. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2582. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2583. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2584. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2585. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2586. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2587. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2588. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2589. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2590. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  2591. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  2592. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  2593. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  2594. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  2595. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  2596. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  2597. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  2598. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  2599. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  2600. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  2601. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  2602. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  2603. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  2604. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  2605. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  2606. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  2607. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  2608. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  2609. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  2610. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  2611. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  2612. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  2613. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  2614. typedef struct {
  2615. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2616. /** The following indicate the WMI versions to be supported by
  2617. * the host driver. Note that the host driver decide to
  2618. * "downgrade" its WMI version support and this may not be the
  2619. * native version of the host driver. */
  2620. wmi_abi_version host_abi_vers;
  2621. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  2622. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  2623. * wmi_resource_config resource_config;
  2624. * wlan_host_memory_chunk host_mem_chunks[];
  2625. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2626. * Note that the hw_mode_config, in spite of its "pdev" name,
  2627. * applies to the entire target rather than for a single pdev
  2628. * within the target.
  2629. * To avoid specifying a HW mode for the target, the host should
  2630. * fill hw_mode_config's fields with 0x0.
  2631. */
  2632. } wmi_init_cmd_fixed_param;
  2633. /**
  2634. * TLV for channel list
  2635. */
  2636. typedef struct {
  2637. /** WMI_CHAN_LIST_TAG */
  2638. A_UINT32 tag;
  2639. /** # of channels to scan */
  2640. A_UINT32 num_chan;
  2641. /** channels in Mhz */
  2642. A_UINT32 channel_list[1];
  2643. } wmi_chan_list;
  2644. /**
  2645. * TLV for bssid list
  2646. */
  2647. typedef struct {
  2648. /** WMI_BSSID_LIST_TAG */
  2649. A_UINT32 tag;
  2650. /** number of bssids */
  2651. A_UINT32 num_bssid;
  2652. /** bssid list */
  2653. wmi_mac_addr bssid_list[1];
  2654. } wmi_bssid_list;
  2655. /**
  2656. * TLV for ie data.
  2657. */
  2658. typedef struct {
  2659. /** WMI_IE_TAG */
  2660. A_UINT32 tag;
  2661. /** number of bytes in ie data */
  2662. A_UINT32 ie_len;
  2663. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  2664. A_UINT32 ie_data[1];
  2665. } wmi_ie_data;
  2666. /**
  2667. * TLV used for length/buffer
  2668. */
  2669. typedef struct {
  2670. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  2671. A_UINT32 buf_len; /** Length of buf */
  2672. /**
  2673. * Following this structure is the TLV byte stream of buf of length buf_len:
  2674. * A_UINT8 buf[];
  2675. *
  2676. */
  2677. } wmi_tlv_buf_len_param;
  2678. typedef struct {
  2679. /** Len of the SSID */
  2680. A_UINT32 ssid_len;
  2681. /** SSID */
  2682. A_UINT32 ssid[8];
  2683. } wmi_ssid;
  2684. typedef struct {
  2685. /** WMI_SSID_LIST_TAG */
  2686. A_UINT32 tag;
  2687. A_UINT32 num_ssids;
  2688. wmi_ssid ssids[1];
  2689. } wmi_ssid_list;
  2690. typedef struct {
  2691. /** WMI_SCAN_START_OFFSET_TAG */
  2692. A_UINT32 tag;
  2693. /** Number of start TSF offsets */
  2694. A_UINT32 num_offset;
  2695. /** Array of start TSF offsets provided in milliseconds */
  2696. A_UINT32 start_tsf_offset[1];
  2697. } wmi_scan_start_offset;
  2698. /**
  2699. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  2700. */
  2701. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  2702. * 0 to be used to represent unspecified / don't care / default values.
  2703. * Therefore, WMI phy mode = WLAN phy mode + 1.
  2704. */
  2705. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  2706. * and the FW will use any mode as long as the frequency matches.
  2707. */
  2708. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  2709. * be equal to num_chan. (Unless the host does not specify phymode_list values
  2710. * at all, in which case the number of phymode_list elements will be zero.)
  2711. * The indexing of the phymode_list[] array corresponds to same index of
  2712. * the chan_list[] array.
  2713. */
  2714. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  2715. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  2716. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  2717. /* prefix used by scan requestor ids on the host */
  2718. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2719. /* prefix used by scan request ids generated on the host */
  2720. /* host cycles through the lower 12 bits to generate ids */
  2721. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2722. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2723. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2724. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2725. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  2726. #define WMI_IE_BITMAP_SIZE 8
  2727. typedef struct {
  2728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2729. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  2730. A_UINT32 scan_id;
  2731. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  2732. A_UINT32 scan_req_id;
  2733. /** VDEV id(interface) that is requesting scan */
  2734. A_UINT32 vdev_id;
  2735. /** Scan Priority, input to scan scheduler */
  2736. A_UINT32 scan_priority;
  2737. /** Scan events subscription */
  2738. A_UINT32 notify_scan_events;
  2739. /** dwell time in msec on active channels */
  2740. A_UINT32 dwell_time_active;
  2741. /** dwell time in msec on passive channels */
  2742. A_UINT32 dwell_time_passive;
  2743. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2744. A_UINT32 min_rest_time;
  2745. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2746. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2747. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2748. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2749. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2750. * irrespective of activity. activity is determined by the idle_time parameter.
  2751. */
  2752. A_UINT32 max_rest_time;
  2753. /** time before sending next set of probe requests.
  2754. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2755. * The number of probe requests specified depends on the ssid_list and bssid_list
  2756. */
  2757. A_UINT32 repeat_probe_time;
  2758. /** time in msec between 2 consequetive probe requests with in a set. */
  2759. A_UINT32 probe_spacing_time;
  2760. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2761. A_UINT32 idle_time;
  2762. /** maximum time in msec allowed for scan */
  2763. A_UINT32 max_scan_time;
  2764. /** delay in msec before sending first probe request after switching to a channel */
  2765. A_UINT32 probe_delay;
  2766. /** Scan control flags */
  2767. A_UINT32 scan_ctrl_flags;
  2768. /** Burst duration time in msec*/
  2769. A_UINT32 burst_duration;
  2770. /** # if channels to scan. In the TLV channel_list[] */
  2771. A_UINT32 num_chan;
  2772. /** number of bssids. In the TLV bssid_list[] */
  2773. A_UINT32 num_bssid;
  2774. /** number of ssid. In the TLV ssid_list[] */
  2775. A_UINT32 num_ssids;
  2776. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2777. A_UINT32 ie_len;
  2778. /** Max number of probes to be sent */
  2779. A_UINT32 n_probes;
  2780. /** MAC Address to use in Probe Req as SA **/
  2781. wmi_mac_addr mac_addr;
  2782. /** Mask on which MAC has to be randomized **/
  2783. wmi_mac_addr mac_mask;
  2784. /** ie bitmap to use in probe req **/
  2785. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2786. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2787. A_UINT32 num_vendor_oui;
  2788. /** Scan control flags extended **/
  2789. A_UINT32 scan_ctrl_flags_ext;
  2790. /** dwell time in msec on active 2G channels, if it's not zero */
  2791. A_UINT32 dwell_time_active_2g;
  2792. /**
  2793. * TLV (tag length value) parameters follow the scan_cmd
  2794. * structure. The TLV's are:
  2795. * A_UINT32 channel_list[num_chan];
  2796. * wmi_ssid ssid_list[num_ssids];
  2797. * wmi_mac_addr bssid_list[num_bssid];
  2798. * A_UINT8 ie_data[ie_len];
  2799. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  2800. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  2801. */
  2802. } wmi_start_scan_cmd_fixed_param;
  2803. /**
  2804. * scan control flags.
  2805. */
  2806. /** passively scan all channels including active channels */
  2807. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2808. /** add wild card ssid probe request even though ssid_list is specified. */
  2809. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2810. /** add cck rates to rates/xrate ie for the generated probe request */
  2811. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2812. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2813. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2814. /** To enable indication of Chan load and Noise floor to host */
  2815. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2816. /** Filter Probe request frames */
  2817. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2818. /**When set, not to scan DFS channels*/
  2819. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2820. /**When set, certain errors are ignored and scan continues.
  2821. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  2822. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2823. /** Enable promiscous mode for CCXv4 */
  2824. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  2825. /** allow to send probe req on DFS channel */
  2826. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  2827. /** add TPC content in probe req frame */
  2828. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  2829. /** add DS content in probe req frame */
  2830. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  2831. /** use random mac address for TA for probe request frame and add
  2832. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  2833. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  2834. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  2835. /** allow mgmt transmission during off channel scan */
  2836. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  2837. /** allow data transmission during off channel scan */
  2838. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  2839. /** allow capture ppdu with phy errrors */
  2840. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  2841. /** always do passive scan on passive channels */
  2842. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  2843. /** set HALF (10MHz) rate support */
  2844. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  2845. /** set Quarter (5MHz) rate support */
  2846. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  2847. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  2848. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  2849. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  2850. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  2851. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  2852. typedef enum {
  2853. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  2854. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  2855. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  2856. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  2857. WMI_SCAN_DWELL_MODE_STATIC = 4,
  2858. } WMI_SCAN_DWELL_MODE;
  2859. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  2860. do { \
  2861. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  2862. WMI_SCAN_DWELL_MODE_MASK); \
  2863. } while (0)
  2864. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  2865. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  2866. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2867. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2868. /*
  2869. * Masks identifying types/ID of scans
  2870. * Scan_Stop macros should be the same value as below defined in UMAC
  2871. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  2872. * #define IEEE80211_VAP_SCAN 0x01000000
  2873. * #define IEEE80211_ALL_SCANS 0x04000000
  2874. */
  2875. #define WMI_SCAN_STOP_ONE 0x00000000
  2876. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  2877. #define WMI_SCAN_STOP_ALL 0x04000000
  2878. /** extended Scan ctrl flags **/
  2879. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  2880. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  2881. policy scan manager computes */
  2882. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  2883. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  2884. policy scan manager computes*/
  2885. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  2886. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  2887. /** Enable Reception of Public Action frame with this flag
  2888. * (inside scan_ctrl_flags_ext field of wmi_start_scan_cmd_fixed_param)
  2889. */
  2890. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x4
  2891. typedef struct {
  2892. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  2893. /** requestor requesting cancel */
  2894. A_UINT32 requestor;
  2895. /** Scan ID */
  2896. A_UINT32 scan_id;
  2897. /**
  2898. * Req Type
  2899. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  2900. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  2901. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  2902. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  2903. */
  2904. A_UINT32 req_type;
  2905. /**
  2906. * vDev ID
  2907. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  2908. */
  2909. A_UINT32 vdev_id;
  2910. /** pdev_id for identifying the MAC
  2911. * See macros starting with WMI_PDEV_ID_ for values.
  2912. * In non-DBDC case host should set it to 0
  2913. */
  2914. A_UINT32 pdev_id;
  2915. } wmi_stop_scan_cmd_fixed_param;
  2916. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  2917. #define APPEND_TO_EXISTING_CHAN_LIST 1
  2918. typedef struct {
  2919. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  2920. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  2921. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  2922. 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. */
  2923. /** Followed by the variable length TLV chan_info:
  2924. * wmi_channel chan_info[] */
  2925. } wmi_scan_chan_list_cmd_fixed_param;
  2926. /*
  2927. * Priority numbers must be sequential, starting with 0.
  2928. */
  2929. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  2930. typedef enum {
  2931. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2932. WMI_SCAN_PRIORITY_LOW,
  2933. WMI_SCAN_PRIORITY_MEDIUM,
  2934. WMI_SCAN_PRIORITY_HIGH,
  2935. WMI_SCAN_PRIORITY_VERY_HIGH,
  2936. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2937. } wmi_scan_priority;
  2938. /* Five Levels for Requested Priority */
  2939. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  2940. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  2941. /**
  2942. * 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
  2943. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  2944. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  2945. */
  2946. typedef struct {
  2947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  2948. /**
  2949. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  2950. * 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
  2951. */
  2952. A_UINT32 vdev_type;
  2953. /**
  2954. * number of rows in mapping_table for a specific vdev
  2955. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  2956. */
  2957. A_UINT32 number_rows;
  2958. /**
  2959. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  2960. * In non-DBDC case host should set it to 0
  2961. */
  2962. A_UINT32 pdev_id;
  2963. /** mapping_table for a specific vdev follows this TLV
  2964. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  2965. } wmi_scan_sch_priority_table_cmd_fixed_param;
  2966. /** update flags */
  2967. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  2968. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  2969. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  2970. typedef struct {
  2971. A_UINT32 tlv_header;
  2972. /** requestor requesting update scan request */
  2973. A_UINT32 requestor;
  2974. /** Scan ID of the scan request that need to be update */
  2975. A_UINT32 scan_id;
  2976. /** update flags, indicating which of the following fields are valid and need to be updated*/
  2977. A_UINT32 scan_update_flags;
  2978. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  2979. A_UINT32 scan_priority;
  2980. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  2981. A_UINT32 min_rest_time;
  2982. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  2983. A_UINT32 max_rest_time;
  2984. /** 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 */
  2985. A_UINT32 pdev_id;
  2986. } wmi_scan_update_request_cmd_fixed_param;
  2987. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  2988. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  2989. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  2990. typedef struct _wmi_vendor_oui {
  2991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  2992. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  2993. }wmi_vendor_oui;
  2994. typedef struct {
  2995. A_UINT32 tlv_header;
  2996. /** oui to be used in probe request frame when random mac addresss is
  2997. * requested part of scan parameters. this is applied to both FW internal scans and
  2998. * host initated scans. host can request for random mac address with
  2999. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  3000. A_UINT32 prob_req_oui;
  3001. A_UINT32 vdev_id;
  3002. /** Control Flags **/
  3003. A_UINT32 flags;
  3004. /** ie bitmap to use in probe req **/
  3005. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3006. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3007. A_UINT32 num_vendor_oui;
  3008. /** 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 */
  3009. A_UINT32 pdev_id;
  3010. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  3011. wmi_vendor_oui vendor_oui[];*/
  3012. } wmi_scan_prob_req_oui_cmd_fixed_param;
  3013. enum wmi_scan_event_type {
  3014. WMI_SCAN_EVENT_STARTED = 0x1,
  3015. WMI_SCAN_EVENT_COMPLETED = 0x2,
  3016. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  3017. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  3018. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  3019. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  3020. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  3021. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  3022. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  3023. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  3024. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  3025. WMI_SCAN_EVENT_MAX = 0x8000
  3026. };
  3027. enum wmi_scan_completion_reason {
  3028. /** scan related events */
  3029. WMI_SCAN_REASON_NONE = 0xFF,
  3030. WMI_SCAN_REASON_COMPLETED = 0,
  3031. WMI_SCAN_REASON_CANCELLED = 1,
  3032. WMI_SCAN_REASON_PREEMPTED = 2,
  3033. WMI_SCAN_REASON_TIMEDOUT = 3,
  3034. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  3035. WMI_SCAN_REASON_SUSPENDED = 5,
  3036. WMI_SCAN_REASON_MAX,
  3037. };
  3038. typedef struct {
  3039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  3040. /** scan event (wmi_scan_event_type) */
  3041. A_UINT32 event;
  3042. /** status of the scan completion event */
  3043. A_UINT32 reason;
  3044. /** channel freq , only valid for FOREIGN channel event*/
  3045. A_UINT32 channel_freq;
  3046. /**id of the requestor whose scan is in progress */
  3047. A_UINT32 requestor;
  3048. /**id of the scan that is in progress */
  3049. A_UINT32 scan_id;
  3050. /**id of VDEV that requested the scan */
  3051. A_UINT32 vdev_id;
  3052. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  3053. * In case of AP it is TSF of the AP vdev
  3054. * In case of STA connected state this is the TSF of the AP
  3055. * In case of STA not connected it will be the free running HW timer
  3056. */
  3057. A_UINT32 tsf_timestamp;
  3058. } wmi_scan_event_fixed_param;
  3059. /* WMI Diag event */
  3060. typedef struct {
  3061. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  3062. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  3063. A_UINT32 count; /* Number of diag frames added to current event */
  3064. A_UINT32 dropped;
  3065. /* followed by WMITLV_TAG_ARRAY_BYTE */
  3066. } wmi_diag_event_fixed_param;
  3067. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  3068. typedef struct {
  3069. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  3070. 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 */
  3071. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  3072. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  3073. 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 */
  3074. 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
  3075. * neighbor report requests that will be sent by FW after every roam */
  3076. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  3077. * interested in candidate of the same SSID */
  3078. } wmi_neighbor_report_offload;
  3079. typedef struct {
  3080. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  3081. A_UINT32 vdev_id;
  3082. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  3083. } wmi_11k_offload_report_fixed_param;
  3084. typedef struct {
  3085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  3086. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  3087. } wmi_neighbor_report_11k_offload_tlv_param;
  3088. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  3089. typedef struct {
  3090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  3091. A_UINT32 vdev_id;
  3092. A_UINT32 flags;
  3093. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  3094. * In that case AP gives all the candidates in ESS without SSID filter
  3095. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  3096. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  3097. #define WMI_MAX_PMKID_LEN 16
  3098. #define WMI_MAX_PMK_LEN 64
  3099. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  3100. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  3101. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  3102. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  3103. typedef struct {
  3104. A_UINT32 tlv_header;
  3105. A_UINT32 pmk_len;
  3106. 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,
  3107. in spite of the automatic byte-swap applied to WMI messages during download*/
  3108. A_UINT32 pmkid_len;
  3109. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3110. wmi_mac_addr bssid;
  3111. wmi_ssid ssid;
  3112. A_UINT32 cache_id;
  3113. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  3114. A_UINT32 action_flag; // add/delete the entry
  3115. } wmi_pmk_cache;
  3116. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  3117. typedef struct {
  3118. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  3119. A_UINT32 op_flag; //option to flush all the cache at once
  3120. A_UINT32 vdev_id;
  3121. A_UINT32 num_cache;
  3122. /**
  3123. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  3124. * structure. The TLV's are:
  3125. * wmi_pmk_cache cache_list[];
  3126. */
  3127. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  3128. #define WMI_FILS_MAX_USERNAME_LEN 16
  3129. #define WMI_FILS_MAX_REALM_LEN 256
  3130. #define WMI_FILS_MAX_RRK_LEN 64
  3131. #define WMI_FILS_MAX_RIK_LEN 64
  3132. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3133. in spite of the automatic byte-swap applied to WMI messages during download*/
  3134. typedef struct {
  3135. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  3136. A_UINT32 username_length;
  3137. A_UINT32 next_erp_seq_num;
  3138. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  3139. A_UINT32 rRk_length;
  3140. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  3141. A_UINT32 rIk_length;
  3142. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3143. A_UINT32 realm_len;
  3144. } wmi_erp_info;
  3145. enum wmi_fils_hlp_pkt_type {
  3146. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  3147. };
  3148. typedef struct {
  3149. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  3150. A_UINT32 flags;
  3151. wmi_erp_info vdev_erp_info;
  3152. } wmi_roam_fils_offload_tlv_param;
  3153. typedef struct {
  3154. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  3155. A_UINT32 flags;
  3156. A_UINT32 vdev_id;
  3157. A_UINT32 size;
  3158. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  3159. // A_UINT8 fils_hlp_pkt[];
  3160. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  3161. #define WMI_MAX_KEK_LEN 64
  3162. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  3163. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  3164. typedef struct {
  3165. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  3166. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  3167. A_UINT32 next_erp_seq_num;
  3168. A_UINT32 kek_len;
  3169. A_UINT8 kek[WMI_MAX_KEK_LEN];
  3170. A_UINT32 pmk_len;
  3171. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  3172. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3173. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3174. A_UINT32 realm_len;
  3175. } wmi_roam_fils_synch_tlv_param;
  3176. /*
  3177. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3178. * then these stats are combined stats for all the active channels.
  3179. */
  3180. typedef struct {
  3181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3182. /** ack count, it is an incremental number, not accumulated number */
  3183. A_UINT32 ackRcvBad;
  3184. /** bad rts count, it is an incremental number, not accumulated number */
  3185. A_UINT32 rtsBad;
  3186. /** good rts, it is an incremental number, not accumulated number */
  3187. A_UINT32 rtsGood;
  3188. /** fcs count, it is an incremental number, not accumulated number */
  3189. A_UINT32 fcsBad;
  3190. /** beacon count, it is an incremental number, not accumulated number */
  3191. A_UINT32 noBeacons;
  3192. } wmi_update_whal_mib_stats_event_fixed_param;
  3193. /*
  3194. * This defines how much headroom is kept in the
  3195. * receive frame between the descriptor and the
  3196. * payload, in order for the WMI PHY error and
  3197. * management handler to insert header contents.
  3198. *
  3199. * This is in bytes.
  3200. */
  3201. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3202. /** This event will be used for sending scan results
  3203. * as well as rx mgmt frames to the host. The rx buffer
  3204. * will be sent as part of this WMI event. It would be a
  3205. * good idea to pass all the fields in the RX status
  3206. * descriptor up to the host.
  3207. */
  3208. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3209. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3210. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3211. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3212. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3213. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3214. #define MAX_ANTENNA_EIGHT 8
  3215. typedef struct {
  3216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3217. /** channel on which this frame is received. */
  3218. A_UINT32 channel;
  3219. /** snr information used to cal rssi */
  3220. A_UINT32 snr;
  3221. /** Rate kbps */
  3222. A_UINT32 rate;
  3223. /** rx phy mode WLAN_PHY_MODE */
  3224. A_UINT32 phy_mode;
  3225. /** length of the frame */
  3226. A_UINT32 buf_len;
  3227. /** rx status */
  3228. A_UINT32 status;
  3229. /** RSSI of PRI 20MHz for each chain. */
  3230. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3231. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3232. A_UINT32 flags;
  3233. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3234. A_INT32 rssi;
  3235. /** delta between local TSF(TSF timestamp when frame was RXd)
  3236. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3237. * beacon,proberesp for e.g). If remote TSF is not available,
  3238. * delta set to 0.
  3239. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3240. * and thus would need to be sign-extended if added to a value
  3241. * larger than 32 bits.
  3242. */
  3243. A_UINT32 tsf_delta;
  3244. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3245. * TSF timestamp in the RX MAC descriptor provided by HW.
  3246. */
  3247. A_UINT32 rx_tsf_l32;
  3248. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3249. * after the packet is received.
  3250. */
  3251. A_UINT32 rx_tsf_u32;
  3252. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3253. * See macros starting with WMI_PDEV_ID_ for values.
  3254. */
  3255. A_UINT32 pdev_id;
  3256. /* This TLV is followed by array of bytes:
  3257. * A_UINT8 bufp[]; <-- management frame buffer
  3258. */
  3259. /* This TLV is optionally followed by array of struct:
  3260. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3261. */
  3262. } wmi_mgmt_rx_hdr;
  3263. /*
  3264. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3265. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3266. */
  3267. typedef struct
  3268. {
  3269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3270. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3271. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3272. } wmi_rssi_ctl_ext;
  3273. typedef struct {
  3274. /** TSF timestamp */
  3275. A_UINT32 tsf_timestamp;
  3276. /**
  3277. * Current freq1, freq2
  3278. *
  3279. * [7:0]: freq1[lo]
  3280. * [15:8] : freq1[hi]
  3281. * [23:16]: freq2[lo]
  3282. * [31:24]: freq2[hi]
  3283. */
  3284. A_UINT32 freq_info_1;
  3285. /**
  3286. * Combined RSSI over all chains and channel width for this PHY error
  3287. *
  3288. * [7:0]: RSSI combined
  3289. * [15:8]: Channel width (MHz)
  3290. * [23:16]: PHY error code
  3291. * [24:16]: reserved (future use)
  3292. */
  3293. A_UINT32 freq_info_2;
  3294. /**
  3295. * RSSI on chain 0 through 3
  3296. *
  3297. * This is formatted the same as the PPDU_START RX descriptor
  3298. * field:
  3299. *
  3300. * [7:0]: pri20
  3301. * [15:8]: sec20
  3302. * [23:16]: sec40
  3303. * [31:24]: sec80
  3304. */
  3305. A_UINT32 rssi_chain0;
  3306. A_UINT32 rssi_chain1;
  3307. A_UINT32 rssi_chain2;
  3308. A_UINT32 rssi_chain3;
  3309. /**
  3310. * Last calibrated NF value for chain 0 through 3
  3311. *
  3312. * nf_list_1:
  3313. *
  3314. * + [15:0] - chain 0
  3315. * + [31:16] - chain 1
  3316. *
  3317. * nf_list_2:
  3318. *
  3319. * + [15:0] - chain 2
  3320. * + [31:16] - chain 3
  3321. */
  3322. A_UINT32 nf_list_1;
  3323. A_UINT32 nf_list_2;
  3324. /** Length of the frame */
  3325. A_UINT32 buf_len;
  3326. } wmi_single_phyerr_rx_hdr;
  3327. typedef struct {
  3328. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3329. /**
  3330. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3331. *
  3332. * This is formatted the same as the PPDU_START RX descriptor
  3333. * field:
  3334. *
  3335. * [7:0]: pri20
  3336. * [15:8]: sec20
  3337. * [23:16]: sec40
  3338. * [31:24]: sec80
  3339. */
  3340. A_UINT32 rssi_chain4;
  3341. A_UINT32 rssi_chain5;
  3342. A_UINT32 rssi_chain6;
  3343. A_UINT32 rssi_chain7;
  3344. /**
  3345. * Last calibrated NF value for chain 4 through 7 in dbm
  3346. *
  3347. * nf_list_3:
  3348. * + [15:0] - chain 4
  3349. * + [31:16] - chain 5
  3350. *
  3351. * nf_list_4:
  3352. * + [15:0] - chain 6
  3353. * + [31:16] - chain 7
  3354. *
  3355. * Each chain's noise floor is stored as a sign-extended (negative)
  3356. * value in dBm units.
  3357. */
  3358. A_UINT32 nf_list_3;
  3359. A_UINT32 nf_list_4;
  3360. } wmi_single_phyerr_ext_rx_hdr;
  3361. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  3362. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  3363. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  3364. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  3365. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  3366. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  3367. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  3368. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  3369. /*
  3370. * Please keep in mind that these _SET macros break macro side effect
  3371. * assumptions; don't be clever with them.
  3372. */
  3373. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  3374. (WMI_F_MS((hdr)->freq_info_1, \
  3375. WMI_UNIFIED_FREQINFO_##f##_LO) \
  3376. | (WMI_F_MS((hdr)->freq_info_1, \
  3377. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  3378. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  3379. do { \
  3380. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  3381. WMI_UNIFIED_FREQINFO_##f##_LO); \
  3382. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  3383. WMI_UNIFIED_FREQINFO_##f##_HI); \
  3384. } while (0)
  3385. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  3386. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  3387. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  3388. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  3389. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  3390. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  3391. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  3392. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  3393. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  3394. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  3395. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3396. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  3397. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  3398. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  3399. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  3400. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3401. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  3402. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  3403. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  3404. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  3405. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3406. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  3407. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  3408. #define WMI_UNIFIED_CHAIN_0_S 0
  3409. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  3410. #define WMI_UNIFIED_CHAIN_1_S 16
  3411. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  3412. #define WMI_UNIFIED_CHAIN_2_S 0
  3413. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  3414. #define WMI_UNIFIED_CHAIN_3_S 16
  3415. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  3416. #define WMI_UNIFIED_CHAIN_4_S 0
  3417. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  3418. #define WMI_UNIFIED_CHAIN_5_S 16
  3419. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  3420. #define WMI_UNIFIED_CHAIN_6_S 0
  3421. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  3422. #define WMI_UNIFIED_CHAIN_7_S 16
  3423. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  3424. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  3425. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  3426. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  3427. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  3428. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  3429. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  3430. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  3431. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  3432. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  3433. WMI_UNIFIED_CHAIN_##c)))
  3434. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  3435. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  3436. WMI_UNIFIED_CHAIN_##c);
  3437. /*
  3438. * For now, this matches what the underlying hardware is doing.
  3439. * Update ar6000ProcRxDesc() to use these macros when populating
  3440. * the rx descriptor and then we can just copy the field over
  3441. * to the WMI PHY notification without worrying about breaking
  3442. * things.
  3443. */
  3444. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  3445. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  3446. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  3447. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  3448. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  3449. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  3450. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  3451. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  3452. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  3453. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  3454. WMI_UNIFIED_RSSI_CHAN_##ch);
  3455. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  3456. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  3457. WMI_UNIFIED_RSSI_CHAN_##ch)))
  3458. typedef struct {
  3459. /** Phy error event header */
  3460. wmi_single_phyerr_rx_hdr hdr;
  3461. /** frame buffer */
  3462. A_UINT8 bufp[1];
  3463. } wmi_single_phyerr_rx_event;
  3464. /* PHY ERROR MASK 0 */
  3465. /* bits 1:0 defined but not published */
  3466. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  3467. /* bits 23:3 defined but not published */
  3468. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  3469. /* bits 25:24 defined but not published */
  3470. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  3471. /* bits 31:27 defined but not published */
  3472. /* PHY ERROR MASK 1 */
  3473. /* bits 13:0 defined but not published */
  3474. /* bits 31:14 reserved */
  3475. /* PHY ERROR MASK 2 */
  3476. /* bits 31:0 reserved */
  3477. typedef struct {
  3478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  3479. /** Phy error phy error count */
  3480. A_UINT32 num_phyerr_events;
  3481. A_UINT32 tsf_l32;
  3482. A_UINT32 tsf_u32;
  3483. A_UINT32 buf_len;
  3484. union {
  3485. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  3486. /** pdev_id for identifying the MAC
  3487. * See macros starting with WMI_PDEV_ID_ for values.
  3488. */
  3489. A_UINT32 pdev_id;
  3490. };
  3491. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  3492. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  3493. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  3494. /* This TLV is followed by array of bytes:
  3495. * frame buffer - contains multiple payloads in the order:
  3496. * header - payload, header - payload...
  3497. * (The header is of type: wmi_single_phyerr_rx_hdr)
  3498. * A_UINT8 bufp[];
  3499. * The extension hdr will repeat num_phyerr_events of times
  3500. * and will have 1:1 mapping with above header. i.e the 1st
  3501. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  3502. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  3503. */
  3504. } wmi_comb_phyerr_rx_hdr;
  3505. /* WMI MGMT TX */
  3506. typedef struct {
  3507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  3508. /** unique id identifying the VDEV, generated by the caller */
  3509. A_UINT32 vdev_id;
  3510. /** peer MAC address */
  3511. wmi_mac_addr peer_macaddr;
  3512. /** xmit rate */
  3513. A_UINT32 tx_rate;
  3514. /** xmit power */
  3515. A_UINT32 tx_power;
  3516. /** Buffer length in bytes */
  3517. A_UINT32 buf_len;
  3518. /* This TLV is followed by array of bytes:
  3519. * A_UINT8 bufp[]; <-- management frame buffer
  3520. */
  3521. } wmi_mgmt_tx_hdr;
  3522. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  3523. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  3524. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  3525. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  3526. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  3527. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  3528. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  3529. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  3530. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  3531. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  3532. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  3533. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  3534. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  3535. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  3536. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  3537. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  3538. typedef struct {
  3539. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  3540. union {
  3541. struct {
  3542. /* DWORD 0: tx power, tx rate, retry_limit */
  3543. A_UINT32
  3544. /* pwr -
  3545. * Specify what power the tx frame needs to be transmitted at.
  3546. * The power a signed (two's complement) value is in units of 0.5 dBm.
  3547. * The value needs to be appropriately sign-extended when extracting
  3548. * the value from the message and storing it in a variable that is
  3549. * larger than A_INT8. (fw automatically handles this sign-extension.)
  3550. * If the transmission uses multiple tx chains, this power spec is
  3551. * the total transmit power, assuming incoherent combination of
  3552. * per-chain power to produce the total power.
  3553. */
  3554. pwr: 8,
  3555. /* mcs_mask -
  3556. * Specify the allowable values for MCS index (modulation and coding)
  3557. * to use for transmitting the frame.
  3558. *
  3559. * For HT / VHT preamble types, this mask directly corresponds to
  3560. * the HT or VHT MCS indices that are allowed. For each bit N set
  3561. * within the mask, MCS index N is allowed for transmitting the frame.
  3562. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  3563. * rates versus OFDM rates, so the host has the option of specifying
  3564. * that the target must transmit the frame with CCK or OFDM rates
  3565. * (not HT or VHT), but leaving the decision to the target whether
  3566. * to use CCK or OFDM.
  3567. *
  3568. * For CCK and OFDM, the bits within this mask are interpreted as
  3569. * follows:
  3570. * bit 0 -> CCK 1 Mbps rate is allowed
  3571. * bit 1 -> CCK 2 Mbps rate is allowed
  3572. * bit 2 -> CCK 5.5 Mbps rate is allowed
  3573. * bit 3 -> CCK 11 Mbps rate is allowed
  3574. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  3575. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  3576. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  3577. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  3578. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  3579. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  3580. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  3581. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  3582. *
  3583. * The MCS index specification needs to be compatible with the
  3584. * bandwidth mask specification. For example, a MCS index == 9
  3585. * specification is inconsistent with a preamble type == VHT,
  3586. * Nss == 1, and channel bandwidth == 20 MHz.
  3587. *
  3588. * Furthermore, the host has only a limited ability to specify to
  3589. * the target to select from HT + legacy rates, or VHT + legacy rates,
  3590. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  3591. * If no bits are set, target can choose what MCS type to use.
  3592. */
  3593. mcs_mask: 12,
  3594. /* nss_mask -
  3595. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  3596. * Each bit in this mask corresponds to a Nss value:
  3597. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  3598. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  3599. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  3600. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  3601. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  3602. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  3603. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  3604. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  3605. * The values in the Nss mask must be suitable for the recipient, e.g.
  3606. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  3607. * recipient which only supports 2x2 MIMO.
  3608. * If no bits are set, target can choose what NSS type to use.
  3609. */
  3610. nss_mask: 8,
  3611. /* retry_limit -
  3612. * Specify the maximum number of transmissions, including the
  3613. * initial transmission, to attempt before giving up if no ack
  3614. * is received.
  3615. * If the tx rate is specified, then all retries shall use the
  3616. * same rate as the initial transmission.
  3617. * If no tx rate is specified, the target can choose whether to
  3618. * retain the original rate during the retransmissions, or to
  3619. * fall back to a more robust rate.
  3620. */
  3621. retry_limit: 4;
  3622. };
  3623. A_UINT32 tx_param_dword0;
  3624. };
  3625. union {
  3626. struct {
  3627. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  3628. A_UINT32
  3629. /* chain_mask - specify which chains to transmit from
  3630. * If not set, target will choose what chain_mask to use.
  3631. */
  3632. chain_mask: 8,
  3633. /* The bits in this mask correspond to the values as below
  3634. * bit 0 -> 5MHz
  3635. * bit 1 -> 10MHz
  3636. * bit 2 -> 20MHz
  3637. * bit 3 -> 40MHz
  3638. * bit 4 -> 80MHz
  3639. * bit 5 -> 160MHz
  3640. * bit 6 -> 80_80MHz
  3641. * If no bits are set, target can choose what BW to use.
  3642. */
  3643. bw_mask: 7,
  3644. /* preamble_type_mask -
  3645. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  3646. * may choose from for transmitting this frame.
  3647. * Each bit in this mask corresponds to a preamble_type value:
  3648. * bit 0: if set, OFDM
  3649. * bit 1: if set, CCK
  3650. * bit 2: if set, HT
  3651. * bit 3: if set, VHT
  3652. * bit 4: if set, HE
  3653. * If no bits are set, target can choose what preamble type to use.
  3654. */
  3655. preamble_type: 5,
  3656. /* Data:1 Mgmt:0
  3657. */
  3658. frame_type: 1,
  3659. reserved1_31_21: 11;
  3660. };
  3661. A_UINT32 tx_param_dword1;
  3662. };
  3663. } wmi_tx_send_params;
  3664. typedef struct {
  3665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  3666. A_UINT32 vdev_id;
  3667. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3668. A_UINT32 chanfreq; /* MHz units */
  3669. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  3670. * pass by reference WMI management frames.
  3671. *
  3672. * a) If the command is for pass by reference,
  3673. * paddr_lo and padd_hi will hold the address of remote/host buffer
  3674. * b) If the command is for pass by value,
  3675. * paddr_lo and paddr_hi will be NULL.
  3676. */
  3677. A_UINT32 paddr_lo;
  3678. A_UINT32 paddr_hi;
  3679. A_UINT32 frame_len;
  3680. A_UINT32 buf_len; /** Buffer length in bytes */
  3681. /*
  3682. * The frame which will have tx_params_valid set will be always be RAW
  3683. * frame, as it will be tx'ed on non-pause tid
  3684. */
  3685. A_UINT32 tx_params_valid;
  3686. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  3687. * A_UINT8 bufp[];
  3688. */
  3689. /* This TLV is followed by wmi_tx_send_params
  3690. * wmi_tx_send_params tx_send_params;
  3691. */
  3692. } wmi_mgmt_tx_send_cmd_fixed_param;
  3693. typedef struct {
  3694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  3695. A_UINT32 vdev_id;
  3696. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3697. A_UINT32 chanfreq; /* MHz units */
  3698. A_UINT32 paddr_lo;
  3699. A_UINT32 paddr_hi;
  3700. A_UINT32 frame_len;
  3701. A_UINT32 buf_len; /** Buffer length in bytes */
  3702. /* The frame which will have tx_params_valid set will be always be RAW
  3703. * frame, as it will be tx'ed on non-pause tid
  3704. */
  3705. A_UINT32 tx_params_valid;
  3706. /* This TLV is followed by array of bytes: First 64 bytes of frame
  3707. * A_UINT8 bufp[];
  3708. */
  3709. /* This TLV is followed by wmi_tx_send_params
  3710. * wmi_tx_send_params tx_send_params;
  3711. */
  3712. } wmi_offchan_data_tx_send_cmd_fixed_param;
  3713. typedef struct {
  3714. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  3715. A_UINT32 value;
  3716. } wmi_echo_event_fixed_param;
  3717. typedef struct {
  3718. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  3719. A_UINT32 value;
  3720. } wmi_echo_cmd_fixed_param;
  3721. typedef struct {
  3722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  3723. /** pdev_id for identifying the MAC
  3724. * See macros starting with WMI_PDEV_ID_ for values.
  3725. */
  3726. A_UINT32 pdev_id;
  3727. /** reg domain code */
  3728. A_UINT32 reg_domain;
  3729. A_UINT32 reg_domain_2G;
  3730. A_UINT32 reg_domain_5G;
  3731. A_UINT32 conformance_test_limit_2G;
  3732. A_UINT32 conformance_test_limit_5G;
  3733. A_UINT32 dfs_domain;
  3734. } wmi_pdev_set_regdomain_cmd_fixed_param;
  3735. typedef struct {
  3736. /** TRUE for scan start and flase for scan end */
  3737. A_UINT32 scan_start;
  3738. } wmi_pdev_scan_cmd;
  3739. /* WMI support for setting ratemask in target */
  3740. typedef struct {
  3741. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  3742. A_UINT32 vdev_id;
  3743. /*
  3744. * 0 - cck/ofdm
  3745. * 1 - HT
  3746. * 2 - VHT
  3747. * 3 - HE
  3748. */
  3749. A_UINT32 type;
  3750. A_UINT32 mask_lower32;
  3751. A_UINT32 mask_higher32;
  3752. A_UINT32 mask_lower32_2;
  3753. A_UINT32 mask_higher32_2;
  3754. } wmi_vdev_config_ratemask_cmd_fixed_param;
  3755. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  3756. enum {
  3757. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  3758. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  3759. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  3760. }; /* nrp - Neighbor Rx Packets */
  3761. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  3762. enum {
  3763. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  3764. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  3765. };
  3766. /* nrp flag - Filter Neighbor Rx Packets
  3767. * (capture flag, 2 & 3 not initially supported)
  3768. */
  3769. enum {
  3770. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  3771. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  3772. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  3773. };
  3774. typedef struct {
  3775. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  3776. A_UINT32 vdev_id;
  3777. /* AP Bssid or Client Mac-addr */
  3778. wmi_mac_addr addr;
  3779. /* Add/Remove NRF Filter */
  3780. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  3781. /* client/ap filter */
  3782. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  3783. /* optional - tx/rx capture */
  3784. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  3785. /* BSSID index - index of the BSSID register */
  3786. A_UINT32 bssid_idx;
  3787. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  3788. /*Command to set/unset chip in quiet mode*/
  3789. typedef struct {
  3790. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  3791. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  3792. A_UINT32 period; /*period in TUs*/
  3793. A_UINT32 duration; /*duration in TUs*/
  3794. A_UINT32 next_start; /*offset in TUs*/
  3795. A_UINT32 enabled; /*enable/disable*/
  3796. } wmi_pdev_set_quiet_cmd_fixed_param;
  3797. typedef struct {
  3798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  3799. A_UINT32 vdev_id; /* Virtual interface ID */
  3800. A_UINT32 period; /* period in TUs */
  3801. A_UINT32 duration; /* duration in TUs */
  3802. A_UINT32 next_start; /* offset in TUs */
  3803. A_UINT32 enabled; /* enable/disable */
  3804. } wmi_vdev_set_quiet_cmd_fixed_param;
  3805. typedef struct {
  3806. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  3807. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  3808. /* Size for tx aggregation for the vdev mentioned in vdev id
  3809. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  3810. */
  3811. A_UINT32 tx_aggr_size;
  3812. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  3813. /*
  3814. * To set TX aggregation size limits per VDEV per AC
  3815. * bits 1:0 (ac):
  3816. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  3817. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  3818. * for all Access Categories
  3819. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  3820. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  3821. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  3822. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  3823. * bits 31:6: Reserved bits. should be set to zero.
  3824. */
  3825. A_UINT32 enable_bitmap;
  3826. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  3827. typedef enum {
  3828. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  3829. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  3830. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  3831. } wmi_vdev_custom_aggr_type_t;
  3832. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  3833. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  3834. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  3835. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  3836. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  3837. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  3838. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  3839. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  3840. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  3841. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  3842. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  3843. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  3844. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  3845. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  3846. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  3847. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  3848. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  3849. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  3850. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  3851. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  3852. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  3853. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  3854. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  3855. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  3856. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  3857. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  3858. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  3859. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  3860. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  3861. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  3862. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  3863. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  3864. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  3865. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  3866. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  3867. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  3868. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  3869. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  3870. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  3871. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  3872. typedef enum {
  3873. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  3874. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  3875. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  3876. } wmi_vdev_custom_sw_retry_type_t;
  3877. typedef struct {
  3878. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  3879. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  3880. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  3881. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  3882. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  3883. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  3884. /*
  3885. * Command to enable/disable Green AP Power Save.
  3886. * This helps conserve power during AP operation. When the AP has no
  3887. * stations associated with it, the host can enable Green AP Power Save
  3888. * to request the firmware to shut down all but one transmit and receive
  3889. * chains.
  3890. */
  3891. typedef struct {
  3892. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  3893. /** pdev_id for identifying the MAC
  3894. * See macros starting with WMI_PDEV_ID_ for values.
  3895. */
  3896. A_UINT32 pdev_id;
  3897. A_UINT32 enable; /*1:enable, 0:disable*/
  3898. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  3899. #define MAX_HT_IE_LEN 32
  3900. /* DEPRECATED */
  3901. typedef struct {
  3902. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  3903. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3904. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  3905. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3906. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3907. /** The TLV for the HT IE follows:
  3908. * A_UINT32 ie_data[];
  3909. */
  3910. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  3911. #define MAX_VHT_IE_LEN 32
  3912. /* DEPRECATED */
  3913. typedef struct {
  3914. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  3915. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3916. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  3917. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3918. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3919. /** The TLV for the VHT IE follows:
  3920. * A_UINT32 ie_data[];
  3921. */
  3922. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  3923. typedef struct {
  3924. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  3925. /** pdev_id for identifying the MAC
  3926. * See macros starting with WMI_PDEV_ID_ for values.
  3927. */
  3928. A_UINT32 pdev_id;
  3929. wmi_mac_addr base_macaddr;
  3930. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  3931. /*
  3932. * For now, the spectral configuration is global rather than
  3933. * per-vdev. The vdev is a placeholder and will be ignored
  3934. * by the firmware.
  3935. */
  3936. typedef struct {
  3937. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  3938. A_UINT32 vdev_id;
  3939. A_UINT32 spectral_scan_count;
  3940. A_UINT32 spectral_scan_period;
  3941. A_UINT32 spectral_scan_priority;
  3942. A_UINT32 spectral_scan_fft_size;
  3943. A_UINT32 spectral_scan_gc_ena;
  3944. A_UINT32 spectral_scan_restart_ena;
  3945. A_UINT32 spectral_scan_noise_floor_ref;
  3946. A_UINT32 spectral_scan_init_delay;
  3947. A_UINT32 spectral_scan_nb_tone_thr;
  3948. A_UINT32 spectral_scan_str_bin_thr;
  3949. A_UINT32 spectral_scan_wb_rpt_mode;
  3950. A_UINT32 spectral_scan_rssi_rpt_mode;
  3951. A_UINT32 spectral_scan_rssi_thr;
  3952. A_UINT32 spectral_scan_pwr_format;
  3953. A_UINT32 spectral_scan_rpt_mode;
  3954. A_UINT32 spectral_scan_bin_scale;
  3955. A_UINT32 spectral_scan_dBm_adj;
  3956. A_UINT32 spectral_scan_chn_mask;
  3957. } wmi_vdev_spectral_configure_cmd_fixed_param;
  3958. /*
  3959. * Enabling, disabling and triggering the spectral scan
  3960. * is a per-vdev operation. That is, it will set channel
  3961. * flags per vdev rather than globally; so concurrent scan/run
  3962. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  3963. */
  3964. typedef struct {
  3965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  3966. A_UINT32 vdev_id;
  3967. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  3968. A_UINT32 trigger_cmd;
  3969. /* 0 - ignore; 1 - enable, 2 - disable */
  3970. A_UINT32 enable_cmd;
  3971. } wmi_vdev_spectral_enable_cmd_fixed_param;
  3972. typedef struct {
  3973. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  3974. A_UINT32 vdev_id;
  3975. } wmi_vdev_get_tx_power_cmd_fixed_param;
  3976. #define WMI_BEACON_CTRL_TX_DISABLE 0
  3977. #define WMI_BEACON_CTRL_TX_ENABLE 1
  3978. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  3979. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  3980. typedef struct {
  3981. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  3982. /** unique id identifying the VDEV, generated by the caller */
  3983. A_UINT32 vdev_id;
  3984. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  3985. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  3986. /** common structure used for wmi_vedv_get_tx_power_event */
  3987. typedef struct {
  3988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  3989. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  3990. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  3991. } wmi_vdev_get_tx_power_event_fixed_param;
  3992. typedef enum {
  3993. /** Limit the offchannel duration */
  3994. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  3995. /** Skip DFS channels from Scan channel list.
  3996. * valid for both host scans and FW scans */
  3997. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  3998. } wmi_vdev_limit_offchan_flags;
  3999. typedef struct {
  4000. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  4001. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  4002. A_UINT32 vdev_id;
  4003. /** see enum wmi_vdev_limit_offchan_flags */
  4004. A_UINT32 flags;
  4005. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  4006. A_UINT32 max_offchan_time;
  4007. /** rest time in msec on the BSS channel */
  4008. A_UINT32 rest_time;
  4009. } wmi_vdev_limit_offchan_cmd_fixed_param;
  4010. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  4011. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  4012. #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) */
  4013. #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) */
  4014. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  4015. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  4016. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  4017. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  4018. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  4019. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4020. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  4021. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4022. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  4023. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4024. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  4025. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4026. typedef enum {
  4027. WMI_CSA_IE_PRESENT = 0x00000001,
  4028. WMI_XCSA_IE_PRESENT = 0x00000002,
  4029. WMI_WBW_IE_PRESENT = 0x00000004,
  4030. WMI_CSWARP_IE_PRESENT = 0x00000008,
  4031. WMI_QSBW_ISE_PRESENT = 0x00000010,
  4032. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  4033. /* wmi CSA receive event from beacon frame */
  4034. typedef struct {
  4035. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  4036. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  4037. wmi_mac_addr i_addr1;
  4038. wmi_mac_addr i_addr2;
  4039. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  4040. * changed in the future without breaking WMI compatibility */
  4041. A_UINT32 csa_ie[2];
  4042. A_UINT32 xcsa_ie[2];
  4043. A_UINT32 wb_ie[2];
  4044. A_UINT32 cswarp_ie;
  4045. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  4046. A_UINT32 qsbw_ise;
  4047. } wmi_csa_event_fixed_param;
  4048. typedef enum {
  4049. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  4050. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  4051. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  4052. } WMI_PEER_MCAST2UCAST_MODE;
  4053. typedef enum {
  4054. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  4055. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  4056. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  4057. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  4058. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  4059. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  4060. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  4061. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4062. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4063. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4064. * Bit 3-5 : "Xretry threshold" to use
  4065. * Bit 6~31 : reserved for future use.
  4066. */
  4067. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  4068. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  4069. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  4070. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  4071. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  4072. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  4073. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  4074. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  4075. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  4076. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  4077. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  4078. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  4079. typedef enum {
  4080. /** TX chain mask */
  4081. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  4082. /** RX chain mask */
  4083. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  4084. /** TX power limit for 2G Radio */
  4085. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  4086. /** TX power limit for 5G Radio */
  4087. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  4088. /** TX power scale */
  4089. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  4090. /** Beacon generation mode . 0: host, 1: target */
  4091. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  4092. /** Beacon generation mode . 0: staggered 1: bursted */
  4093. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  4094. /** Resource manager off chan mode .
  4095. * 0: turn off off chan mode. 1: turn on offchan mode
  4096. */
  4097. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  4098. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  4099. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  4100. /** Dynamic bandwidth 0: disable 1: enable */
  4101. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  4102. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  4103. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  4104. /** aggregrate sw retry threshold. 0-disable*/
  4105. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  4106. /** Station kickout threshold (non of consecutive failures).0-disable */
  4107. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  4108. /** Aggerate size scaling configuration per AC */
  4109. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  4110. /** LTR enable */
  4111. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  4112. /** LTR latency for BE, in us */
  4113. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  4114. /** LTR latency for BK, in us */
  4115. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  4116. /** LTR latency for VI, in us */
  4117. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  4118. /** LTR latency for VO, in us */
  4119. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  4120. /** LTR AC latency timeout, in ms */
  4121. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  4122. /** LTR platform latency override, in us */
  4123. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  4124. /** LTR-M override, in us */
  4125. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  4126. /** Tx activity timeout for LTR, in us */
  4127. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  4128. /** L1SS state machine enable */
  4129. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  4130. /** Deep sleep state machine enable */
  4131. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  4132. /** RX buffering flush enable */
  4133. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  4134. /** RX buffering matermark */
  4135. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  4136. /** RX buffering timeout enable */
  4137. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  4138. /** RX buffering timeout value */
  4139. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  4140. /** pdev level stats update period in ms */
  4141. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  4142. /** vdev level stats update period in ms */
  4143. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  4144. /** peer level stats update period in ms */
  4145. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  4146. /** beacon filter status update period */
  4147. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  4148. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4149. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  4150. /** Access category on which ARP frames are sent */
  4151. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  4152. /** DCS configuration */
  4153. WMI_PDEV_PARAM_DCS, /* 0x24 */
  4154. /** Enable/Disable ANI on target */
  4155. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  4156. /** configure the ANI polling period */
  4157. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  4158. /** configure the ANI listening period */
  4159. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  4160. /** configure OFDM immunity level */
  4161. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  4162. /** configure CCK immunity level */
  4163. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  4164. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4165. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  4166. /** Enable/Disable proxy STA */
  4167. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  4168. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4169. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  4170. /** Enable/Disable power gating sleep */
  4171. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  4172. /** Enable/Disable Rfkill */
  4173. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  4174. /** Set Bursting DUR */
  4175. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  4176. /** Set Bursting ENABLE */
  4177. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  4178. /** HW rfkill config */
  4179. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  4180. /** Enable radio low power features */
  4181. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  4182. /** L1SS entry and residency time track */
  4183. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  4184. /** set hyst at runtime, requirement from SS */
  4185. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  4186. /** Enable/ Disable POWER COLLAPSE */
  4187. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  4188. /** configure LED system state */
  4189. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  4190. /** Enable/Disable LED */
  4191. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  4192. /** set DIRECT AUDIO time latency */
  4193. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  4194. /** set DIRECT AUDIO Feature ENABLE */
  4195. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  4196. /** pdev level whal mib stats update enable */
  4197. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  4198. /** ht/vht info based on vdev */
  4199. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  4200. /** Set CTS channel BW for dynamic BW adjustment feature */
  4201. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  4202. /** Set GPIO pin info used by WNTS */
  4203. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  4204. /** Enable/Disable hardware adaptive early rx feature */
  4205. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  4206. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4207. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  4208. /** Increasing/decreasing step used by hardware */
  4209. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  4210. /** The fixed early rx duration when adaptive early rx is disabled */
  4211. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  4212. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4213. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  4214. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4215. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  4216. /** Increasing/decreasing step used by hardware */
  4217. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  4218. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4219. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  4220. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4221. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  4222. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4223. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  4224. /** 2G TX chain mask */
  4225. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  4226. /** 2G RX chain mask */
  4227. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  4228. /** 5G TX chain mask */
  4229. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  4230. /** 5G RX chain mask */
  4231. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  4232. /* Set tx chain mask for CCK rates */
  4233. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  4234. /* Set tx chain mask for 1SS stream */
  4235. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  4236. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4237. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  4238. /** TX power backoff in dB: tx power -= param value
  4239. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4240. * the values. Safety check will happen in Halphy
  4241. */
  4242. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  4243. /** enable and disable aggregate burst along with duration */
  4244. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  4245. /** Set the global RX decap mode */
  4246. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  4247. /** Enable/Disable Fast channel reset */
  4248. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  4249. /** Default antenna for Smart antenna */
  4250. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  4251. /** Set the user-specified antenna gain */
  4252. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  4253. /** Set the user-specified RX filter */
  4254. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  4255. /** configure the user-specified MCAST tid for managed mcast feature
  4256. * 0-15 is the valid range. 0xff will clear the tid setting */
  4257. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  4258. /** Enable/Disable Proxy sta mode */
  4259. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  4260. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4261. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4262. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  4263. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4264. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  4265. /** Remove the Mcast buffers added by host */
  4266. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  4267. /** En/disable station power save state indication */
  4268. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  4269. /** Access category on which ARP frames are sent */
  4270. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  4271. /** allow or disallow interbss frame forwarding */
  4272. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  4273. /** Enable/Disable reset */
  4274. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  4275. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  4276. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  4277. /** Set global PPDU duration limit (usec). */
  4278. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  4279. /** set txbf sounding period of vap in milliseconds */
  4280. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  4281. /** Set promiscuous mode */
  4282. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  4283. /** Set burst mode */
  4284. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  4285. /** enable enhanced stats */
  4286. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  4287. /** Set mu-grouping policy */
  4288. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  4289. /** Channel Hopping Enable */
  4290. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  4291. /** Set Channel Hopping NF threshold in dBm */
  4292. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  4293. /** Set PAPRD policy */
  4294. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  4295. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  4296. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  4297. /** ATF enable/disable strict schedule */
  4298. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  4299. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  4300. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  4301. /** Default antenna polarization */
  4302. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  4303. /** Set mgmt retry limit */
  4304. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  4305. /** Set CCA sensitivity level in dBm */
  4306. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  4307. /** Set 2G positive and negative Tx power in 0.5dBm units */
  4308. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  4309. /** Set 5G positive and negative Tx power in 0.5dBm
  4310. * units */
  4311. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  4312. /** Enable/disble AMSDU for tids */
  4313. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  4314. /** Enable/disable AMPDU for tids */
  4315. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  4316. /** Set CCA threshold in dBm */
  4317. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  4318. /** RTS Fixed rate setting */
  4319. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  4320. /** Pdev reset */
  4321. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  4322. /** wapi mbssid offset **/
  4323. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  4324. /** ARP DEBUG source address*/
  4325. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  4326. /** ARP DEBUG destination address*/
  4327. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  4328. /** ATF enable/disable obss noise scheduling */
  4329. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  4330. /** ATF obss noise scaling factor */
  4331. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  4332. /**
  4333. * TX power reduction scaling exponent - final tx power is the
  4334. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  4335. * 2^(scale exponent). For example:
  4336. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  4337. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  4338. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  4339. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  4340. */
  4341. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  4342. /** ATF enabe/disabe dynamically */
  4343. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  4344. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  4345. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  4346. /** Set propagation delay for 2G / 5G band.
  4347. * The propagation delay is fundamentally a per-peer property, but
  4348. * the target may not support per-peer settings for ack timeouts.
  4349. * This pdev parameter allows the MAC-level ack timeout to be set to
  4350. * a value suitable for the worst-case propagation delay of any peer
  4351. * within that pdev.
  4352. * Units are microseconds.
  4353. */
  4354. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  4355. /**
  4356. * Host can enable/disable ANT DIV feature
  4357. * if it's been enabled in BDF
  4358. */
  4359. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  4360. /** Host can force one chain to select a specific ANT */
  4361. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  4362. /**
  4363. * Start a cycle ANT self test periodically.
  4364. * In the test, the FW would select each ANT pair
  4365. * one by one, the cycle time could be configured
  4366. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  4367. */
  4368. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  4369. /**
  4370. * Configure the cycle time of ANT self test,
  4371. * the unit is micro second. Per the timer
  4372. * limitation, too small value could be not so
  4373. * accurate.
  4374. */
  4375. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  4376. /**
  4377. * wlan stats observation period, the unit is millisecond.
  4378. * The value of 0 is used to turn off periodic stats report.
  4379. */
  4380. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  4381. /**
  4382. * Set tx_ppdu_delay[] bin size to specify how many
  4383. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  4384. * histogram represents.
  4385. */
  4386. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  4387. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  4388. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  4389. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  4390. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  4391. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  4392. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  4393. /** Set TX delay value in TX sch module, unit is microseconds */
  4394. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  4395. /** Set RTS enable for SIFS bursting */
  4396. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  4397. /** Set Maximum number of MPDUs in an AMPDU*/
  4398. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  4399. /** Enable/disable peer stats info mechanism
  4400. * A zero value disables; a non-zero value enables.
  4401. */
  4402. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  4403. /** Configure Fast PWR Transition mode
  4404. * 0x0 -> inidcates Fast PWR transition disabled
  4405. * 0x1 -> indicates Static mode enabled
  4406. * 0x2 -> indicates Dynamic mode enabled
  4407. */
  4408. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  4409. /** Enable/disable radio channel stats mechanism
  4410. * A zero value disables; a non-zero value enables.
  4411. */
  4412. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  4413. /** Enable/disable radio diagnosis feature
  4414. * which allows retrieving the status of radio.
  4415. * A zero value disables; a non-zero value enables.
  4416. */
  4417. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  4418. /** Enable/Disable mesh mcast traffic
  4419. * 1 - Allow mesh mcast traffic
  4420. * 0 - Disallow mesh mcast traffic
  4421. */
  4422. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  4423. /** Enable/Disable smart chainmask scheme
  4424. * 1 - Enable smart chainmask scheme
  4425. * 0 - Disable smart chainmask scheme
  4426. */
  4427. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  4428. /** Enable/Disable alternate chainmask scheme
  4429. * 1 - Enable alternate chainmask scheme
  4430. * 0 - Disable alternate chainmask scheme
  4431. */
  4432. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  4433. /** User configured parameters for antenna diversity algorithm
  4434. * BIT[25..13]: Probe period (milliseconds units)
  4435. * BIT[12..0]: Stay period (milliseconds units)
  4436. */
  4437. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  4438. /** pdev packet power save levels,
  4439. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  4440. */
  4441. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  4442. /** Define IOT pattern to be enabled/disabled
  4443. * bit values: 0 - disable, 1 - enable
  4444. * BIT[0..31]: each bit represents an IOT pattern
  4445. * -----
  4446. * Bit 0 - avoid SMPS with certain APs
  4447. * Bits 31:1 - reserved
  4448. */
  4449. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  4450. /** ACK timeout - change wireless packet ack timeout configuration,
  4451. * units are microseconds
  4452. */
  4453. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  4454. /** Number of TX chains to use for a/b/g rates.
  4455. * bit 0~15 : 11b mode TX chain number.
  4456. * bit 16~31 : 11ag mode TX chain number.
  4457. */
  4458. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  4459. /** Enable/Disable cck txfir override
  4460. * bit 0 - enable (1) or disable (0) CCK tx FIR
  4461. * bits 31:1 - unused / reserved (set to 0)
  4462. */
  4463. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  4464. /** Enable/Disable DTIM Synth
  4465. * 1- Enable DTIM Synth
  4466. * 0- Disable DTIM Synth
  4467. */
  4468. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  4469. /** Configure auto detect power failure feature.
  4470. * 0 - FW will trigger crash if power failure happens.
  4471. * 1 - FW will send a failure notification to host, and the host
  4472. * framework determines how to respond to the power failure
  4473. * 2 - Silently rejuvenate if power failure occurs.
  4474. * 3 - Feature disabled.
  4475. */
  4476. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  4477. /** Configure operating voltage corner mode based on phymode and bw.
  4478. * bit 0-1 - operating voltage corner mode for 11a/b.
  4479. * bit 2-3 - operating voltage corner mode for 11g.
  4480. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  4481. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  4482. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  4483. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  4484. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  4485. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  4486. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  4487. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  4488. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  4489. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  4490. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  4491. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  4492. * ---------------------------------------------
  4493. * 00 - Static voltage corner SVS
  4494. * 01 - static voltage corner LOW SVS
  4495. * 10 - Dynamic voltage corner selection based on TPUT
  4496. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  4497. */
  4498. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  4499. /* Enable/Disable data stall detection */
  4500. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  4501. /* GCMP Support indication to FW */
  4502. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  4503. /** Enable/Disable chain selection optimization for one chain dtim
  4504. * non-zero - Enable optimization and use this non-zero value as the
  4505. * chain imbalance threshold for optimization to kick in
  4506. * (units = dB)
  4507. * 0- Disable optimization
  4508. */
  4509. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  4510. /*
  4511. * Override default FW behavior and explicitly enable / disable
  4512. * the use of CCK for PPDU transmissions.
  4513. *
  4514. * When CCK transmissions are disabled, the default OFDM legacy
  4515. * rate will be used instead.
  4516. */
  4517. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  4518. /*
  4519. * Set the user-specified antenna gain, but in 0.5 dB units.
  4520. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  4521. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  4522. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  4523. */
  4524. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  4525. /*
  4526. * Global Enable/Disable control for Secondary Retry Feature Set
  4527. *
  4528. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4529. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4530. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4531. * Bit 3-5: "Xretry threshold" to use
  4532. */
  4533. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  4534. /** Set global uplink triggered PPDU duration limit (usec). */
  4535. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  4536. /** Set target buffer status report trigger interval (ms) */
  4537. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  4538. /** Use simplified equal RU allocation for DL and UL OFDMA */
  4539. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  4540. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  4541. * 0 - Don't allow quick FTDM Policy (Default)
  4542. * 1 - Allow quick FTDM policy.
  4543. */
  4544. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  4545. /** Set MWS-COEX 5G-NR power limit.
  4546. * 0: Don't apply user specific power limit,
  4547. * use internal power limit (Default)
  4548. * 1-2: invalid value (ignored)
  4549. * 3-21: apply the specified value as the external power limit, in dBm
  4550. * >21: invalid value (ignored)
  4551. */
  4552. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  4553. /** Set max msdus available for cong ctrl in target */
  4554. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  4555. /*
  4556. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  4557. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  4558. * Value 0: Disable this feature
  4559. * Non zero Value: Periodicity (seconds)
  4560. */
  4561. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  4562. /*
  4563. * Enable/Disable periodic peer CFR capture
  4564. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  4565. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  4566. */
  4567. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  4568. /*
  4569. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  4570. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  4571. * CFR measurment of other peers will be in multiples of this base timer.
  4572. * The unit is in milliseconds.
  4573. */
  4574. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  4575. /*
  4576. * Once the periodic capture is enabled using
  4577. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  4578. * the target. This parameter will ensure that the timer stops if there are
  4579. * no active peers in the capture list. Once the peers are added again to
  4580. * the capture list, the timer will not start again. The timer has to be
  4581. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  4582. * Value 1: Enable this feature
  4583. * Value 0: Disable this feature
  4584. */
  4585. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  4586. } WMI_PDEV_PARAM;
  4587. typedef struct {
  4588. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  4589. /** pdev_id for identifying the MAC
  4590. * See macros starting with WMI_PDEV_ID_ for values.
  4591. */
  4592. A_UINT32 pdev_id;
  4593. /** parameter id */
  4594. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  4595. /** parameter value */
  4596. A_UINT32 param_value;
  4597. } wmi_pdev_set_param_cmd_fixed_param;
  4598. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  4599. * bit 0~15 : 11b mode TX chain number.
  4600. * bit 16~31: 11ag mode TX chain number.
  4601. */
  4602. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  4603. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  4604. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  4605. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  4606. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4607. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4608. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4609. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4610. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  4611. typedef enum {
  4612. WMI_CTS_CBW_INVALID = 0,
  4613. WMI_CTS_CBW_20,
  4614. WMI_CTS_CBW_40,
  4615. WMI_CTS_CBW_80,
  4616. WMI_CTS_CBW_80_80,
  4617. WMI_CTS_CBW_160,
  4618. } WMI_CTS_CBW;
  4619. typedef struct {
  4620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  4621. /** pdev_id for identifying the MAC
  4622. * See macros starting with WMI_PDEV_ID_ for values.
  4623. */
  4624. A_UINT32 pdev_id;
  4625. /** parameter */
  4626. A_UINT32 param;
  4627. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  4628. typedef struct {
  4629. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  4630. /** pdev_id for identifying the MAC */
  4631. A_UINT32 pdev_id;
  4632. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4633. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4634. /** index of the last-used antenna for each chain */
  4635. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4636. /** mac address of diversity peer */
  4637. wmi_mac_addr macaddr;
  4638. } wmi_pdev_div_get_rssi_antid_fixed_param;
  4639. typedef struct {
  4640. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  4641. A_UINT32 param; /* 1 = read only, 2= read and clear */
  4642. } wmi_pdev_bss_chan_info_request_fixed_param;
  4643. typedef struct {
  4644. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  4645. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  4646. A_UINT32 len; /* the number of ctltable bytes in current payload */
  4647. A_UINT32 seq; /* the number of current transfers */
  4648. /*
  4649. * This TLV is followed by the following additional TLVs:
  4650. * ARRAY_BYTE TLV of ctltable_data
  4651. */
  4652. } wmi_pdev_update_ctltable_request_fixed_param;
  4653. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  4654. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  4655. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  4656. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  4657. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  4658. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  4659. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  4660. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  4661. typedef struct {
  4662. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  4663. /** pdev_id for identifying the MAC
  4664. * See macros starting with WMI_PDEV_ID_ for values.
  4665. * In non-DBDC case host should set it to 0
  4666. */
  4667. A_UINT32 pdev_id;
  4668. /*
  4669. * Percentage of air time available for each AC
  4670. * BIT[0-7] : AC_BE
  4671. * BIT[8-15] : AC_BK
  4672. * BIT[16-23] : AC_VI
  4673. * BIT[24-31] : AC_VO
  4674. */
  4675. A_UINT32 ac_airtime_percentage;
  4676. } wmi_esp_estimate_event_fixed_param;
  4677. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  4678. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  4679. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  4680. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4681. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  4682. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4683. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  4684. do { \
  4685. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4686. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  4687. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4688. } while (0)
  4689. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  4690. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4691. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  4692. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4693. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  4694. do { \
  4695. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4696. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  4697. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4698. } while (0)
  4699. typedef struct {
  4700. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  4701. union {
  4702. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  4703. /** pdev_id for identifying the MAC
  4704. * See macros starting with WMI_PDEV_ID_ for values.
  4705. */
  4706. A_UINT32 pdev_id;
  4707. };
  4708. /**
  4709. * The following "value" field is divided into bit fields as follows:
  4710. * bits | purpose
  4711. * -----+---------------------------------------
  4712. * 0 | enable/disable FAST diversity
  4713. * 1 | enable/disable SLOW diversity
  4714. * 5:2 | chain0 slow-diversity weighting factor
  4715. * 9:6 | chain1 slow-diversity weighting factor
  4716. * 31:10| currenty unused (set to 0x0)
  4717. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  4718. */
  4719. A_UINT32 value;
  4720. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  4721. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  4722. typedef struct {
  4723. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  4724. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  4725. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  4726. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  4727. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  4728. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  4729. 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] */
  4730. 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] */
  4731. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  4732. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  4733. } wmi_rssi_breach_monitor_config_fixed_param;
  4734. typedef struct {
  4735. /** parameter */
  4736. A_UINT32 param;
  4737. } wmi_pdev_dump_cmd;
  4738. typedef enum {
  4739. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  4740. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  4741. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  4742. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4743. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4744. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  4745. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  4746. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  4747. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  4748. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  4749. } wmi_tx_pause_type;
  4750. typedef enum {
  4751. ACTION_PAUSE = 0x0,
  4752. ACTION_UNPAUSE = 0x1,
  4753. } wmi_tx_pause_action;
  4754. typedef struct {
  4755. A_UINT32 tlv_header;
  4756. A_UINT32 pause_type;
  4757. A_UINT32 action;
  4758. A_UINT32 vdev_map;
  4759. A_UINT32 peer_id;
  4760. A_UINT32 tid_map;
  4761. } wmi_tx_pause_event_fixed_param;
  4762. typedef enum {
  4763. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  4764. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  4765. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  4766. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  4767. WMI_MGMT_TX_COMP_TYPE_MAX,
  4768. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  4769. typedef struct {
  4770. A_UINT32 tlv_header;
  4771. A_UINT32 desc_id; /* from tx_send_cmd */
  4772. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  4773. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4774. * See macros starting with WMI_PDEV_ID_ for values.
  4775. */
  4776. A_UINT32 pdev_id;
  4777. /* ppdu_id
  4778. * Hardware PPDU ID for tracking the completion stats
  4779. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  4780. */
  4781. A_UINT32 ppdu_id;
  4782. } wmi_mgmt_tx_compl_event_fixed_param;
  4783. typedef struct {
  4784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  4785. A_UINT32 desc_id; /* from tx_send_cmd */
  4786. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  4787. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4788. * See macros starting with WMI_PDEV_ID_ for values.
  4789. */
  4790. A_UINT32 pdev_id;
  4791. /* ppdu_id
  4792. * Hardware PPDU ID for tracking the completion stats
  4793. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  4794. */
  4795. A_UINT32 ppdu_id;
  4796. } wmi_offchan_data_tx_compl_event_fixed_param;
  4797. typedef struct {
  4798. A_UINT32 tlv_header;
  4799. A_UINT32 num_reports;
  4800. /* tlv for completion
  4801. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  4802. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  4803. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  4804. */
  4805. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  4806. #define WMI_TPC_RATE_MAX 160
  4807. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4808. #define WMI_TPC_TX_NUM_CHAIN 4
  4809. typedef enum {
  4810. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  4811. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  4812. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  4813. } WMI_TPC_CONFIG_EVENT_FLAG;
  4814. typedef struct {
  4815. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  4816. A_UINT32 regDomain;
  4817. A_UINT32 chanFreq;
  4818. A_UINT32 phyMode;
  4819. A_UINT32 twiceAntennaReduction;
  4820. A_UINT32 twiceMaxRDPower;
  4821. A_INT32 twiceAntennaGain;
  4822. A_UINT32 powerLimit;
  4823. A_UINT32 rateMax;
  4824. A_UINT32 numTxChain;
  4825. A_UINT32 ctl;
  4826. A_UINT32 flags;
  4827. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4828. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  4829. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4830. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4831. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4832. /** pdev_id for identifying the MAC
  4833. * See macros starting with WMI_PDEV_ID_ for values.
  4834. */
  4835. A_UINT32 pdev_id;
  4836. /* This TLV is followed by a byte array:
  4837. * A_UINT8 ratesArray[];
  4838. */
  4839. } wmi_pdev_tpc_config_event_fixed_param;
  4840. typedef struct {
  4841. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  4842. A_UINT32 tlv_header;
  4843. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  4844. A_UINT32 num_chains_valid;
  4845. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4846. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4847. /** index of the last-used antenna for each chain */
  4848. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4849. /** mac address of diversity peer */
  4850. wmi_mac_addr macaddr;
  4851. } wmi_pdev_div_rssi_antid_event_fixed_param;
  4852. typedef struct {
  4853. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  4854. A_UINT32 freq; /* Units in MHz */
  4855. A_INT32 noise_floor; /* units are dBm */
  4856. /* rx clear - how often the channel was unused */
  4857. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  4858. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  4859. /* cycle count - elapsed time during the measured period, in clock ticks */
  4860. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  4861. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  4862. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  4863. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  4864. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  4865. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  4866. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  4867. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  4868. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  4869. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  4870. } wmi_pdev_bss_chan_info_event_fixed_param;
  4871. typedef struct {
  4872. /* WMI event response update ctltable request to host */
  4873. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  4874. A_UINT32 total_len; /* the total number of bytes to be transferred */
  4875. A_UINT32 len; /* the number of FW received bytes from host */
  4876. A_UINT32 seq; /* the number of current transfers */
  4877. } wmi_pdev_update_ctltable_event_fixed_param;
  4878. typedef struct {
  4879. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  4880. A_UINT32 periodCnt;
  4881. A_UINT32 L1Cnt;
  4882. A_UINT32 L11Cnt;
  4883. A_UINT32 L12Cnt;
  4884. A_UINT32 L1Entry;
  4885. A_UINT32 L11Entry;
  4886. A_UINT32 L12Entry;
  4887. /** pdev_id for identifying the MAC
  4888. * See macros starting with WMI_PDEV_ID_ for values.
  4889. */
  4890. A_UINT32 pdev_id;
  4891. } wmi_pdev_l1ss_track_event_fixed_param;
  4892. typedef struct {
  4893. A_UINT32 len;
  4894. A_UINT32 msgref;
  4895. A_UINT32 segmentInfo;
  4896. } wmi_pdev_seg_hdr_info;
  4897. /*
  4898. * Transmit power scale factor.
  4899. *
  4900. */
  4901. typedef enum {
  4902. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  4903. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  4904. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  4905. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  4906. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  4907. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  4908. } WMI_TP_SCALE;
  4909. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  4910. typedef struct {
  4911. /** message buffer, NULL terminated */
  4912. char bufp[WMI_MAX_DEBUG_MESG];
  4913. } wmi_debug_mesg_event;
  4914. enum {
  4915. /** P2P device */
  4916. VDEV_SUBTYPE_P2PDEV = 0,
  4917. /** P2P client */
  4918. VDEV_SUBTYPE_P2PCLI,
  4919. /** P2P GO */
  4920. VDEV_SUBTYPE_P2PGO,
  4921. /** BT3.0 HS */
  4922. VDEV_SUBTYPE_BT,
  4923. };
  4924. typedef struct {
  4925. /** idnore power , only use flags , mode and freq */
  4926. wmi_channel chan;
  4927. } wmi_pdev_set_channel_cmd;
  4928. typedef enum {
  4929. WMI_PKTLOG_EVENT_RX = 0x1,
  4930. WMI_PKTLOG_EVENT_TX = 0x2,
  4931. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  4932. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  4933. /* 0x10 used by deprecated DBG_PRINT */
  4934. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  4935. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  4936. } WMI_PKTLOG_EVENT;
  4937. typedef enum {
  4938. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  4939. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  4940. } WMI_PKTLOG_ENABLE;
  4941. typedef struct {
  4942. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  4943. /** pdev_id for identifying the MAC
  4944. * See macros starting with WMI_PDEV_ID_ for values.
  4945. */
  4946. A_UINT32 pdev_id;
  4947. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  4948. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  4949. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  4950. typedef struct {
  4951. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  4952. /** pdev_id for identifying the MAC
  4953. * See macros starting with WMI_PDEV_ID_ for values.
  4954. */
  4955. A_UINT32 pdev_id;
  4956. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  4957. typedef struct {
  4958. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  4959. /** pdev_id for identifying the MAC
  4960. * See macros starting with WMI_PDEV_ID_ for values.
  4961. */
  4962. A_UINT32 pdev_id;
  4963. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  4964. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  4965. } wmi_mib_stats_enable_cmd_fixed_param;
  4966. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  4967. * NOTE: This constant cannot be changed without breaking
  4968. * WMI Compatibility. */
  4969. #define WMI_DSCP_MAP_MAX (64)
  4970. /*
  4971. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  4972. * @details
  4973. * Create an API for sending the custom DSCP-to-TID map to the target
  4974. * If this is a request from the user space or from above the UMAC
  4975. * then the best place to implement this is in the umac_if_offload of the OL path.
  4976. * Provide a place holder for this API in the ieee80211com (ic).
  4977. *
  4978. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  4979. * in the target should be directed to the function pointer in the ic.
  4980. *
  4981. * Implementation details of the API to send the map to the target are as described-
  4982. *
  4983. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  4984. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  4985. * 64 TID values for 2^6 (64) DSCP ids.
  4986. * Example:
  4987. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  4988. * 0, 0, 0, 0, 0, 0, 0, 0,
  4989. * 1, 1, 1, 1, 1, 1, 1, 1,
  4990. * 2, 2, 2, 2, 2, 2, 2, 2,
  4991. * 3, 3, 3, 3, 3, 3, 3, 3,
  4992. * 4, 4, 4, 4, 4, 4, 4, 4,
  4993. * 5, 5, 5, 5, 5, 5, 5, 5,
  4994. * 6, 6, 6, 6, 6, 6, 6, 6,
  4995. * 7, 7, 7, 7, 7, 7, 7, 7,
  4996. * };
  4997. *
  4998. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  4999. *
  5000. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  5001. *
  5002. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  5003. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  5004. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  5005. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  5006. *
  5007. */
  5008. /* DEPRECATED - use VDEV level command instead
  5009. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  5010. */
  5011. typedef struct {
  5012. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  5013. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5014. /* map indicating DSCP to TID conversion */
  5015. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  5016. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  5017. typedef struct {
  5018. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  5019. A_UINT32 vdev_id;
  5020. /** map indicating DSCP to TID conversion */
  5021. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  5022. A_UINT32 enable_override;
  5023. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  5024. enum WMI_WAKE_GPIO_TYPE {
  5025. WMI_WAKE_GPIO_LOW = 1,
  5026. WMI_WAKE_GPIO_HIGH = 2,
  5027. WMI_WAKE_GPIO_RISING_EDGE = 3,
  5028. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  5029. };
  5030. /**
  5031. * Set GPIO numbers used to wakeup host and wakeup target.
  5032. */
  5033. typedef struct {
  5034. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  5035. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  5036. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  5037. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  5038. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  5039. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  5040. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  5041. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  5042. * @details
  5043. * Create an API for setting the custom rate for the MCAST and BCAST frames
  5044. * in the target. If this is a request from the user space or from above the UMAC
  5045. * then the best place to implement this is in the umac_if_offload of the OL path.
  5046. * Provide a place holder for this API in the ieee80211com (ic).
  5047. *
  5048. * Implementation details of the API to set custom rates for MCAST and BCAST in
  5049. * the target are as described-
  5050. *
  5051. * 1. The function will have 3 arguments-
  5052. * vap structure,
  5053. * MCAST/ BCAST identifier code,
  5054. * 8 bit rate code
  5055. *
  5056. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5057. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5058. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5059. * b'3-b'0 indicate the rate, which is indicated as follows:
  5060. * OFDM : 0: OFDM 48 Mbps
  5061. * 1: OFDM 24 Mbps
  5062. * 2: OFDM 12 Mbps
  5063. * 3: OFDM 6 Mbps
  5064. * 4: OFDM 54 Mbps
  5065. * 5: OFDM 36 Mbps
  5066. * 6: OFDM 18 Mbps
  5067. * 7: OFDM 9 Mbps
  5068. * CCK (pream == 1)
  5069. * 0: CCK 11 Mbps Long
  5070. * 1: CCK 5.5 Mbps Long
  5071. * 2: CCK 2 Mbps Long
  5072. * 3: CCK 1 Mbps Long
  5073. * 4: CCK 11 Mbps Short
  5074. * 5: CCK 5.5 Mbps Short
  5075. * 6: CCK 2 Mbps Short
  5076. * HT/VHT (pream == 2/3)
  5077. * 0..7: MCS0..MCS7 (HT)
  5078. * 0..9: MCS0..MCS9 (VHT)
  5079. *
  5080. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  5081. * to the target.
  5082. * Arguments to the API are-
  5083. * wmi handle,
  5084. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  5085. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  5086. * rate value.
  5087. */
  5088. typedef enum {
  5089. WMI_SET_MCAST_RATE,
  5090. WMI_SET_BCAST_RATE
  5091. } MCAST_BCAST_RATE_ID;
  5092. typedef struct {
  5093. MCAST_BCAST_RATE_ID rate_id;
  5094. A_UINT32 rate;
  5095. } mcast_bcast_rate;
  5096. typedef struct {
  5097. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  5098. A_UINT32 cwmin;
  5099. A_UINT32 cwmax;
  5100. A_UINT32 aifs;
  5101. A_UINT32 txoplimit;
  5102. A_UINT32 acm;
  5103. A_UINT32 no_ack;
  5104. } wmi_wmm_params;
  5105. /* DEPRECATED - use VDEV level command instead
  5106. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  5107. */
  5108. typedef struct {
  5109. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  5110. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5111. A_UINT32 dg_type;
  5112. /* The TLVs for the 4 AC follows:
  5113. * wmi_wmm_params wmm_params_ac_be;
  5114. * wmi_wmm_params wmm_params_ac_bk;
  5115. * wmi_wmm_params wmm_params_ac_vi;
  5116. * wmi_wmm_params wmm_params_ac_vo;
  5117. */
  5118. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  5119. typedef enum {
  5120. WMI_REQUEST_PEER_STAT = 0x0001,
  5121. WMI_REQUEST_AP_STAT = 0x0002,
  5122. WMI_REQUEST_PDEV_STAT = 0x0004,
  5123. WMI_REQUEST_VDEV_STAT = 0x0008,
  5124. WMI_REQUEST_BCNFLT_STAT = 0x0010,
  5125. WMI_REQUEST_VDEV_RATE_STAT = 0x0020,
  5126. WMI_REQUEST_INST_STAT = 0x0040,
  5127. WMI_REQUEST_MIB_STAT = 0x0080,
  5128. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x0100,
  5129. WMI_REQUEST_CONGESTION_STAT = 0x0200,
  5130. WMI_REQUEST_PEER_EXTD_STAT = 0x0400,
  5131. WMI_REQUEST_BCN_STAT = 0x0800,
  5132. WMI_REQUEST_BCN_STAT_RESET = 0x1000,
  5133. } wmi_stats_id;
  5134. /*
  5135. * cfg_retry_count is set to max number of times the AP should try sending
  5136. * QoS Null frames to the STA for measuring the instantaneous RSSI
  5137. *
  5138. * retry_count is used to maintain the number of times the AP has tried sending
  5139. * QoS Null frames to the STA for measuring the instantaneous RSSI
  5140. */
  5141. typedef struct {
  5142. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  5143. A_UINT32 cfg_retry_count;
  5144. A_UINT32 retry_count;
  5145. } wmi_inst_rssi_stats_params;
  5146. typedef struct {
  5147. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  5148. wmi_stats_id stats_id;
  5149. /** unique id identifying the VDEV, generated by the caller */
  5150. A_UINT32 vdev_id;
  5151. /** peer MAC address */
  5152. wmi_mac_addr peer_macaddr;
  5153. 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. */
  5154. /*
  5155. * This TLV is (optionally) followed by other TLVs:
  5156. * wmi_inst_rssi_stats_params inst_rssi_params;
  5157. */
  5158. } wmi_request_stats_cmd_fixed_param;
  5159. /* stats type bitmap */
  5160. #define WMI_LINK_STATS_RADIO 0x00000001
  5161. #define WMI_LINK_STATS_IFACE 0x00000002
  5162. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  5163. #define WMI_LINK_STATS_PER_PEER 0x00000008
  5164. /* wifi clear statistics bitmap */
  5165. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  5166. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  5167. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  5168. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  5169. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  5170. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  5171. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  5172. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  5173. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  5174. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  5175. /** Default value for stats if the stats collection has not started */
  5176. #define WMI_STATS_VALUE_INVALID 0xffffffff
  5177. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  5178. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  5179. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  5180. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  5181. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  5182. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  5183. typedef struct {
  5184. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  5185. A_UINT32 num_of_diag_events_logs;
  5186. /* The TLVs will follow.
  5187. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  5188. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  5189. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  5190. */
  5191. } wmi_diag_event_log_config_fixed_param;
  5192. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  5193. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  5194. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  5195. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  5196. typedef struct {
  5197. A_UINT32 tlv_header;
  5198. A_UINT32 num_of_diag_events_logs;
  5199. /* The TLVs will follow.
  5200. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  5201. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  5202. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  5203. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  5204. */
  5205. } wmi_diag_event_log_supported_event_fixed_params;
  5206. typedef struct {
  5207. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  5208. A_UINT32 reserved0; /** placeholder for future */
  5209. } wmi_debug_mesg_flush_fixed_param;
  5210. typedef struct {
  5211. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  5212. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  5213. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  5214. /** reason_code1:
  5215. * The information stored in reason_code1 varies based on the data stally
  5216. * type values:
  5217. * data_stall_type | reason_code1
  5218. * -----------------------------------------------------
  5219. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  5220. * RX_REFILL_FAILED | ring_id (0-7)
  5221. * RX_FCS_LEN_ERROR | exact error type
  5222. */
  5223. A_UINT32 reason_code1;
  5224. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  5225. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  5226. } wmi_debug_mesg_fw_data_stall_param;
  5227. typedef struct {
  5228. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  5229. A_UINT32 reserved0; /** placeholder for future */
  5230. } wmi_debug_mesg_flush_complete_fixed_param;
  5231. typedef struct {
  5232. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  5233. /* vdev_id, where RSSI breach event occurred */
  5234. A_UINT32 vdev_id;
  5235. /* request id */
  5236. A_UINT32 request_id;
  5237. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  5238. A_UINT32 event_bitmap;
  5239. /* rssi at the time of RSSI breach. Unit dBm */
  5240. A_UINT32 rssi;
  5241. /* bssid of the monitored AP's */
  5242. wmi_mac_addr bssid;
  5243. } wmi_rssi_breach_event_fixed_param;
  5244. typedef struct {
  5245. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  5246. /** unique id identifying the segment */
  5247. A_UINT32 seg_id;
  5248. /** Start address of the segment to be read */
  5249. A_UINT32 seg_start_addr_lo;
  5250. A_UINT32 seg_start_addr_hi;
  5251. /** Length of the segment to be read */
  5252. A_UINT32 seg_length;
  5253. /** Host bufeer address to which the segment will be read and dumped */
  5254. A_UINT32 dest_addr_lo;
  5255. A_UINT32 dest_addr_hi;
  5256. } wmi_fw_mem_dump;
  5257. /* Command to get firmware memory dump*/
  5258. typedef struct {
  5259. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  5260. /** unique id identifying the request */
  5261. A_UINT32 request_id;
  5262. /** number of memory dump segments */
  5263. A_UINT32 num_fw_mem_dump_segs;
  5264. /**
  5265. * This TLV is followed by another TLV
  5266. * wmi_fw_mem_dump fw_mem_dump[];
  5267. */
  5268. } wmi_get_fw_mem_dump_fixed_param;
  5269. /** Event to indicate the completion of fw mem dump */
  5270. typedef struct {
  5271. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  5272. /** unique id identifying the request, given in the request stats command */
  5273. A_UINT32 request_id;
  5274. /*In case of Firmware memory dump */
  5275. A_UINT32 fw_mem_dump_complete;
  5276. } wmi_update_fw_mem_dump_fixed_param;
  5277. typedef enum {
  5278. WMI_ROAMING_IDLE = 0,
  5279. WMI_ROAMING_ACTIVE = 1,
  5280. } wmi_roam_state;
  5281. /* access categories */
  5282. typedef enum {
  5283. WMI_AC_VO = 0,
  5284. WMI_AC_VI = 1,
  5285. WMI_AC_BE = 2,
  5286. WMI_AC_BK = 3,
  5287. WMI_AC_MAX = 4,
  5288. } wmi_traffic_ac;
  5289. typedef enum {
  5290. WMI_STA_STATS = 0,
  5291. WMI_SOFTAP_STATS = 1,
  5292. WMI_IBSS_STATS = 2,
  5293. WMI_P2P_CLIENT_STATS = 3,
  5294. WMI_P2P_GO_STATS = 4,
  5295. WMI_NAN_STATS = 5,
  5296. WMI_MESH_STATS = 6,
  5297. } wmi_link_iface_type;
  5298. /* channel operating width */
  5299. typedef enum {
  5300. WMI_CHAN_WIDTH_20 = 0,
  5301. WMI_CHAN_WIDTH_40 = 1,
  5302. WMI_CHAN_WIDTH_80 = 2,
  5303. WMI_CHAN_WIDTH_160 = 3,
  5304. WMI_CHAN_WIDTH_80P80 = 4,
  5305. WMI_CHAN_WIDTH_5 = 5,
  5306. WMI_CHAN_WIDTH_10 = 6,
  5307. } wmi_channel_width;
  5308. /*Clear stats*/
  5309. typedef struct {
  5310. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  5311. /** unique id identifying the VDEV, generated by the caller */
  5312. A_UINT32 vdev_id;
  5313. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  5314. A_UINT32 stop_stats_collection_req;
  5315. /** identifies what stats to be cleared */
  5316. A_UINT32 stats_clear_req_mask;
  5317. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  5318. wmi_mac_addr peer_macaddr;
  5319. } wmi_clear_link_stats_cmd_fixed_param;
  5320. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  5321. typedef struct {
  5322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  5323. /** threshold to classify the pkts as short or long */
  5324. A_UINT32 mpdu_size_threshold;
  5325. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  5326. A_UINT32 aggressive_statistics_gathering;
  5327. } wmi_start_link_stats_cmd_fixed_param;
  5328. typedef struct {
  5329. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  5330. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  5331. A_UINT32 stats_type;
  5332. /** unique id identifying the VDEV, generated by the caller */
  5333. A_UINT32 vdev_id;
  5334. /** unique id identifying the request, generated by the caller */
  5335. A_UINT32 request_id;
  5336. /** peer MAC address */
  5337. wmi_mac_addr peer_macaddr;
  5338. } wmi_request_link_stats_cmd_fixed_param;
  5339. /* channel statistics */
  5340. typedef struct {
  5341. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  5342. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  5343. A_UINT32 channel_width;
  5344. /** Primary 20 MHz channel */
  5345. A_UINT32 center_freq;
  5346. /** center frequency (MHz) first segment */
  5347. A_UINT32 center_freq0;
  5348. /** center frequency (MHz) second segment */
  5349. A_UINT32 center_freq1;
  5350. /** msecs the radio is awake (32 bits number accruing over time) */
  5351. A_UINT32 radio_awake_time;
  5352. /** msecs the CCA register is busy (32 bits number accruing over time) */
  5353. A_UINT32 cca_busy_time;
  5354. } wmi_channel_stats;
  5355. /*
  5356. * Each step represents 0.5 dB. The starting value is 0 dBm.
  5357. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  5358. */
  5359. #define MAX_TPC_LEVELS 64
  5360. /* radio statistics */
  5361. typedef struct {
  5362. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  5363. /** Wifi radio (if multiple radio supported) */
  5364. A_UINT32 radio_id;
  5365. /** msecs the radio is awake (32 bits number accruing over time) */
  5366. A_UINT32 on_time;
  5367. /** msecs the radio is transmitting (32 bits number accruing over time) */
  5368. A_UINT32 tx_time;
  5369. /** msecs the radio is in active receive (32 bits number accruing over time) */
  5370. A_UINT32 rx_time;
  5371. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  5372. A_UINT32 on_time_scan;
  5373. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  5374. A_UINT32 on_time_nbd;
  5375. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  5376. A_UINT32 on_time_gscan;
  5377. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  5378. A_UINT32 on_time_roam_scan;
  5379. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  5380. A_UINT32 on_time_pno_scan;
  5381. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  5382. A_UINT32 on_time_hs20;
  5383. /** number of channels */
  5384. A_UINT32 num_channels;
  5385. /** tx time per TPC level - DEPRECATED
  5386. * This field is deprecated.
  5387. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  5388. */
  5389. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  5390. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  5391. A_UINT32 on_time_host_scan;
  5392. /** msecs the radio is awake due to LPI scan (accruing over time) */
  5393. A_UINT32 on_time_lpi_scan;
  5394. } wmi_radio_link_stats;
  5395. /** tx time per power level statistics */
  5396. typedef struct {
  5397. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  5398. /** total number of tx power levels */
  5399. A_UINT32 total_num_tx_power_levels;
  5400. /** number of tx power levels that are carried in this event */
  5401. A_UINT32 num_tx_power_levels;
  5402. /** offset of current stats
  5403. * If ((num_tx_power_levels + power_level_offset)) ==
  5404. * total_num_tx_power_levels)
  5405. * this message completes the report of tx time per power levels.
  5406. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  5407. * will be sent by the target to deliver the remainder of the tx time
  5408. * per power level stats.
  5409. */
  5410. A_UINT32 power_level_offset;
  5411. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  5412. A_UINT32 radio_id;
  5413. /*
  5414. * This TLV will be followed by a TLV containing a variable-length array of
  5415. * A_UINT32 with tx time per power level data
  5416. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  5417. * The tx time is in units of milliseconds.
  5418. * The power levels are board-specific values; a board-specific translation
  5419. * has to be applied to determine what actual power corresponds to each
  5420. * power level.
  5421. * Just as the host has a BDF file available, the host should also have
  5422. * a data file available that provides the power level to power translations.
  5423. */
  5424. } wmi_tx_power_level_stats_evt_fixed_param;
  5425. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  5426. typedef struct {
  5427. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5428. /** unique id identifying the request, given in the request stats command */
  5429. A_UINT32 request_id;
  5430. /** Number of radios*/
  5431. A_UINT32 num_radio;
  5432. /** more_data will be set depending on the number of radios */
  5433. A_UINT32 more_radio_events;
  5434. /*
  5435. * This TLV is followed by another TLV of array of bytes
  5436. * size of(struct wmi_radio_link_stats);
  5437. *
  5438. * This TLV is followed by another TLV of array of bytes
  5439. * num_channels * size of(struct wmi_channel_stats)
  5440. */
  5441. } wmi_radio_link_stats_event_fixed_param;
  5442. /* per rate statistics */
  5443. typedef struct {
  5444. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  5445. /** rate information
  5446. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5447. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5448. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5449. * b'3-b'0 indicate the rate, which is indicated as follows:
  5450. * OFDM : 0: OFDM 48 Mbps
  5451. * 1: OFDM 24 Mbps
  5452. * 2: OFDM 12 Mbps
  5453. * 3: OFDM 6 Mbps
  5454. * 4: OFDM 54 Mbps
  5455. * 5: OFDM 36 Mbps
  5456. * 6: OFDM 18 Mbps
  5457. * 7: OFDM 9 Mbps
  5458. * CCK (pream == 1)
  5459. * 0: CCK 11 Mbps Long
  5460. * 1: CCK 5.5 Mbps Long
  5461. * 2: CCK 2 Mbps Long
  5462. * 3: CCK 1 Mbps Long
  5463. * 4: CCK 11 Mbps Short
  5464. * 5: CCK 5.5 Mbps Short
  5465. * 6: CCK 2 Mbps Short
  5466. * HT/VHT (pream == 2/3)
  5467. * 0..7: MCS0..MCS7 (HT)
  5468. * 0..9: MCS0..MCS9 (VHT)
  5469. */
  5470. A_UINT32 rate;
  5471. /** units of 100 Kbps */
  5472. A_UINT32 bitrate;
  5473. /** number of successfully transmitted data pkts (ACK rcvd) */
  5474. A_UINT32 tx_mpdu;
  5475. /** number of received data pkts */
  5476. A_UINT32 rx_mpdu;
  5477. /** number of data packet losses (no ACK) */
  5478. A_UINT32 mpdu_lost;
  5479. /** total number of data pkt retries */
  5480. A_UINT32 retries;
  5481. /** number of short data pkt retries */
  5482. A_UINT32 retries_short;
  5483. /** number of long data pkt retries */
  5484. A_UINT32 retries_long;
  5485. } wmi_rate_stats;
  5486. typedef struct {
  5487. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  5488. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  5489. A_UINT32 peer_type;
  5490. /** mac address */
  5491. wmi_mac_addr peer_mac_address;
  5492. /** peer wmi_CAPABILITY_XXX */
  5493. A_UINT32 capabilities;
  5494. /** number of rates */
  5495. A_UINT32 num_rates;
  5496. } wmi_peer_link_stats;
  5497. /** PEER statistics (once started) reset and start afresh after each connection */
  5498. typedef struct {
  5499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  5500. /** unique id identifying the request, given in the request stats command */
  5501. A_UINT32 request_id;
  5502. /** number of peers accomidated in this particular event */
  5503. A_UINT32 num_peers;
  5504. /** Indicates the fragment number */
  5505. A_UINT32 peer_event_number;
  5506. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  5507. A_UINT32 more_data;
  5508. /**
  5509. * This TLV is followed by another TLV
  5510. * num_peers * size of(struct wmi_peer_stats)
  5511. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  5512. */
  5513. } wmi_peer_stats_event_fixed_param;
  5514. /* per access category statistics */
  5515. typedef struct {
  5516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  5517. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  5518. A_UINT32 ac_type;
  5519. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  5520. A_UINT32 tx_mpdu;
  5521. /** number of received unicast mpdus */
  5522. A_UINT32 rx_mpdu;
  5523. /** number of succesfully transmitted multicast data packets */
  5524. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  5525. A_UINT32 tx_mcast;
  5526. /** number of received multicast data packets */
  5527. A_UINT32 rx_mcast;
  5528. /** number of received unicast a-mpdus */
  5529. A_UINT32 rx_ampdu;
  5530. /** number of transmitted unicast a-mpdus */
  5531. A_UINT32 tx_ampdu;
  5532. /** number of data pkt losses (no ACK) */
  5533. A_UINT32 mpdu_lost;
  5534. /** total number of data pkt retries */
  5535. A_UINT32 retries;
  5536. /** number of short data pkt retries */
  5537. A_UINT32 retries_short;
  5538. /** number of long data pkt retries */
  5539. A_UINT32 retries_long;
  5540. /** data pkt min contention time (usecs) */
  5541. A_UINT32 contention_time_min;
  5542. /** data pkt max contention time (usecs) */
  5543. A_UINT32 contention_time_max;
  5544. /** data pkt avg contention time (usecs) */
  5545. A_UINT32 contention_time_avg;
  5546. /** num of data pkts used for contention statistics */
  5547. A_UINT32 contention_num_samples;
  5548. /** number of pending pkts */
  5549. A_UINT32 tx_pending_msdu;
  5550. } wmi_wmm_ac_stats;
  5551. /* interface statistics */
  5552. typedef struct {
  5553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  5554. /** access point beacon received count from connected AP */
  5555. A_UINT32 beacon_rx;
  5556. /** access point mgmt frames received count from connected AP (including Beacon) */
  5557. A_UINT32 mgmt_rx;
  5558. /** action frames received count */
  5559. A_UINT32 mgmt_action_rx;
  5560. /** action frames transmit count */
  5561. A_UINT32 mgmt_action_tx;
  5562. /** access Point Beacon and Management frames RSSI (averaged) */
  5563. A_UINT32 rssi_mgmt;
  5564. /** access Point Data Frames RSSI (averaged) from connected AP */
  5565. A_UINT32 rssi_data;
  5566. /** access Point ACK RSSI (averaged) from connected AP */
  5567. A_UINT32 rssi_ack;
  5568. /** number of peers */
  5569. A_UINT32 num_peers;
  5570. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  5571. A_UINT32 num_peer_events;
  5572. /** number of ac */
  5573. A_UINT32 num_ac;
  5574. /** Roaming Stat */
  5575. A_UINT32 roam_state;
  5576. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  5577. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  5578. A_UINT32 avg_bcn_spread_offset_high;
  5579. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  5580. A_UINT32 avg_bcn_spread_offset_low;
  5581. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  5582. A_UINT32 is_leaky_ap;
  5583. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  5584. A_UINT32 avg_rx_frms_leaked;
  5585. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  5586. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  5587. a data frame with PM bit set) */
  5588. A_UINT32 rx_leak_window;
  5589. A_UINT32 tx_rts_succ_cnt;
  5590. A_UINT32 tx_rts_fail_cnt;
  5591. A_UINT32 tx_ppdu_succ_cnt;
  5592. A_UINT32 tx_ppdu_fail_cnt;
  5593. /** msecs the interface is in Connected state (accruing over time) */
  5594. A_UINT32 connected_duration;
  5595. /** msecs the interface is in DisConnected state (accruing over time) */
  5596. A_UINT32 disconnected_duration;
  5597. /** msecs the interface is doing RTT ranging (accruing over time) */
  5598. A_UINT32 rtt_ranging_duration;
  5599. /** msecs the interface is in RTT responder mode (accruing over time) */
  5600. A_UINT32 rtt_responder_duration;
  5601. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  5602. A_UINT32 num_probes_tx;
  5603. /** Number of Beacon misses on this interface (accruing over time) */
  5604. A_UINT32 num_beacon_miss;
  5605. } wmi_iface_link_stats;
  5606. typedef enum {
  5607. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  5608. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  5609. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  5610. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  5611. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  5612. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  5613. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  5614. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  5615. /* Add New offload stat type here */
  5616. WMI_OFFLOAD_STATS_TYPE_MAX,
  5617. } wmi_offload_stats_type;
  5618. typedef struct {
  5619. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  5620. /** Type of offload stat. enum wmi_offload_stats_type **/
  5621. A_UINT32 type;
  5622. /** Number of (MSDUs) frames Received **/
  5623. A_UINT32 rx_count;
  5624. /** Number of frames Dropped **/
  5625. A_UINT32 drp_count;
  5626. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  5627. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  5628. A_UINT32 fwd_count;
  5629. } wmi_iface_offload_stats;
  5630. /** Interface statistics (once started) reset and start afresh after each connection */
  5631. typedef struct {
  5632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  5633. /** unique id identifying the request, given in the request stats command */
  5634. A_UINT32 request_id;
  5635. /** unique id identifying the VDEV, generated by the caller */
  5636. A_UINT32 vdev_id;
  5637. /** Number of offload stats **/
  5638. A_UINT32 num_offload_stats;
  5639. /*
  5640. * This TLV is followed by other TLVs:
  5641. * wmi_iface_link_stats iface_link_stats;
  5642. * num_ac * size of(struct wmi_wmm_ac_stats)
  5643. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  5644. */
  5645. } wmi_iface_link_stats_event_fixed_param;
  5646. /** Suspend option */
  5647. enum {
  5648. WMI_PDEV_SUSPEND, /* suspend */
  5649. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  5650. };
  5651. typedef struct {
  5652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  5653. /* suspend option sent to target */
  5654. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5655. A_UINT32 suspend_opt;
  5656. } wmi_pdev_suspend_cmd_fixed_param;
  5657. typedef struct {
  5658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  5659. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5660. } wmi_pdev_resume_cmd_fixed_param;
  5661. typedef struct {
  5662. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  5663. A_UINT32 num_vdev_stats; /* number of vdevs */
  5664. } wmi_vdev_rate_stats_event_fixed_param;
  5665. typedef struct {
  5666. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  5667. A_UINT32 vdevid; /* Id of the wlan vdev*/
  5668. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  5669. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  5670. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  5671. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  5672. } wmi_vdev_rate_ht_info;
  5673. typedef struct {
  5674. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  5675. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  5676. } wmi_rx_aggr_failure_event_fixed_param;
  5677. typedef struct {
  5678. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  5679. A_UINT32 start_seq; /* start sequence number of the hole */
  5680. A_UINT32 end_seq; /* end sequence number of the hole */
  5681. } wmi_rx_aggr_failure_info;
  5682. typedef struct {
  5683. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5684. wmi_stats_id stats_id;
  5685. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  5686. A_UINT32 num_pdev_stats;
  5687. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  5688. A_UINT32 num_vdev_stats;
  5689. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  5690. A_UINT32 num_peer_stats;
  5691. A_UINT32 num_bcnflt_stats;
  5692. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  5693. A_UINT32 num_chan_stats;
  5694. /** number of MIB stats event structures (wmi_mib_stats) */
  5695. A_UINT32 num_mib_stats;
  5696. 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. */
  5697. /** number of beacon stats event structures (wmi_bcn_stats) */
  5698. A_UINT32 num_bcn_stats;
  5699. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  5700. A_UINT32 num_peer_extd_stats;
  5701. /* This TLV is followed by another TLV of array of bytes
  5702. * A_UINT8 data[];
  5703. * This data array contains
  5704. * num_pdev_stats * size of(struct wmi_pdev_stats)
  5705. * num_vdev_stats * size of(struct wmi_vdev_stats)
  5706. * num_peer_stats * size of(struct wmi_peer_stats)
  5707. * num_bcnflt_stats * size_of()
  5708. * num_chan_stats * size of(struct wmi_chan_stats)
  5709. * num_mib_stats * size of(struct wmi_mib_stats)
  5710. * num_bcn_stats * size of(struct wmi_bcn_stats)
  5711. */
  5712. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  5713. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  5714. * following the information elements listed above.
  5715. */
  5716. } wmi_stats_event_fixed_param;
  5717. /* WLAN channel CCA stats bitmap */
  5718. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  5719. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  5720. #define WLAN_STATS_TX_TIME_SHIFT 1
  5721. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  5722. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  5723. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  5724. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  5725. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  5726. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  5727. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  5728. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  5729. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  5730. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  5731. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  5732. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  5733. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  5734. /* WLAN peer signal stats bitmap */
  5735. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  5736. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  5737. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  5738. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  5739. /* WLAN TX stats bitmap */
  5740. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  5741. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  5742. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  5743. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  5744. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  5745. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  5746. #define WLAN_STATS_TX_BYTES_SHIFT 3
  5747. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  5748. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  5749. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  5750. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  5751. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  5752. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  5753. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  5754. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  5755. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  5756. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  5757. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  5758. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  5759. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  5760. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  5761. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  5762. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  5763. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  5764. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  5765. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  5766. /* WLAN RX stats bitmap */
  5767. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  5768. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  5769. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  5770. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  5771. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  5772. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  5773. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  5774. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  5775. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  5776. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  5777. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  5778. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  5779. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  5780. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  5781. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  5782. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  5783. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  5784. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  5785. #define WLAN_STATS_RX_MCS_SHIFT 9
  5786. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  5787. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  5788. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  5789. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  5790. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  5791. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  5792. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  5793. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  5794. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  5795. typedef struct
  5796. {
  5797. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  5798. A_UINT32 vdev_id;
  5799. /** Percentage of idle time, no TX, no RX, no interference */
  5800. A_UINT32 idle_time;
  5801. /** Percentage of time transmitting packets */
  5802. A_UINT32 tx_time;
  5803. /** Percentage of time receiving packets in current BSSs */
  5804. A_UINT32 rx_in_bss_time;
  5805. /** Percentage of time receiving packets not in current BSSs */
  5806. A_UINT32 rx_out_bss_time;
  5807. /** Percentage of time interference detected. */
  5808. A_UINT32 rx_busy_time;
  5809. /** Percentage of time receiving packets with errors
  5810. * or packets flagged as retransmission or seqnum discontinued. */
  5811. A_UINT32 rx_in_bad_cond_time;
  5812. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  5813. A_UINT32 tx_in_bad_cond_time;
  5814. /** Percentage of time the chip is unable to work in normal conditions. */
  5815. A_UINT32 wlan_not_avail_time;
  5816. } wmi_chan_cca_stats;
  5817. /** Thresholds of cca stats, stands for percentages of stats variation.
  5818. * Check wmi_chan_cca_stats for each stats's meaning.
  5819. */
  5820. typedef struct
  5821. {
  5822. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  5823. A_UINT32 idle_time; /* units = percent */
  5824. A_UINT32 tx_time; /* units = percent */
  5825. A_UINT32 rx_in_bss_time; /* units = percent */
  5826. A_UINT32 rx_out_bss_time; /* units = percent */
  5827. A_UINT32 rx_busy_time; /* units = percent */
  5828. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  5829. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  5830. A_UINT32 wlan_not_avail_time; /* units = percent */
  5831. } wmi_chan_cca_stats_thresh;
  5832. typedef struct
  5833. {
  5834. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  5835. A_UINT32 vdev_id;
  5836. A_UINT32 peer_id;
  5837. /** per chain SNR in current bss, units are dB */
  5838. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  5839. /** per chain background noise, units are dBm */
  5840. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  5841. /** per antenna rx MPDUs */
  5842. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  5843. /** per antenna tx MPDUs */
  5844. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  5845. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  5846. A_UINT32 num_chains_valid;
  5847. } wmi_peer_signal_stats;
  5848. /** Thresholds of signal stats, stand for percentage of stats variation.
  5849. * Check wmi_peer_signal_stats for each stats's meaning.
  5850. */
  5851. typedef struct
  5852. {
  5853. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  5854. A_UINT32 per_chain_snr; /* units = dB */
  5855. A_UINT32 per_chain_nf; /* units = dBm */
  5856. } wmi_peer_signal_stats_thresh;
  5857. typedef struct
  5858. {
  5859. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  5860. /** Number of total TX MSDUs on MAC layer in the period */
  5861. A_UINT32 tx_msdu_cnt;
  5862. /** Number of total TX MPDUs on MAC layer in the period */
  5863. A_UINT32 tx_mpdu_cnt;
  5864. /** Number of total TX PPDUs on MAC layer in the period */
  5865. A_UINT32 tx_ppdu_cnt;
  5866. /** Bytes of tx data on MAC layer in the period */
  5867. A_UINT32 tx_bytes;
  5868. /** Number of TX MSDUs cancelled due to any reason in the period,
  5869. * such as WMM limitation/bandwidth limitation/radio congestion */
  5870. A_UINT32 tx_msdu_drop_cnt;
  5871. /** Bytes of dropped TX packets in the period */
  5872. A_UINT32 tx_drop_bytes;
  5873. /** Number of unacked transmissions of MPDUs */
  5874. A_UINT32 tx_mpdu_retry_cnt;
  5875. /** Number of MPDUs have not been ACKed despite retried */
  5876. A_UINT32 tx_mpdu_fail_cnt;
  5877. /** Number of PPDUs which received no block ack */
  5878. A_UINT32 tx_ppdu_fail_cnt;
  5879. /* This TLV is followed by TLVs below: :
  5880. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  5881. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  5882. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  5883. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  5884. */
  5885. } wmi_tx_stats;
  5886. /** Thresholds of tx stats, stand for percentage of stats variation.
  5887. * Check wmi_tx_stats for each stats's meaning.
  5888. */
  5889. typedef struct
  5890. {
  5891. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  5892. A_UINT32 tx_msdu_cnt;
  5893. A_UINT32 tx_mpdu_cnt;
  5894. A_UINT32 tx_ppdu_cnt;
  5895. A_UINT32 tx_bytes;
  5896. A_UINT32 tx_msdu_drop_cnt;
  5897. A_UINT32 tx_drop_bytes;
  5898. A_UINT32 tx_mpdu_retry_cnt;
  5899. A_UINT32 tx_mpdu_fail_cnt;
  5900. A_UINT32 tx_ppdu_fail_cnt;
  5901. A_UINT32 tx_mpdu_aggr;
  5902. A_UINT32 tx_succ_mcs;
  5903. A_UINT32 tx_fail_mcs;
  5904. A_UINT32 tx_ppdu_delay;
  5905. } wmi_tx_stats_thresh;
  5906. typedef struct
  5907. {
  5908. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  5909. A_UINT32 vdev_id;
  5910. A_UINT32 peer_id;
  5911. /* The TLVs for the 4 AC follows:
  5912. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  5913. */
  5914. } wmi_peer_ac_tx_stats;
  5915. typedef struct
  5916. {
  5917. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  5918. /** Number of RX MPDUs on MAC layer */
  5919. A_UINT32 mac_rx_mpdu_cnt;
  5920. /** Bytes of RX packets on MAC layer */
  5921. A_UINT32 mac_rx_bytes;
  5922. /** Number of RX PPDU on PHY layer */
  5923. A_UINT32 phy_rx_ppdu_cnt;
  5924. /** Bytes of RX packets on PHY layer */
  5925. A_UINT32 phy_rx_bytes;
  5926. /** Number of discontinuity in seqnum */
  5927. A_UINT32 rx_disorder_cnt;
  5928. /** Number of RX MPDUs flagged as retransmissions */
  5929. A_UINT32 rx_mpdu_retry_cnt;
  5930. /** Number of RX MPDUs identified as duplicates */
  5931. A_UINT32 rx_mpdu_dup_cnt;
  5932. /** Number of RX MPDUs discarded */
  5933. A_UINT32 rx_mpdu_discard_cnt;
  5934. /* This TLV is followed by TLVs below:
  5935. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  5936. * A_UINT32 rx_mcs[rx_mcs_array_len];
  5937. */
  5938. } wmi_rx_stats;
  5939. /** Thresholds of rx stats, stands for percentage of stats variation.
  5940. * Check wmi_rx_stats for each stats's meaning.
  5941. */
  5942. typedef struct
  5943. {
  5944. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  5945. A_UINT32 mac_rx_mpdu_cnt;
  5946. A_UINT32 mac_rx_bytes;
  5947. A_UINT32 phy_rx_ppdu_cnt;
  5948. A_UINT32 phy_rx_bytes;
  5949. A_UINT32 rx_disorder_cnt;
  5950. A_UINT32 rx_mpdu_retry_cnt;
  5951. A_UINT32 rx_mpdu_dup_cnt;
  5952. A_UINT32 rx_mpdu_discard_cnt;
  5953. A_UINT32 rx_mpdu_aggr;
  5954. A_UINT32 rx_mcs;
  5955. A_UINT32 sta_ps_inds;
  5956. A_UINT32 sta_ps_durs;
  5957. A_UINT32 rx_probe_reqs;
  5958. A_UINT32 rx_oth_mgmts;
  5959. } wmi_rx_stats_thresh;
  5960. typedef struct
  5961. {
  5962. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  5963. A_UINT32 vdev_id;
  5964. A_UINT32 peer_id;
  5965. /** How many times STAs go to sleep */
  5966. A_UINT32 sta_ps_inds;
  5967. /** Total sleep time of STAs, milliseconds units */
  5968. A_UINT32 sta_ps_durs;
  5969. /** Number of probe requests received */
  5970. A_UINT32 rx_probe_reqs;
  5971. /** Number of other management frames received, not including probe requests */
  5972. A_UINT32 rx_oth_mgmts;
  5973. /* The TLVs for the 4 AC follows:
  5974. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  5975. */
  5976. } wmi_peer_ac_rx_stats;
  5977. typedef struct
  5978. {
  5979. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  5980. /*
  5981. * This struct provides the timestamps from a low-frequency timer
  5982. * for the start and end of a stats period.
  5983. * Each timestamp is reported twice, with different units.
  5984. * The _msec timestamp is in millisecond units.
  5985. * The _count timestamp is in clock tick units.
  5986. * The timestamp is reported in clock ticks as well as in milliseconds
  5987. * so that if the stats start and end times fall within the same
  5988. * millisecond, the clock tick timestamps can still be used to
  5989. * determine what fraction of a millisecond the stats period occupied.
  5990. */
  5991. A_UINT32 start_low_freq_msec;
  5992. A_UINT32 start_low_freq_count;
  5993. A_UINT32 end_low_freq_msec;
  5994. A_UINT32 end_low_freq_count;
  5995. } wmi_stats_period;
  5996. typedef enum {
  5997. /** Periodic timer timed out, based on the period specified
  5998. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  5999. */
  6000. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  6001. /** Any of the (enabled) stats thresholds specified
  6002. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  6003. * within the current stats period.
  6004. */
  6005. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  6006. /** In Response to the one-time wlan stats request of
  6007. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  6008. */
  6009. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  6010. } wmi_report_stats_event_trigger_cond_id;
  6011. typedef struct {
  6012. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  6013. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  6014. A_UINT32 trigger_cond_id;
  6015. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  6016. A_UINT32 cca_chgd_bitmap;
  6017. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  6018. A_UINT32 sig_chgd_bitmap;
  6019. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  6020. A_UINT32 tx_chgd_bitmap;
  6021. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  6022. A_UINT32 rx_chgd_bitmap;
  6023. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  6024. A_UINT32 num_chan_cca_stats;
  6025. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  6026. A_UINT32 num_peer_signal_stats;
  6027. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  6028. A_UINT32 num_peer_ac_tx_stats;
  6029. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  6030. * The array indicates number of MPDUs sent on specified aggregation size
  6031. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  6032. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  6033. A_UINT32 tx_mpdu_aggr_array_len;
  6034. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  6035. * The array indicates number of acked PPDUs sent at a specific rate */
  6036. A_UINT32 tx_succ_mcs_array_len;
  6037. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  6038. * The array indicates number of unacked PPDUs sent at a specific rate */
  6039. A_UINT32 tx_fail_mcs_array_len;
  6040. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  6041. * The array counts numbers of PPDUs encountering different TX time delays.
  6042. * TX delay here means time interval between the time a PPDU is queued
  6043. * to the MAC HW for transmission and the time the lower layers of
  6044. * tx FW return a tx status.
  6045. *
  6046. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  6047. * each bin of the tx_ppdu_delay histogram represents.
  6048. * By default the bin size is 10ms.
  6049. * tx_ppdu_delay[0] -> delays between 0-9 ms
  6050. * tx_ppdu_delay[1] -> delays between 10-19 ms
  6051. * ...
  6052. * tx_ppdu_delay[9] -> delays between 90-99 ms
  6053. * tx_ppdu_delay[10] -> delays >= 100 ms
  6054. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  6055. */
  6056. A_UINT32 tx_ppdu_delay_bin_size_ms;
  6057. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  6058. A_UINT32 tx_ppdu_delay_array_len;
  6059. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  6060. A_UINT32 num_peer_ac_rx_stats;
  6061. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  6062. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  6063. A_UINT32 rx_mpdu_aggr_array_len;
  6064. /** Array size of rx_mcs[] which is histogram of encoding rate.
  6065. * The array indicates number of PPDUs received at a specific rate */
  6066. A_UINT32 rx_mcs_array_len;
  6067. /** Array size of stats_period[] which contains several stats periods. */
  6068. A_UINT32 stats_period_array_len;
  6069. /**
  6070. * This TLV is followed by TLVs below:
  6071. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  6072. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  6073. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  6074. * 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)
  6075. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  6076. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  6077. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  6078. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  6079. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  6080. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  6081. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  6082. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  6083. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  6084. * 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)
  6085. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  6086. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  6087. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  6088. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  6089. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  6090. **/
  6091. } wmi_report_stats_event_fixed_param;
  6092. typedef struct {
  6093. /** TLV tag and len; tag equals
  6094. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  6095. A_UINT32 tlv_header;
  6096. /** peer MAC address */
  6097. wmi_mac_addr peer_macaddr;
  6098. /** bytes (size of MPDUs) transmitted to this peer */
  6099. struct {
  6100. /* lower 32 bits of the tx_bytes value */
  6101. A_UINT32 low_32;
  6102. /* upper 32 bits of the tx_bytes value */
  6103. A_UINT32 high_32;
  6104. } tx_bytes;
  6105. /** packets (MSDUs) transmitted to this peer */
  6106. struct {
  6107. /* lower 32 bits of the tx_packets value */
  6108. A_UINT32 low_32;
  6109. /* upper 32 bits of the tx_packets value */
  6110. A_UINT32 high_32;
  6111. } tx_packets;
  6112. /** bytes (size of MPDUs) received from this peer */
  6113. struct {
  6114. /* lower 32 bits of the rx_bytes value */
  6115. A_UINT32 low_32;
  6116. /* upper 32 bits of the rx_bytes value */
  6117. A_UINT32 high_32;
  6118. } rx_bytes;
  6119. /** packets (MSDUs) received from this peer */
  6120. struct {
  6121. /* lower 32 bits of the rx_packets value */
  6122. A_UINT32 low_32;
  6123. /* upper 32 bits of the rx_packets value */
  6124. A_UINT32 high_32;
  6125. } rx_packets;
  6126. /** cumulative retry counts (MPDUs) */
  6127. A_UINT32 tx_retries;
  6128. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  6129. A_UINT32 tx_failed;
  6130. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  6131. * (in format of 0x1000RRRR)
  6132. * The rate-code is a 4-bytes field in which,
  6133. * for given rate, nss and preamble
  6134. *
  6135. * b'31-b'29 unused / reserved
  6136. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  6137. * b'27-b'11 unused / reserved
  6138. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  6139. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  6140. * b'4-b'0 indicate the rate, which is indicated as follows:
  6141. * OFDM : 0: OFDM 48 Mbps
  6142. * 1: OFDM 24 Mbps
  6143. * 2: OFDM 12 Mbps
  6144. * 3: OFDM 6 Mbps
  6145. * 4: OFDM 54 Mbps
  6146. * 5: OFDM 36 Mbps
  6147. * 6: OFDM 18 Mbps
  6148. * 7: OFDM 9 Mbps
  6149. * CCK (pream == 1)
  6150. * 0: CCK 11 Mbps Long
  6151. * 1: CCK 5.5 Mbps Long
  6152. * 2: CCK 2 Mbps Long
  6153. * 3: CCK 1 Mbps Long
  6154. * 4: CCK 11 Mbps Short
  6155. * 5: CCK 5.5 Mbps Short
  6156. * 6: CCK 2 Mbps Short
  6157. * HT/VHT (pream == 2/3)
  6158. * 0..7: MCS0..MCS7 (HT)
  6159. * 0..9: MCS0..MCS9 (11AC VHT)
  6160. * 0..11: MCS0..MCS11 (11AX VHT)
  6161. */
  6162. /** rate-code of the last transmission */
  6163. A_UINT32 last_tx_rate_code;
  6164. /** rate-code of the last received PPDU */
  6165. A_UINT32 last_rx_rate_code;
  6166. /** bitrate of the last transmission, in units of kbps */
  6167. A_UINT32 last_tx_bitrate_kbps;
  6168. /** bitrate of the last received PPDU, in units of kbps */
  6169. A_UINT32 last_rx_bitrate_kbps;
  6170. /** combined RSSI of the last received PPDU, in unit of dBm */
  6171. A_INT32 peer_rssi;
  6172. } wmi_peer_stats_info;
  6173. typedef struct {
  6174. /** TLV tag and len; tag equals
  6175. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  6176. A_UINT32 tlv_header;
  6177. /** VDEV to which the peers belong to */
  6178. A_UINT32 vdev_id;
  6179. /** number of peers in peer_stats_info[] */
  6180. A_UINT32 num_peers;
  6181. /** flag to indicate if there are more peers which will
  6182. * be sent a following seperate peer_stats_info event */
  6183. A_UINT32 more_data;
  6184. /* This TLV is followed by another TLV of array of structs
  6185. * wmi_peer_stats_info peer_stats_info[];
  6186. */
  6187. } wmi_peer_stats_info_event_fixed_param;
  6188. typedef struct {
  6189. /** TLV tag and len; tag equals
  6190. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  6191. A_UINT32 tlv_header;
  6192. /** primary channel freq of the channel whose stats is sent */
  6193. A_UINT32 chan_mhz;
  6194. /** accumulation of time the radio is tuned to this channel,
  6195. * in units of microseconds */
  6196. A_UINT32 on_chan_us;
  6197. /** accumulation of the TX PPDU duration over the measurement period,
  6198. * in units of microseconds */
  6199. A_UINT32 tx_duration_us;
  6200. /** accumulation of the RX PPDU duration over the measurement period,
  6201. * in units of microseconds */
  6202. A_UINT32 rx_duration_us;
  6203. /** ratio of channel busy time to on_chan_us, in units of percent */
  6204. A_UINT32 chan_busy_ratio;
  6205. /** ratio of on_chan_us to the measurement period, in units of percent */
  6206. A_UINT32 on_chan_ratio;
  6207. /** measurement period, in units of microseconds */
  6208. A_UINT32 measurement_period_us;
  6209. /** MPDUs transmitted on this channel */
  6210. A_UINT32 tx_mpdus;
  6211. /** MSDUs transmitted on this channel */
  6212. A_UINT32 tx_msdus;
  6213. /** MPDUS successfully received on this channel */
  6214. A_UINT32 rx_succ_mpdus;
  6215. /** Failed MPDUs (CRC failures) received on this channel */
  6216. A_UINT32 rx_fail_mpdus;
  6217. } wmi_radio_chan_stats;
  6218. typedef struct {
  6219. /** TLV tag and len; tag equals
  6220. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  6221. A_UINT32 tlv_header;
  6222. /** number of channel stats in radio_chan_stats[] */
  6223. A_UINT32 num_chans;
  6224. /* This TLV is followed by another TLV of array of structs
  6225. * wmi_radio_chan_stats radio_chan_stats[];
  6226. */
  6227. } wmi_radio_chan_stats_event_fixed_param;
  6228. /**
  6229. * PDEV statistics
  6230. * @todo
  6231. * add all PDEV stats here
  6232. */
  6233. typedef struct {
  6234. /** Channel noise floor */
  6235. A_INT32 chan_nf;
  6236. /** TX frame count */
  6237. A_UINT32 tx_frame_count;
  6238. /** RX frame count */
  6239. A_UINT32 rx_frame_count;
  6240. /** rx clear count */
  6241. A_UINT32 rx_clear_count;
  6242. /** cycle count */
  6243. A_UINT32 cycle_count;
  6244. /** Phy error count */
  6245. A_UINT32 phy_err_count;
  6246. /** Channel Tx Power */
  6247. A_UINT32 chan_tx_pwr;
  6248. /** WAL dbg stats */
  6249. struct wlan_dbg_stats pdev_stats;
  6250. } wmi_pdev_stats;
  6251. /**
  6252. * VDEV statistics
  6253. * @todo
  6254. * add all VDEV stats here
  6255. */
  6256. typedef struct {
  6257. A_INT32 bcn_snr;
  6258. A_INT32 dat_snr;
  6259. } wmi_snr_info;
  6260. typedef struct {
  6261. /** unique id identifying the VDEV, generated by the caller */
  6262. A_UINT32 vdev_id;
  6263. wmi_snr_info vdev_snr;
  6264. 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) */
  6265. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  6266. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  6267. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  6268. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  6269. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  6270. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  6271. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  6272. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  6273. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  6274. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  6275. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  6276. } wmi_vdev_stats;
  6277. /*
  6278. * vdev ext stats with additonal bcn stats
  6279. * (Due to backward compatiblity requirements, these new stats fields cannot be
  6280. * added inside wmi_vdev_stats.)
  6281. */
  6282. typedef struct {
  6283. A_UINT32 vdev_id;
  6284. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  6285. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  6286. } wmi_bcn_stats;
  6287. /**
  6288. * peer statistics.
  6289. */
  6290. typedef struct {
  6291. /** peer MAC address */
  6292. wmi_mac_addr peer_macaddr;
  6293. /** rssi */
  6294. A_UINT32 peer_rssi;
  6295. /** last tx data rate used for peer */
  6296. A_UINT32 peer_tx_rate;
  6297. /** last rx data rate used for peer */
  6298. A_UINT32 peer_rx_rate;
  6299. } wmi_peer_stats;
  6300. /**
  6301. * Peer extension statistics
  6302. */
  6303. typedef struct {
  6304. /** peer MAC address */
  6305. wmi_mac_addr peer_macaddr;
  6306. /* rx duration in microseconds*/
  6307. A_UINT32 rx_duration;
  6308. /** Total TX bytes (including dot11 header) sent to peer */
  6309. A_UINT32 peer_tx_bytes;
  6310. /** Total RX bytes (including dot11 header) received from peer */
  6311. A_UINT32 peer_rx_bytes;
  6312. /** last TX ratecode */
  6313. A_UINT32 last_tx_rate_code;
  6314. /** TX power used by peer - units are 0.5 dBm */
  6315. A_INT32 last_tx_power;
  6316. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  6317. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  6318. A_UINT32 reserved[3]; /** for future use - add new peer stats here */
  6319. } wmi_peer_extd_stats;
  6320. typedef struct {
  6321. /** Primary channel freq of the channel for which stats are sent */
  6322. A_UINT32 chan_mhz;
  6323. /** Time spent on the channel */
  6324. A_UINT32 sampling_period_us;
  6325. /** Aggregate duration over a sampling period for which channel activity was observed */
  6326. A_UINT32 rx_clear_count;
  6327. /** Accumalation of the TX PPDU duration over a sampling period */
  6328. A_UINT32 tx_duration_us;
  6329. /** Accumalation of the RX PPDU duration over a sampling period */
  6330. A_UINT32 rx_duration_us;
  6331. } wmi_chan_stats;
  6332. typedef struct {
  6333. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  6334. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  6335. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  6336. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  6337. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  6338. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  6339. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  6340. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  6341. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  6342. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  6343. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  6344. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  6345. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  6346. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  6347. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  6348. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  6349. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  6350. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  6351. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  6352. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  6353. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  6354. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  6355. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  6356. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  6357. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  6358. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  6359. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  6360. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  6361. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  6362. union {
  6363. A_UINT64 counter; /* for use by target only */
  6364. struct {
  6365. A_UINT32 low;
  6366. A_UINT32 high;
  6367. } upload; /* for use by host */
  6368. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  6369. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  6370. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  6371. union {
  6372. A_UINT64 counter; /* for use by target only */
  6373. struct {
  6374. A_UINT32 rx_octets_in_ampdu_low;
  6375. A_UINT32 rx_octets_in_ampdu_high;
  6376. } upload; /* for use by host */
  6377. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  6378. A_UINT32 reserved_1;
  6379. A_UINT32 reserved_2;
  6380. A_UINT32 reserved_3;
  6381. A_UINT32 reserved_4;
  6382. } wmi_mib_stats;
  6383. typedef struct {
  6384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  6385. A_UINT32 vdev_id;
  6386. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  6387. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  6388. wmi_mac_addr peer_macaddr;
  6389. } wmi_rssi_stats;
  6390. typedef struct {
  6391. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  6392. A_UINT32 vdev_id;
  6393. /* congestion -
  6394. * This field holds the congestion percentage = (busy_time/total_time)*100
  6395. * for the interval from when the vdev was started to the current time
  6396. * (or the time at which the vdev was stopped).
  6397. */
  6398. A_UINT32 congestion;
  6399. } wmi_congestion_stats;
  6400. typedef struct {
  6401. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  6402. A_UINT32 num_per_chain_rssi_stats;
  6403. /* This TLV is followed by another TLV of array of structs:
  6404. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  6405. */
  6406. } wmi_per_chain_rssi_stats;
  6407. /* vdev control flags (per bits) */
  6408. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  6409. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  6410. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  6411. typedef struct {
  6412. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  6413. /** unique id identifying the VDEV, generated by the caller */
  6414. A_UINT32 vdev_id;
  6415. /** VDEV type (AP,STA,IBSS,MONITOR) */
  6416. A_UINT32 vdev_type;
  6417. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  6418. A_UINT32 vdev_subtype;
  6419. /** VDEV MAC address */
  6420. wmi_mac_addr vdev_macaddr;
  6421. /** Number of configured txrx streams */
  6422. A_UINT32 num_cfg_txrx_streams;
  6423. /**
  6424. * pdev_id for identifying the MAC,
  6425. * See macros starting with WMI_PDEV_ID_ for values.
  6426. */
  6427. A_UINT32 pdev_id;
  6428. /** control flags for this vdev */
  6429. A_UINT32 flags;
  6430. /** vdevid of transmitted AP (mbssid case) */
  6431. A_UINT32 vdevid_trans;
  6432. /* This TLV is followed by another TLV of array of structures
  6433. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  6434. */
  6435. } wmi_vdev_create_cmd_fixed_param;
  6436. typedef struct {
  6437. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  6438. /* band - Should take values from wmi_channel_band_mask */
  6439. A_UINT32 band;
  6440. /* max supported tx streams per given band for this vdev */
  6441. A_UINT32 supported_tx_streams;
  6442. /* max supported rx streams per given band for this vdev */
  6443. A_UINT32 supported_rx_streams;
  6444. } wmi_vdev_txrx_streams;
  6445. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  6446. typedef struct {
  6447. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  6448. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  6449. A_UINT32 duration; /** Absent period duration in micro seconds */
  6450. A_UINT32 interval; /** Absent period interval in micro seconds */
  6451. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  6452. } wmi_p2p_noa_descriptor;
  6453. /** values for vdev_type */
  6454. #define WMI_VDEV_TYPE_AP 0x1
  6455. #define WMI_VDEV_TYPE_STA 0x2
  6456. #define WMI_VDEV_TYPE_IBSS 0x3
  6457. #define WMI_VDEV_TYPE_MONITOR 0x4
  6458. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  6459. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  6460. * operations like Network discovery, service provisioning and service
  6461. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  6462. * WMI command to create this VDEV once during initialization and host is not
  6463. * expected to use any VDEV specific WMI commands on this VDEV.
  6464. **/
  6465. #define WMI_VDEV_TYPE_NAN 0x5
  6466. #define WMI_VDEV_TYPE_OCB 0x6
  6467. /* NAN Data Interface */
  6468. #define WMI_VDEV_TYPE_NDI 0x7
  6469. /*
  6470. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  6471. * which are used in 11ax systems
  6472. */
  6473. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  6474. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  6475. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  6476. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  6477. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  6478. /*
  6479. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  6480. * which are used in 11ax systems
  6481. */
  6482. #define WMI_HE_LTF_DEFAULT 0x0
  6483. #define WMI_HE_LTF_1X 0x1
  6484. #define WMI_HE_LTF_2X 0x2
  6485. #define WMI_HE_LTF_4X 0x3
  6486. /** values for vdev_subtype */
  6487. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  6488. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  6489. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  6490. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  6491. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  6492. /* new subtype for 11S mesh is required as 11S functionality differs
  6493. * in many ways from proprietary mesh
  6494. * 11S uses 6-addr frame format and supports peering between mesh
  6495. * stations and dynamic best path selection between mesh stations.
  6496. * While in proprietary mesh, neighboring mesh station MAC is manually
  6497. * added to AST table for traffic flow between mesh stations
  6498. */
  6499. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  6500. /** values for vdev_start_request flags */
  6501. /** Indicates that AP VDEV uses hidden ssid. only valid for
  6502. * AP/GO */
  6503. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  6504. /** Indicates if robust management frame/management frame
  6505. * protection is enabled. For GO/AP vdevs, it indicates that
  6506. * it may support station/client associations with RMF enabled.
  6507. * For STA/client vdevs, it indicates that sta will
  6508. * associate with AP with RMF enabled. */
  6509. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  6510. /*
  6511. * Host is sending bcn_tx_rate to override the beacon tx rates.
  6512. */
  6513. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  6514. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  6515. * of assoc request/response
  6516. */
  6517. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  6518. /* BSS color 0-6 */
  6519. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  6520. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  6521. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  6522. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  6523. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  6524. /* TWT required */
  6525. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  6526. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  6527. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  6528. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  6529. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  6530. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  6531. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  6532. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  6533. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  6534. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  6535. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  6536. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  6537. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  6538. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  6539. /* MAX BSS supported by MultiBSS element */
  6540. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  6541. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  6542. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  6543. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  6544. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  6545. /* when set to 1 disables use of BSS color */
  6546. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  6547. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  6548. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  6549. /* When set to 1 HE AP transmits beacons using two PHY formats,
  6550. * one in non-HE format and other in an HE_EXT_SU PHY format
  6551. */
  6552. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  6553. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  6554. #define WMI_MAX_HECAP_PHY_SIZE (3)
  6555. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  6556. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  6557. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  6558. /*
  6559. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  6560. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  6561. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  6562. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  6563. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  6564. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  6565. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  6566. * 242-tone RU mapping in 40 MHz and 80
  6567. * MHz channel width in 5 GHz. Otherwise Reserved.
  6568. * B6: Reserved
  6569. */
  6570. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  6571. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  6572. /*
  6573. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6574. * where in the preamble only the secondary 20 MHz is punctured
  6575. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6576. * where in the preamble only one of the two 20 MHz sub-channels in the
  6577. * secondary 40 MHz is punctured
  6578. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  6579. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  6580. * secondary 20 MHz is punctured
  6581. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  6582. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  6583. * primary 40 MHz is present
  6584. */
  6585. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  6586. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  6587. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  6588. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  6589. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  6590. /* Indicates support of transmission and reception of LDPC encoded packets */
  6591. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  6592. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  6593. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6594. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  6595. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  6596. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6597. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  6598. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  6599. /*
  6600. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  6601. */
  6602. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  6603. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  6604. /*
  6605. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  6606. * time streams supported for reception when midamble is used in the Data field.
  6607. */
  6608. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  6609. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  6610. /*
  6611. * B0: For a transmitting STA acting as beamformee, it indicates support of
  6612. * NDP reception using 4x LTF and 3.2 us guard interval duration
  6613. */
  6614. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  6615. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  6616. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  6617. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  6618. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  6619. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  6620. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  6621. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  6622. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  6623. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  6624. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  6625. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  6626. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  6627. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  6628. /*
  6629. * If the transmitting STA is an AP:
  6630. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  6631. * transmission.
  6632. * If the transmitting STA is a non-AP STA:
  6633. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  6634. * transmission.
  6635. */
  6636. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  6637. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  6638. /*
  6639. * If the transmitting STA is an AP:
  6640. * indicates STA supports of reception of UL MUMIMO transmission on an
  6641. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6642. * If the transmitting STA is a non-AP STA:
  6643. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  6644. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6645. */
  6646. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  6647. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  6648. /* Tx DCM
  6649. * B0:B1
  6650. * 00: Does not support DCM
  6651. * 01: BPSK
  6652. * 10: QPSK
  6653. * 11: 16-QAM
  6654. * B2 signals maximum number of spatial streams with DCM
  6655. * 0: 1 spatial stream
  6656. * 1: 2 spatial streams
  6657. */
  6658. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  6659. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  6660. /* Rx DCM
  6661. * B0:B1
  6662. * 00: Does not support DCM
  6663. * 01: BPSK
  6664. * 10: QPSK
  6665. * 11: 16-QAM
  6666. * B2 signals maximum number of spatial streams with DCM
  6667. * 0: 1 spatial stream
  6668. * 1: 2 spatial streams
  6669. */
  6670. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  6671. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  6672. /*
  6673. * Indicates that the STA supports the reception of an HE MU PPDU payload
  6674. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  6675. */
  6676. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  6677. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  6678. /* Indicates support for operation as an SU beamformer */
  6679. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  6680. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  6681. /* Indicates support for operation as an SU beamformee */
  6682. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  6683. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  6684. /* Indicates support for operation as an MU Beamformer */
  6685. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  6686. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  6687. /*
  6688. * Num STS -1 for <= 80MHz (min val 3)
  6689. * The maximum number of space-time streams minus 1 that the STA can
  6690. * receive in an HE NDP
  6691. */
  6692. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  6693. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  6694. /*
  6695. * Num STS -1 for > 80MHz (min val 3)
  6696. * The maximum number of space-time streams minus 1 that the STA can
  6697. * receive in an HE NDP
  6698. */
  6699. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  6700. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  6701. /*
  6702. * Number Of Sounding Dimensions For <= 80 MHz
  6703. * If SU beamformer capable, set to the maximum supported value of the
  6704. * TXVECTOR parameter NUM_STS minus 1.
  6705. * Otherwise, reserved.
  6706. */
  6707. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  6708. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  6709. /*
  6710. * Number Of Sounding Dimensions For > 80 MHz
  6711. * If SU beamformer capable, set to the maximum supported value of the
  6712. * TXVECTOR parameter NUM_STS minus 1.
  6713. * Otherwise, reserved.
  6714. */
  6715. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  6716. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  6717. /*
  6718. * Indicates if the HE beamformee is capable of feedback with tone
  6719. * grouping of 16 in the HE Compressed Beamforming Report field for
  6720. * a SU-type feedback.
  6721. */
  6722. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  6723. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  6724. /*
  6725. * Indicates if the HE beamformee is capable of feedback with tone
  6726. * grouping of 16 in the HE Compressed Beamforming Report field for
  6727. * a MU-type feedback.
  6728. */
  6729. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  6730. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  6731. /*
  6732. * Indicates if HE beamformee is capable of feedback with codebook
  6733. * size {4, 2} in the HECompressed Beamforming Report field for
  6734. * a SU-type feedback.
  6735. */
  6736. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  6737. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  6738. /*
  6739. * Indicates if HE beamformee is capable of feedback with codebook
  6740. * size {7, 5} in the HE Compressed Beamforming Report field for
  6741. * a MU-type feedback.
  6742. */
  6743. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  6744. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  6745. /*
  6746. * Beamforming Feedback With Trigger Frame
  6747. * If the transmitting STA is an AP STA:
  6748. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  6749. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  6750. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  6751. * If the transmitting STA is a non-AP STA:
  6752. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  6753. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  6754. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  6755. */
  6756. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  6757. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  6758. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  6759. * over the right 106-tone RU or partial BW ER
  6760. */
  6761. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  6762. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  6763. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  6764. * where the RU does not span the entire PPDU bandwidth.
  6765. */
  6766. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  6767. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  6768. /* Indicates whether or not the PPE Threshold field is present */
  6769. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  6770. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  6771. /* Indicates that the STA supports SRP-based SR operation */
  6772. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  6773. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  6774. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  6775. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  6776. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  6777. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  6778. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  6779. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  6780. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  6781. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  6782. * minus 1. Otherwise, reserved.
  6783. */
  6784. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  6785. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  6786. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  6787. * STBC with one spatial stream
  6788. */
  6789. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  6790. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  6791. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  6792. * STBC with one spatial stream
  6793. */
  6794. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  6795. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  6796. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  6797. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  6798. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  6799. /*
  6800. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  6801. * 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.
  6802. */
  6803. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  6804. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  6805. /*
  6806. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  6807. * 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.
  6808. */
  6809. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  6810. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  6811. /*
  6812. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  6813. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  6814. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  6815. * 160 MHz HE TB PPDU.
  6816. */
  6817. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  6818. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  6819. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  6820. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  6821. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  6822. /*
  6823. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  6824. * 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
  6825. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  6826. */
  6827. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  6828. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  6829. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  6830. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  6831. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  6832. /* set to 1 to for TWT Requestor support*/
  6833. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  6834. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  6835. /* set to 1 to for TWT Responder support*/
  6836. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  6837. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  6838. /* Level of frag support
  6839. Set to 0 for no support for dynamic fragmentation.
  6840. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  6841. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  6842. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  6843. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  6844. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  6845. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  6846. */
  6847. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  6848. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  6849. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  6850. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  6851. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  6852. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  6853. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  6854. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  6855. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  6856. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  6857. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  6858. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  6859. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  6860. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  6861. /*
  6862. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  6863. * a QoS Data frame for which no block ack agreement exists.
  6864. */
  6865. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  6866. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  6867. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  6868. /*0=No Feedback,2=Unsolicited,3=Both*/
  6869. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  6870. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  6871. /* bit 16 reserved. */
  6872. /*Set to 1 for reception of AllAck support*/
  6873. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  6874. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  6875. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  6876. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  6877. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  6878. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  6879. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  6880. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  6881. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  6882. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  6883. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  6884. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  6885. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  6886. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  6887. /*Set to 1 if the STA supports MU cascading operation*/
  6888. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  6889. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  6890. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  6891. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  6892. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  6893. /*Set to 1 when the STA supports its reception*/
  6894. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  6895. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  6896. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  6897. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  6898. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  6899. /*1 if OFDMA Random Access Supported*/
  6900. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  6901. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  6902. /* Maximum AMPDU Length Exponent.
  6903. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  6904. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  6905. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  6906. * padding is not included in this limit.
  6907. */
  6908. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  6909. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  6910. /*A-MSDU Fragmentation Support*/
  6911. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  6912. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  6913. /*Flexible TWT Schedule Support*/
  6914. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  6915. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  6916. /*Rx Control Frame to MultiBSS*/
  6917. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  6918. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  6919. /* BSRP A-MPDU Aggregation
  6920. * maintaining compatability since we dont support this now so not wasting memory
  6921. */
  6922. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  6923. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  6924. /* Quiet Time Period (QTP) operation
  6925. * maintaining compatability since we dont support this now so not wasting memory
  6926. */
  6927. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  6928. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  6929. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  6930. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  6931. * that contains a BQR in the A-Control subfield
  6932. * maintaining compatability since we dont support this now so not wasting memory
  6933. */
  6934. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  6935. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  6936. /*Indicates support by the STA for the role of SR Responder.*/
  6937. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  6938. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  6939. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  6940. * frames or TIM frames as described in AP operation for opportunistic power save.
  6941. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  6942. */
  6943. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  6944. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  6945. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  6946. * the NDP Feedback Report Poll Trigger frame.
  6947. */
  6948. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  6949. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  6950. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  6951. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  6952. * removed by standard
  6953. */
  6954. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6955. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6956. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6957. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6958. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  6959. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  6960. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  6961. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  6962. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  6963. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  6964. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  6965. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  6966. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  6967. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  6968. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  6969. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  6970. /**DO NOT USE - DEPRECATED*/
  6971. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  6972. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  6973. /*DO NOT USE - DEPRECATED**/
  6974. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  6975. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  6976. /*DO NOT USE - DEPRECATED**/
  6977. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  6978. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  6979. /*DO NOT USE - DEPRECATED**/
  6980. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  6981. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  6982. /* START TEMPORARY WORKAROUND -
  6983. * Leave legacy names as aliases for new names, until all references to the
  6984. * legacy names have been removed.
  6985. */
  6986. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  6987. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  6988. /* END TEMPORARY WORKAROUND */
  6989. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  6990. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  6991. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  6992. /*
  6993. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  6994. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  6995. */
  6996. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  6997. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  6998. /*
  6999. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  7000. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  7001. */
  7002. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  7003. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  7004. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  7005. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  7006. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  7007. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  7008. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  7009. typedef struct {
  7010. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  7011. /** unique id identifying the VDEV, generated by the caller */
  7012. A_UINT32 vdev_id;
  7013. /** requestor id identifying the caller module */
  7014. A_UINT32 requestor_id;
  7015. /** beacon interval from received beacon */
  7016. A_UINT32 beacon_interval;
  7017. /** DTIM Period from the received beacon */
  7018. A_UINT32 dtim_period;
  7019. /** Flags */
  7020. A_UINT32 flags;
  7021. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  7022. wmi_ssid ssid;
  7023. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  7024. /** This field will be invalid and ignored unless the */
  7025. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  7026. /** When valid, this field contains the fixed tx rate for the beacon */
  7027. /** and probe response frames send by the GO or SoftAP */
  7028. A_UINT32 bcn_tx_rate;
  7029. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  7030. A_UINT32 bcn_txPower;
  7031. /** number of p2p NOA descriptor(s) from scan entry */
  7032. A_UINT32 num_noa_descriptors;
  7033. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  7034. During CAC, Our HW shouldn't ack ditected frames */
  7035. A_UINT32 disable_hw_ack;
  7036. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  7037. /** The DBS policy manager indicates the preferred number of transmit streams. */
  7038. A_UINT32 preferred_tx_streams;
  7039. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  7040. /** the DBS policy manager indicates the preferred number of receive streams. */
  7041. A_UINT32 preferred_rx_streams;
  7042. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  7043. A_UINT32 cac_duration_ms; /* in milliseconds */
  7044. A_UINT32 regdomain;
  7045. /* The TLVs follows this structure:
  7046. * wmi_channel chan; <-- WMI channel
  7047. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  7048. */
  7049. } wmi_vdev_start_request_cmd_fixed_param;
  7050. typedef struct {
  7051. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  7052. /** unique id identifying the VDEV, generated by the caller */
  7053. A_UINT32 vdev_id;
  7054. } wmi_vdev_delete_cmd_fixed_param;
  7055. typedef struct {
  7056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  7057. /** unique id identifying the VDEV, generated by the caller */
  7058. A_UINT32 vdev_id;
  7059. /** aid (assoc id) received in association response for STA VDEV */
  7060. A_UINT32 vdev_assoc_id;
  7061. /** bssid of the BSS the VDEV is joining */
  7062. wmi_mac_addr vdev_bssid;
  7063. /** bssid of transmitted AP (mbssid case) */
  7064. wmi_mac_addr trans_bssid;
  7065. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  7066. A_UINT32 profile_idx;
  7067. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  7068. A_UINT32 profile_num;
  7069. } wmi_vdev_up_cmd_fixed_param;
  7070. typedef struct {
  7071. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  7072. /** unique id identifying the VDEV, generated by the caller */
  7073. A_UINT32 vdev_id;
  7074. } wmi_vdev_stop_cmd_fixed_param;
  7075. typedef struct {
  7076. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  7077. /** unique id identifying the VDEV, generated by the caller */
  7078. A_UINT32 vdev_id;
  7079. } wmi_vdev_down_cmd_fixed_param;
  7080. typedef struct {
  7081. /** unique id identifying the VDEV, generated by the caller */
  7082. A_UINT32 vdev_id;
  7083. } wmi_vdev_standby_response_cmd;
  7084. typedef struct {
  7085. /** unique id identifying the VDEV, generated by the caller */
  7086. A_UINT32 vdev_id;
  7087. } wmi_vdev_resume_response_cmd;
  7088. typedef struct {
  7089. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  7090. /** unique id identifying the VDEV, generated by the caller */
  7091. A_UINT32 vdev_id;
  7092. /** parameter id */
  7093. A_UINT32 param_id;
  7094. /** parameter value */
  7095. A_UINT32 param_value;
  7096. } wmi_vdev_set_param_cmd_fixed_param;
  7097. typedef struct {
  7098. A_UINT32 key_seq_counter_l;
  7099. A_UINT32 key_seq_counter_h;
  7100. } wmi_key_seq_counter;
  7101. #define WMI_CIPHER_NONE 0x0 /* clear key */
  7102. #define WMI_CIPHER_WEP 0x1
  7103. #define WMI_CIPHER_TKIP 0x2
  7104. #define WMI_CIPHER_AES_OCB 0x3
  7105. #define WMI_CIPHER_AES_CCM 0x4
  7106. #define WMI_CIPHER_WAPI 0x5
  7107. #define WMI_CIPHER_CKIP 0x6
  7108. #define WMI_CIPHER_AES_CMAC 0x7
  7109. #define WMI_CIPHER_ANY 0x8
  7110. #define WMI_CIPHER_AES_GCM 0x9
  7111. #define WMI_CIPHER_AES_GMAC 0xa
  7112. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  7113. typedef struct {
  7114. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  7115. /** unique id identifying the VDEV, generated by the caller */
  7116. A_UINT32 vdev_id;
  7117. /** MAC address used for installing */
  7118. wmi_mac_addr peer_macaddr;
  7119. /** key index */
  7120. A_UINT32 key_ix;
  7121. /** key flags */
  7122. A_UINT32 key_flags;
  7123. /** key cipher, defined above */
  7124. A_UINT32 key_cipher;
  7125. /** key rsc counter */
  7126. wmi_key_seq_counter key_rsc_counter;
  7127. /** global key rsc counter */
  7128. wmi_key_seq_counter key_global_rsc_counter;
  7129. /** global key tsc counter */
  7130. wmi_key_seq_counter key_tsc_counter;
  7131. /** WAPI key rsc counter */
  7132. A_UINT8 wpi_key_rsc_counter[16];
  7133. /** WAPI key tsc counter */
  7134. A_UINT8 wpi_key_tsc_counter[16];
  7135. /** key length */
  7136. A_UINT32 key_len;
  7137. /** key tx mic length */
  7138. A_UINT32 key_txmic_len;
  7139. /** key rx mic length */
  7140. A_UINT32 key_rxmic_len;
  7141. /** specifies if the group_key_ix is valid, filled by the sender */
  7142. A_UINT32 is_group_key_ix_valid;
  7143. /** Multi group key ID */
  7144. A_UINT32 group_key_ix;
  7145. /*
  7146. * Following this struct are this TLV.
  7147. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  7148. */
  7149. } wmi_vdev_install_key_cmd_fixed_param;
  7150. /** Preamble types to be used with VDEV fixed rate configuration */
  7151. typedef enum {
  7152. WMI_RATE_PREAMBLE_OFDM,
  7153. WMI_RATE_PREAMBLE_CCK,
  7154. WMI_RATE_PREAMBLE_HT,
  7155. WMI_RATE_PREAMBLE_VHT,
  7156. WMI_RATE_PREAMBLE_HE,
  7157. } WMI_RATE_PREAMBLE;
  7158. /** Value to disable fixed rate setting */
  7159. #define WMI_FIXED_RATE_NONE (0xff)
  7160. #define WMI_GI_400_NS 1
  7161. #define WMI_GI_800_NS 0
  7162. #define WMI_GI_1600_NS 2
  7163. #define WMI_GI_3200_NS 3
  7164. /** OCE(Optimized Connectivity_Experience) Feature flags */
  7165. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  7166. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  7167. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  7168. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  7169. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  7170. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  7171. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  7172. /** the definition of different VDEV parameters */
  7173. typedef enum {
  7174. /** RTS Threshold */
  7175. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  7176. /** Fragmentation threshold */
  7177. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  7178. /** beacon interval in TUs */
  7179. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  7180. /** Listen interval in TUs */
  7181. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  7182. /** muticast rate in Mbps */
  7183. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  7184. /** management frame rate in Mbps */
  7185. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  7186. /** slot time (long vs short) */
  7187. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  7188. /** preamble (long vs short) */
  7189. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  7190. /** SWBA time (time before tbtt in msec) */
  7191. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  7192. /** time period for updating VDEV stats */
  7193. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  7194. /** age out time in msec for frames queued for station in power save*/
  7195. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  7196. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  7197. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  7198. /** DTIM period (specified in units of num beacon intervals) */
  7199. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  7200. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  7201. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  7202. /** enable/dsiable WDS for this VDEV */
  7203. WMI_VDEV_PARAM_WDS, /* 0xf */
  7204. /** ATIM Window */
  7205. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  7206. /** BMISS max */
  7207. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  7208. /** BMISS first time */
  7209. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  7210. /** BMISS final time */
  7211. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  7212. /** WMM enables/disabled */
  7213. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  7214. /** Channel width */
  7215. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  7216. /** Channel Offset */
  7217. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  7218. /** Disable HT Protection */
  7219. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  7220. /** Quick STA Kickout */
  7221. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  7222. /** Rate to be used with Management frames */
  7223. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  7224. /** Protection Mode */
  7225. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  7226. /** Fixed rate setting
  7227. * The top nibble is used to select which format to use for encoding
  7228. * the rate specification: 0xVXXXXXXX
  7229. * If V == 0b0000: format is same as before: 0x000000RR
  7230. * If V == 0b0001: format is: 0x1000RRRR.
  7231. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  7232. * The host shall use the new V1 format (and set V = 0x1) if the target
  7233. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  7234. * system is configured with Nss > 4 (either at compile time within the
  7235. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  7236. * by the target).
  7237. */
  7238. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  7239. /**
  7240. * 11AX: GI =
  7241. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  7242. * 11N: SGI=WMI_GI_400_NS
  7243. */
  7244. WMI_VDEV_PARAM_SGI, /* 0x1c */
  7245. /** Enable LDPC */
  7246. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  7247. /** Enable Tx STBC */
  7248. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  7249. /** Enable Rx STBC */
  7250. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  7251. /** Intra BSS forwarding */
  7252. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  7253. /** Setting Default xmit key for Vdev */
  7254. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  7255. /** NSS width */
  7256. WMI_VDEV_PARAM_NSS, /* 0x22 */
  7257. /** Set the custom rate for the broadcast data frames */
  7258. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  7259. /** Set the custom rate (rate-code) for multicast data frames */
  7260. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  7261. /** Tx multicast packet indicate Enable/Disable */
  7262. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  7263. /** Tx DHCP packet indicate Enable/Disable */
  7264. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  7265. /** Enable host inspection of Tx unicast packet to unknown destination */
  7266. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  7267. /* The minimum amount of time AP begins to consider STA inactive */
  7268. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  7269. /* An associated STA is considered inactive when there is no recent TX/RX
  7270. * activity and no downlink frames are buffered for it. Once a STA exceeds
  7271. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  7272. * a keep alive to verify the STA is still associated. If the STA does ACK
  7273. * the data-null, or if the data-null is buffered and the STA does not
  7274. * retrieve it, the STA will be considered unresponsive (see
  7275. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  7276. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  7277. /* An associated STA is considered unresponsive if there is no recent
  7278. * TX/RX activity and downlink frames are buffered for it. Once a STA
  7279. * exceeds the maximum unresponsive time, the AP will send a
  7280. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  7281. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  7282. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  7283. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  7284. /** Enable/Disable RTS-CTS */
  7285. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  7286. /* Enable TXBFee/er */
  7287. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  7288. /**Set packet power save */
  7289. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  7290. /**Drops un-encrypted packets if any received in an encryted connection
  7291. * otherwise forwards to host
  7292. */
  7293. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  7294. /*
  7295. * Set TX encap type.
  7296. *
  7297. * enum wmi_pkt_type is to be used as the parameter
  7298. * specifying the encap type.
  7299. */
  7300. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  7301. /*
  7302. * Try to detect stations that woke-up and exited power save but did not
  7303. * successfully transmit data-null with PM=0 to AP. When this happens,
  7304. * STA and AP power save state are out-of-sync. Use buffered but
  7305. * undelivered MSDU to the STA as a hint that the STA is really awake
  7306. * and expecting normal ASAP delivery, rather than retrieving BU with
  7307. * PS-Poll, U-APSD trigger, etc.
  7308. *
  7309. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  7310. */
  7311. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  7312. /* Enable/Disable early rx dynamic adjust feature.
  7313. * Early-rx dynamic adjust is a advance power save feature.
  7314. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  7315. * timing discrepancies in the system.
  7316. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  7317. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  7318. * properly to minimum the power consume.*/
  7319. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  7320. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  7321. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  7322. * which can be set by user through WMI command.
  7323. */
  7324. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  7325. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  7326. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  7327. /* set slop_step */
  7328. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  7329. /* set init slop */
  7330. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  7331. /* pause adjust enable/disable */
  7332. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  7333. /* Set channel pwr limit value of the vdev the minimal value of all
  7334. * vdevs operating on this channel will be set as channel tx power
  7335. * limit, which is used to configure ratearray
  7336. */
  7337. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  7338. /* set the count of snr value for calculation in snr monitor */
  7339. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  7340. /** Roaming offload */
  7341. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  7342. /** Enable Leader request RX functionality for RMC */
  7343. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  7344. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  7345. * by himself. If the beacon lost time exceed this threshold, the peer is
  7346. * thought to be gone. */
  7347. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  7348. /** max rate in kpbs, transmit rate can't go beyond it */
  7349. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  7350. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  7351. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  7352. /* set Tx failure count threshold for the vdev */
  7353. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  7354. /* set ebt resync timeout value, in the unit of TU */
  7355. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  7356. /* Enable Aggregation State Trigger Event */
  7357. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  7358. /* This parameter indicates whether IBSS station can enter into power save
  7359. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  7360. * awake all the time and should never set PM=1 in its transmitted frames.
  7361. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  7362. * is non-zero. */
  7363. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  7364. /* This parameter indicates if this station can enter into power collapse
  7365. * for the remaining beacon interval after the ATIM window.
  7366. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  7367. * is set to TRUE. */
  7368. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  7369. /* This parameter indicates whether IBSS station exit power save mode and
  7370. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  7371. * whenever there is a TX/RX activity. */
  7372. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  7373. /* If Awake on TX/RX activity is enabled, this parameter indicates
  7374. * the data inactivity time in number of beacon intervals after which
  7375. * IBSS station reenters power save by sending Null frame with PM=1. */
  7376. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  7377. /* Inactivity time in msec after which TX Service Period (SP) is
  7378. * terminated by sending a Qos Null frame with EOSP.
  7379. * If value is 0, TX SP is terminated with the last buffered packet itself
  7380. * instead of waiting for the inactivity timeout. */
  7381. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  7382. /** DTIM policy */
  7383. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  7384. /* When IBSS network is initialized, PS-supporting device
  7385. * does not enter protocol sleep state during first
  7386. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  7387. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  7388. /* Enable/Disable 1 RX chain usage during the ATIM window */
  7389. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  7390. /* RX Leak window is the time driver waits before shutting down
  7391. * the radio or switching the channel and after receiving an ACK
  7392. * for a data frame with PM bit set) */
  7393. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  7394. /** Averaging factor(16 bit value) is used in the calculations to
  7395. * perform averaging of different link level statistics like average
  7396. * beacon spread or average number of frames leaked */
  7397. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  7398. /** disconnect threshold, once the consecutive error for specific peer
  7399. * exceed this threhold, FW will send kickout event to host */
  7400. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  7401. /** The rate_code of RTS_CTS changed by host. Now FW can support
  7402. * more non-HT rates rather than 1Mbps or 6Mbps */
  7403. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  7404. /** This parameter indicates whether using a long duration RTS-CTS
  7405. * protection when a SAP goes off channel in MCC mode */
  7406. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  7407. /** This parameter indicates whether using a broadcast probe response
  7408. * to increase the detectability of SAP in MCC mode */
  7409. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  7410. /** This parameter indicates the power backoff in percentage
  7411. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  7412. * Host passes 0, 1, 2, 3, 4 to Firmware
  7413. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  7414. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  7415. */
  7416. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  7417. /** TX power backoff in dB: tx power -= param value
  7418. * Host passes values(DB) to Halphy, Halphy reduces the power table
  7419. * by the values. Safety check will happen in Halphy.
  7420. */
  7421. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  7422. /** Multicast to Unicast conversion setting */
  7423. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  7424. /** Total number of HW retries */
  7425. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  7426. /** Max tx percentage for cabq */
  7427. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  7428. /** MFPTEST settings */
  7429. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  7430. /** RTS Fixed rate setting */
  7431. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  7432. /** VHT SGI MASK */
  7433. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  7434. /** VHT80 Auto Rate MASK */
  7435. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  7436. /** set Proxy STA features for this vap */
  7437. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  7438. /** set virtual cell mode - enable/disable */
  7439. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  7440. /** Set receive packet type */
  7441. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  7442. /** Set ratemask with specific Bandwidth and NSS */
  7443. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  7444. /** Set SENSOR Support */
  7445. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  7446. /** Set beacon rate */
  7447. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  7448. /** Enable CTS to self for DTIM beacon */
  7449. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  7450. /** Disable station kickout at Vap level */
  7451. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  7452. /* VDEV capabilities */
  7453. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  7454. /**
  7455. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  7456. * The host must ensure that either no other vdevs share the TSF with
  7457. * this vdev, or else that it is acceptable to apply this TSF adjustment
  7458. * to all vdevs sharing the TSF.
  7459. */
  7460. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  7461. /** Disable/Enable AMPDU of vdev per AC:
  7462. * bit | AC
  7463. * --------
  7464. * 0 | VO
  7465. * 1 | VI
  7466. * 2 | BE
  7467. * 3 | BK
  7468. * A value of 0 in a given bit disables A-MPDU aggregation for
  7469. * that AC; a value of 1 enables A-MPDU aggregation
  7470. */
  7471. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  7472. /**
  7473. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  7474. * Used mainly for mesh-vap.
  7475. * The parameter value delivered with the RX_FILTER vdev param contains
  7476. * a bit-or mask of wmi_vdev_param_filter enum values.
  7477. */
  7478. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  7479. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  7480. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  7481. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7482. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  7483. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7484. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  7485. /** disable dynamic bw RTS **/
  7486. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  7487. /** per ssid (vdev) based ATF strict/fair scheduling policy
  7488. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  7489. */
  7490. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  7491. /** Enable or disable Dual carrier modulation
  7492. * valid values: 0-Disable DCM, 1-Enable DCM.
  7493. */
  7494. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  7495. /** Enable or disable Extended range
  7496. * valid values: 0-Disable ER, 1-Enable ER.
  7497. */
  7498. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  7499. /* enable or disable BCAST probe response feature */
  7500. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  7501. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  7502. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  7503. /* enable or disable NOA for P2P GO */
  7504. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  7505. /** Per band user management frame fix rate setting
  7506. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  7507. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  7508. *
  7509. * BIT 23: 11ax (1) or legacy (0) rate code
  7510. * BITS [22..12]: rate code for 5G
  7511. *
  7512. * BIT 11: 11ax (1) or legacy (0) rate code
  7513. * BITS [10..0]: rate code for 2G
  7514. */
  7515. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  7516. /* This should be called before WMI_VDEV_PARAM_TXBF */
  7517. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  7518. /** This parameter indicates whether VDEV is SMPS intolerant.
  7519. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  7520. * dynamically change the RX NSS.
  7521. *
  7522. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  7523. */
  7524. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  7525. /** specify probe request Tx delay for scans triggered on this VDEV */
  7526. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  7527. /** specify the time gap between each set of probe request transmissions.
  7528. * The number of probe requests in each set depends on the ssid_list and
  7529. * bssid_list in the scan request.
  7530. * This parameter will be applied only for scans triggered on this VDEV.
  7531. */
  7532. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  7533. /** specify the HE LTF setting that should be used for fixed rate
  7534. * transmissions.
  7535. *
  7536. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  7537. * or WMI_HE_LTF_4X.
  7538. */
  7539. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  7540. /** VDEV parameter to configure the number of TX chains to use for
  7541. * a/b/g rates.
  7542. * bit 0~15 : 11b mode TX chain number.
  7543. * bit 16~31 : 11ag mode TX chain number.
  7544. *
  7545. * valid values:
  7546. * Should not exceed the maximum number of supported TX Chains
  7547. * 0 - Used to reset the vote. Acts as Don't Care
  7548. */
  7549. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  7550. /**
  7551. * Enable or disable the multi group key feature on this VDEV.
  7552. * used for NAN APP and VLAN Tagging
  7553. */
  7554. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  7555. /*
  7556. * Specify the total number of multi group key on this VDEV.
  7557. */
  7558. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  7559. /** VDEV parameter to enable or disable various OCE features */
  7560. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  7561. /*
  7562. * Set/Clear 3 least-significant bits to
  7563. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  7564. *
  7565. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  7566. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  7567. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  7568. * bits 31:3 -> Reserved bits. should be set to zero.
  7569. */
  7570. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  7571. /** VDEV parameter to config modulated DTIM count */
  7572. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  7573. /**
  7574. * VDEV parameter to config max listen interval,
  7575. * when modulated DTIM is enabled.
  7576. * Units are 100TU.
  7577. */
  7578. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  7579. /** VDEV parameter to config dynamic DTIM count */
  7580. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  7581. /** VDEV parameter to enable or disable RTT responder role
  7582. * valid values: 0-Disable responder role 1-Enable responder role
  7583. */
  7584. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  7585. /** Parameter to configure BA mode.
  7586. * Valid values: 0- Auto mode,
  7587. * 1- Manual mode(addba req not sent).
  7588. * 2- buffer size 64
  7589. * 3- buffer size 256
  7590. */
  7591. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  7592. /**
  7593. * VDEV parameter to force to set modulate DTIM count as listen interval,
  7594. * no matter whether WoW is enabled
  7595. * Default: Disabled.
  7596. * Valid values: 0- Disabled,
  7597. * 1- Enabled.
  7598. */
  7599. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  7600. /** specify the setting that are valid for auto rate transmissions.
  7601. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  7602. * used for auto rate.
  7603. * BIT0 = 1 (WMI_HE_LTF_1X)
  7604. * BIT1 = 1 (WMI_HE_LTF_2X)
  7605. * BIT2 = 1 (WMI_HE_LTF_4X)
  7606. * BIT3-7 = Reserved bits.
  7607. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  7608. * used for auto rate.
  7609. * BIT8 = 1 (400 NS)
  7610. * BIT9 = 1 (800 NS)
  7611. * BIT10 = 1 (1600 NS)
  7612. * BIT11 = 1 (3200 NS)
  7613. * BIT12-15 = Reserved bits.
  7614. * bits 31:16: Reserved bits. should be set to zero.
  7615. */
  7616. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  7617. /** VDEV parameter to enable or disable RTT initiator mac address
  7618. * randomization.
  7619. * Default: Disabled.
  7620. * valid values: 0-Disable random mac 1-Enable random mac
  7621. */
  7622. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  7623. /**
  7624. * For each AC, configure how many tx retries to send without RTS
  7625. * before enabling RTS
  7626. * bits 0:7 :BE
  7627. * bits 8:15 :BK
  7628. * bits 16:23 :VI
  7629. * bits 24:31 :VO
  7630. * A value of 0 in specific AC means default configuration for that AC.
  7631. */
  7632. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  7633. /**
  7634. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  7635. * We have logic where AMSDU aggregation size is dynamically decided
  7636. * based on MCS. That logic is enabled by default.
  7637. * For certain tests, we need a method to disable this optimization,
  7638. * and base AMSDU size only on the peer's capability rather than our logic.
  7639. * A value of 0 means disable internal optimization,
  7640. * 1 means enable internal optimzation.
  7641. */
  7642. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  7643. /**
  7644. * In RAW mode, FW will not know whether the encryption is enabled
  7645. * on this vdev or not.
  7646. * Because of this, FW will not program the right info into the
  7647. * RawNwifi TLV resulting in the connection failure in RAW mode.
  7648. * So to program the right info, FW should know whether the security
  7649. * is enabled on this VDEV.
  7650. * Host will send this VDEV param command (With Value = 1) in case of
  7651. * RAW secure mode.
  7652. */
  7653. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  7654. /**
  7655. * Dynamically enable/disable green tx (GTX) on supported rates.
  7656. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  7657. * Note: If GTX was already running (since the global GTX control
  7658. * resides with default BDF setting) & host wants to disable GTX,
  7659. * the VDEV does not exercise any more TPC changes on the GTX supported
  7660. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  7661. * Whenever, host wants to reenable GTX, the enable command resumes the
  7662. * GTX functionality & TPC convergence to lower power levels can be
  7663. * attained as long as PER on GTX supported rates is within the pre-defined
  7664. * PER margin configured through the BDF.
  7665. */
  7666. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  7667. /*
  7668. * Enable/Disable multicast buffer.
  7669. * A FLAG to enable & disable buffering of multicast frames at AP
  7670. * when stations are in Power Save mode.
  7671. * Once AP disables buffering of multicast frame,
  7672. * clients which goes into Power save mode will not receive these frames.
  7673. * by default MCAST buffering will be enabled.
  7674. * (CABQ = Content After Beacon Queue = multicast queue)
  7675. * Host will send this VDEV param command,
  7676. * With Value = 1 means fw will disable the MCAST buffering
  7677. * With Value = 0 means fw will enable the MCAST buffering.
  7678. */
  7679. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  7680. /**
  7681. * For SU and MU sounding
  7682. * switch between su ac/ax sounding and mu ac/ax sounding
  7683. * switch between triggered/ non-triggered on ax sounding enabled.
  7684. * each bit toggles the corresponding modes by enabling/disabling
  7685. *
  7686. * Bit 1 doesn't carry any operation for now and may change later,
  7687. * so reserved.
  7688. *
  7689. *-----------------------
  7690. * bit(0) | mode
  7691. *-----------------------
  7692. * 0 | AC
  7693. * 1 | AX
  7694. *-----------------------
  7695. *
  7696. * bit(1) | Reserved
  7697. *
  7698. *-----------------------
  7699. * bit(2) | mode
  7700. *-----------------------
  7701. * 0 | SU
  7702. * 1 | MU
  7703. *-----------------------
  7704. * bit(3) | mode
  7705. *-----------------------
  7706. * 0 | non -triggered
  7707. * 1 | triggered
  7708. */
  7709. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  7710. /** Fixed rate setting used in UL Trigger
  7711. * The top nibble is used to select which format to use for encoding
  7712. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  7713. * format.
  7714. * If V == 0b0001: format is: 0x1000RRRR.
  7715. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  7716. *
  7717. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  7718. */
  7719. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  7720. /**
  7721. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  7722. * 11AX: GI =
  7723. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  7724. * 11N: SGI=WMI_GI_400_NS
  7725. */
  7726. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  7727. /** Enable/Disable LDPC in UL Trigger */
  7728. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  7729. /** Max NSS allowed in UL Trigger */
  7730. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  7731. /** Enable/Disable STBC in UL Trigger */
  7732. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  7733. /** specify the HE LTF setting that should be used for fixed rate
  7734. * uplink transmissions.
  7735. *
  7736. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  7737. * or WMI_HE_LTF_4X.
  7738. */
  7739. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  7740. /** Uplink OFDMA PPDU bandwidth (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)*/
  7741. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  7742. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  7743. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  7744. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  7745. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  7746. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  7747. * The below vdev param types are used for prototyping, and are
  7748. * prone to change.
  7749. */
  7750. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  7751. /* 11AX SPECIFIC defines */
  7752. /* USE this for BSS color change */
  7753. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  7754. /*
  7755. * Enable / disable trigger access for a AP vdev's peers.
  7756. * For a STA mode vdev this will enable/disable triggered access
  7757. * and enable/disable Multi User mode of operation.
  7758. * A value of 0 in a given bit disables corresponding mode.
  7759. * bit | hemu mode
  7760. * ---------------
  7761. * 0 | HE SUBFEE
  7762. * 1 | HE SUBFER
  7763. * 2 | HE MUBFEE
  7764. * 3 | HE MUBFER
  7765. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  7766. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  7767. * | trigger receive & UL response
  7768. * 6 | UL MUMIMO
  7769. */
  7770. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  7771. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  7772. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  7773. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  7774. } WMI_VDEV_PARAM;
  7775. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  7776. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  7777. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  7778. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  7779. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  7780. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  7781. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  7782. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  7783. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  7784. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  7785. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  7786. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  7787. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  7788. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  7789. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  7790. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  7791. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  7792. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  7793. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  7794. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  7795. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  7796. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  7797. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  7798. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  7799. /* vdev capabilities bit mask */
  7800. #define WMI_VDEV_BEACON_SUPPORT 0x1
  7801. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  7802. #define WMI_VDEV_VOW_ENABLED 0x4
  7803. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  7804. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  7805. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  7806. /* Per VAP rate dropdown masks */
  7807. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  7808. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  7809. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  7810. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  7811. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  7812. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  7813. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  7814. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  7815. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  7816. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  7817. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  7818. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  7819. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  7820. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  7821. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  7822. /* TXBF capabilities masks */
  7823. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  7824. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  7825. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  7826. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  7827. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  7828. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  7829. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  7830. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  7831. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  7832. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  7833. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  7834. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  7835. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  7836. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  7837. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  7838. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  7839. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  7840. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  7841. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  7842. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  7843. #define WMI_TXBF_CONF_STS_CAP_S 4
  7844. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  7845. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  7846. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  7847. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  7848. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  7849. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  7850. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  7851. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  7852. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  7853. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  7854. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  7855. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  7856. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  7857. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  7858. /* commands for 11ax TXBF capabilities */
  7859. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  7860. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  7861. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  7862. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  7863. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  7864. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  7865. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  7866. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  7867. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  7868. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  7869. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  7870. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  7871. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  7872. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  7873. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  7874. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  7875. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  7876. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  7877. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  7878. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  7879. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  7880. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  7881. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  7882. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  7883. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  7884. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  7885. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  7886. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  7887. /* TXBF capabilities */
  7888. typedef struct {
  7889. A_UINT32 txbf_cap;
  7890. } wmi_vdev_txbf_cap;
  7891. /* vdev rx filters (for mesh) */
  7892. typedef enum {
  7893. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  7894. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  7895. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  7896. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  7897. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  7898. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  7899. } wmi_vdev_param_filter;
  7900. /* Length of ATIM Window in TU */
  7901. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  7902. enum wmi_pkt_type {
  7903. WMI_PKT_TYPE_RAW = 0,
  7904. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  7905. WMI_PKT_TYPE_ETHERNET = 2,
  7906. };
  7907. /*******************************************************************
  7908. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  7909. * Do not use it!
  7910. *******************************************************************/
  7911. typedef struct {
  7912. A_UINT8 sutxbfee : 1,
  7913. mutxbfee : 1,
  7914. sutxbfer : 1,
  7915. mutxbfer : 1,
  7916. txb_sts_cap : 3,
  7917. implicit_bf : 1;
  7918. } wmi_vdev_txbf_en;
  7919. /** Upto 8 bits are available for Roaming module to be sent along with
  7920. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  7921. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  7922. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  7923. /* Enable Roaming module in FW to do scan based on Final BMISS */
  7924. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  7925. /** slot time long */
  7926. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  7927. /** slot time short */
  7928. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  7929. /** preablbe long */
  7930. #define WMI_VDEV_PREAMBLE_LONG 0x1
  7931. /** preablbe short */
  7932. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  7933. /** the definition of different START/RESTART Event response */
  7934. typedef enum {
  7935. /* Event respose of START CMD */
  7936. WMI_VDEV_START_RESP_EVENT = 0,
  7937. /* Event respose of RESTART CMD */
  7938. WMI_VDEV_RESTART_RESP_EVENT,
  7939. } WMI_START_EVENT_PARAM;
  7940. typedef struct {
  7941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  7942. /** unique id identifying the VDEV, generated by the caller */
  7943. A_UINT32 vdev_id;
  7944. /** requestor id that requested the VDEV start request */
  7945. A_UINT32 requestor_id;
  7946. /* Respose of Event type START/RESTART */
  7947. WMI_START_EVENT_PARAM resp_type;
  7948. /** status of the response */
  7949. A_UINT32 status;
  7950. /** Vdev chain mask */
  7951. A_UINT32 chain_mask;
  7952. /** Vdev mimo power save mode */
  7953. A_UINT32 smps_mode;
  7954. union {
  7955. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  7956. /** pdev_id for identifying the MAC
  7957. * See macros starting with WMI_PDEV_ID_ for values.
  7958. */
  7959. A_UINT32 pdev_id;
  7960. };
  7961. /** Configured Transmit Streams **/
  7962. A_UINT32 cfgd_tx_streams;
  7963. /** Configured Receive Streams **/
  7964. A_UINT32 cfgd_rx_streams;
  7965. } wmi_vdev_start_response_event_fixed_param;
  7966. typedef struct {
  7967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  7968. /** unique id identifying the VDEV, generated by the caller */
  7969. A_UINT32 vdev_id;
  7970. } wmi_vdev_stopped_event_fixed_param;
  7971. typedef struct {
  7972. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  7973. /** unique id identifying the VDEV, generated by the caller */
  7974. A_UINT32 vdev_id;
  7975. } wmi_vdev_delete_resp_event_fixed_param;
  7976. /** common structure used for simple events (stopped, resume_req, standby response) */
  7977. typedef struct {
  7978. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  7979. /** unique id identifying the VDEV, generated by the caller */
  7980. A_UINT32 vdev_id;
  7981. } wmi_vdev_simple_event_fixed_param;
  7982. /** VDEV start response status codes */
  7983. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  7984. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  7985. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  7986. /** Beacon processing related command and event structures */
  7987. typedef struct {
  7988. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  7989. /** unique id identifying the VDEV, generated by the caller */
  7990. A_UINT32 vdev_id;
  7991. /** xmit rate */
  7992. A_UINT32 tx_rate;
  7993. /** xmit power */
  7994. A_UINT32 txPower;
  7995. /** beacon buffer length in bytes */
  7996. A_UINT32 buf_len;
  7997. /* This TLV is followed by array of bytes:
  7998. * A_UINT8 bufp[]; <-- beacon frame buffer
  7999. */
  8000. } wmi_bcn_tx_hdr;
  8001. /* Beacon filter */
  8002. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  8003. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  8004. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  8005. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  8006. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  8007. typedef struct {
  8008. /** Filter ID */
  8009. A_UINT32 bcn_filter_id;
  8010. /** Filter type - wmi_bcn_filter */
  8011. A_UINT32 bcn_filter;
  8012. /** Buffer len */
  8013. A_UINT32 bcn_filter_len;
  8014. /** Filter info (threshold, BSSID, RSSI) */
  8015. A_UINT8 *bcn_filter_buf;
  8016. } wmi_bcn_filter_rx_cmd;
  8017. /** Capabilities and IEs to be passed to firmware */
  8018. typedef struct {
  8019. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  8020. /** Capabilities */
  8021. A_UINT32 caps;
  8022. /** ERP info */
  8023. A_UINT32 erp;
  8024. /** Advanced capabilities */
  8025. /** HT capabilities */
  8026. /** HT Info */
  8027. /** ibss_dfs */
  8028. /** wpa Info */
  8029. /** rsn Info */
  8030. /** rrm info */
  8031. /** ath_ext */
  8032. /** app IE */
  8033. } wmi_bcn_prb_info;
  8034. typedef struct {
  8035. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  8036. /** unique id identifying the VDEV, generated by the caller */
  8037. A_UINT32 vdev_id;
  8038. /** TIM IE offset from the beginning of the template. */
  8039. A_UINT32 tim_ie_offset;
  8040. /** beacon buffer length. data is in TLV data[] */
  8041. A_UINT32 buf_len;
  8042. /** CSA IE switch count offset from the beginning of data[]
  8043. * Value 0 indicates CSA IE is not present in beacon template.
  8044. */
  8045. A_UINT32 csa_switch_count_offset; /* units = bytes */
  8046. /** Extended CSA IE switch count offset from the beginning of data[]
  8047. * Value 0 indicates CSA IE is not present in beacon template.
  8048. */
  8049. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  8050. /** Specify when to send the CSA switch count status from FW to host.
  8051. * See WMI_CSA_EVENT_BMAP* below for more information.
  8052. * E.g. if CSA switch count event is needed to be sent when the switch count
  8053. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  8054. */
  8055. A_UINT32 csa_event_bitmap;
  8056. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  8057. A_UINT32 mbssid_ie_offset;
  8058. /** offset (in octets/bytes) of ESP IE in beacon frame */
  8059. A_UINT32 esp_ie_offset;
  8060. /*
  8061. * The TLVs follows:
  8062. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  8063. * A_UINT8 data[]; <-- Variable length data
  8064. */
  8065. } wmi_bcn_tmpl_cmd_fixed_param;
  8066. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  8067. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  8068. Same can also be achieved by setting bitmap to 0X80000001 */
  8069. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  8070. typedef struct {
  8071. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  8072. /** unique id identifying the VDEV, generated by the caller */
  8073. A_UINT32 vdev_id;
  8074. /** beacon buffer length. data is in TLV data[] */
  8075. A_UINT32 buf_len;
  8076. /*
  8077. * The TLVs follows:
  8078. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  8079. * A_UINT8 data[]; <-- Variable length data
  8080. */
  8081. } wmi_prb_tmpl_cmd_fixed_param;
  8082. typedef struct {
  8083. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  8084. A_UINT32 tlv_header;
  8085. /** unique id identifying the VDEV */
  8086. A_UINT32 vdev_id;
  8087. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  8088. A_UINT32 tx_status;
  8089. } wmi_offload_bcn_tx_status_event_fixed_param;
  8090. enum wmi_sta_ps_mode {
  8091. /** enable power save for the given STA VDEV */
  8092. WMI_STA_PS_MODE_DISABLED = 0,
  8093. /** disable power save for a given STA VDEV */
  8094. WMI_STA_PS_MODE_ENABLED = 1,
  8095. };
  8096. typedef struct {
  8097. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  8098. /** unique id identifying the VDEV, generated by the caller */
  8099. A_UINT32 vdev_id;
  8100. /** Power save mode
  8101. *
  8102. * (see enum wmi_sta_ps_mode)
  8103. */
  8104. A_UINT32 sta_ps_mode;
  8105. } wmi_sta_powersave_mode_cmd_fixed_param;
  8106. enum wmi_csa_offload_en {
  8107. WMI_CSA_OFFLOAD_DISABLE = 0,
  8108. WMI_CSA_OFFLOAD_ENABLE = 1,
  8109. };
  8110. typedef struct {
  8111. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  8112. A_UINT32 vdev_id;
  8113. A_UINT32 csa_offload_enable;
  8114. } wmi_csa_offload_enable_cmd_fixed_param;
  8115. typedef struct {
  8116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  8117. A_UINT32 vdev_id;
  8118. /*
  8119. * The TLVs follows:
  8120. * wmi_channel chan;
  8121. */
  8122. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  8123. /**
  8124. * This parameter controls the policy for retrieving frames from AP while the
  8125. * STA is in sleep state.
  8126. *
  8127. * Only takes affect if the sta_ps_mode is enabled
  8128. */
  8129. enum wmi_sta_ps_param_rx_wake_policy {
  8130. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  8131. * the Power save SM(state machine) will come out of sleep by either
  8132. * sending null frame (or) a data frame (with PS==0) in response to TIM
  8133. * bit set in the received beacon frame from AP.
  8134. */
  8135. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  8136. /* Here the power save state machine will not wakeup in response to TIM
  8137. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  8138. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  8139. * access categories are delivery-enabled, the station will send a UAPSD
  8140. * trigger frame, otherwise it will send a PS-Poll.
  8141. */
  8142. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  8143. };
  8144. /** Number of tx frames/beacon that cause the power save SM to wake up.
  8145. *
  8146. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  8147. * meaning, It will cause the SM to never wake up. This is useful if you want
  8148. * to keep the system to sleep all the time for some kind of test mode . host
  8149. * can change this parameter any time. It will affect at the next tx frame.
  8150. */
  8151. enum wmi_sta_ps_param_tx_wake_threshold {
  8152. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  8153. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  8154. /* Values greater than one indicate that many TX attempts per beacon
  8155. * interval before the STA will wake up
  8156. */
  8157. };
  8158. /**
  8159. * The maximum number of PS-Poll frames the FW will send in response to
  8160. * traffic advertised in TIM before waking up (by sending a null frame with PS
  8161. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  8162. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  8163. * parameter is used when the RX wake policy is
  8164. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  8165. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  8166. */
  8167. enum wmi_sta_ps_param_pspoll_count {
  8168. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  8169. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  8170. * will send before waking up.
  8171. */
  8172. };
  8173. /*
  8174. * This will include the delivery and trigger enabled state for every AC.
  8175. * This is the negotiated state with AP. The host MLME needs to set this based
  8176. * on AP capability and the state Set in the association request by the
  8177. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  8178. */
  8179. #define WMI_UAPSD_AC_TYPE_DELI 0
  8180. #define WMI_UAPSD_AC_TYPE_TRIG 1
  8181. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  8182. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  8183. (1 << (ac<<1)) : \
  8184. (1 << ((ac<<1)+1)))
  8185. enum wmi_sta_ps_param_uapsd {
  8186. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  8187. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  8188. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  8189. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  8190. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  8191. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  8192. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  8193. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  8194. };
  8195. enum wmi_sta_powersave_param {
  8196. /**
  8197. * Controls how frames are retrievd from AP while STA is sleeping
  8198. *
  8199. * (see enum wmi_sta_ps_param_rx_wake_policy)
  8200. */
  8201. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  8202. /**
  8203. * The STA will go active after this many TX
  8204. *
  8205. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  8206. */
  8207. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  8208. /**
  8209. * Number of PS-Poll to send before STA wakes up
  8210. *
  8211. * (see enum wmi_sta_ps_param_pspoll_count)
  8212. *
  8213. */
  8214. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  8215. /**
  8216. * TX/RX inactivity time in msec before going to sleep.
  8217. *
  8218. * The power save SM will monitor tx/rx activity on the VDEV, if no
  8219. * activity for the specified msec of the parameter the Power save SM will
  8220. * go to sleep.
  8221. */
  8222. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  8223. /**
  8224. * Set uapsd configuration.
  8225. *
  8226. * (see enum wmi_sta_ps_param_uapsd)
  8227. */
  8228. WMI_STA_PS_PARAM_UAPSD = 4,
  8229. /**
  8230. * Number of PS-Poll to send before STA wakes up in QPower Mode
  8231. */
  8232. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  8233. /**
  8234. * Enable QPower
  8235. */
  8236. WMI_STA_PS_ENABLE_QPOWER = 6,
  8237. /**
  8238. * Number of TX frames before the entering the Active state
  8239. */
  8240. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  8241. /**
  8242. * QPower SPEC PSPOLL interval
  8243. */
  8244. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  8245. /**
  8246. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  8247. * no-data bit set
  8248. */
  8249. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  8250. /**
  8251. * Max value of ITO reset when there is no tx-rx
  8252. * after AP has set the TIM bit
  8253. */
  8254. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  8255. };
  8256. typedef struct {
  8257. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  8258. /** unique id identifying the VDEV, generated by the caller */
  8259. A_UINT32 vdev_id;
  8260. /** station power save parameter (see enum wmi_sta_powersave_param) */
  8261. A_UINT32 param;
  8262. A_UINT32 value;
  8263. } wmi_sta_powersave_param_cmd_fixed_param;
  8264. /** No MIMO power save */
  8265. #define WMI_STA_MIMO_PS_MODE_DISABLE
  8266. /** mimo powersave mode static*/
  8267. #define WMI_STA_MIMO_PS_MODE_STATIC
  8268. /** mimo powersave mode dynamic */
  8269. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  8270. typedef struct {
  8271. /** unique id identifying the VDEV, generated by the caller */
  8272. A_UINT32 vdev_id;
  8273. /** mimo powersave mode as defined above */
  8274. A_UINT32 mimo_pwrsave_mode;
  8275. } wmi_sta_mimo_ps_mode_cmd;
  8276. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  8277. enum wmi_ap_ps_param_uapsd {
  8278. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  8279. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  8280. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  8281. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  8282. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  8283. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  8284. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  8285. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  8286. };
  8287. /** U-APSD maximum service period of peer station */
  8288. enum wmi_ap_ps_peer_param_max_sp {
  8289. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  8290. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  8291. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  8292. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  8293. /* keep last! */
  8294. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  8295. };
  8296. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  8297. enum wmi_ap_ps_param_sifs_resp_frmtype {
  8298. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  8299. WMI_SIFS_RESP_UAPSD = (1 << 1),
  8300. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  8301. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  8302. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  8303. };
  8304. /**
  8305. * AP power save parameter
  8306. * Set a power save specific parameter for a peer station
  8307. */
  8308. enum wmi_ap_ps_peer_param {
  8309. /** Set uapsd configuration for a given peer.
  8310. *
  8311. * This will include the delivery and trigger enabled state for every AC.
  8312. * The host MLME needs to set this based on AP capability and stations
  8313. * request Set in the association request received from the station.
  8314. *
  8315. * Lower 8 bits of the value specify the UAPSD configuration.
  8316. *
  8317. * (see enum wmi_ap_ps_param_uapsd)
  8318. * The default value is 0.
  8319. */
  8320. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  8321. /**
  8322. * Set the service period for a UAPSD capable station
  8323. *
  8324. * The service period from wme ie in the (re)assoc request frame.
  8325. *
  8326. * (see enum wmi_ap_ps_peer_param_max_sp)
  8327. */
  8328. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  8329. /** Time in seconds for aging out buffered frames for STA in power save */
  8330. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  8331. /**
  8332. * Specify frame types that are considered SIFS RESP trigger frame
  8333. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  8334. */
  8335. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  8336. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  8337. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  8338. /** Specifies the WNM sleep state of a STA */
  8339. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  8340. };
  8341. typedef struct {
  8342. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  8343. /** unique id identifying the VDEV, generated by the caller */
  8344. A_UINT32 vdev_id;
  8345. /** peer MAC address */
  8346. wmi_mac_addr peer_macaddr;
  8347. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  8348. A_UINT32 param;
  8349. /** AP powersave param value (see defines) */
  8350. A_UINT32 value;
  8351. } wmi_ap_ps_peer_cmd_fixed_param;
  8352. /** Configure peer station 11v U-APSD coexistance
  8353. *
  8354. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  8355. * sent down to FW along with this command.
  8356. *
  8357. * The semantics of these fields are described in the following text extracted
  8358. * from 802.11v.
  8359. *
  8360. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  8361. * U-APSD Coexistence element, the AP should not transmit frames to the
  8362. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  8363. * begins when the AP receives the U-APSD trigger frame and ends after
  8364. * the transmission period specified by the result of the following
  8365. * calculation:
  8366. *
  8367. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  8368. *
  8369. * Where T is the time the U-APSD trigger frame was received at the AP
  8370. * Interval is the UAPSD Coexistence element Duration/Interval field
  8371. * value (see 7.3.2.91) or upon the successful transmission of a frame
  8372. * with EOSP bit set to 1, whichever is earlier.
  8373. *
  8374. *
  8375. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  8376. * Coexistence element, the AP should not transmit frames to the non-AP
  8377. * STA outside of the U-APSD Coexistence Service Period, which begins
  8378. * when the AP receives a U-APSD trigger frame and ends after the
  8379. * transmission period specified by the result of the following
  8380. * calculation: End of transmission period = T + Duration
  8381. */
  8382. typedef struct {
  8383. /** unique id identifying the VDEV, generated by the caller */
  8384. A_UINT32 vdev_id;
  8385. /** peer MAC address */
  8386. wmi_mac_addr peer_macaddr;
  8387. /** Enable U-APSD coexistence support for this peer
  8388. *
  8389. * 0 -> disabled (default)
  8390. * 1 -> enabled
  8391. */
  8392. A_UINT32 enabled;
  8393. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  8394. A_UINT32 duration_interval;
  8395. /** Upper 32 bits of 64-bit TSF offset */
  8396. A_UINT32 tsf_offset_high;
  8397. /** Lower 32 bits of 64-bit TSF offset */
  8398. A_UINT32 tsf_offset_low;
  8399. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  8400. typedef enum {
  8401. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  8402. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  8403. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  8404. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  8405. } wmi_ap_ps_egap_flag_type;
  8406. /**
  8407. * configure ehanced green ap parameters
  8408. */
  8409. typedef struct {
  8410. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8411. /** Enable enhanced green ap
  8412. * 0 -> disabled
  8413. * 1 -> enabled
  8414. */
  8415. A_UINT32 enable;
  8416. /** The param indicates a duration that all STAs connected
  8417. * to S-AP have no traffic.
  8418. */
  8419. A_UINT32 inactivity_time; /* in unit of milliseconds */
  8420. /** The param indicates a duration that all STAs connected
  8421. * to S-AP have no traffic, after all STAs have entered powersave.
  8422. */
  8423. A_UINT32 wait_time; /* in unit of milliseconds */
  8424. /** The param is used to turn on/off some functions within E-GAP.
  8425. */
  8426. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  8427. } wmi_ap_ps_egap_param_cmd_fixed_param;
  8428. typedef enum {
  8429. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  8430. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  8431. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  8432. WMI_AP_PS_EGAP_STATUS_MAX = 15
  8433. } wmi_ap_ps_egap_status_type;
  8434. /**
  8435. * send ehanced green ap status to host
  8436. */
  8437. typedef struct
  8438. {
  8439. /** TLV tag and len; tag equals
  8440. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  8441. A_UINT32 tlv_header;
  8442. union {
  8443. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8444. /** pdev_id for identifying the MAC
  8445. * See macros starting with WMI_PDEV_ID_ for values.
  8446. */
  8447. A_UINT32 pdev_id;
  8448. };
  8449. /** The param indicates the current tx chainmask with the mac id. */
  8450. A_UINT32 tx_chainmask;
  8451. /** The param indicates the current rx chainmask with the mac id. */
  8452. A_UINT32 rx_chainmask;
  8453. } wmi_ap_ps_egap_info_chainmask_list;
  8454. typedef struct {
  8455. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8456. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  8457. A_UINT32 status;
  8458. /* This TLV is followed by
  8459. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  8460. */
  8461. } wmi_ap_ps_egap_info_event_fixed_param;
  8462. /* 128 clients = 4 words */
  8463. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  8464. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  8465. typedef struct {
  8466. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  8467. /** TIM bitmap len (in bytes) */
  8468. A_UINT32 tim_len;
  8469. /** TIM Partial Virtual Bitmap */
  8470. A_UINT32 tim_mcast;
  8471. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  8472. A_UINT32 tim_changed;
  8473. A_UINT32 tim_num_ps_pending;
  8474. /** Use the vdev_id only if vdev_id_valid is set */
  8475. A_UINT32 vdev_id_valid;
  8476. /** unique id identifying the VDEV */
  8477. A_UINT32 vdev_id;
  8478. } wmi_tim_info;
  8479. typedef struct {
  8480. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  8481. /** TIM Partial Virtual Bitmap */
  8482. A_UINT32 tim_mcast;
  8483. A_UINT32 tim_changed;
  8484. A_UINT32 tim_num_ps_pending;
  8485. /** Use the vdev_id only if vdev_id_valid is set */
  8486. A_UINT32 vdev_id_valid;
  8487. /** unique id identifying the VDEV */
  8488. A_UINT32 vdev_id;
  8489. /** TIM bitmap len (in bytes) */
  8490. A_UINT32 tim_len;
  8491. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  8492. } wmi_tim_info_v2;
  8493. typedef struct {
  8494. /** Flag to enable quiet period IE support */
  8495. A_UINT32 is_enabled;
  8496. /** Quiet start */
  8497. A_UINT32 tbttcount;
  8498. /** Beacon intervals between quiets*/
  8499. A_UINT32 period;
  8500. /** TUs of each quiet*/
  8501. A_UINT32 duration;
  8502. /** TUs of from TBTT of quiet start*/
  8503. A_UINT32 offset;
  8504. } wmi_quiet_info;
  8505. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  8506. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  8507. typedef struct {
  8508. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  8509. /** Bit 0: Flag to indicate an update in NOA schedule
  8510. * Bits 7-1: Reserved
  8511. * Bits 15-8: Index (identifies the instance of NOA sub element)
  8512. * Bit 16: Opp PS state of the AP
  8513. * Bits 23-17: Ctwindow in TUs
  8514. * Bits 31-24: Number of NOA descriptors
  8515. */
  8516. A_UINT32 noa_attributes;
  8517. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  8518. /** Use the vdev_id only if vdev_id_valid is set */
  8519. A_UINT32 vdev_id_valid;
  8520. /** unique id identifying the VDEV */
  8521. A_UINT32 vdev_id;
  8522. } wmi_p2p_noa_info;
  8523. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  8524. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  8525. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  8526. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  8527. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  8528. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8529. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  8530. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  8531. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  8532. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  8533. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  8534. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  8535. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8536. WMI_UNIFIED_NOA_ATTR_INDEX);
  8537. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  8538. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  8539. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  8540. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  8541. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  8542. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8543. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  8544. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  8545. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  8546. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  8547. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  8548. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  8549. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  8550. WMI_UNIFIED_NOA_ATTR_CTWIN);
  8551. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  8552. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  8553. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  8554. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  8555. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  8556. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8557. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  8558. typedef struct {
  8559. /** TIM info */
  8560. wmi_tim_info tim_info;
  8561. /** P2P NOA info */
  8562. wmi_p2p_noa_info p2p_noa_info;
  8563. /* TBD: More info elements to be added later */
  8564. } wmi_bcn_info;
  8565. typedef struct {
  8566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  8567. /** bitmap identifying the VDEVs, generated by the caller */
  8568. A_UINT32 vdev_map;
  8569. /** how many vdev's info is included in this message
  8570. * If this field is zero, then the number of vdevs is specified by
  8571. * the number of bits set in the vdev_map bitmap.
  8572. */
  8573. A_UINT32 num_vdevs;
  8574. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  8575. * wmi_tim_info tim_info[];
  8576. * wmi_p2p_noa_info p2p_noa_info[];
  8577. *
  8578. */
  8579. } wmi_host_swba_event_fixed_param;
  8580. #define WMI_MAX_AP_VDEV 16
  8581. typedef struct {
  8582. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  8583. /** vdev_id identifying the VDEV for which FILS should be generated */
  8584. A_UINT32 vdev_id;
  8585. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  8586. A_UINT32 fils_tt;
  8587. /** next TBTT time (in TU) for this vdev */
  8588. A_UINT32 tbtt;
  8589. } wmi_host_swfda_event_fixed_param;
  8590. typedef struct {
  8591. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  8592. /** bimtap of VDEVs that has tbtt offset updated */
  8593. A_UINT32 vdev_map;
  8594. /* The TLVs for tbttoffset_list will follow this TLV.
  8595. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  8596. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  8597. */
  8598. } wmi_tbtt_offset_event_fixed_param;
  8599. typedef struct {
  8600. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  8601. /** unique id identifying the VDEV */
  8602. A_UINT32 vdev_id;
  8603. /** tbttoffset in TUs */
  8604. A_UINT32 tbttoffset;
  8605. } wmi_tbtt_offset_info;
  8606. /** Use this event if number of vdevs > 32 */
  8607. typedef struct {
  8608. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  8609. A_UINT32 num_vdevs;
  8610. /*
  8611. * The TLVs for tbttoffset will follow this TLV.
  8612. * Of size num_vdevs * wmi_tbtt_offset_info
  8613. */
  8614. } wmi_tbtt_offset_ext_event_fixed_param;
  8615. /* Peer Specific commands and events */
  8616. typedef struct {
  8617. A_UINT32 percentage; /* in unit of 12.5% */
  8618. A_UINT32 min_delta; /* in unit of Mbps */
  8619. } rate_delta_t;
  8620. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  8621. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  8622. #define MAX_NUM_OF_RATE_THRESH 4
  8623. typedef struct {
  8624. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  8625. Any of these two conditions or both of them can be set. */
  8626. rate_delta_t rate_delta;
  8627. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  8628. If the threshold count is less than 4, set zero to
  8629. the one following the last threshold */
  8630. } report_cond_per_phy_t;
  8631. enum peer_rate_report_cond_phy_type {
  8632. PEER_RATE_REPORT_COND_11B = 0,
  8633. PEER_RATE_REPORT_COND_11A_G,
  8634. PEER_RATE_REPORT_COND_11N,
  8635. PEER_RATE_REPORT_COND_11AC,
  8636. PEER_RATE_REPORT_COND_MAX_NUM
  8637. };
  8638. typedef struct {
  8639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  8640. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  8641. A_UINT32 report_backoff_time; /* in unit of msecond */
  8642. A_UINT32 report_timer_period; /* in unit of msecond */
  8643. /* In the following field, the array index means the phy type,
  8644. * please see enum peer_rate_report_cond_phy_type for detail */
  8645. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  8646. } wmi_peer_set_rate_report_condition_fixed_param;
  8647. /* Peer Type:
  8648. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  8649. * on address and vdev opmode. This is largely here to allow host to indicate that
  8650. * peer is explicitly a TDLS peer
  8651. */
  8652. enum wmi_peer_type {
  8653. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  8654. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  8655. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  8656. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  8657. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  8658. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  8659. /* Reserved from 128 - 255 for target internal use.*/
  8660. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  8661. };
  8662. typedef struct {
  8663. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  8664. /** unique id identifying the VDEV, generated by the caller */
  8665. A_UINT32 vdev_id;
  8666. /** peer MAC address */
  8667. wmi_mac_addr peer_macaddr;
  8668. /** peer type: see enum values above */
  8669. A_UINT32 peer_type;
  8670. } wmi_peer_create_cmd_fixed_param;
  8671. typedef struct {
  8672. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  8673. /** unique id identifying the VDEV, generated by the caller */
  8674. A_UINT32 vdev_id;
  8675. /** peer MAC address */
  8676. wmi_mac_addr peer_macaddr;
  8677. } wmi_peer_delete_cmd_fixed_param;
  8678. typedef struct {
  8679. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  8680. /** unique id identifying the VDEV, generated by the caller */
  8681. A_UINT32 vdev_id;
  8682. /** peer MAC address */
  8683. wmi_mac_addr peer_macaddr;
  8684. /**
  8685. * maximum block ack window size to use during a rx block ack negotiation,
  8686. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  8687. */
  8688. A_UINT32 rx_block_ack_win_limit;
  8689. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  8690. typedef struct {
  8691. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  8692. /** unique id identifying the VDEV, generated by the caller */
  8693. A_UINT32 vdev_id;
  8694. /** peer MAC address */
  8695. wmi_mac_addr peer_macaddr;
  8696. /** tid bitmap identifying the tids to flush */
  8697. A_UINT32 peer_tid_bitmap;
  8698. } wmi_peer_flush_tids_cmd_fixed_param;
  8699. typedef struct {
  8700. /** rate mode . 0: disable fixed rate (auto rate)
  8701. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  8702. * 2: ht20 11n rate specified as mcs index
  8703. * 3: ht40 11n rate specified as mcs index
  8704. */
  8705. A_UINT32 rate_mode;
  8706. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  8707. * and series 3 is stored at byte 3 (MSB) */
  8708. A_UINT32 rate_series;
  8709. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  8710. * and retry count for rate 3 is stored at byte 3 (MSB) */
  8711. A_UINT32 rate_retries;
  8712. } wmi_fixed_rate;
  8713. typedef struct {
  8714. /** unique id identifying the VDEV, generated by the caller */
  8715. A_UINT32 vdev_id;
  8716. /** peer MAC address */
  8717. wmi_mac_addr peer_macaddr;
  8718. /** fixed rate */
  8719. wmi_fixed_rate peer_fixed_rate;
  8720. } wmi_peer_fixed_rate_cmd;
  8721. #define WMI_MGMT_TID 17
  8722. typedef struct {
  8723. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  8724. /** unique id identifying the VDEV, generated by the caller */
  8725. A_UINT32 vdev_id;
  8726. /** peer MAC address */
  8727. wmi_mac_addr peer_macaddr;
  8728. } wmi_addba_clear_resp_cmd_fixed_param;
  8729. typedef struct {
  8730. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  8731. /** unique id identifying the VDEV, generated by the caller */
  8732. A_UINT32 vdev_id;
  8733. /** peer MAC address */
  8734. wmi_mac_addr peer_macaddr;
  8735. /** Tid number */
  8736. A_UINT32 tid;
  8737. /** Buffer/Window size*/
  8738. A_UINT32 buffersize;
  8739. } wmi_addba_send_cmd_fixed_param;
  8740. typedef struct {
  8741. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  8742. /** unique id identifying the VDEV, generated by the caller */
  8743. A_UINT32 vdev_id;
  8744. /** peer MAC address */
  8745. wmi_mac_addr peer_macaddr;
  8746. /** Tid number */
  8747. A_UINT32 tid;
  8748. /** Is Initiator */
  8749. A_UINT32 initiator;
  8750. /** Reason code */
  8751. A_UINT32 reasoncode;
  8752. } wmi_delba_send_cmd_fixed_param;
  8753. typedef struct {
  8754. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  8755. /** unique id identifying the vdev, generated by the caller */
  8756. A_UINT32 vdev_id;
  8757. /** peer mac address */
  8758. wmi_mac_addr peer_macaddr;
  8759. /** Tid number */
  8760. A_UINT32 tid;
  8761. /** status code */
  8762. A_UINT32 statuscode;
  8763. } wmi_addba_setresponse_cmd_fixed_param;
  8764. typedef struct {
  8765. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  8766. /** unique id identifying the vdev, generated by the caller */
  8767. A_UINT32 vdev_id;
  8768. /** peer mac address */
  8769. wmi_mac_addr peer_macaddr;
  8770. /** Tid number */
  8771. A_UINT32 tid;
  8772. } wmi_send_singleamsdu_cmd_fixed_param;
  8773. /* Type of Station DTIM Power Save method */
  8774. enum {
  8775. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  8776. * also the same value as the listen interval. For this method, the
  8777. * station will wake up based on the listen interval. If this
  8778. * listen interval is not equal to DTIM, then the station may
  8779. * miss certain DTIM beacons. If this value is 1, then the
  8780. * station will wake up for every beacon.
  8781. */
  8782. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  8783. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  8784. * When this value is 1, then the station will wake at every DTIM beacon.
  8785. * If this value is >1, then the station will skip certain DTIM beacons.
  8786. * This value is the multiple of DTIM intervals that the station will
  8787. * wake up to receive the DTIM beacons.
  8788. */
  8789. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  8790. };
  8791. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  8792. typedef struct {
  8793. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  8794. /** unique id identifying the VDEV, generated by the caller */
  8795. A_UINT32 vdev_id;
  8796. /** Station DTIM Power Save method as defined above */
  8797. A_UINT32 dtim_pwrsave_method;
  8798. /** DTIM PS value. Contents depends on the method */
  8799. A_UINT32 value;
  8800. /** Modulated DTIM value */
  8801. A_UINT32 MaxLIModulatedDTIM;
  8802. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  8803. /*
  8804. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  8805. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  8806. * If there is no uplink/download for the specified service interval (field service_interval),
  8807. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  8808. * specified in the UP (field user_priority).
  8809. * Firmware also monitors the responses for these QOS-NULL triggers.
  8810. * If the peer does not have any delivery frames, it will respond with
  8811. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  8812. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  8813. * are unused and should be set to 0.
  8814. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  8815. * certain host-based implementations that don't want this firmware offload.
  8816. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  8817. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  8818. * and rest of the AC default to 300 ms.
  8819. *
  8820. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  8821. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  8822. * the more advanced monitoring method.
  8823. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  8824. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  8825. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  8826. * will save more power by waking up less and sending less trigger frames.
  8827. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  8828. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  8829. * should be 0.
  8830. */
  8831. typedef struct {
  8832. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  8833. /** WMM Access category from 0 to 3 */
  8834. A_UINT32 wmm_ac;
  8835. /** User priority to use in trigger frames. It is the TID
  8836. * value. This field needs to be specified and may not be
  8837. * equivalent to AC since some implementation may use the TSPEC
  8838. * to enable UAPSD and negotiate a particular user priority. */
  8839. A_UINT32 user_priority;
  8840. /** service interval in ms */
  8841. A_UINT32 service_interval;
  8842. /** Suspend interval in ms */
  8843. A_UINT32 suspend_interval;
  8844. /** delay interval in ms */
  8845. A_UINT32 delay_interval;
  8846. } wmi_sta_uapsd_auto_trig_param;
  8847. typedef struct {
  8848. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  8849. /** unique id identifying the VDEV, generated by the caller */
  8850. A_UINT32 vdev_id;
  8851. /** peer mac address */
  8852. wmi_mac_addr peer_macaddr;
  8853. /** Number of AC to specify */
  8854. A_UINT32 num_ac;
  8855. /*
  8856. * Following this struc is the TLV:
  8857. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  8858. */
  8859. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  8860. /** mimo powersave state */
  8861. #define WMI_PEER_MIMO_PS_STATE 0x1
  8862. /** enable/disable AMPDU . initial value (enabled) */
  8863. #define WMI_PEER_AMPDU 0x2
  8864. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  8865. #define WMI_PEER_AUTHORIZE 0x3
  8866. /** peer channel bandwidth */
  8867. #define WMI_PEER_CHWIDTH 0x4
  8868. /** peer NSS */
  8869. #define WMI_PEER_NSS 0x5
  8870. /** USE 4 ADDR */
  8871. #define WMI_PEER_USE_4ADDR 0x6
  8872. /* set group membership status */
  8873. #define WMI_PEER_MEMBERSHIP 0x7
  8874. #define WMI_PEER_USERPOS 0x8
  8875. /*
  8876. * A critical high-level protocol is being used with this peer. Target
  8877. * should take appropriate measures (if possible) to ensure more
  8878. * reliable link with minimal latency. This *may* include modifying the
  8879. * station power save policy, enabling more RX chains, increased
  8880. * priority of channel scheduling, etc.
  8881. *
  8882. * NOTE: This parameter should only be considered a hint as specific
  8883. * behavior will depend on many factors including current network load
  8884. * and vdev/peer configuration.
  8885. *
  8886. * For STA VDEV this peer corresponds to the AP's BSS peer.
  8887. * For AP VDEV this peer corresponds to the remote peer STA.
  8888. */
  8889. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  8890. /* set Tx failure count threshold for the peer - Currently unused */
  8891. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  8892. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  8893. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  8894. /* Set peer advertised IBSS atim window length */
  8895. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  8896. /** peer phy mode */
  8897. #define WMI_PEER_PHYMODE 0xD
  8898. /** Use FIXED Pwr */
  8899. #define WMI_PEER_USE_FIXED_PWR 0xE
  8900. /** Set peer fixed rate
  8901. * The top nibble is used to select which format to use for encoding
  8902. * the rate specification: 0xVXXXXXXX
  8903. * If V == 0b0000: format is same as before: 0x000000RR
  8904. * If V == 0b0001: format is: 0x1000RRRR.
  8905. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8906. * The host shall use the new V1 format (and set V = 0x1) if the target
  8907. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  8908. * system is configured with Nss > 4 (either at compile time within the
  8909. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  8910. * by the target).
  8911. */
  8912. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  8913. /** Whitelist peer TIDs */
  8914. #define WMI_PEER_SET_MU_WHITELIST 0x10
  8915. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  8916. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  8917. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  8918. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  8919. /**
  8920. * default ring routing for peer data packets,
  8921. * param_value = bit 0 for hash based routing enabled or not
  8922. * (value 1 is enabled, value 0 is disabled)
  8923. * bits 1:5 are for ring 32 (i.e. ring id value
  8924. * selected from 0 to 31 values)
  8925. */
  8926. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  8927. /* peer NSS for VHT160 - Extended NSS support */
  8928. #define WMI_PEER_NSS_VHT160 0x14
  8929. /* peer NSS for VHT160 - Extended NSS support */
  8930. #define WMI_PEER_NSS_VHT80_80 0x15
  8931. /* Peer SU TXBF sounding interval */
  8932. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  8933. /* Peer MU TXBF sounding interval */
  8934. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  8935. /* Peer TXBF sounding enable or disable */
  8936. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  8937. /* Per peer 11ax OFDMA enable or disable */
  8938. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  8939. /* Per peer 11ax/11ac MU enable or disable */
  8940. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  8941. /** Set peer fixed rate used in UL Trigger
  8942. * The top nibble is used to select which format to use for encoding
  8943. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  8944. * If V == 0b0001: format is: 0x1000RRRR.
  8945. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8946. *
  8947. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  8948. */
  8949. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  8950. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  8951. #define WMI_PEER_MIMO_PS_NONE 0x0
  8952. #define WMI_PEER_MIMO_PS_STATIC 0x1
  8953. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  8954. typedef struct {
  8955. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  8956. /** unique id identifying the VDEV, generated by the caller */
  8957. A_UINT32 vdev_id;
  8958. /** peer MAC address */
  8959. wmi_mac_addr peer_macaddr;
  8960. /** parameter id */
  8961. A_UINT32 param_id;
  8962. /** parametr value */
  8963. A_UINT32 param_value;
  8964. } wmi_peer_set_param_cmd_fixed_param;
  8965. typedef union {
  8966. /*
  8967. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  8968. * by the target or a little-endian host.
  8969. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  8970. * macros on the A_UINT32 "value" field.
  8971. */
  8972. struct {
  8973. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  8974. A_UINT16 tx_rate; /* see per-mode specs below */
  8975. };
  8976. A_UINT32 value; /* for use by big-endian host */
  8977. } wmi_peer_max_min_tx_rate;
  8978. /*
  8979. * Any access to the mode/tx_rate in an big endian system should use
  8980. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  8981. */
  8982. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  8983. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  8984. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  8985. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  8986. /* CCK max/min tx Rate description
  8987. * tx_rate = 0: 1 Mbps
  8988. * tx_rate = 1: 2 Mbps
  8989. * tx_rate = 2: 5.5 Mbps
  8990. * tx_rate = 3: 11 Mbps
  8991. * tx_rate = else: invalid
  8992. */
  8993. enum {
  8994. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  8995. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  8996. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  8997. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  8998. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  8999. };
  9000. /* OFDM max/min tx Rate description
  9001. * tx_rate = 0: 6 Mbps
  9002. * tx_rate = 1: 9 Mbps
  9003. * tx_rate = 2: 12 Mbps
  9004. * tx_rate = 3: 18 Mbps
  9005. * tx_rate = 4: 24 Mbps
  9006. * tx_rate = 5: 32 Mbps
  9007. * tx_rate = 6: 48 Mbps
  9008. * tx_rate = 7: 54 Mbps
  9009. * tx_rate = else: invalid
  9010. */
  9011. enum {
  9012. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  9013. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  9014. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  9015. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  9016. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  9017. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  9018. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  9019. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  9020. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  9021. };
  9022. /* HT max/min tx rate description
  9023. * tx_rate = 0~7 : MCS Rate 0~7
  9024. * tx_rate=else : invalid.
  9025. */
  9026. #define WMI_MAX_HT_TX_MCS 0x07
  9027. /* VHT max/min tx rate description
  9028. * tx_rate = 0~9 : MCS Rate 0~9
  9029. * tx_rate=else : invalid.
  9030. */
  9031. #define WMI_MAX_VHT_TX_MCS 0x09
  9032. #define MAX_SUPPORTED_RATES 128
  9033. typedef struct {
  9034. /** total number of rates */
  9035. A_UINT32 num_rates;
  9036. /**
  9037. * rates (each 8bit value) packed into a 32 bit word.
  9038. * the rates are filled from least significant byte to most
  9039. * significant byte.
  9040. */
  9041. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  9042. } wmi_rate_set;
  9043. /* NOTE: It would bea good idea to represent the Tx MCS
  9044. * info in one word and Rx in another word. This is split
  9045. * into multiple words for convenience
  9046. */
  9047. typedef struct {
  9048. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  9049. A_UINT32 rx_max_rate; /* Max Rx data rate */
  9050. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  9051. A_UINT32 tx_max_rate; /* Max Tx data rate */
  9052. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  9053. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  9054. } wmi_vht_rate_set;
  9055. /* NOTE: It would bea good idea to represent the Tx MCS
  9056. * info in one word and Rx in another word. This is split
  9057. * into multiple words for convenience
  9058. * 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
  9059. */
  9060. typedef struct {
  9061. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  9062. /* HE Supported MCS Set field Rx
  9063. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  9064. * value 0 - MCS 0-7 enabled for this NSS
  9065. * value 1 - MCS 0-9 enabled for this NSS
  9066. * value 2 - MCS 0-11 enabled for this NSS
  9067. * value 3 - NSS disabled
  9068. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  9069. */
  9070. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  9071. /* HE Supported MCS Set field Tx
  9072. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  9073. * value 0 - MCS 0-7 enabled for this NSS
  9074. * value 1 - MCS 0-9 enabled for this NSS
  9075. * value 2 - MCS 0-11 enabled for this NSS
  9076. * value 3 - NSS disabled
  9077. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  9078. */
  9079. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  9080. } wmi_he_rate_set;
  9081. /*
  9082. * IMPORTANT: Make sure the bit definitions here are consistent
  9083. * with the ni_flags definitions in wlan_peer.h
  9084. */
  9085. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  9086. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  9087. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  9088. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  9089. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  9090. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  9091. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  9092. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  9093. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  9094. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  9095. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  9096. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  9097. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  9098. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  9099. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  9100. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  9101. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  9102. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  9103. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  9104. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  9105. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  9106. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  9107. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  9108. /**
  9109. * Peer rate capabilities.
  9110. *
  9111. * This is of interest to the ratecontrol
  9112. * module which resides in the firmware. The bit definitions are
  9113. * consistent with that defined in if_athrate.c.
  9114. *
  9115. * @todo
  9116. * Move this to a common header file later so there is no need to
  9117. * duplicate the definitions or maintain consistency.
  9118. */
  9119. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  9120. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  9121. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  9122. #define WMI_RC_HT_FLAG 0x08 /* HT */
  9123. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  9124. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  9125. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  9126. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  9127. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  9128. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  9129. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  9130. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  9131. typedef struct {
  9132. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  9133. /** peer MAC address */
  9134. wmi_mac_addr peer_macaddr;
  9135. /** VDEV id */
  9136. A_UINT32 vdev_id;
  9137. /** assoc = 1 reassoc = 0 */
  9138. A_UINT32 peer_new_assoc;
  9139. /** peer associd (16 bits) */
  9140. A_UINT32 peer_associd;
  9141. /** peer station flags: see definition above */
  9142. A_UINT32 peer_flags;
  9143. /** negotiated capabilities (lower 16 bits)*/
  9144. A_UINT32 peer_caps;
  9145. /** Listen interval */
  9146. A_UINT32 peer_listen_intval;
  9147. /** HT capabilties of the peer */
  9148. A_UINT32 peer_ht_caps;
  9149. /** maximum rx A-MPDU length */
  9150. A_UINT32 peer_max_mpdu;
  9151. /** mpdu density of the peer in usec(0 to 16) */
  9152. A_UINT32 peer_mpdu_density;
  9153. /** peer rate capabilties see flags above */
  9154. A_UINT32 peer_rate_caps;
  9155. /** num spatial streams */
  9156. A_UINT32 peer_nss;
  9157. /** VHT capabilties of the peer */
  9158. A_UINT32 peer_vht_caps;
  9159. /** phy mode */
  9160. A_UINT32 peer_phymode;
  9161. /** HT Operation Element of the peer. Five bytes packed in 2
  9162. * INT32 array and filled from lsb to msb.
  9163. * Note that the size of array peer_ht_info[] cannotbe changed
  9164. * without breaking WMI Compatibility. */
  9165. A_UINT32 peer_ht_info[2];
  9166. /** total number of negotiated legacy rate set. Also the sizeof
  9167. * peer_legacy_rates[] */
  9168. A_UINT32 num_peer_legacy_rates;
  9169. /** total number of negotiated ht rate set. Also the sizeof
  9170. * peer_ht_rates[] */
  9171. A_UINT32 num_peer_ht_rates;
  9172. /**
  9173. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  9174. * in VHT160 / VHT80+80 Mode.
  9175. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  9176. * handshake with the Max Rx NSS differing for different bandwidths
  9177. * instead of a single max Rx NSS Value.
  9178. * Some QCA chipsets have to advertise a different max Rx NSS value for
  9179. * 160 MHz and 80MHz.
  9180. *
  9181. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  9182. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  9183. * Extended NSS support
  9184. * bit[30:6]: Reserved
  9185. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  9186. */
  9187. A_UINT32 peer_bw_rxnss_override;
  9188. /* 802.11ax capabilities */
  9189. wmi_ppe_threshold peer_ppet;
  9190. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  9191. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  9192. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  9193. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  9194. /* 2nd DWORD of 11ax MAC Capabilities */
  9195. A_UINT32 peer_he_cap_info_ext;
  9196. /* Following this struct are the TLV's:
  9197. * A_UINT8 peer_legacy_rates[];
  9198. * A_UINT8 peer_ht_rates[];
  9199. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  9200. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  9201. */
  9202. } wmi_peer_assoc_complete_cmd_fixed_param;
  9203. /* WDS Entry Flags */
  9204. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  9205. typedef struct {
  9206. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  9207. /** peer MAC address */
  9208. wmi_mac_addr peer_macaddr;
  9209. /** wds MAC addr */
  9210. wmi_mac_addr wds_macaddr;
  9211. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  9212. A_UINT32 flags;
  9213. A_UINT32 vdev_id;
  9214. } wmi_peer_add_wds_entry_cmd_fixed_param;
  9215. #define WMI_CHAN_InFO_START_RESP 0
  9216. #define WMI_CHAN_InFO_END_RESP 1
  9217. typedef struct {
  9218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  9219. /** wds MAC addr */
  9220. wmi_mac_addr wds_macaddr;
  9221. A_UINT32 vdev_id;
  9222. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  9223. typedef struct {
  9224. /** peer MAC address */
  9225. wmi_mac_addr peer_macaddr;
  9226. } wmi_peer_q_empty_callback_event;
  9227. /*
  9228. * Command to update an already existing WDS entry. Different address setting
  9229. * combinations are possible.
  9230. *
  9231. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  9232. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  9233. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  9234. * Null wds and peer -> Flags will be updated for all WDS entries.
  9235. */
  9236. typedef struct {
  9237. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  9238. /** peer MAC address */
  9239. wmi_mac_addr peer_macaddr;
  9240. /** wds MAC addr */
  9241. wmi_mac_addr wds_macaddr;
  9242. /* Flags associated with WDS entry */
  9243. A_UINT32 flags;
  9244. A_UINT32 vdev_id;
  9245. } wmi_peer_update_wds_entry_cmd_fixed_param;
  9246. /**
  9247. * Channel info WMI event
  9248. */
  9249. typedef struct {
  9250. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  9251. /** Error code */
  9252. A_UINT32 err_code;
  9253. /** Channel freq */
  9254. A_UINT32 freq;
  9255. /** Read flags */
  9256. A_UINT32 cmd_flags;
  9257. /** Noise Floor value */
  9258. A_UINT32 noise_floor;
  9259. /** rx clear count */
  9260. A_UINT32 rx_clear_count;
  9261. /** cycle count */
  9262. A_UINT32 cycle_count;
  9263. /** channel tx power per range in 0.5dBm steps */
  9264. A_UINT32 chan_tx_pwr_range;
  9265. /** channel tx power per throughput */
  9266. A_UINT32 chan_tx_pwr_tp;
  9267. /** rx frame count (cumulative) */
  9268. A_UINT32 rx_frame_count;
  9269. /** BSS rx cycle count */
  9270. A_UINT32 my_bss_rx_cycle_count;
  9271. /** b-mode data rx time (units are microseconds) */
  9272. A_UINT32 rx_11b_mode_data_duration;
  9273. /** tx frame count */
  9274. A_UINT32 tx_frame_cnt;
  9275. /** mac clock */
  9276. A_UINT32 mac_clk_mhz;
  9277. /** unique id identifying the VDEV */
  9278. A_UINT32 vdev_id;
  9279. } wmi_chan_info_event_fixed_param;
  9280. /**
  9281. * Non wlan interference event
  9282. */
  9283. typedef struct {
  9284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  9285. A_UINT32 channel; /* either number or freq in mhz*/
  9286. } wlan_dcs_cw_int;
  9287. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  9288. /**
  9289. * wlan_dcs_im_tgt_stats
  9290. *
  9291. */
  9292. typedef struct _wlan_dcs_im_tgt_stats {
  9293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  9294. /** current running TSF from the TSF-1 */
  9295. A_UINT32 reg_tsf32;
  9296. /** Known last frame rssi, in case of multiple stations, if
  9297. * and at different ranges, this would not gaurantee that
  9298. * this is the least rssi.
  9299. */
  9300. A_UINT32 last_ack_rssi;
  9301. /** Sum of all the failed durations in the last one second interval.
  9302. */
  9303. A_UINT32 tx_waste_time;
  9304. /** count how many times the hal_rxerr_phy is marked, in this
  9305. * time period
  9306. */
  9307. A_UINT32 rx_time;
  9308. A_UINT32 phyerr_cnt;
  9309. /**
  9310. * WLAN IM stats from target to host
  9311. *
  9312. * Below statistics are sent from target to host periodically.
  9313. * These are collected at target as long as target is running
  9314. * and target chip is not in sleep.
  9315. *
  9316. */
  9317. /** listen time from ANI */
  9318. A_INT32 listen_time;
  9319. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  9320. A_UINT32 reg_tx_frame_cnt;
  9321. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  9322. A_UINT32 reg_rx_frame_cnt;
  9323. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  9324. A_UINT32 reg_rxclr_cnt;
  9325. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  9326. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  9327. /** extenstion channel rx clear count */
  9328. A_UINT32 reg_rxclr_ext_cnt;
  9329. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  9330. A_UINT32 reg_ofdm_phyerr_cnt;
  9331. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  9332. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  9333. /** Channel noise floor (units are dBm) */
  9334. A_INT32 chan_nf;
  9335. /** BSS rx cycle count */
  9336. A_UINT32 my_bss_rx_cycle_count;
  9337. } wlan_dcs_im_tgt_stats_t;
  9338. /**
  9339. * wmi_dcs_interference_event_t
  9340. *
  9341. * Right now this is event and stats together. Partly this is
  9342. * because cw interference is handled in target now. This
  9343. * can be done at host itself, if we can carry the NF alone
  9344. * as a stats event. In future this would be done and this
  9345. * event would carry only stats.
  9346. */
  9347. typedef struct {
  9348. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  9349. /**
  9350. * Type of the event present, either the cw interference event, or the wlan_im stats
  9351. */
  9352. A_UINT32 interference_type; /* type of interference, wlan or cw */
  9353. /** pdev_id for identifying the MAC
  9354. * See macros starting with WMI_PDEV_ID_ for values.
  9355. */
  9356. A_UINT32 pdev_id;
  9357. /*
  9358. * Following this struct are these TLVs. Note that they are both array of structures
  9359. * but can have at most one element. Which TLV is empty or has one element depends
  9360. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  9361. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  9362. *
  9363. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  9364. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  9365. */
  9366. } wmi_dcs_interference_event_fixed_param;
  9367. enum wmi_peer_mcast_group_action {
  9368. wmi_peer_mcast_group_action_add = 0,
  9369. wmi_peer_mcast_group_action_del = 1
  9370. };
  9371. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  9372. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  9373. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  9374. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  9375. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  9376. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  9377. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  9378. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  9379. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  9380. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  9381. /* multicast group membership commands */
  9382. /* TODO: Converting this will be tricky since it uses an union.
  9383. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  9384. typedef struct {
  9385. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  9386. A_UINT32 flags;
  9387. wmi_mac_addr ucast_mac_addr;
  9388. /* in network byte order */
  9389. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  9390. A_UINT8 mcast_ip_addr[16];
  9391. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  9392. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  9393. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  9394. A_UINT32 num_filter_addr;
  9395. /* this array should contain the src IPs that are to be filtered during find
  9396. The array should be packed.
  9397. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  9398. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  9399. A_UINT8 vdev_id; /* vdev of this mcast group */
  9400. } wmi_peer_mcast_group_cmd_fixed_param;
  9401. /** Offload Scan and Roaming related commands */
  9402. /** The FW performs 2 different kinds of offload scans independent
  9403. * of host. One is Roam scan which is primarily performed on a
  9404. * station VDEV after association to look for a better AP that
  9405. * the station VDEV can roam to. The second scan is connect scan
  9406. * which is mainly performed when the station is not associated
  9407. * and to look for a matching AP profile from a list of
  9408. * configured profiles. */
  9409. /* flags for roam_scan_mode_cmd
  9410. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  9411. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  9412. /**
  9413. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  9414. * the roam scan mode is one of the periodic, rssi change, both, none.
  9415. * None : Disable Roam scan. No Roam scan at all.
  9416. * Periodic : Scan periodically with a configurable period.
  9417. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  9418. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  9419. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  9420. *
  9421. */
  9422. typedef struct {
  9423. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  9424. A_UINT32 roam_scan_mode;
  9425. A_UINT32 vdev_id;
  9426. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  9427. /*
  9428. * Minimum duration allowed between two consecutive roam scans.
  9429. * Roam scan is not allowed, if duration between two consecutive
  9430. * roam scans is less than this time.
  9431. */
  9432. A_UINT32 min_delay_btw_scans; /* In msec */
  9433. /*
  9434. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  9435. * positions) showing for which roam_trigger_reasons the
  9436. * min_delay_btw_scans constraint should be applied.
  9437. * 0x0 means there is no time restrictions between successive roam scans.
  9438. */
  9439. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  9440. } wmi_roam_scan_mode_fixed_param;
  9441. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  9442. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  9443. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  9444. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  9445. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  9446. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  9447. typedef struct {
  9448. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  9449. A_UINT32 vdev_id;
  9450. A_UINT32 command_arg;
  9451. } wmi_roam_scan_cmd_fixed_param;
  9452. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  9453. /**
  9454. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  9455. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  9456. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  9457. */
  9458. typedef struct {
  9459. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  9460. /** unique id identifying the VDEV, generated by the caller */
  9461. A_UINT32 vdev_id;
  9462. /** roam scan rssi threshold */
  9463. A_UINT32 roam_scan_rssi_thresh;
  9464. /** When using Hw generated beacon RSSI interrupts */
  9465. A_UINT32 roam_rssi_thresh_diff;
  9466. /** 5G scan max count */
  9467. A_UINT32 hirssi_scan_max_count;
  9468. /** 5G scan rssi change threshold value */
  9469. A_UINT32 hirssi_scan_delta;
  9470. /** 5G scan upper bound */
  9471. A_UINT32 hirssi_upper_bound;
  9472. /** roam scan rssi threshold for 5G band.
  9473. * offset from roam_scan_rssi_thres, in dB units
  9474. */
  9475. A_INT32 rssi_thresh_offset_5g;
  9476. /* The TLVs will follow.
  9477. * wmi_roam_scan_extended_threshold_param extended_param;
  9478. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  9479. * wmi_roam_dense_thres_param dense_param;
  9480. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  9481. */
  9482. } wmi_roam_scan_rssi_threshold_fixed_param;
  9483. /**
  9484. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  9485. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  9486. */
  9487. /**
  9488. * btm_config.flags
  9489. * BIT 0 : Enable/Disable the BTM offload.
  9490. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  9491. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  9492. * BIT 6 : Enable/Disable solicited BTM
  9493. * BIT 7-31 : Reserved
  9494. */
  9495. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  9496. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  9497. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  9498. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  9499. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  9500. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  9501. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  9502. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  9503. /** 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 */
  9504. #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 */
  9505. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  9506. /** reserved upto 3 */
  9507. /** 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 */
  9508. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  9509. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  9510. /** reserved upto 7 */
  9511. typedef struct {
  9512. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  9513. A_UINT32 tlv_header;
  9514. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  9515. A_UINT32 vdev_id;
  9516. /** BTM configuration control flags */
  9517. A_UINT32 flags;
  9518. /* BTM query timeout, unit: milliseconds
  9519. * valid value range: 1-10000,
  9520. * default value: 100 will be set if invalid value is given
  9521. */
  9522. A_UINT32 solicited_timeout_ms;
  9523. /* Maximum attempt of solicited BTM
  9524. * If continuous failure reach to this value, solicited BTM to current
  9525. * ESS will be disabled.
  9526. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  9527. * Default value: 3 will be set if invalid value is given
  9528. */
  9529. A_UINT32 max_attempt_cnt;
  9530. /* Time to stick to current AP after BTM, unit: seconds
  9531. * valid value range: 0 -(2^16-1).
  9532. * Either 0 or (2^16)-1 means stick to AP forever.
  9533. * Default value: 300 will be set if invalid value is given
  9534. */
  9535. A_UINT32 stick_time_seconds;
  9536. } wmi_btm_config_fixed_param;
  9537. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  9538. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  9539. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  9540. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  9541. typedef struct {
  9542. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  9543. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  9544. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  9545. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9546. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  9547. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9548. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  9549. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  9550. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  9551. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  9552. } wmi_roam_scan_extended_threshold_param;
  9553. /**
  9554. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  9555. * Applicable when the scan mode is Periodic or both.
  9556. */
  9557. typedef struct {
  9558. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  9559. /** unique id identifying the VDEV, generated by the caller */
  9560. A_UINT32 vdev_id;
  9561. /** roam scan period value */
  9562. A_UINT32 roam_scan_period;
  9563. /** Aging for Roam scans */
  9564. A_UINT32 roam_scan_age;
  9565. } wmi_roam_scan_period_fixed_param;
  9566. /**
  9567. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  9568. * Rssi change threshold used when mode is Rssi change (or) Both.
  9569. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  9570. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  9571. */
  9572. typedef struct {
  9573. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  9574. /** unique id identifying the VDEV, generated by the caller */
  9575. A_UINT32 vdev_id;
  9576. /** roam scan rssi change threshold value */
  9577. A_UINT32 roam_scan_rssi_change_thresh;
  9578. /** When using Hw generated beacon RSSI interrupts */
  9579. A_UINT32 bcn_rssi_weight;
  9580. /** Minimum delay between two 5G scans */
  9581. A_UINT32 hirssi_delay_btw_scans;
  9582. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  9583. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  9584. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  9585. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  9586. /**
  9587. * TLV for roaming channel list
  9588. */
  9589. typedef struct {
  9590. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  9591. /** unique id identifying the VDEV, generated by the caller */
  9592. A_UINT32 vdev_id;
  9593. /** WMI_CHAN_LIST_TAG */
  9594. A_UINT32 chan_list_type;
  9595. /** # if channels to scan */
  9596. A_UINT32 num_chan;
  9597. /**
  9598. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  9599. * structure. The TLV's are:
  9600. * A_UINT32 channel_list[];
  9601. **/
  9602. } wmi_roam_chan_list_fixed_param;
  9603. /** Authentication modes */
  9604. enum {
  9605. WMI_AUTH_NONE, /* no upper level auth */
  9606. WMI_AUTH_OPEN, /* open */
  9607. WMI_AUTH_SHARED, /* shared-key */
  9608. WMI_AUTH_8021X, /* 802.1x */
  9609. WMI_AUTH_AUTO, /* Auto */
  9610. WMI_AUTH_WPA, /* WPA */
  9611. WMI_AUTH_RSNA, /* WPA2/RSNA */
  9612. WMI_AUTH_CCKM, /* CCKM */
  9613. WMI_AUTH_WAPI, /* WAPI */
  9614. WMI_AUTH_AUTO_PSK,
  9615. WMI_AUTH_WPA_PSK,
  9616. WMI_AUTH_RSNA_PSK,
  9617. WMI_AUTH_WAPI_PSK,
  9618. WMI_AUTH_FT_RSNA, /* 11r FT */
  9619. WMI_AUTH_FT_RSNA_PSK,
  9620. WMI_AUTH_RSNA_PSK_SHA256,
  9621. WMI_AUTH_RSNA_8021X_SHA256,
  9622. WMI_AUTH_CCKM_WPA,
  9623. WMI_AUTH_CCKM_RSNA,
  9624. WMI_AUTH_RSNA_FILS_SHA256,
  9625. WMI_AUTH_RSNA_FILS_SHA384,
  9626. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  9627. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  9628. };
  9629. typedef enum {
  9630. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  9631. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  9632. WMI_SCAN_CLIENT_ROAM, /* 3 */
  9633. WMI_SCAN_CLIENT_P2P, /* 4 */
  9634. WMI_SCAN_CLIENT_LPI, /* 5 */
  9635. WMI_SCAN_CLIENT_NAN, /* 6 */
  9636. WMI_SCAN_CLIENT_ANQP, /* 7 */
  9637. WMI_SCAN_CLIENT_OBSS, /* 8 */
  9638. WMI_SCAN_CLIENT_PLM, /* 9 */
  9639. WMI_SCAN_CLIENT_HOST, /* 10 */
  9640. } WMI_SCAN_CLIENT_ID;
  9641. typedef struct {
  9642. /** authentication mode (defined above) */
  9643. A_UINT32 rsn_authmode;
  9644. /** unicast cipher set */
  9645. A_UINT32 rsn_ucastcipherset;
  9646. /** mcast/group cipher set */
  9647. A_UINT32 rsn_mcastcipherset;
  9648. /** mcast/group management frames cipher set */
  9649. A_UINT32 rsn_mcastmgmtcipherset;
  9650. } wmi_rsn_params;
  9651. /** looking for a wps enabled AP */
  9652. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  9653. /** looking for a secure AP */
  9654. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  9655. /** looking for a PMF enabled AP */
  9656. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  9657. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  9658. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  9659. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  9660. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  9661. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  9662. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  9663. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  9664. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  9665. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  9666. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  9667. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  9668. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  9669. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  9670. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  9671. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  9672. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  9673. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  9674. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  9675. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  9676. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  9677. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  9678. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  9679. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  9680. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  9681. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  9682. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  9683. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  9684. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  9685. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  9686. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  9687. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  9688. /* 2 and 3 are reserved */
  9689. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  9690. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  9691. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  9692. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  9693. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  9694. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  9695. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  9696. /**
  9697. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  9698. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  9699. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  9700. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  9701. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  9702. good_bucket_size : bucket size of slot in good zone. Units in dB.
  9703. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  9704. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  9705. */
  9706. /**
  9707. The graph below explains how RSSI scoring percentage is calculated
  9708. as the RSSI improves. In the graph, the derived parameters good_buckets
  9709. and bad_buckets are used. These derived parameters are related to the
  9710. specified parameters as follows:
  9711. good_buckets =
  9712. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  9713. bad_buckets =
  9714. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  9715. | (x0,y0) (x0 = best_rssi, y0 = 100)
  9716. p 100 |-------o
  9717. e | |<--------- (100 - good_rssi_pct)/good_buckets
  9718. r | |___ ,---- good_bucket_size
  9719. c | | |
  9720. e | |_V_
  9721. n | |
  9722. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  9723. 80 | |
  9724. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  9725. | |_____
  9726. | | ,-- bad_bucket_size
  9727. | | |
  9728. | |__v__
  9729. | |
  9730. | |
  9731. 40 | o------------
  9732. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  9733. +------o------------o-----------o------------->
  9734. -50 -70 -80 rssi dBm
  9735. | excellent | good | bad | poor
  9736. | zone | zone | zone | zone
  9737. V V V
  9738. BEST_THRES GOOD_THRES BAD_THRES
  9739. */
  9740. typedef struct {
  9741. A_INT32 best_rssi_threshold;
  9742. A_INT32 good_rssi_threshold;
  9743. A_INT32 bad_rssi_threshold;
  9744. A_UINT32 good_rssi_pcnt;
  9745. A_UINT32 bad_rssi_pcnt;
  9746. A_UINT32 good_bucket_size;
  9747. A_UINT32 bad_bucket_size;
  9748. A_INT32 rssi_pref_5g_rssi_thresh;
  9749. } wmi_roam_cnd_rssi_scoring;
  9750. /**
  9751. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the value respectively.
  9752. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  9753. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  9754. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  9755. BITS 24-31 :- It contains scoring percentage of 1600MHz BW
  9756. The value of each index must be 0-100
  9757. */
  9758. typedef struct {
  9759. A_UINT32 score_pcnt;
  9760. } wmi_roam_cnd_bw_scoring;
  9761. /**
  9762. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  9763. BITS 0-7 :- It contains scoring percentage of 2G
  9764. BITS 8-15 :- It contains scoring percentage of 5G
  9765. BITS 16-23 :- reserved
  9766. BITS 24-31 :- reserved
  9767. The value of each index must be 0-100
  9768. */
  9769. typedef struct {
  9770. A_UINT32 score_pcnt;
  9771. } wmi_roam_cnd_band_scoring;
  9772. /**
  9773. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  9774. BITS 0-7 :- It contains scoring percentage of 1x1
  9775. BITS 8-15 :- It contains scoring percentage of 2x2
  9776. BITS 16-23 :- It contains scoring percentage of 3x3
  9777. BITS 24-31 :- It contains scoring percentage of 4x4
  9778. The value of each index must be 0-100
  9779. */
  9780. typedef struct {
  9781. A_UINT32 score_pcnt;
  9782. } wmi_roam_cnd_nss_scoring;
  9783. /**
  9784. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  9785. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  9786. BITS 8-15 :- SLOT_1
  9787. BITS 16-23 :- SLOT_2
  9788. BITS 24-31 :- SLOT_3
  9789. BITS 32- ...
  9790. num_slot will equally divide 100. e.g, if num_slot = 4
  9791. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  9792. */
  9793. typedef struct {
  9794. A_UINT32 num_slot; /* max 15 */
  9795. A_UINT32 score_pcnt3_to_0;
  9796. A_UINT32 score_pcnt7_to_4;
  9797. A_UINT32 score_pcnt11_to_8;
  9798. A_UINT32 score_pcnt15_to_12;
  9799. } wmi_roam_cnd_esp_qbss_scoring;
  9800. /**
  9801. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  9802. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  9803. BITS 8-15 :- SLOT_1
  9804. BITS 16-23 :- SLOT_2
  9805. BITS 24-31 :- SLOT_3
  9806. BITS 32- ...
  9807. num_slot will equally divide 100. e.g, if num_slot = 4
  9808. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  9809. */
  9810. typedef struct {
  9811. A_UINT32 num_slot; /* max 15 */
  9812. A_UINT32 score_pcnt3_to_0;
  9813. A_UINT32 score_pcnt7_to_4;
  9814. A_UINT32 score_pcnt11_to_8;
  9815. A_UINT32 score_pcnt15_to_12;
  9816. } wmi_roam_cnd_oce_wan_scoring;
  9817. /**
  9818. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  9819. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  9820. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  9821. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  9822. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  9823. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  9824. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  9825. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  9826. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  9827. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  9828. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  9829. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  9830. rssi_scoring :- RSSI scoring information.
  9831. bw_scoring :- channel BW scoring percentage information.
  9832. band_scoring : - band scording percentage information.
  9833. nss_scoring :- NSS scoring percentage information.
  9834. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  9835. oce_wan_scoring : OCE WAN metrics percentage information
  9836. */
  9837. typedef struct {
  9838. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  9839. A_UINT32 disable_bitmap;
  9840. A_INT32 rssi_weightage_pcnt;
  9841. A_INT32 ht_weightage_pcnt;
  9842. A_INT32 vht_weightage_pcnt;
  9843. A_INT32 he_weightage_pcnt;
  9844. A_INT32 bw_weightage_pcnt;
  9845. A_INT32 band_weightage_pcnt;
  9846. A_INT32 nss_weightage_pcnt;
  9847. A_INT32 esp_qbss_weightage_pcnt;
  9848. A_INT32 beamforming_weightage_pcnt;
  9849. A_INT32 pcl_weightage_pcnt;
  9850. A_INT32 oce_wan_weightage_pcnt;
  9851. wmi_roam_cnd_rssi_scoring rssi_scoring;
  9852. wmi_roam_cnd_bw_scoring bw_scoring;
  9853. wmi_roam_cnd_band_scoring band_scoring;
  9854. wmi_roam_cnd_nss_scoring nss_scoring;
  9855. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  9856. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  9857. } wmi_roam_cnd_scoring_param;
  9858. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  9859. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  9860. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  9861. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  9862. */
  9863. typedef struct {
  9864. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  9865. /** flags as defined above */
  9866. A_UINT32 flags;
  9867. /**
  9868. * rssi threshold value in dB: the value of the candidate AP should
  9869. * higher by this threshold than the rssi of the currrently associated AP.
  9870. */
  9871. A_UINT32 rssi_threshold;
  9872. /**
  9873. * ssid vlaue to be matched.
  9874. */
  9875. wmi_ssid ssid;
  9876. /**
  9877. * security params to be matched.
  9878. */
  9879. /** authentication mode (defined above) */
  9880. A_UINT32 rsn_authmode;
  9881. /** unicast cipher set */
  9882. A_UINT32 rsn_ucastcipherset;
  9883. /** mcast/group cipher set */
  9884. A_UINT32 rsn_mcastcipherset;
  9885. /** mcast/group management frames cipher set */
  9886. A_UINT32 rsn_mcastmgmtcipherset;
  9887. /**
  9888. * rssi_abs_threshold value: the value of the candidate AP should
  9889. * higher than this absolute RSSI threshold.
  9890. * Zero means no absolute minimum RSSI is required.
  9891. * units are the offset from the noise floor in dB.
  9892. */
  9893. A_UINT32 rssi_abs_thresh;
  9894. /**
  9895. * bg_rssi_threshold value in dB: For background scan the value of
  9896. * the candidate AP should be higher by this threshold than the rssi
  9897. * of the currrently associated AP.
  9898. */
  9899. A_UINT32 bg_rssi_threshold;
  9900. } wmi_ap_profile;
  9901. /** Support early stop roaming scanning when finding a strong candidate AP
  9902. * A 'strong' candidate is
  9903. * 1) Is eligible candidate
  9904. * (all conditions are met in existing candidate selection).
  9905. * 2) Its rssi is better than earlystop threshold.
  9906. * Earlystop threshold will be relaxed as each channel is scanned.
  9907. */
  9908. typedef struct {
  9909. A_UINT32 tlv_header;
  9910. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  9911. A_UINT32 roam_earlystop_thres_min;
  9912. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  9913. A_UINT32 roam_earlystop_thres_max;
  9914. } wmi_roam_earlystop_rssi_thres_param;
  9915. typedef struct {
  9916. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  9917. A_UINT32 tlv_header;
  9918. /** rssi threshold offset under trffic and dense env */
  9919. A_UINT32 roam_dense_rssi_thres_offset;
  9920. /** minimum number of APs to determine dense env */
  9921. A_UINT32 roam_dense_min_aps;
  9922. /** initial dense status detected by host at the time of initial connection */
  9923. A_UINT32 roam_dense_status;
  9924. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  9925. A_UINT32 roam_dense_traffic_thres;
  9926. } wmi_roam_dense_thres_param;
  9927. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  9928. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  9929. * Bit 1-31: Reserved
  9930. */
  9931. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  9932. typedef struct {
  9933. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  9934. A_UINT32 tlv_header;
  9935. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  9936. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  9937. /** 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 */
  9938. A_UINT32 roam_bg_scan_client_bitmap;
  9939. /** roam scan rssi threshold for 2G band.
  9940. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  9941. */
  9942. A_INT32 bad_rssi_thresh_offset_2g;
  9943. /* flags for background roaming */
  9944. A_UINT32 flags;
  9945. } wmi_roam_bg_scan_roaming_param;
  9946. /** Beacon filter wmi command info */
  9947. #define BCN_FLT_MAX_SUPPORTED_IES 256
  9948. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  9949. typedef struct bss_bcn_stats {
  9950. A_UINT32 vdev_id;
  9951. A_UINT32 bss_bcnsdropped;
  9952. A_UINT32 bss_bcnsdelivered;
  9953. } wmi_bss_bcn_stats_t;
  9954. typedef struct bcn_filter_stats {
  9955. A_UINT32 bcns_dropped;
  9956. A_UINT32 bcns_delivered;
  9957. A_UINT32 activefilters;
  9958. wmi_bss_bcn_stats_t bss_stats;
  9959. } wmi_bcnfilter_stats_t;
  9960. typedef struct wmi_add_bcn_filter_cmd {
  9961. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  9962. A_UINT32 vdev_id;
  9963. /*
  9964. * Following this structure is the TLV:
  9965. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  9966. */
  9967. } wmi_add_bcn_filter_cmd_fixed_param;
  9968. typedef struct wmi_rmv_bcn_filter_cmd {
  9969. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  9970. A_UINT32 vdev_id;
  9971. } wmi_rmv_bcn_filter_cmd_fixed_param;
  9972. #define WMI_BCN_SEND_DTIM_ZERO 1
  9973. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  9974. typedef struct wmi_bcn_send_from_host {
  9975. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  9976. A_UINT32 vdev_id;
  9977. A_UINT32 data_len;
  9978. union {
  9979. A_UINT32 frag_ptr; /* Physical address of the frame */
  9980. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  9981. };
  9982. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  9983. A_UINT32 dtim_flag; /* to control CABQ traffic */
  9984. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  9985. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  9986. } wmi_bcn_send_from_host_cmd_fixed_param;
  9987. /* cmd to support bcn snd for all vaps at once */
  9988. typedef struct wmi_pdev_send_bcn {
  9989. A_UINT32 num_vdevs;
  9990. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  9991. } wmi_pdev_send_bcn_cmd_t;
  9992. typedef struct wmi_fd_send_from_host {
  9993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  9994. A_UINT32 vdev_id;
  9995. A_UINT32 data_len;
  9996. union {
  9997. A_UINT32 frag_ptr; /* Physical address of the frame */
  9998. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  9999. };
  10000. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  10001. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  10002. } wmi_fd_send_from_host_cmd_fixed_param;
  10003. /*
  10004. * WMI command structure for FILS feature enable/disable
  10005. */
  10006. typedef struct {
  10007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  10008. /* VDEV identifier */
  10009. A_UINT32 vdev_id;
  10010. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames with this period (in TU), 0 - disable FD frames */
  10011. } wmi_enable_fils_cmd_fixed_param;
  10012. /*
  10013. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  10014. */
  10015. typedef struct {
  10016. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  10017. /** id of AP criteria */
  10018. A_UINT32 id;
  10019. /** unique id identifying the VDEV, generated by the caller */
  10020. A_UINT32 vdev_id;
  10021. /*
  10022. * Following this structure is the TLV:
  10023. * wmi_ap_profile ap_profile; <-- AP profile info
  10024. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  10025. */
  10026. } wmi_roam_ap_profile_fixed_param;
  10027. /**
  10028. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  10029. */
  10030. typedef struct {
  10031. /** id of AP criteria */
  10032. A_UINT32 id;
  10033. /** unique id identifying the VDEV, generated by the caller */
  10034. A_UINT32 vdev_id;
  10035. /** AP profile info */
  10036. wmi_ap_profile ap_profile;
  10037. } wmi_ofl_scan_add_ap_profile;
  10038. /**
  10039. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  10040. */
  10041. typedef struct {
  10042. /** id of AP criteria */
  10043. A_UINT32 id;
  10044. /** unique id identifying the VDEV, generated by the caller */
  10045. A_UINT32 vdev_id;
  10046. } wmi_ofl_scan_remove_ap_profile;
  10047. /**
  10048. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  10049. * 0 will disable ofload scan and a very low value will perform a continous
  10050. * scan.
  10051. */
  10052. typedef struct {
  10053. /** offload scan period value, used for scans used when not connected */
  10054. A_UINT32 ofl_scan_period;
  10055. } wmi_ofl_scan_period;
  10056. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  10057. #define ROAM_OFFLOAD_PMK_BYTES (32)
  10058. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  10059. #define ROAM_OFFLOAD_KRK_BYTES (16)
  10060. #define ROAM_OFFLOAD_BTK_BYTES (32)
  10061. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  10062. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  10063. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  10064. typedef struct {
  10065. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  10066. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  10067. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  10068. A_UINT32 select_5g_margin;
  10069. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  10070. A_UINT32 capability;
  10071. A_UINT32 ht_caps_info;
  10072. A_UINT32 ampdu_param;
  10073. A_UINT32 ht_ext_cap;
  10074. A_UINT32 ht_txbf;
  10075. A_UINT32 asel_cap;
  10076. A_UINT32 qos_enabled;
  10077. A_UINT32 qos_caps;
  10078. A_UINT32 wmm_caps;
  10079. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  10080. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  10081. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  10082. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  10083. } wmi_roam_offload_tlv_param;
  10084. /* flags for 11i offload */
  10085. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  10086. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  10087. /* from bit 2 to bit 31 are reserved */
  10088. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  10089. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  10090. } while (0)
  10091. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  10092. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  10093. } while (0)
  10094. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  10095. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  10096. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  10097. do { \
  10098. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  10099. } while (0)
  10100. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  10101. do { \
  10102. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  10103. } while (0)
  10104. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  10105. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  10106. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  10107. typedef struct {
  10108. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  10109. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  10110. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  10111. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  10112. } wmi_roam_11i_offload_tlv_param;
  10113. /* This TLV will be filled only in case of 11R*/
  10114. typedef struct {
  10115. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  10116. A_UINT32 mdie_present;
  10117. A_UINT32 mdid;
  10118. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  10119. A_UINT32 r0kh_id_len;
  10120. 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 */
  10121. A_UINT32 psk_msk_len; /**length of psk_msk*/
  10122. } wmi_roam_11r_offload_tlv_param;
  10123. /* This TLV will be filled only in case of ESE */
  10124. typedef struct {
  10125. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  10126. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  10127. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  10128. } wmi_roam_ese_offload_tlv_param;
  10129. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  10130. * generated when ever a better AP is found in the recent roam scan (or)
  10131. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  10132. * from the current AP.
  10133. */
  10134. typedef struct {
  10135. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  10136. /** unique id identifying the VDEV, generated by the caller */
  10137. A_UINT32 vdev_id;
  10138. /** reason for roam event */
  10139. A_UINT32 reason;
  10140. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  10141. A_UINT32 rssi;
  10142. /** roam notification */
  10143. A_UINT32 notif;
  10144. } wmi_roam_event_fixed_param;
  10145. /* roam_reason: bits 0-3 */
  10146. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  10147. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  10148. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  10149. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  10150. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  10151. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  10152. SSID and Security profile in
  10153. WMI_ROAM_AP_PROFILE, found during scan
  10154. triggered upon FINAL_BMISS **/
  10155. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  10156. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  10157. * Result code of WMI_ROAM_INVOKE_CMDID.
  10158. * Any roaming failure before reassociation will be indicated to host
  10159. * with this reason.
  10160. * Any roaming failure after reassociation will be indicated to host with
  10161. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  10162. */
  10163. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  10164. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  10165. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  10166. /* reserved up through 0xF */
  10167. /* subnet status: bits 4-5 */
  10168. typedef enum
  10169. {
  10170. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  10171. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  10172. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  10173. } wmi_roam_subnet_change_status;
  10174. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  10175. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  10176. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  10177. do { \
  10178. (roam_reason) |= \
  10179. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  10180. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  10181. } while (0)
  10182. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  10183. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  10184. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  10185. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  10186. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  10187. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  10188. do { \
  10189. (roam_reason) |= \
  10190. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  10191. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  10192. } while (0)
  10193. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  10194. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  10195. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  10196. /* roaming notification */
  10197. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  10198. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  10199. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  10200. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  10201. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  10202. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  10203. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  10204. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  10205. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  10206. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  10207. */
  10208. typedef struct
  10209. {
  10210. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  10211. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  10212. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  10213. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  10214. } wmi_ric_request_fixed_param;
  10215. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  10216. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  10217. */
  10218. typedef struct{
  10219. A_UINT32 tlv_header;
  10220. A_UINT32 ts_info; /** bits value of TS Info field.*/
  10221. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  10222. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  10223. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  10224. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  10225. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  10226. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  10227. A_UINT32 svc_start_time; /**The Service Start Time field*/
  10228. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  10229. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  10230. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  10231. A_UINT32 max_burst_size; /**The Burst Size field*/
  10232. A_UINT32 delay_bound; /**The Delay Bound field*/
  10233. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  10234. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  10235. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  10236. } wmi_ric_tspec;
  10237. /* flags for roam_invoke_cmd */
  10238. /* add this channel into roam cache channel list after this command is finished */
  10239. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  10240. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  10241. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  10242. /* during host-invoked roaming, don't send null data frame to AP */
  10243. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  10244. /* from bit 3 to bit 31 are reserved */
  10245. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  10246. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  10247. } while (0)
  10248. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  10249. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  10250. } while (0)
  10251. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  10252. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  10253. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  10254. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  10255. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  10256. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  10257. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  10258. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  10259. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  10260. *
  10261. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  10262. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  10263. This command can be used to add specific channel into roam cached channel list by following
  10264. <roam_scan_ch_mode> = 0
  10265. <roam_ap_sel_mode> = 0
  10266. <roam_delay> = 0
  10267. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  10268. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  10269. <channel_no> = channel list to be added
  10270. */
  10271. typedef struct {
  10272. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  10273. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  10274. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  10275. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  10276. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  10277. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  10278. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  10279. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  10280. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  10281. /**
  10282. * TLV (tag length value) parameters follows roam_invoke_req
  10283. * The TLV's are:
  10284. * A_UINT32 channel_list[];
  10285. * wmi_mac_addr bssid_list[];
  10286. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  10287. * A_UINT8 bcn_prb_frm[];
  10288. */
  10289. } wmi_roam_invoke_cmd_fixed_param;
  10290. /* Definition for op_bitmap */
  10291. enum {
  10292. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  10293. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  10294. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  10295. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  10296. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  10297. };
  10298. /** lca_enable_source_bitmap */
  10299. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  10300. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  10301. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  10302. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  10303. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  10304. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  10305. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  10306. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  10307. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  10308. typedef struct {
  10309. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rssi_rejection_oce_config_param */
  10310. A_UINT32 tlv_header;
  10311. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  10312. wmi_mac_addr bssid;
  10313. /** Disallowed AP for certain duration, in units of milliseconds */
  10314. A_UINT32 remaining_disallow_duration;
  10315. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  10316. A_INT32 requested_rssi;
  10317. } wmi_roam_rssi_rejection_oce_config_param;
  10318. typedef struct {
  10319. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  10320. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  10321. A_UINT32 flags; /** flags for filter */
  10322. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  10323. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  10324. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  10325. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  10326. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  10327. /**
  10328. * TLV (tag length value) parameters follows roam_filter_list_cmd
  10329. * The TLV's are:
  10330. * wmi_mac_addr bssid_black_list[];
  10331. * wmi_ssid ssid_white_list[];
  10332. * wmi_mac_addr bssid_preferred_list[];
  10333. * A_UINT32 bssid_preferred_factor[];
  10334. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  10335. * wmi_roam_rssi_rejection_oce_config_param rssi_rejection_list[]
  10336. */
  10337. } wmi_roam_filter_fixed_param;
  10338. typedef struct {
  10339. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  10340. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  10341. 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 */
  10342. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  10343. 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) */
  10344. } wmi_roam_lca_disallow_config_tlv_param;
  10345. typedef struct {
  10346. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  10347. } WMI_IPV4_ADDR;
  10348. typedef struct _WMI_IPV6_ADDR {
  10349. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  10350. } WMI_IPV6_ADDR;
  10351. /* flags for subnet change detection */
  10352. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  10353. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  10354. /* bit 2 to bit 31 are reserved */
  10355. /* set IPv4 enabled/disabled flag and get the flag */
  10356. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  10357. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  10358. } while (0)
  10359. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  10360. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  10361. } while (0)
  10362. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  10363. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  10364. /* set IPv6 enabled flag, disabled and get the flag */
  10365. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  10366. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  10367. } while (0)
  10368. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  10369. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  10370. } while (0)
  10371. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  10372. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  10373. /**
  10374. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  10375. * to FW. FW uses these parameters for subnet change detection.
  10376. */
  10377. typedef struct {
  10378. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  10379. /** unique id identifying the VDEV, generated by the caller */
  10380. A_UINT32 vdev_id;
  10381. /** IPv4/IPv6 enabled/disabled */
  10382. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  10383. A_UINT32 flag;
  10384. /** Gateway MAC address */
  10385. wmi_mac_addr inet_gw_mac_addr;
  10386. /** IP addresses */
  10387. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  10388. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  10389. /** Number of software retries for ARP/Neighbor solicitation request */
  10390. A_UINT32 max_retries;
  10391. /** timeout in milliseconds for each ARP request*/
  10392. A_UINT32 timeout;
  10393. /** number of skipped aps **/
  10394. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  10395. /**
  10396. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  10397. * structure. The TLV's are:
  10398. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  10399. **/
  10400. } wmi_roam_subnet_change_config_fixed_param;
  10401. /** WMI_PROFILE_MATCH_EVENT: offload scan
  10402. * generated when ever atleast one of the matching profiles is found
  10403. * in recent NLO scan. no data is carried with the event.
  10404. */
  10405. /** P2P specific commands */
  10406. /**
  10407. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  10408. * FW to generate P2P IE tobe carried in probe response frames.
  10409. * FW will respond to probe requests while in listen state.
  10410. */
  10411. typedef struct {
  10412. /* number of secondary device types,supported */
  10413. A_UINT32 num_secondary_dev_types;
  10414. /**
  10415. * followed by 8 bytes of primary device id and
  10416. * num_secondary_dev_types * 8 bytes of secondary device
  10417. * id.
  10418. */
  10419. } wmi_p2p_dev_set_device_info;
  10420. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  10421. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  10422. * the operating channel of the VDEV.
  10423. */
  10424. typedef struct {
  10425. /* 1:enable disoverability, 0:disable discoverability */
  10426. A_UINT32 enable_discoverability;
  10427. } wmi_p2p_set_discoverability;
  10428. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  10429. * beacons generated by FW. used in FW beacon mode.
  10430. * the FW will add this IE to beacon in addition to the beacon
  10431. * template set by WMI_BCN_TMPL_CMDID command.
  10432. */
  10433. typedef struct {
  10434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  10435. /** unique id identifying the VDEV, generated by the caller */
  10436. A_UINT32 vdev_id;
  10437. /* ie length */
  10438. A_UINT32 ie_buf_len;
  10439. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  10440. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  10441. */
  10442. } wmi_p2p_go_set_beacon_ie_fixed_param;
  10443. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  10444. * probe response generated by FW. used in FW beacon mode.
  10445. * the FW will add this IE to probe response in addition to the probe response
  10446. * template set by WMI_PRB_TMPL_CMDID command.
  10447. */
  10448. typedef struct {
  10449. /** unique id identifying the VDEV, generated by the caller */
  10450. A_UINT32 vdev_id;
  10451. /* ie length */
  10452. A_UINT32 ie_buf_len;
  10453. /*followed by byte stream of ie data of length ie_buf_len */
  10454. } wmi_p2p_go_set_probe_resp_ie;
  10455. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  10456. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  10457. * and action frames received by the P2P Client.
  10458. * Note: This command is currently used only for Apple P2P implementation.
  10459. */
  10460. typedef struct {
  10461. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  10462. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  10463. A_UINT32 p2p_ie_oui_type;
  10464. /** OS specific NoA Attribute ID */
  10465. A_UINT32 p2p_noa_attribute;
  10466. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  10467. /*----P2P disc offload definition ----*/
  10468. typedef struct {
  10469. A_UINT32 pattern_type;
  10470. /**
  10471. * TLV (tag length value) paramerters follow the pattern structure.
  10472. * TLV can contain bssid list, ssid list and
  10473. * ie. the TLV tags are defined above;
  10474. */
  10475. } wmi_p2p_disc_offload_pattern_cmd;
  10476. typedef struct {
  10477. /* unique id identifying the VDEV, generated by the caller */
  10478. A_UINT32 vdev_id;
  10479. /* mgmt type of the ie*/
  10480. A_UINT32 mgmt_type;
  10481. /* ie length */
  10482. A_UINT32 ie_buf_len;
  10483. /*followed by byte stream of ie data of length ie_buf_len */
  10484. } wmi_p2p_disc_offload_appie_cmd;
  10485. typedef struct {
  10486. /* enable/disable p2p find offload*/
  10487. A_UINT32 enable;
  10488. /* unique id identifying the VDEV, generated by the caller */
  10489. A_UINT32 vdev_id;
  10490. /* p2p find type */
  10491. A_UINT32 disc_type;
  10492. /* p2p find perodic */
  10493. A_UINT32 perodic;
  10494. /* p2p find listen channel */
  10495. A_UINT32 listen_channel;
  10496. /* p2p find full channel number */
  10497. A_UINT32 num_scan_chans;
  10498. /**
  10499. * TLV (tag length value) paramerters follow the pattern structure.
  10500. * TLV contain channel list
  10501. */
  10502. } wmi_p2p_disc_offload_config_cmd;
  10503. /*----P2P OppPS definition ----*/
  10504. typedef struct {
  10505. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  10506. A_UINT32 tlv_header;
  10507. /* unique id identifying the VDEV, generated by the caller */
  10508. A_UINT32 vdev_id;
  10509. /* OppPS attributes */
  10510. /** Bit 0: Indicate enable/disable of OppPS
  10511. * Bits 7-1: Ctwindow in TUs
  10512. * Bits 31-8: Reserved
  10513. */
  10514. A_UINT32 oppps_attr;
  10515. } wmi_p2p_set_oppps_cmd_fixed_param;
  10516. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  10517. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  10518. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  10519. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  10520. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  10521. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  10522. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  10523. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  10524. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  10525. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  10526. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  10527. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  10528. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  10529. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  10530. typedef enum p2p_lo_start_ctrl_flags_e {
  10531. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  10532. } p2p_lo_start_ctrl_flags;
  10533. #define P2P_LO_PER_DEV_TYPE_LEN 8
  10534. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  10535. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  10536. #define P2P_LO_PROB_RESP_MAX_LEN 512
  10537. typedef struct {
  10538. A_UINT32 tlv_header;
  10539. A_UINT32 vdev_id;
  10540. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  10541. A_UINT32 channel; /* MHz */
  10542. A_UINT32 period; /* ms */
  10543. A_UINT32 interval; /* ms, interval should be larger than period */
  10544. A_UINT32 count; /* 0 means forever */
  10545. /*
  10546. * device_types_len specifies the number of bytes in the
  10547. * device_types_data[] byte-array TLV that follows this TLV.
  10548. * The data in device_types_data[] is in 8-byte elements, so
  10549. * device_types_len will be a multiple of 8.
  10550. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  10551. */
  10552. A_UINT32 device_types_len;
  10553. /*
  10554. * prob_resp_len specifies the number of bytes in the
  10555. * prob_resp_data[] byte-array TLV that follows this TLV.
  10556. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  10557. */
  10558. A_UINT32 prob_resp_len;
  10559. /*
  10560. * Two other TLVs follow this TLV:
  10561. * A_UINT8 device_types_data[device_types_len];
  10562. * A_UINT8 prob_resp_data[prob_resp_len];
  10563. * The information in device_types_data[] and prob_resp_data[]
  10564. * needs to be provided to the target in over-the-air byte order.
  10565. * On a big-endian host, if device_types_data and prob_resp_data
  10566. * are initially in the correct over-the-air byte order,
  10567. * the automatic byteswap for endianness-correction during WMI
  10568. * message download will mess up the byte order.
  10569. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  10570. * within each quad-byte segment of device_types_data[] and
  10571. * prob_resp_data[], so that the automatic byte-swap applied during
  10572. * WMI download from a big-endian host to the little-endian target
  10573. * will restore device_types_data and prob_resp_data into the
  10574. * correct byte ordering.
  10575. */
  10576. } wmi_p2p_lo_start_cmd_fixed_param;
  10577. typedef struct {
  10578. A_UINT32 tlv_header;
  10579. A_UINT32 vdev_id;
  10580. } wmi_p2p_lo_stop_cmd_fixed_param;
  10581. typedef enum p2p_lo_stopped_reason_e {
  10582. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  10583. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  10584. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  10585. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  10586. } p2p_lo_stopped_reason;
  10587. typedef struct {
  10588. A_UINT32 tlv_header;
  10589. A_UINT32 vdev_id;
  10590. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  10591. } wmi_p2p_lo_stopped_event_fixed_param;
  10592. typedef enum {
  10593. WMI_MNT_FILTER_CONFIG_MANAGER,
  10594. WMI_MNT_FILTER_CONFIG_CONTROL,
  10595. WMI_MNT_FILTER_CONFIG_DATA,
  10596. WMI_MNT_FILTER_CONFIG_ALL,
  10597. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  10598. } WMI_MNT_FILTER_CONFIG_TYPE;
  10599. typedef struct {
  10600. A_UINT32 tlv_header;
  10601. A_UINT32 vdev_id;
  10602. A_UINT32 clear_or_set;
  10603. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  10604. } wmi_mnt_filter_cmd_fixed_param;
  10605. typedef struct {
  10606. A_UINT32 time32; /* upper 32 bits of time stamp */
  10607. A_UINT32 time0; /* lower 32 bits of time stamp */
  10608. } A_TIME64;
  10609. typedef enum wmi_peer_sta_kickout_reason {
  10610. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  10611. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  10612. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  10613. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  10614. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  10615. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  10616. } PEER_KICKOUT_REASON;
  10617. typedef struct {
  10618. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  10619. /** peer mac address */
  10620. wmi_mac_addr peer_macaddr;
  10621. /** Reason code, defined as above */
  10622. A_UINT32 reason;
  10623. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  10624. A_UINT32 rssi;
  10625. } wmi_peer_sta_kickout_event_fixed_param;
  10626. #define WMI_WLAN_PROFILE_MAX_HIST 3
  10627. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  10628. typedef struct _wmi_wlan_profile_t {
  10629. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  10630. A_UINT32 id;
  10631. A_UINT32 cnt;
  10632. A_UINT32 tot;
  10633. A_UINT32 min;
  10634. A_UINT32 max;
  10635. A_UINT32 hist_intvl;
  10636. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  10637. } wmi_wlan_profile_t;
  10638. typedef struct _wmi_wlan_profile_ctx_t {
  10639. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  10640. A_UINT32 tot; /* time in us */
  10641. A_UINT32 tx_msdu_cnt;
  10642. A_UINT32 tx_mpdu_cnt;
  10643. A_UINT32 tx_ppdu_cnt;
  10644. A_UINT32 rx_msdu_cnt;
  10645. A_UINT32 rx_mpdu_cnt;
  10646. A_UINT32 bin_count;
  10647. } wmi_wlan_profile_ctx_t;
  10648. typedef struct {
  10649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  10650. A_UINT32 enable;
  10651. } wmi_wlan_profile_trigger_cmd_fixed_param;
  10652. typedef struct {
  10653. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  10654. A_UINT32 value;
  10655. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  10656. typedef struct {
  10657. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  10658. A_UINT32 profile_id;
  10659. A_UINT32 value;
  10660. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  10661. typedef struct {
  10662. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  10663. A_UINT32 profile_id;
  10664. A_UINT32 enable;
  10665. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  10666. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  10667. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  10668. when comparing wifi header.*/
  10669. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  10670. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  10671. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  10672. #define WOW_DEFAULT_BITMASK_SIZE 146
  10673. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  10674. #define WOW_MAX_BITMAP_FILTERS 32
  10675. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  10676. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  10677. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  10678. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  10679. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  10680. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  10681. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  10682. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  10683. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  10684. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  10685. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  10686. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  10687. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  10688. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  10689. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  10690. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  10691. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  10692. typedef enum pattern_type_e {
  10693. WOW_PATTERN_MIN = 0,
  10694. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  10695. WOW_IPV4_SYNC_PATTERN,
  10696. WOW_IPV6_SYNC_PATTERN,
  10697. WOW_WILD_CARD_PATTERN,
  10698. WOW_TIMER_PATTERN,
  10699. WOW_MAGIC_PATTERN,
  10700. WOW_IPV6_RA_PATTERN,
  10701. WOW_IOAC_PKT_PATTERN,
  10702. WOW_IOAC_TMR_PATTERN,
  10703. WOW_IOAC_SOCK_PATTERN,
  10704. WOW_PATTERN_MAX
  10705. } WOW_PATTERN_TYPE;
  10706. typedef enum event_type_e {
  10707. WOW_BMISS_EVENT = 0,
  10708. WOW_BETTER_AP_EVENT,
  10709. WOW_DEAUTH_RECVD_EVENT,
  10710. WOW_MAGIC_PKT_RECVD_EVENT,
  10711. WOW_GTK_ERR_EVENT,
  10712. WOW_FOURWAY_HSHAKE_EVENT,
  10713. WOW_EAPOL_RECVD_EVENT,
  10714. WOW_NLO_DETECTED_EVENT,
  10715. WOW_DISASSOC_RECVD_EVENT,
  10716. WOW_PATTERN_MATCH_EVENT,
  10717. WOW_CSA_IE_EVENT,
  10718. WOW_PROBE_REQ_WPS_IE_EVENT,
  10719. WOW_AUTH_REQ_EVENT,
  10720. WOW_ASSOC_REQ_EVENT,
  10721. WOW_HTT_EVENT,
  10722. WOW_RA_MATCH_EVENT,
  10723. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  10724. WOW_IOAC_MAGIC_EVENT,
  10725. WOW_IOAC_SHORT_EVENT,
  10726. WOW_IOAC_EXTEND_EVENT,
  10727. WOW_IOAC_TIMER_EVENT,
  10728. WOW_DFS_PHYERR_RADAR_EVENT,
  10729. WOW_BEACON_EVENT,
  10730. WOW_CLIENT_KICKOUT_EVENT,
  10731. WOW_NAN_EVENT,
  10732. WOW_EXTSCAN_EVENT,
  10733. WOW_IOAC_REV_KA_FAIL_EVENT,
  10734. WOW_IOAC_SOCK_EVENT,
  10735. WOW_NLO_SCAN_COMPLETE_EVENT,
  10736. WOW_NAN_DATA_EVENT,
  10737. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  10738. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  10739. WOW_TDLS_CONN_TRACKER_EVENT,
  10740. WOW_CRITICAL_LOG_EVENT,
  10741. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  10742. WOW_11D_SCAN_EVENT,
  10743. WOW_SAP_OBSS_DETECTION_EVENT,
  10744. WOW_BSS_COLOR_COLLISION_DETECT_EVENT,
  10745. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,
  10746. } WOW_WAKE_EVENT_TYPE;
  10747. typedef enum wake_reason_e {
  10748. WOW_REASON_UNSPECIFIED = -1,
  10749. WOW_REASON_NLOD = 0,
  10750. WOW_REASON_AP_ASSOC_LOST,
  10751. WOW_REASON_LOW_RSSI,
  10752. WOW_REASON_DEAUTH_RECVD,
  10753. WOW_REASON_DISASSOC_RECVD,
  10754. WOW_REASON_GTK_HS_ERR,
  10755. WOW_REASON_EAP_REQ,
  10756. WOW_REASON_FOURWAY_HS_RECV,
  10757. WOW_REASON_TIMER_INTR_RECV,
  10758. WOW_REASON_PATTERN_MATCH_FOUND,
  10759. WOW_REASON_RECV_MAGIC_PATTERN,
  10760. WOW_REASON_P2P_DISC,
  10761. WOW_REASON_WLAN_HB,
  10762. WOW_REASON_CSA_EVENT,
  10763. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  10764. WOW_REASON_AUTH_REQ_RECV,
  10765. WOW_REASON_ASSOC_REQ_RECV,
  10766. WOW_REASON_HTT_EVENT,
  10767. WOW_REASON_RA_MATCH,
  10768. WOW_REASON_HOST_AUTO_SHUTDOWN,
  10769. WOW_REASON_IOAC_MAGIC_EVENT,
  10770. WOW_REASON_IOAC_SHORT_EVENT,
  10771. WOW_REASON_IOAC_EXTEND_EVENT,
  10772. WOW_REASON_IOAC_TIMER_EVENT,
  10773. WOW_REASON_ROAM_HO,
  10774. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  10775. WOW_REASON_BEACON_RECV,
  10776. WOW_REASON_CLIENT_KICKOUT_EVENT,
  10777. WOW_REASON_NAN_EVENT,
  10778. WOW_REASON_EXTSCAN,
  10779. WOW_REASON_RSSI_BREACH_EVENT,
  10780. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  10781. WOW_REASON_IOAC_SOCK_EVENT,
  10782. WOW_REASON_NLO_SCAN_COMPLETE,
  10783. WOW_REASON_PACKET_FILTER_MATCH,
  10784. WOW_REASON_ASSOC_RES_RECV,
  10785. WOW_REASON_REASSOC_REQ_RECV,
  10786. WOW_REASON_REASSOC_RES_RECV,
  10787. WOW_REASON_ACTION_FRAME_RECV,
  10788. WOW_REASON_BPF_ALLOW,
  10789. WOW_REASON_NAN_DATA,
  10790. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  10791. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  10792. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  10793. WOW_REASON_CRITICAL_LOG,
  10794. WOW_REASON_P2P_LISTEN_OFFLOAD,
  10795. WOW_REASON_NAN_EVENT_WAKE_HOST,
  10796. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  10797. WOW_REASON_11D_SCAN,
  10798. WOW_REASON_THERMAL_CHANGE,
  10799. WOW_REASON_OIC_PING_OFFLOAD,
  10800. WOW_REASON_WLAN_DHCP_RENEW,
  10801. WOW_REASON_SAP_OBSS_DETECTION,
  10802. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  10803. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  10804. WOW_REASON_WLAN_MD, /* motion detected */
  10805. WOW_REASON_WLAN_BL, /* baselining done */
  10806. WOW_REASON_DEBUG_TEST = 0xFF,
  10807. } WOW_WAKE_REASON_TYPE;
  10808. typedef enum {
  10809. WOW_IFACE_PAUSE_ENABLED,
  10810. WOW_IFACE_PAUSE_DISABLED
  10811. } WOW_IFACE_STATUS;
  10812. enum {
  10813. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  10814. /* WMI_WOW_FLAG_SEND_PM_PME
  10815. * Some platforms have issues if the PM_PME message is sent after WoW,
  10816. * so don't send PM_PME after WoW unless the host uses this flag
  10817. * to request it.
  10818. */
  10819. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  10820. /* Flag to indicate unit test */
  10821. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  10822. /* Force HTC wakeup */
  10823. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  10824. /* Enable L1SS sleep for PCIE DRV case */
  10825. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  10826. };
  10827. typedef struct {
  10828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  10829. A_UINT32 enable;
  10830. A_UINT32 pause_iface_config;
  10831. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  10832. } wmi_wow_enable_cmd_fixed_param;
  10833. typedef struct {
  10834. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  10835. /** Reserved for future use */
  10836. A_UINT32 reserved0;
  10837. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  10838. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  10839. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  10840. typedef struct {
  10841. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  10842. A_UINT32 vdev_id;
  10843. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  10844. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  10845. typedef struct bitmap_pattern_s {
  10846. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  10847. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  10848. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  10849. A_UINT32 pattern_offset;
  10850. A_UINT32 pattern_len;
  10851. A_UINT32 bitmask_len;
  10852. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  10853. } WOW_BITMAP_PATTERN_T;
  10854. typedef struct ipv4_sync_s {
  10855. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  10856. A_UINT32 ipv4_src_addr;
  10857. A_UINT32 ipv4_dst_addr;
  10858. A_UINT32 tcp_src_prt;
  10859. A_UINT32 tcp_dst_prt;
  10860. } WOW_IPV4_SYNC_PATTERN_T;
  10861. typedef struct ipv6_sync_s {
  10862. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  10863. A_UINT32 ipv6_src_addr[4];
  10864. A_UINT32 ipv6_dst_addr[4];
  10865. A_UINT32 tcp_src_prt;
  10866. A_UINT32 tcp_dst_prt;
  10867. } WOW_IPV6_SYNC_PATTERN_T;
  10868. typedef struct WOW_MAGIC_PATTERN_CMD
  10869. {
  10870. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  10871. wmi_mac_addr macaddr;
  10872. } WOW_MAGIC_PATTERN_CMD;
  10873. typedef enum wow_ioac_pattern_type {
  10874. WOW_IOAC_MAGIC_PATTERN = 1,
  10875. WOW_IOAC_SHORT_PATTERN,
  10876. WOW_IOAC_EXTEND_PATTERN,
  10877. } WOW_IOAC_PATTERN_TYPE;
  10878. typedef struct ioac_sock_pattern_s {
  10879. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  10880. A_UINT32 id;
  10881. A_UINT32 local_ipv4;
  10882. A_UINT32 remote_ipv4;
  10883. A_UINT32 local_port;
  10884. A_UINT32 remote_port;
  10885. A_UINT32 pattern_len; /* units = bytes */
  10886. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  10887. WMI_IPV6_ADDR local_ipv6;
  10888. WMI_IPV6_ADDR remote_ipv6;
  10889. A_UINT32 ack_nak_len;
  10890. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10891. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10892. } WOW_IOAC_SOCK_PATTERN_T;
  10893. typedef struct ioac_pkt_pattern_s {
  10894. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  10895. A_UINT32 pattern_type;
  10896. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  10897. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  10898. A_UINT32 pattern_len;
  10899. A_UINT32 random_len;
  10900. } WOW_IOAC_PKT_PATTERN_T;
  10901. typedef struct ioac_tmr_pattern_s {
  10902. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  10903. A_UINT32 wake_in_s;
  10904. A_UINT32 vdev_id;
  10905. } WOW_IOAC_TMR_PATTERN_T;
  10906. typedef struct {
  10907. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  10908. A_UINT32 nID;
  10909. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  10910. typedef struct {
  10911. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  10912. A_UINT32 nID;
  10913. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  10914. typedef struct ioac_keepalive_s {
  10915. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  10916. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  10917. A_UINT32 keepalive_pkt_len;
  10918. A_UINT32 period_in_ms;
  10919. A_UINT32 vdev_id;
  10920. A_UINT32 max_loss_cnt;
  10921. A_UINT32 local_ipv4;
  10922. A_UINT32 remote_ipv4;
  10923. A_UINT32 local_port;
  10924. A_UINT32 remote_port;
  10925. A_UINT32 recv_period_in_ms;
  10926. A_UINT32 rev_ka_size;
  10927. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  10928. WMI_IPV6_ADDR local_ipv6;
  10929. WMI_IPV6_ADDR remote_ipv6;
  10930. } WMI_WOW_IOAC_KEEPALIVE_T;
  10931. typedef struct {
  10932. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  10933. A_UINT32 vdev_id;
  10934. A_UINT32 pattern_type;
  10935. /*
  10936. * Following this struct are these TLVs. Note that they are all array of structures
  10937. * but can have at most one element. Which TLV is empty or has one element depends
  10938. * on the field pattern_type. This is to emulate an union.
  10939. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  10940. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  10941. */
  10942. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  10943. typedef struct {
  10944. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  10945. A_UINT32 vdev_id;
  10946. A_UINT32 pattern_type;
  10947. A_UINT32 pattern_id;
  10948. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  10949. typedef struct {
  10950. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  10951. A_UINT32 vdev_id;
  10952. A_UINT32 pattern_id;
  10953. A_UINT32 pattern_type;
  10954. /*
  10955. * Following this struct are these TLVs. Note that they are all array of structures
  10956. * but can have at most one element. Which TLV is empty or has one element depends
  10957. * on the field pattern_type. This is to emulate an union.
  10958. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  10959. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  10960. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  10961. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  10962. * A_UINT32 pattern_info_timeout[];
  10963. * A_UINT32 ra_ratelimit_interval;
  10964. */
  10965. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  10966. typedef struct {
  10967. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  10968. A_UINT32 vdev_id;
  10969. A_UINT32 pattern_id;
  10970. A_UINT32 pattern_type;
  10971. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  10972. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  10973. typedef struct {
  10974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  10975. A_UINT32 vdev_id;
  10976. A_UINT32 is_add;
  10977. union {
  10978. A_UINT32 event_bitmap;
  10979. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  10980. };
  10981. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  10982. /*
  10983. * This structure is used to set the pattern to check UDP packet in WOW mode.
  10984. * If match, construct a tx frame in a local buffer to send through the peer
  10985. * AP to the entity in the IP network that sent the UDP packet to this STA.
  10986. */
  10987. typedef struct {
  10988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  10989. A_UINT32 vdev_id;
  10990. A_UINT32 enable; /* 1: enable, 0: disable*/
  10991. /* dest_port -
  10992. * bits 7:0 contain the LSB of the UDP dest port,
  10993. * bits 15:8 contain the MSB of the UDP dest port
  10994. */
  10995. A_UINT32 dest_port;
  10996. A_UINT32 pattern_len; /* length in byte of pattern[] */
  10997. A_UINT32 response_len; /* length in byte of response[] */
  10998. /* Following this struct are the TLV's:
  10999. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  11000. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  11001. */
  11002. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  11003. /*
  11004. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  11005. */
  11006. typedef struct {
  11007. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  11008. A_UINT32 enable; /* 1: enable, 0: disable */
  11009. A_UINT32 pin; /* pin for host wakeup */
  11010. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  11011. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  11012. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  11013. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  11014. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  11015. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  11016. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  11017. typedef enum {
  11018. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  11019. WOW_ACTION_WAKEUP_OPERATION_SET,
  11020. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  11021. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  11022. } WOW_ACTION_WAKEUP_OPERATION;
  11023. typedef struct {
  11024. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  11025. A_UINT32 vdev_id;
  11026. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  11027. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  11028. /* This fixed_param TLV is followed by these additional TLV's
  11029. * action_bitmaps_per_category -
  11030. * Each element is a 32-bit bitmap indicating which subcategories
  11031. * for that particular action category are considered for WoW wakeup
  11032. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  11033. * subcategory's bit is 1).
  11034. *
  11035. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  11036. */
  11037. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  11038. typedef struct wow_event_info_s {
  11039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  11040. A_UINT32 vdev_id;
  11041. A_UINT32 flag; /*This is current reserved.*/
  11042. A_INT32 wake_reason;
  11043. A_UINT32 data_len;
  11044. } WOW_EVENT_INFO_fixed_param;
  11045. typedef struct wow_initial_wakeup_event_s {
  11046. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  11047. A_UINT32 vdev_id;
  11048. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  11049. typedef enum {
  11050. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  11051. WOW_EVENT_INFO_TYPE_BITMAP,
  11052. WOW_EVENT_INFO_TYPE_GTKIGTK,
  11053. } WOW_EVENT_INFO_TYPE;
  11054. typedef struct wow_event_info_section_s {
  11055. A_UINT32 data_type;
  11056. A_UINT32 data_len;
  11057. } WOW_EVENT_INFO_SECTION;
  11058. typedef struct wow_event_info_section_packet_s {
  11059. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  11060. } WOW_EVENT_INFO_SECTION_PACKET;
  11061. typedef struct wow_event_info_section_bitmap_s {
  11062. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  11063. A_UINT32 flag; /*This is current reserved.*/
  11064. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  11065. A_UINT32 org_len; /*The length of the orginal packet.*/
  11066. } WOW_EVENT_INFO_SECTION_BITMAP;
  11067. /**
  11068. * This command is sent from WLAN host driver to firmware to
  11069. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  11070. * PCIe link and DDR being active.
  11071. *
  11072. *
  11073. * Entering D0-WOW Mode (based on kernel suspend request):
  11074. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  11075. * target: Take action (e.g. dbglog suspend)
  11076. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  11077. *
  11078. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  11079. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  11080. * target: Take action (e.g. dbglog resume)
  11081. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  11082. *
  11083. * This command is applicable only on the PCIE LL systems
  11084. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  11085. * Decision to enter D0-WOW or WOW is based on active interfaces
  11086. *
  11087. */
  11088. typedef struct {
  11089. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  11090. A_UINT32 enable; /* 1 = enable, 0 = disable */
  11091. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  11092. typedef enum extend_wow_type_e {
  11093. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  11094. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  11095. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  11096. EXTWOW_TYPE_APP_PULSETEST,
  11097. EXTWOW_DISABLED = 255,
  11098. } EXTWOW_TYPE;
  11099. typedef struct {
  11100. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  11101. A_UINT32 vdev_id;
  11102. A_UINT32 type;
  11103. A_UINT32 wakeup_pin_num;
  11104. A_UINT32 swol_pulsetest_type;
  11105. A_UINT32 swol_pulsetest_application;
  11106. } wmi_extwow_enable_cmd_fixed_param;
  11107. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  11108. #define SWOL_INDOOR_KEY_LEN 16
  11109. typedef struct {
  11110. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  11111. A_UINT32 vdev_id;
  11112. wmi_mac_addr wakee_mac;
  11113. A_UINT8 ident[8];
  11114. A_UINT8 passwd[16];
  11115. A_UINT32 ident_len;
  11116. A_UINT32 passwd_len;
  11117. /* indoor check parameters */
  11118. /* key for mac addresses specified in swol_indoor_key_mac
  11119. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  11120. * segment of this array, so the bytes will return to their original
  11121. * order when the entire WMI message contents are byte-swapped to
  11122. * convert from big-endian to little-endian format.
  11123. */
  11124. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  11125. /* key length for specified mac address index
  11126. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  11127. * segment of this array, so the bytes will return to their original
  11128. * order when the entire WMI message contents are byte-swapped to
  11129. * convert from big-endian to little-endian format.
  11130. */
  11131. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11132. /* mac address array allowed to wakeup host*/
  11133. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11134. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  11135. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11136. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  11137. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  11138. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  11139. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  11140. A_UINT32 swol_indoor_exception_app;
  11141. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  11142. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  11143. typedef struct {
  11144. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  11145. A_UINT32 vdev_id;
  11146. A_UINT8 rc4_key[16];
  11147. A_UINT32 rc4_key_len;
  11148. /** ip header parameter */
  11149. A_UINT32 ip_id; /* NC id */
  11150. A_UINT32 ip_device_ip; /* NC IP address */
  11151. A_UINT32 ip_server_ip; /* Push server IP address */
  11152. /** tcp header parameter */
  11153. A_UINT16 tcp_src_port; /* NC TCP port */
  11154. A_UINT16 tcp_dst_port; /* Push server TCP port */
  11155. A_UINT32 tcp_seq;
  11156. A_UINT32 tcp_ack_seq;
  11157. A_UINT32 keepalive_init; /* Initial ping interval */
  11158. A_UINT32 keepalive_min; /* Minimum ping interval */
  11159. A_UINT32 keepalive_max; /* Maximum ping interval */
  11160. A_UINT32 keepalive_inc; /* Increment of ping interval */
  11161. wmi_mac_addr gateway_mac;
  11162. A_UINT32 tcp_tx_timeout_val;
  11163. A_UINT32 tcp_rx_timeout_val;
  11164. /** add extra parameter for backward-compatible */
  11165. /*
  11166. * For all byte arrays, natural order is used. E.g.
  11167. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  11168. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  11169. */
  11170. /* used to encrypt transmit packet such as keep-alive */
  11171. A_UINT8 rc4_write_sandbox[256];
  11172. A_UINT32 rc4_write_x;
  11173. A_UINT32 rc4_write_y;
  11174. /* used to decrypt received packet such as wow data */
  11175. A_UINT8 rc4_read_sandbox[256];
  11176. A_UINT32 rc4_read_x;
  11177. A_UINT32 rc4_read_y;
  11178. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  11179. A_UINT8 ssl_write_seq[8];
  11180. A_UINT8 ssl_sha1_write_key[64];
  11181. A_UINT32 ssl_sha1_write_key_len;
  11182. /* used to calculate HAMC hash for receive packet such as wow data */
  11183. A_UINT8 ssl_read_seq[8];
  11184. A_UINT8 ssl_sha1_read_key[64];
  11185. A_UINT32 ssl_sha1_read_key_len;
  11186. /* optional element for specifying TCP options data to include in
  11187. * transmit packets such as keep-alive
  11188. */
  11189. A_UINT32 tcp_options_len;
  11190. A_UINT8 tcp_options[40];
  11191. A_UINT32 async_id; /* keep-alive request id */
  11192. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  11193. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  11194. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  11195. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  11196. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  11197. typedef enum {
  11198. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  11199. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  11200. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  11201. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  11202. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  11203. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  11204. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  11205. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  11206. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  11207. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  11208. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  11209. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  11210. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  11211. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  11212. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  11213. PKT_PWR_SAVE_ENABLE = 0x80000000,
  11214. } WMI_PKT_PWR_SAVE_TYPE;
  11215. typedef struct {
  11216. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  11217. A_UINT32 num_data; /** length in byte of data[]. */
  11218. /** pdev_id for identifying the MAC
  11219. * See macros starting with WMI_PDEV_ID_ for values.
  11220. */
  11221. A_UINT32 pdev_id;
  11222. /* This structure is used to send Factory Test Mode [FTM] command
  11223. * from host to firmware for integrated chips which are binary blobs.
  11224. * Following this structure is the TLV:
  11225. * A_UINT8 data[]; <-- length in byte given by field num_data.
  11226. */
  11227. } wmi_ftm_intg_cmd_fixed_param;
  11228. typedef struct {
  11229. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  11230. A_UINT32 num_data; /** length in byte of data[]. */
  11231. /* This structure is used to receive Factory Test Mode [FTM] event
  11232. * from firmware to host for integrated chips which are binary blobs.
  11233. * Following this structure is the TLV:
  11234. * A_UINT8 data[]; <-- length in byte given by field num_data.
  11235. */
  11236. } wmi_ftm_intg_event_fixed_param;
  11237. #define WMI_MAX_NS_OFFLOADS 2
  11238. #define WMI_MAX_ARP_OFFLOADS 2
  11239. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  11240. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  11241. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  11242. typedef struct {
  11243. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  11244. A_UINT32 flags; /* flags */
  11245. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  11246. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  11247. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  11248. } WMI_ARP_OFFLOAD_TUPLE;
  11249. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  11250. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  11251. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  11252. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  11253. #define WMI_NSOFF_MAX_TARGET_IPS 2
  11254. typedef struct {
  11255. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  11256. A_UINT32 flags; /* flags */
  11257. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  11258. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  11259. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  11260. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  11261. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  11262. } WMI_NS_OFFLOAD_TUPLE;
  11263. typedef struct {
  11264. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  11265. A_UINT32 flags;
  11266. A_UINT32 vdev_id;
  11267. A_UINT32 num_ns_ext_tuples;
  11268. /* Following this structure are the TLVs:
  11269. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  11270. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  11271. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  11272. */
  11273. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  11274. typedef struct {
  11275. A_UINT32 tlv_header;
  11276. A_UINT32 vdev_id;
  11277. A_UINT32 pattern_id;
  11278. A_UINT32 timeout;
  11279. A_UINT32 length;
  11280. /*Following this would be the pattern
  11281. A_UINT8 pattern[] of length specifed by length
  11282. field in the structure.*/
  11283. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  11284. typedef struct {
  11285. A_UINT32 tlv_header;
  11286. A_UINT32 vdev_id;
  11287. A_UINT32 pattern_id;
  11288. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  11289. typedef struct {
  11290. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  11291. /** unique id identifying the VDEV, generated by the caller */
  11292. A_UINT32 vdev_id;
  11293. /** peer MAC address */
  11294. wmi_mac_addr peer_macaddr;
  11295. /** Tid number */
  11296. A_UINT32 tid;
  11297. /** Initiator (1) or Responder (0) for this aggregation */
  11298. A_UINT32 initiator;
  11299. /** size of the negotiated window */
  11300. A_UINT32 window_size;
  11301. /** starting sequence number (only valid for initiator) */
  11302. A_UINT32 ssn;
  11303. /** timeout field represents the time to wait for Block Ack in
  11304. * initiator case and the time to wait for BAR in responder
  11305. * case. 0 represents no timeout. */
  11306. A_UINT32 timeout;
  11307. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  11308. A_UINT32 policy;
  11309. } wmi_peer_tid_addba_cmd_fixed_param;
  11310. typedef struct {
  11311. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  11312. /** unique id identifying the VDEV, generated by the caller */
  11313. A_UINT32 vdev_id;
  11314. /** peer MAC address */
  11315. wmi_mac_addr peer_macaddr;
  11316. /** Tid number */
  11317. A_UINT32 tid;
  11318. /** Initiator (1) or Responder (0) for this aggregation */
  11319. A_UINT32 initiator;
  11320. } wmi_peer_tid_delba_cmd_fixed_param;
  11321. typedef struct {
  11322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  11323. /** unique id identifying the VDEV, generated by the caller */
  11324. A_UINT32 vdev_id;
  11325. /** peer MAC address */
  11326. wmi_mac_addr peer_macaddr;
  11327. /** Tid number */
  11328. A_UINT32 tid;
  11329. /** Event status */
  11330. A_UINT32 status;
  11331. } wmi_tx_addba_complete_event_fixed_param;
  11332. typedef struct {
  11333. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  11334. /** unique id identifying the VDEV, generated by the caller */
  11335. A_UINT32 vdev_id;
  11336. /** peer MAC address */
  11337. wmi_mac_addr peer_macaddr;
  11338. /** Tid number */
  11339. A_UINT32 tid;
  11340. /** Event status */
  11341. A_UINT32 status;
  11342. } wmi_tx_delba_complete_event_fixed_param;
  11343. /*
  11344. * Structure to request sequence numbers for a given
  11345. * peer station on different TIDs. The TIDs are
  11346. * indicated in the tidBitMap, tid 0 would
  11347. * be represented by LSB bit 0. tid 1 would be
  11348. * represented by LSB bit 1 etc.
  11349. * The target will retrieve the current sequence
  11350. * numbers for the peer on all the TIDs requested
  11351. * and send back a response in a WMI event.
  11352. */
  11353. typedef struct
  11354. {
  11355. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11356. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  11357. wmi_mac_addr peer_macaddr;
  11358. A_UINT32 tidBitmap;
  11359. } wmi_ba_req_ssn;
  11360. typedef struct {
  11361. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11362. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  11363. /** unique id identifying the VDEV, generated by the caller */
  11364. A_UINT32 vdev_id;
  11365. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  11366. A_UINT32 num_ba_req_ssn;
  11367. /* Following this struc are the TLV's:
  11368. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  11369. */
  11370. } wmi_ba_req_ssn_cmd_fixed_param;
  11371. /*
  11372. * Max transmit categories
  11373. *
  11374. * Note: In future if we need to increase WMI_MAX_TC definition
  11375. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  11376. */
  11377. #define WMI_MAX_TC 8
  11378. /*
  11379. * Structure to send response sequence numbers
  11380. * for a give peer and tidmap.
  11381. */
  11382. typedef struct
  11383. {
  11384. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11385. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  11386. wmi_mac_addr peer_macaddr;
  11387. /* A boolean to indicate if ssn is present */
  11388. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  11389. /* The ssn from target, valid only if
  11390. * ssn_present_for_tid[tidn] equals 1
  11391. */
  11392. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  11393. } wmi_ba_event_ssn;
  11394. typedef struct {
  11395. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11396. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  11397. /** unique id identifying the VDEV, generated by the caller */
  11398. A_UINT32 vdev_id;
  11399. /** Event status, success or failure of the overall operation */
  11400. A_UINT32 status;
  11401. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  11402. A_UINT32 num_ba_event_ssn;
  11403. /* Following this struc are the TLV's:
  11404. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  11405. */
  11406. } wmi_ba_rsp_ssn_event_fixed_param;
  11407. enum wmi_aggr_state_req_type {
  11408. WMI_DISABLE_AGGREGATION,
  11409. WMI_ENABLE_AGGREGATION
  11410. };
  11411. /*
  11412. * This event is generated by the COEX module
  11413. * when esco call is begins the coex module in fw genrated this event to host to
  11414. * disable the RX aggregation and after completion of the esco call fw will indicate to
  11415. * enable back the Rx aggregation .
  11416. */
  11417. typedef struct {
  11418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  11419. /** unique id identifying the VDEV, generated by the caller */
  11420. A_UINT32 vdev_id;
  11421. /** req_type contains values from enum
  11422. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  11423. A_UINT32 req_type;
  11424. } wmi_aggr_state_trig_event_fixed_param;
  11425. typedef struct {
  11426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  11427. /** unique id identifying the VDEV, generated by the caller */
  11428. A_UINT32 vdev_id;
  11429. /** MAC address used for installing */
  11430. wmi_mac_addr peer_macaddr;
  11431. /** key index */
  11432. A_UINT32 key_ix;
  11433. /** key flags */
  11434. A_UINT32 key_flags;
  11435. /** Event status */
  11436. A_UINT32 status;
  11437. } wmi_vdev_install_key_complete_event_fixed_param;
  11438. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  11439. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  11440. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  11441. WMI_NLO_AUTH_ALGO_WPA = 3,
  11442. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  11443. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  11444. WMI_NLO_AUTH_ALGO_RSNA = 6,
  11445. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  11446. } WMI_NLO_AUTH_ALGORITHM;
  11447. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  11448. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  11449. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  11450. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  11451. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  11452. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  11453. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  11454. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  11455. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  11456. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  11457. } WMI_NLO_CIPHER_ALGORITHM;
  11458. /* SSID broadcast type passed in NLO params */
  11459. typedef enum _WMI_NLO_SSID_BcastNwType
  11460. {
  11461. WMI_NLO_BCAST_UNKNOWN = 0,
  11462. WMI_NLO_BCAST_NORMAL = 1,
  11463. WMI_NLO_BCAST_HIDDEN = 2,
  11464. } WMI_NLO_SSID_BcastNwType;
  11465. #define WMI_NLO_MAX_SSIDS 16
  11466. #define WMI_NLO_MAX_CHAN 48
  11467. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  11468. #define WMI_NLO_CONFIG_START (0x1 << 1)
  11469. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  11470. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  11471. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  11472. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  11473. /* This bit is used to indicate if EPNO Profile is enabled */
  11474. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  11475. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  11476. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  11477. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  11478. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  11479. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  11480. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  11481. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  11482. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  11483. /* Whether PNO event shall be triggered if the network is found on A band */
  11484. #define WMI_ENLO_FLAG_A_BAND 2
  11485. /* Whether PNO event shall be triggered if the network is found on G band */
  11486. #define WMI_ENLO_FLAG_G_BAND 4
  11487. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  11488. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  11489. /* Code for matching the beacon AUTH IE - additional codes TBD */
  11490. /* open */
  11491. #define WMI_ENLO_AUTH_CODE_OPEN 1
  11492. /* WPA_PSK or WPA2PSK */
  11493. #define WMI_ENLO_AUTH_CODE_PSK 2
  11494. /* any EAPOL */
  11495. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  11496. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  11497. typedef struct wmi_nlo_ssid_param
  11498. {
  11499. A_UINT32 valid;
  11500. wmi_ssid ssid;
  11501. } wmi_nlo_ssid_param;
  11502. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  11503. typedef struct wmi_nlo_enc_param
  11504. {
  11505. A_UINT32 valid;
  11506. A_UINT32 enc_type;
  11507. } wmi_nlo_enc_param;
  11508. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  11509. typedef struct wmi_nlo_auth_param
  11510. {
  11511. A_UINT32 valid;
  11512. A_UINT32 auth_type;
  11513. } wmi_nlo_auth_param;
  11514. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  11515. typedef struct wmi_nlo_bcast_nw_param
  11516. {
  11517. A_UINT32 valid;
  11518. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  11519. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  11520. A_UINT32 bcast_nw_type;
  11521. } wmi_nlo_bcast_nw_param;
  11522. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  11523. typedef struct wmi_nlo_rssi_param
  11524. {
  11525. A_UINT32 valid;
  11526. A_INT32 rssi;
  11527. } wmi_nlo_rssi_param;
  11528. typedef struct nlo_configured_parameters {
  11529. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  11530. wmi_nlo_ssid_param ssid;
  11531. wmi_nlo_enc_param enc_type;
  11532. wmi_nlo_auth_param auth_type;
  11533. wmi_nlo_rssi_param rssi_cond;
  11534. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  11535. } nlo_configured_parameters;
  11536. /* Support channel prediction for PNO scan after scanning top_k_num channels
  11537. * if stationary_threshold is met.
  11538. */
  11539. typedef struct nlo_channel_prediction_cfg {
  11540. A_UINT32 tlv_header;
  11541. /* Enable or disable this feature. */
  11542. A_UINT32 enable;
  11543. /* Top K channels will be scanned before deciding whether to further scan
  11544. * or stop. Minimum value is 3 and maximum is 5. */
  11545. A_UINT32 top_k_num;
  11546. /* Preconfigured stationary threshold.
  11547. * Lesser value means more conservative. Bigger value means more aggressive.
  11548. * Maximum is 100 and mininum is 0. */
  11549. A_UINT32 stationary_threshold;
  11550. /* Periodic full channel scan in milliseconds unit.
  11551. * After full_scan_period_ms since last full scan, channel prediction
  11552. * scan is suppressed and will do full scan.
  11553. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  11554. * full scan at all (not recommended).
  11555. */
  11556. A_UINT32 full_scan_period_ms;
  11557. } nlo_channel_prediction_cfg;
  11558. typedef struct enlo_candidate_score_params_t {
  11559. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  11560. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  11561. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  11562. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  11563. /* current_connection_bonus:
  11564. * only report when there is a network's score this much higher
  11565. * than the current connection
  11566. */
  11567. A_UINT32 current_connection_bonus;
  11568. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  11569. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  11570. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  11571. } enlo_candidate_score_params;
  11572. typedef struct connected_nlo_bss_band_rssi_pref_t {
  11573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  11574. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  11575. A_UINT32 band;
  11576. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  11577. A_INT32 rssi_pref;
  11578. } connected_nlo_bss_band_rssi_pref;
  11579. typedef struct connected_nlo_rssi_params_t {
  11580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  11581. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  11582. * the current connected BSS.
  11583. */
  11584. A_INT32 relative_rssi;
  11585. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  11586. A_INT32 relative_rssi_5g_pref;
  11587. } connected_nlo_rssi_params;
  11588. typedef struct wmi_nlo_config {
  11589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  11590. A_UINT32 flags;
  11591. A_UINT32 vdev_id;
  11592. A_UINT32 fast_scan_max_cycles;
  11593. A_UINT32 active_dwell_time;
  11594. A_UINT32 passive_dwell_time; /* PDT in msecs */
  11595. A_UINT32 probe_bundle_size;
  11596. A_UINT32 rest_time; /* ART = IRT */
  11597. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  11598. A_UINT32 scan_backoff_multiplier; /* SBM */
  11599. A_UINT32 fast_scan_period; /* SCBM */
  11600. A_UINT32 slow_scan_period; /* specific to windows */
  11601. A_UINT32 no_of_ssids;
  11602. A_UINT32 num_of_channels;
  11603. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  11604. /** MAC Address to use in Probe Req as SA **/
  11605. wmi_mac_addr mac_addr;
  11606. /** Mask on which MAC has to be randomized **/
  11607. wmi_mac_addr mac_mask;
  11608. /** IE bitmap to use in Probe Req **/
  11609. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  11610. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  11611. A_UINT32 num_vendor_oui;
  11612. /** Number of connected NLO band preferences **/
  11613. A_UINT32 num_cnlo_band_pref;
  11614. /* The TLVs will follow.
  11615. * nlo_configured_parameters nlo_list[];
  11616. * A_UINT32 channel_list[num_of_channels];
  11617. * nlo_channel_prediction_cfg ch_prediction_cfg;
  11618. * enlo_candidate_score_params candidate_score_params;
  11619. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  11620. * connected_nlo_rssi_params cnlo_rssi_params;
  11621. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  11622. */
  11623. } wmi_nlo_config_cmd_fixed_param;
  11624. typedef struct wmi_nlo_event
  11625. {
  11626. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  11627. A_UINT32 vdev_id;
  11628. } wmi_nlo_event;
  11629. /* WMI_PASSPOINT_CONFIG_SET
  11630. * Sets a list for passpoint networks for PNO purposes;
  11631. * it should be matched against any passpoint networks found
  11632. * during regular PNO scan.
  11633. */
  11634. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  11635. /* WMI_PASSPOINT_CONFIG_RESET
  11636. * Reset passpoint network list -
  11637. * no Passpoint networks should be matched after this.
  11638. */
  11639. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  11640. #define PASSPOINT_REALM_LEN 256
  11641. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  11642. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  11643. #define PASSPOINT_PLMN_ID_LEN 3
  11644. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  11645. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  11646. /*
  11647. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  11648. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  11649. * array will end on a 4-byte boundary.
  11650. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11651. */
  11652. A_COMPILE_TIME_ASSERT(
  11653. check_passpoint_realm_size,
  11654. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  11655. /*
  11656. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  11657. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  11658. * roaming_consortium_ids array below will end on a 4-byte boundary.
  11659. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11660. */
  11661. A_COMPILE_TIME_ASSERT(
  11662. check_passpoint_roaming_consortium_ids_size,
  11663. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  11664. /* wildcard ID to allow an action (reset) to apply to all networks */
  11665. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  11666. typedef struct wmi_passpoint_config {
  11667. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  11668. /* (network) id
  11669. * identifier of the matched network, report this in event
  11670. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  11671. * that indicates the action should be applied to all networks.
  11672. * Currently, the only action that is applied to all networks is "reset".
  11673. * If a non-wildcard ID is specified, that particular network is configured.
  11674. * If a wildcard ID is specified, all networks are reset.
  11675. */
  11676. A_UINT32 id;
  11677. A_UINT32 req_id;
  11678. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  11679. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  11680. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  11681. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  11682. } wmi_passpoint_config_cmd_fixed_param;
  11683. typedef struct {
  11684. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  11685. A_UINT32 id; /* identifier of the matched network */
  11686. A_UINT32 vdev_id;
  11687. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  11688. wmi_ssid ssid;
  11689. wmi_mac_addr bssid; /* bssid of the network */
  11690. A_UINT32 channel_mhz; /* channel frequency in MHz */
  11691. A_UINT32 rssi; /* rssi value */
  11692. A_UINT32 rtt; /* timestamp in nanoseconds*/
  11693. A_UINT32 rtt_sd; /* standard deviation in rtt */
  11694. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  11695. A_UINT32 capability; /* capabilities advertised in the beacon */
  11696. A_UINT32 ie_length; /* size of the ie_data blob */
  11697. A_UINT32 anqp_length; /* length of ANQP blob */
  11698. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  11699. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  11700. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  11701. * 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.
  11702. */
  11703. } wmi_passpoint_event_hdr;
  11704. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  11705. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  11706. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  11707. /** Disable GTK offload */
  11708. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  11709. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  11710. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  11711. enum wmi_chatter_mode {
  11712. /* Chatter enter/exit happens
  11713. * automatically based on preset
  11714. * params
  11715. */
  11716. WMI_CHATTER_MODE_AUTO,
  11717. /* Chatter enter is triggered
  11718. * manually by the user
  11719. */
  11720. WMI_CHATTER_MODE_MANUAL_ENTER,
  11721. /* Chatter exit is triggered
  11722. * manually by the user
  11723. */
  11724. WMI_CHATTER_MODE_MANUAL_EXIT,
  11725. /* Placeholder max value, always last*/
  11726. WMI_CHATTER_MODE_MAX
  11727. };
  11728. enum wmi_chatter_query_type {
  11729. /*query coalescing filter match counter*/
  11730. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  11731. WMI_CHATTER_QUERY_MAX
  11732. };
  11733. typedef struct {
  11734. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  11735. A_UINT32 chatter_mode;
  11736. } wmi_chatter_set_mode_cmd_fixed_param;
  11737. /** maximum number of filter supported*/
  11738. #define CHATTER_MAX_COALESCING_RULES 11
  11739. /** maximum number of field tests per filter*/
  11740. #define CHATTER_MAX_FIELD_TEST 5
  11741. /** maximum field length in number of DWORDS*/
  11742. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  11743. /** field test kinds*/
  11744. #define CHATTER_COALESCING_TEST_EQUAL 1
  11745. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  11746. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  11747. /** packet type*/
  11748. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  11749. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  11750. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  11751. /** coalescing field test*/
  11752. typedef struct _chatter_pkt_coalescing_hdr_test {
  11753. /** offset from start of mac header, for windows native wifi host driver
  11754. * should assume standard 802.11 frame format without QoS info and address4
  11755. * FW would account for any non-stand fields for final offset value.
  11756. */
  11757. A_UINT32 offset;
  11758. A_UINT32 length; /* length of test field*/
  11759. A_UINT32 test; /*equal, not equal or masked equal*/
  11760. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  11761. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  11762. } chatter_pkt_coalescing_hdr_test;
  11763. /** packet coalescing filter*/
  11764. typedef struct _chatter_pkt_coalescing_filter {
  11765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  11766. A_UINT32 filter_id; /*unique id assigned by OS*/
  11767. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  11768. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  11769. A_UINT32 num_of_test_field; /*number of field test in table*/
  11770. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  11771. } chatter_pkt_coalescing_filter;
  11772. /** packet coalescing filter add command*/
  11773. typedef struct {
  11774. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  11775. A_UINT32 num_of_filters;
  11776. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  11777. chatter_pkt_coalescing_filter rx_filter[1];*/
  11778. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  11779. /** packet coalescing filter delete command*/
  11780. typedef struct {
  11781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  11782. A_UINT32 filter_id; /*filter id which will be deleted*/
  11783. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  11784. /** packet coalescing query command*/
  11785. typedef struct {
  11786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  11787. A_UINT32 type; /*type of query*/
  11788. } wmi_chatter_coalescing_query_cmd_fixed_param;
  11789. /** chatter query reply event*/
  11790. typedef struct {
  11791. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  11792. A_UINT32 type; /*query type*/
  11793. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  11794. } wmi_chatter_query_reply_event_fixed_param;
  11795. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  11796. * cannot be changed without breaking WMI compatibility. */
  11797. #define GTK_OFFLOAD_KEK_BYTES 16
  11798. #define GTK_OFFLOAD_KCK_BYTES 16
  11799. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  11800. #define GTK_REPLAY_COUNTER_BYTES 8
  11801. #define WMI_MAX_KEY_LEN 32
  11802. #define IGTK_PN_SIZE 6
  11803. typedef struct {
  11804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  11805. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11806. A_UINT32 flags; /* status flags */
  11807. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  11808. /*
  11809. * As with all WMI messages, this message uses little-endian byte
  11810. * ordering within each A_UINT32 field.
  11811. * If a big-endian host is using automatic swapping of the bytes within
  11812. * each 4-byte A_UINT32 to automatically correct the endianness of the
  11813. * A_UINT32 fields as the message is uploaded from target --> host, the
  11814. * big-endian host will have to undo the automatic byte swapping for the
  11815. * below A_UINT8 fields, to restore them to their original order.
  11816. */
  11817. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  11818. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  11819. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  11820. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  11821. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  11822. A_UINT8 gtk_keyIndex; /* GTK key index */
  11823. A_UINT8 gtk_keyLength; /* GTK key length */
  11824. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  11825. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  11826. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  11827. typedef struct {
  11828. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  11829. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11830. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  11831. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  11832. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  11833. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  11834. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  11835. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  11836. typedef struct {
  11837. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  11838. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11839. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  11840. A_UINT32 kek_len;
  11841. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  11842. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  11843. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  11844. } wmi_gtk_offload_fils_tlv_param;
  11845. typedef struct {
  11846. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  11847. A_UINT32 vdev_id;
  11848. A_UINT32 sa_query_retry_interval; /* in msec */
  11849. A_UINT32 sa_query_max_retry_count;
  11850. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  11851. typedef enum {
  11852. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  11853. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  11854. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  11855. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  11856. } WMI_STA_KEEPALIVE_METHOD;
  11857. typedef struct {
  11858. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  11859. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  11860. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  11861. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  11862. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  11863. typedef struct {
  11864. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  11865. A_UINT32 vdev_id;
  11866. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  11867. A_UINT32 method; /* keep alive method */
  11868. A_UINT32 interval; /* time interval in seconds */
  11869. /*
  11870. * NOTE: following this structure is the TLV for ARP Resonse:
  11871. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  11872. */
  11873. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  11874. typedef struct {
  11875. A_UINT32 tlv_header;
  11876. A_UINT32 vdev_id;
  11877. A_UINT32 action;
  11878. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  11879. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  11880. typedef struct {
  11881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  11882. A_UINT32 vdev_id;
  11883. A_UINT32 keepaliveInterval; /* seconds */
  11884. A_UINT32 keepaliveMethod;
  11885. } wmi_vdev_set_keepalive_cmd_fixed_param;
  11886. typedef struct {
  11887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  11888. A_UINT32 vdev_id;
  11889. } wmi_vdev_get_keepalive_cmd_fixed_param;
  11890. typedef struct {
  11891. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  11892. A_UINT32 vdev_id;
  11893. A_UINT32 keepaliveInterval; /* seconds */
  11894. A_UINT32 keepaliveMethod; /* seconds */
  11895. } wmi_vdev_get_keepalive_event_fixed_param;
  11896. typedef enum {
  11897. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  11898. WMI_START_ARP_STATS_COLLECTION,
  11899. } WMI_ARP_STATS_ACTION;
  11900. typedef enum {
  11901. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  11902. } WMI_ARP_STATS_RX_PKT_TYPE;
  11903. typedef enum {
  11904. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  11905. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  11906. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  11907. typedef enum {
  11908. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  11909. WMI_CONNECTION_STATUS_SUCCESS,
  11910. } WMI_ARP_STATS_CONNECTION_STATUS;
  11911. /* ARP stats set (configure) req */
  11912. typedef struct {
  11913. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  11914. A_UINT32 vdev_id;
  11915. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  11916. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  11917. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  11918. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  11919. /* ARP stats get req */
  11920. typedef struct {
  11921. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  11922. A_UINT32 vdev_id;
  11923. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  11924. /* per vdev based ARP stats */
  11925. typedef struct {
  11926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  11927. A_UINT32 vdev_id;
  11928. A_UINT32 arp_req_enqueue;
  11929. A_UINT32 arp_req_tx_success;
  11930. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  11931. A_UINT32 arp_rsp_recvd;
  11932. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  11933. A_UINT32 dad_detected; /* duplicate address detection */
  11934. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  11935. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  11936. } wmi_vdev_get_arp_stats_event_fixed_param;
  11937. typedef struct {
  11938. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  11939. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  11940. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  11941. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  11942. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  11943. } wmi_vdev_set_connectivity_check_stats;
  11944. /* per vdev dns/icmp/tcp based stats*/
  11945. typedef struct {
  11946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  11947. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  11948. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  11949. } wmi_vdev_get_connectivity_check_stats;
  11950. typedef struct {
  11951. A_UINT32 tlv_header;
  11952. A_UINT32 vdev_id;
  11953. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  11954. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  11955. A_UINT32 action;
  11956. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  11957. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  11958. typedef struct {
  11959. A_UINT32 tlv_header;
  11960. A_UINT32 vdev_id;
  11961. A_UINT32 mcc_tbttmode;
  11962. wmi_mac_addr mcc_bssid;
  11963. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  11964. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  11965. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  11966. typedef enum
  11967. {
  11968. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  11969. 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 */
  11970. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  11971. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  11972. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  11973. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  11974. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  11975. * to avoid IOT issues due to change in number of Tx and Rx chains
  11976. */
  11977. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  11978. /* Add any action before this line */
  11979. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  11980. } wmi_vendor_oui_action_id;
  11981. typedef struct {
  11982. A_UINT32 tlv_header;
  11983. /** vendor OUI actions */
  11984. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  11985. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  11986. ** For first command, this value will be used for allocating memory in FW accordingly */
  11987. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  11988. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  11989. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  11990. */
  11991. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  11992. ** first byte contains the index i of structure vendor_oui_ext[]
  11993. ** for which data is coming and length of the data is extracted as
  11994. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  11995. ** N th OUI and (N+1) th OUI.
  11996. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  11997. ** data[0] will hold the index value 0, data[1] through data[17]
  11998. ** will hold the OUI data for this first OUI, data[18] will hold
  11999. ** the index value 1, and the OUI data for the second OUI will
  12000. ** begin at data[19].
  12001. */
  12002. } wmi_pdev_config_vendor_oui_action_fixed_param;
  12003. typedef struct {
  12004. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  12005. /** pdev_id for identifying the MAC
  12006. * See macros starting with WMI_PDEV_ID_ for values.
  12007. */
  12008. A_UINT32 pdev_id;
  12009. /** AC number */
  12010. A_UINT32 ac; /* refer to wmi_traffic_ac */
  12011. /**
  12012. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  12013. * for the specified AC.
  12014. */
  12015. A_UINT32 ac_tx_queue_optimize_enable;
  12016. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  12017. typedef struct {
  12018. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  12019. /** pdev_id for identifying the MAC
  12020. * See macros starting with WMI_PDEV_ID_ for values.
  12021. */
  12022. A_UINT32 pdev_id;
  12023. /** Enable/disable rx filter promiscuous */
  12024. A_UINT32 rx_filter_promiscuous_enable;
  12025. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  12026. typedef enum {
  12027. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  12028. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  12029. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  12030. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  12031. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  12032. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  12033. } wmi_beacon_info_presence_items;
  12034. typedef struct _wmi_vendor_oui_ext {
  12035. A_UINT32 tlv_header;
  12036. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  12037. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  12038. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  12039. 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 */
  12040. A_UINT32 mac_address_length; /* MAC address length in bytes
  12041. ** (This value will always be 6,
  12042. ** but is explicitly specified for sake
  12043. ** of uniformity and completeness).
  12044. */
  12045. A_UINT32 capability_data_length; /* length of capability in bytes */
  12046. } wmi_vendor_oui_ext;
  12047. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  12048. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  12049. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  12050. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  12051. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  12052. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  12053. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  12054. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  12055. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  12056. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  12057. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  12058. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  12059. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  12060. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  12061. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  12062. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  12063. typedef struct {
  12064. A_UINT32 tlv_header;
  12065. A_UINT32 vdev_id; /* home vdev id */
  12066. A_UINT32 meas_token; /* from measure request frame */
  12067. A_UINT32 dialog_token;
  12068. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  12069. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  12070. A_UINT32 burst_cycle; /* times cycle through within one burst */
  12071. A_UINT32 tx_power; /* for path frame */
  12072. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  12073. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  12074. A_UINT32 num_chans;
  12075. } wmi_vdev_plmreq_start_cmd_fixed_param;
  12076. typedef struct {
  12077. A_UINT32 tlv_header;
  12078. A_UINT32 vdev_id;
  12079. A_UINT32 meas_token; /* same value from req*/
  12080. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  12081. typedef struct {
  12082. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  12083. A_UINT32 tlv_header;
  12084. /* unique id identifying the VDEV, generated by the caller */
  12085. A_UINT32 vdev_id;
  12086. /* enable/disable NoA */
  12087. A_UINT32 enable;
  12088. /** number of NoA desc. In the TLV noa_descriptor[] */
  12089. A_UINT32 num_noa;
  12090. /**
  12091. * TLV (tag length value) paramerters follow the pattern structure.
  12092. * TLV contain NoA desc with num of num_noa
  12093. */
  12094. } wmi_p2p_set_noa_cmd_fixed_param;
  12095. typedef struct {
  12096. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  12097. A_UINT32 tlv_header;
  12098. /* unique id identifying the VDEV, generated by the caller */
  12099. A_UINT32 vdev_id;
  12100. /* Identify the wlan module */
  12101. A_UINT32 module_id;
  12102. /* Num of test arguments passed */
  12103. A_UINT32 num_args;
  12104. /* unique id identifying the unit test cmd, generated by the caller */
  12105. A_UINT32 diag_token;
  12106. /**
  12107. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  12108. * structure. The TLV's are:
  12109. * A_UINT32 args[];
  12110. **/
  12111. } wmi_unit_test_cmd_fixed_param;
  12112. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  12113. * after it received WMI_ROAM_SYNCH_EVENTID.
  12114. */
  12115. typedef struct {
  12116. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  12117. /** unique id identifying the VDEV, generated by the caller */
  12118. A_UINT32 vdev_id;
  12119. } wmi_roam_synch_complete_fixed_param;
  12120. typedef enum {
  12121. RECOVERY_SIM_ASSERT = 0x01,
  12122. RECOVERY_SIM_NO_DETECT = 0x02,
  12123. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  12124. RECOVERY_SIM_EMPTY_POINT = 0x04,
  12125. RECOVERY_SIM_STACK_OV = 0x05,
  12126. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  12127. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  12128. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  12129. } RECOVERY_SIM_TYPE;
  12130. /* WMI_FORCE_FW_HANG_CMDID */
  12131. typedef struct {
  12132. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  12133. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  12134. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  12135. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  12136. typedef enum {
  12137. WMI_MCAST_FILTER_SET = 1,
  12138. WMI_MCAST_FILTER_DELETE
  12139. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  12140. typedef struct {
  12141. A_UINT32 tlv_header;
  12142. A_UINT32 vdev_id;
  12143. A_UINT32 index;
  12144. A_UINT32 action;
  12145. wmi_mac_addr mcastbdcastaddr;
  12146. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  12147. typedef enum {
  12148. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  12149. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  12150. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  12151. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  12152. } WMI_MULTIPLE_MCAST_FILTER_OP;
  12153. typedef struct {
  12154. A_UINT32 tlv_header;
  12155. A_UINT32 vdev_id;
  12156. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  12157. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  12158. /**
  12159. * TLV (tag length value) parameters follow the
  12160. * structure. The TLV's are:
  12161. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  12162. */
  12163. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  12164. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  12165. typedef enum {
  12166. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  12167. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  12168. } WMI_TIME_STAMP_SYNC_MODE;
  12169. typedef struct {
  12170. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  12171. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  12172. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  12173. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  12174. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  12175. /* GPIO Command and Event data structures */
  12176. /* WMI_GPIO_CONFIG_CMDID */
  12177. enum {
  12178. WMI_GPIO_PULL_NONE,
  12179. WMI_GPIO_PULL_UP,
  12180. WMI_GPIO_PULL_DOWN,
  12181. };
  12182. enum {
  12183. WMI_GPIO_INTTYPE_DISABLE,
  12184. WMI_GPIO_INTTYPE_RISING_EDGE,
  12185. WMI_GPIO_INTTYPE_FALLING_EDGE,
  12186. WMI_GPIO_INTTYPE_BOTH_EDGE,
  12187. WMI_GPIO_INTTYPE_LEVEL_LOW,
  12188. WMI_GPIO_INTTYPE_LEVEL_HIGH
  12189. };
  12190. typedef struct {
  12191. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  12192. A_UINT32 gpio_num; /* GPIO number to be setup */
  12193. A_UINT32 input; /* 0 - Output/ 1 - Input */
  12194. A_UINT32 pull_type; /* Pull type defined above */
  12195. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  12196. /* mux_config_val - configure pin MUX
  12197. * A value of 0x0 for this field means to use the default MUX configuration.
  12198. * Valid non-zero values are as follows:
  12199. * Rome:
  12200. * 0x4 - use the pin as GPIO (rather than UART)
  12201. */
  12202. A_UINT32 mux_config_val;
  12203. } wmi_gpio_config_cmd_fixed_param;
  12204. /* WMI_GPIO_OUTPUT_CMDID */
  12205. typedef struct {
  12206. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  12207. A_UINT32 gpio_num; /* GPIO number to be setup */
  12208. A_UINT32 set; /* Set the GPIO pin*/
  12209. } wmi_gpio_output_cmd_fixed_param;
  12210. /* WMI_GPIO_INPUT_EVENTID */
  12211. typedef struct {
  12212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  12213. A_UINT32 gpio_num; /* GPIO number which changed state */
  12214. } wmi_gpio_input_event_fixed_param;
  12215. /* WMI_P2P_DISC_EVENTID */
  12216. enum {
  12217. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  12218. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  12219. };
  12220. enum {
  12221. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  12222. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  12223. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  12224. };
  12225. enum {
  12226. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  12227. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  12228. };
  12229. typedef struct {
  12230. A_UINT32 vdev_id;
  12231. A_UINT32 reason; /* P2P DISC wake up reason*/
  12232. } wmi_p2p_disc_event;
  12233. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  12234. typedef enum {
  12235. WMI_FAKE_TXBFER_SEND_NDPA,
  12236. WMI_FAKE_TXBFER_SEND_MU,
  12237. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  12238. WMI_FAKE_TXBFER_NDPA_NCIDX,
  12239. WMI_FAKE_TXBFER_NDPA_POLL,
  12240. WMI_FAKE_TXBFER_NDPA_BW,
  12241. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  12242. WMI_FAKE_TXBFER_NDPA_RATE,
  12243. WMI_FAKE_TXBFER_NDP_BW,
  12244. WMI_FAKE_TXBFER_NDP_NSS,
  12245. WMI_TXBFEE_ENABLE_UPLOAD_H,
  12246. WMI_TXBFEE_ENABLE_CAPTURE_H,
  12247. WMI_TXBFEE_SET_CBF_TBL,
  12248. WMI_TXBFEE_CBF_TBL_LSIG,
  12249. WMI_TXBFEE_CBF_TBL_SIGA1,
  12250. WMI_TXBFEE_CBF_TBL_SIGA2,
  12251. WMI_TXBFEE_CBF_TBL_SIGB,
  12252. WMI_TXBFEE_CBF_TBL_PAD,
  12253. WMI_TXBFEE_CBF_TBL_DUR,
  12254. WMI_TXBFEE_SU_NCIDX,
  12255. WMI_TXBFEE_CBIDX,
  12256. WMI_TXBFEE_NGIDX,
  12257. } WMI_TXBF_PARAM_ID;
  12258. typedef struct {
  12259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  12260. /** parameter id */
  12261. A_UINT32 param_id;
  12262. /** parameter value */
  12263. A_UINT32 param_value;
  12264. } wmi_txbf_cmd_fixed_param;
  12265. typedef struct {
  12266. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  12267. A_UINT32 h_length;
  12268. A_UINT32 cv_length;
  12269. /* This TLV is followed by array of bytes:
  12270. * A_UINT8 bufp[]; <-- h_cv info buffer
  12271. */
  12272. } wmi_upload_h_hdr;
  12273. typedef struct {
  12274. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  12275. A_UINT32 svd_num;
  12276. A_UINT32 tone_num;
  12277. A_UINT32 reserved;
  12278. } wmi_capture_h_event_hdr;
  12279. typedef struct {
  12280. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  12281. A_UINT32 start_freq; /* start frequency, not channel center freq */
  12282. A_UINT32 end_freq; /* end frequency */
  12283. } wmi_avoid_freq_range_desc;
  12284. typedef struct {
  12285. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  12286. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  12287. A_UINT32 num_freq_ranges;
  12288. /* The TLVs will follow.
  12289. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  12290. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  12291. */
  12292. } wmi_avoid_freq_ranges_event_fixed_param;
  12293. enum {
  12294. WMI_SAR2_SUCCESS = 0,
  12295. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  12296. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  12297. WMI_SAR2_STATE_ERROR = 4,
  12298. WMI_SAR2_BDF_NO_TABLE = 8,
  12299. };
  12300. typedef struct {
  12301. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  12302. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  12303. } wmi_sar2_result_event_fixed_param;
  12304. typedef struct {
  12305. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  12306. /** Reserved for future use */
  12307. A_UINT32 reserved0;
  12308. A_UINT32 vdev_id;
  12309. } wmi_gtk_rekey_fail_event_fixed_param;
  12310. typedef enum WLAN_COEX_EVENT {
  12311. WLAN_COEX_EVENT_BT_NONE = 0,
  12312. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  12313. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  12314. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  12315. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  12316. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  12317. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  12318. }WLAN_COEX_EVENT;
  12319. typedef struct {
  12320. A_UINT32 tlv_header;
  12321. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  12322. } wmi_coex_bt_activity_event_fixed_param;
  12323. enum wmm_ac_downgrade_policy {
  12324. WMM_AC_DOWNGRADE_DEPRIO,
  12325. WMM_AC_DOWNGRADE_DROP,
  12326. WMM_AC_DOWNGRADE_INVALID,
  12327. };
  12328. /* WMM EDCA Params type */
  12329. #define WMM_PARAM_TYPE_LEGACY 0
  12330. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  12331. #define WMM_PARAM_TYPE_11AX_EDCA 1
  12332. typedef struct {
  12333. A_UINT32 tlv_header;
  12334. A_UINT32 cwmin;
  12335. A_UINT32 cwmax;
  12336. A_UINT32 aifs;
  12337. union {
  12338. A_UINT32 txoplimit;
  12339. A_UINT32 mu_edca_timer;
  12340. };
  12341. A_UINT32 acm;
  12342. A_UINT32 no_ack;
  12343. } wmi_wmm_vparams;
  12344. typedef struct {
  12345. A_UINT32 tlv_header;
  12346. A_UINT32 vdev_id;
  12347. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  12348. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  12349. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  12350. typedef struct {
  12351. A_UINT32 tlv_header;
  12352. A_UINT32 vdev_id;
  12353. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  12354. A_UINT32 userGtxMask; /* host request for GTX mask */
  12355. A_UINT32 gtxPERThreshold; /* default: 10% */
  12356. A_UINT32 gtxPERMargin; /* default: 2% */
  12357. A_UINT32 gtxTPCstep; /* default: 1 */
  12358. A_UINT32 gtxTPCMin; /* default: 5 */
  12359. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  12360. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  12361. typedef struct
  12362. {
  12363. A_UINT32 tlv_header;
  12364. A_UINT32 vdev_id;
  12365. A_UINT32 ac;
  12366. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  12367. A_UINT32 downgrade_type;
  12368. } wmi_vdev_wmm_addts_cmd_fixed_param;
  12369. typedef struct
  12370. {
  12371. A_UINT32 tlv_header;
  12372. A_UINT32 vdev_id;
  12373. A_UINT32 ac;
  12374. } wmi_vdev_wmm_delts_cmd_fixed_param;
  12375. /* DEPRECATED */
  12376. typedef struct {
  12377. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  12378. /** Reserved for future use */
  12379. A_UINT32 reserved0;
  12380. } wmi_pdev_dfs_enable_cmd_fixed_param;
  12381. /* DEPRECATED */
  12382. typedef struct {
  12383. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  12384. /** pdev_id for identifying the MAC
  12385. * See macros starting with WMI_PDEV_ID_ for values.
  12386. */
  12387. A_UINT32 pdev_id;
  12388. } wmi_pdev_dfs_disable_cmd_fixed_param;
  12389. typedef struct {
  12390. /** TLV tag and len; tag equals
  12391. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  12392. */
  12393. A_UINT32 tlv_header;
  12394. /** pdev_id for identifying the MAC
  12395. * See macros starting with WMI_PDEV_ID_ for values.
  12396. */
  12397. A_UINT32 pdev_id;
  12398. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  12399. typedef struct {
  12400. /** TLV tag and len; tag equals
  12401. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  12402. */
  12403. A_UINT32 tlv_header;
  12404. /** pdev_id for identifying the MAC
  12405. * See macros starting with WMI_PDEV_ID_ for values.
  12406. */
  12407. A_UINT32 pdev_id;
  12408. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  12409. typedef struct {
  12410. A_UINT32 tlv_header;
  12411. A_UINT32 pdev_id;
  12412. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  12413. typedef struct {
  12414. A_UINT32 tlv_header;
  12415. A_UINT32 pdev_id;
  12416. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  12417. typedef enum {
  12418. QUICK_OCAC = 0,
  12419. EXTENSIVE_OCAC,
  12420. } WMI_ADFS_OCAC_MODE;
  12421. typedef struct {
  12422. A_UINT32 tlv_header;
  12423. A_UINT32 vdev_id;
  12424. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  12425. A_UINT32 min_duration_ms; /* in milliseconds */
  12426. A_UINT32 max_duration_ms; /* in milliseconds */
  12427. A_UINT32 chan_freq; /* in MHz */
  12428. A_UINT32 chan_width; /* in MHz */
  12429. A_UINT32 center_freq; /* in MHz */
  12430. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  12431. typedef struct {
  12432. A_UINT32 tlv_header;
  12433. A_UINT32 vdev_id;
  12434. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  12435. typedef enum {
  12436. IN_SERVICE_MODE = 0,
  12437. OCAC_MODE,
  12438. } WMI_DFS_RADAR_DETECTION_MODE;
  12439. typedef struct {
  12440. A_UINT32 tlv_header;
  12441. A_UINT32 pdev_id;
  12442. /* In-service mode or O-CAC mode */
  12443. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  12444. A_UINT32 chan_freq; /* in MHz */
  12445. A_UINT32 chan_width; /* in MHz */
  12446. A_UINT32 detector_id;
  12447. A_UINT32 segment_id;
  12448. A_UINT32 timestamp;
  12449. A_UINT32 is_chirp;
  12450. A_INT32 freq_offset; /* in MHz */
  12451. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  12452. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  12453. typedef enum {
  12454. OCAC_COMPLETE = 0,
  12455. OCAC_ABORT,
  12456. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  12457. typedef struct {
  12458. A_UINT32 tlv_header;
  12459. A_UINT32 vdev_id;
  12460. A_UINT32 chan_freq; /* in MHz */
  12461. A_UINT32 chan_width; /* in MHz */
  12462. A_UINT32 center_freq; /* in MHz */
  12463. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  12464. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  12465. typedef struct {
  12466. A_UINT32 tlv_header;
  12467. A_UINT32 vdev_id;
  12468. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  12469. /** TDLS COMMANDS */
  12470. /* WMI_TDLS_SET_STATE_CMDID */
  12471. /* TDLS State */
  12472. enum wmi_tdls_state {
  12473. /** TDLS disable */
  12474. WMI_TDLS_DISABLE,
  12475. /** TDLS enabled - no firmware connection tracking/notifications */
  12476. WMI_TDLS_ENABLE_PASSIVE,
  12477. /** TDLS enabled - with firmware connection tracking/notifications */
  12478. WMI_TDLS_ENABLE_ACTIVE,
  12479. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  12480. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  12481. /** TDLS enabled - TDLS connection tracking is done in host */
  12482. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  12483. };
  12484. /* TDLS Options */
  12485. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  12486. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  12487. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  12488. typedef struct {
  12489. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  12490. A_UINT32 tlv_header;
  12491. /** unique id identifying the VDEV */
  12492. A_UINT32 vdev_id;
  12493. /** Enable/Disable TDLS (wmi_tdls_state) */
  12494. A_UINT32 state;
  12495. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  12496. A_UINT32 notification_interval_ms;
  12497. /** number of packets OVER which notify/suggest TDLS Discovery:
  12498. * if current tx pps counter / notification interval >= threshold
  12499. * then a notification will be sent to host to advise TDLS Discovery */
  12500. A_UINT32 tx_discovery_threshold;
  12501. /** number of packets UNDER which notify/suggest TDLS Teardown:
  12502. * if current tx pps counter / notification interval < threshold
  12503. * then a notification will be sent to host to advise TDLS Tear down */
  12504. A_UINT32 tx_teardown_threshold;
  12505. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  12506. A_INT32 rssi_teardown_threshold;
  12507. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  12508. A_INT32 rssi_delta;
  12509. /** TDLS Option Control
  12510. * Off-Channel, Buffer STA, (later)Sleep STA support */
  12511. A_UINT32 tdls_options;
  12512. /* Buffering time in number of beacon intervals */
  12513. A_UINT32 tdls_peer_traffic_ind_window;
  12514. /* Wait time for PTR frame */
  12515. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  12516. /* Self PUAPSD mask */
  12517. A_UINT32 tdls_puapsd_mask;
  12518. /* Inactivity timeout */
  12519. A_UINT32 tdls_puapsd_inactivity_time_ms;
  12520. /* Max of rx frame during SP */
  12521. A_UINT32 tdls_puapsd_rx_frame_threshold;
  12522. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  12523. A_UINT32 teardown_notification_ms;
  12524. /** STA kickout threshold for TDLS peer */
  12525. A_UINT32 tdls_peer_kickout_threshold;
  12526. /* TDLS discovery WAKE timeout in ms.
  12527. * DUT will wake until this timeout to receive TDLS discovery response
  12528. * from peer.
  12529. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  12530. * what wake timeout value to use.
  12531. */
  12532. A_UINT32 tdls_discovery_wake_timeout;
  12533. } wmi_tdls_set_state_cmd_fixed_param;
  12534. /* WMI_TDLS_PEER_UPDATE_CMDID */
  12535. enum wmi_tdls_peer_state {
  12536. /** tx peer TDLS link setup now starting, traffic to DA should be
  12537. * paused (except TDLS frames) until state is moved to CONNECTED (or
  12538. * TEARDOWN on setup failure) */
  12539. WMI_TDLS_PEER_STATE_PEERING,
  12540. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  12541. WMI_TDLS_PEER_STATE_CONNECTED,
  12542. /** tx peer TDLS link tear down started (link paused, any frames
  12543. * queued for DA will be requeued back through the AP)*/
  12544. WMI_TDLS_PEER_STATE_TEARDOWN,
  12545. /** Add peer mac into connection table */
  12546. WMI_TDLS_PEER_ADD_MAC_ADDR,
  12547. /** Remove peer mac from connection table */
  12548. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  12549. };
  12550. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  12551. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  12552. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  12553. typedef struct {
  12554. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  12555. A_UINT32 tlv_header;
  12556. /* Peer's QoS Info - for U-APSD */
  12557. /* AC FLAGS - accessed through macros below */
  12558. /* Ack, SP, More Data Ack - accessed through macros below */
  12559. A_UINT32 peer_qos;
  12560. /*TDLS Peer's U-APSD Buffer STA Support*/
  12561. A_UINT32 buff_sta_support;
  12562. /*TDLS off channel related params */
  12563. A_UINT32 off_chan_support;
  12564. A_UINT32 peer_curr_operclass;
  12565. A_UINT32 self_curr_operclass;
  12566. /* Number of channels available for off channel operation */
  12567. A_UINT32 peer_chan_len;
  12568. A_UINT32 peer_operclass_len;
  12569. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  12570. /* Is peer initiator or responder of TDLS setup request */
  12571. A_UINT32 is_peer_responder;
  12572. /* Preferred off channel number as configured by user */
  12573. A_UINT32 pref_offchan_num;
  12574. /* Preferred off channel bandwidth as configured by user */
  12575. A_UINT32 pref_offchan_bw;
  12576. /** Followed by the variable length TLV peer_chan_list:
  12577. * wmi_channel peer_chan_list[].
  12578. * Array size would be peer_chan_len.
  12579. * This array is intersected channels which is supported by both peer
  12580. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  12581. * FW shall compute BW for an offchan based on peer's ht/vht cap
  12582. * received in peer_assoc cmd during change STA operation
  12583. */
  12584. } wmi_tdls_peer_capabilities;
  12585. #define WMI_TDLS_QOS_VO_FLAG 0
  12586. #define WMI_TDLS_QOS_VI_FLAG 1
  12587. #define WMI_TDLS_QOS_BK_FLAG 2
  12588. #define WMI_TDLS_QOS_BE_FLAG 3
  12589. #define WMI_TDLS_QOS_ACK_FLAG 4
  12590. #define WMI_TDLS_QOS_SP_FLAG 5
  12591. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  12592. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  12593. (ppeer_caps)->peer_qos |= (1 << flag); \
  12594. } while (0)
  12595. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  12596. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  12597. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12598. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12599. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12600. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12601. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12602. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12603. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12604. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12605. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12606. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12607. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12608. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12609. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12610. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12611. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12612. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12613. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12614. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12615. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12616. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12617. /* SP has 2 bits */
  12618. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  12619. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12620. } while (0)
  12621. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  12622. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12623. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12624. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12625. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12626. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12627. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  12628. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  12629. } while (0)
  12630. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  12631. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  12632. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12633. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12634. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12635. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12636. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12637. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12638. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12639. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12640. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  12641. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12642. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  12643. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12644. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12645. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12646. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12647. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12648. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12649. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12650. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12651. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12652. /* SP has 2 bits */
  12653. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  12654. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12655. } while (0)
  12656. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  12657. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12658. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12659. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12660. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12661. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12662. typedef struct {
  12663. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  12664. A_UINT32 tlv_header;
  12665. /** unique id identifying the VDEV */
  12666. A_UINT32 vdev_id;
  12667. /** peer MAC address */
  12668. wmi_mac_addr peer_macaddr;
  12669. /** new TDLS state for peer (wmi_tdls_peer_state) */
  12670. A_UINT32 peer_state;
  12671. /* The TLV for wmi_tdls_peer_capabilities will follow.
  12672. * wmi_tdls_peer_capabilities peer_caps;
  12673. */
  12674. /** Followed by the variable length TLV chan_info:
  12675. * wmi_channel chan_info[] */
  12676. } wmi_tdls_peer_update_cmd_fixed_param;
  12677. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  12678. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  12679. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  12680. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  12681. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  12682. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  12683. enum wmi_tdls_offchan_mode {
  12684. WMI_TDLS_ENABLE_OFFCHANNEL,
  12685. WMI_TDLS_DISABLE_OFFCHANNEL
  12686. };
  12687. typedef struct {
  12688. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  12689. A_UINT32 tlv_header;
  12690. /** unique id identifying the VDEV */
  12691. A_UINT32 vdev_id;
  12692. /** Enable/Disable TDLS offchannel */
  12693. A_UINT32 offchan_mode;
  12694. /** peer MAC address */
  12695. wmi_mac_addr peer_macaddr;
  12696. /* Is peer initiator or responder of TDLS setup request */
  12697. A_UINT32 is_peer_responder;
  12698. /* off channel number*/
  12699. A_UINT32 offchan_num;
  12700. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  12701. A_UINT32 offchan_bw_bitmap;
  12702. /* operating class for offchan */
  12703. A_UINT32 offchan_oper_class;
  12704. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  12705. /** TDLS EVENTS */
  12706. enum wmi_tdls_peer_notification {
  12707. /** tdls discovery recommended for peer (based
  12708. * on tx bytes per second > tx_discover threshold) */
  12709. WMI_TDLS_SHOULD_DISCOVER,
  12710. /** tdls link tear down recommended for peer
  12711. * due to tx bytes per second below tx_teardown_threshold
  12712. * NB: this notification sent once */
  12713. WMI_TDLS_SHOULD_TEARDOWN,
  12714. /** tx peer TDLS link tear down complete */
  12715. WMI_TDLS_PEER_DISCONNECTED,
  12716. /** TDLS/BT role change notification for connection tracker */
  12717. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  12718. };
  12719. enum wmi_tdls_peer_reason {
  12720. /** tdls teardown recommended due to low transmits */
  12721. WMI_TDLS_TEARDOWN_REASON_TX,
  12722. /** tdls link tear down recommended due to poor RSSI */
  12723. WMI_TDLS_TEARDOWN_REASON_RSSI,
  12724. /** tdls link tear down recommended due to offchannel scan */
  12725. WMI_TDLS_TEARDOWN_REASON_SCAN,
  12726. /** tdls peer disconnected due to peer deletion */
  12727. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  12728. /** tdls peer disconnected due to PTR timeout */
  12729. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  12730. /** tdls peer disconnected due wrong PTR format */
  12731. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  12732. /** tdls peer not responding */
  12733. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  12734. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  12735. WMI_TDLS_ENTER_BUF_STA,
  12736. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  12737. WMI_TDLS_EXIT_BUF_STA,
  12738. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  12739. WMI_TDLS_ENTER_BT_BUSY_MODE,
  12740. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  12741. WMI_TDLS_EXIT_BT_BUSY_MODE,
  12742. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  12743. WMI_TDLS_SCAN_STARTED_EVENT,
  12744. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  12745. WMI_TDLS_SCAN_COMPLETED_EVENT,
  12746. };
  12747. /* WMI_TDLS_PEER_EVENTID */
  12748. typedef struct {
  12749. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  12750. A_UINT32 tlv_header;
  12751. /** peer MAC address */
  12752. wmi_mac_addr peer_macaddr;
  12753. /** TDLS peer status (wmi_tdls_peer_notification)*/
  12754. A_UINT32 peer_status;
  12755. /** TDLS peer reason (wmi_tdls_peer_reason) */
  12756. A_UINT32 peer_reason;
  12757. /** unique id identifying the VDEV */
  12758. A_UINT32 vdev_id;
  12759. } wmi_tdls_peer_event_fixed_param;
  12760. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  12761. don't use this for any new implementations */
  12762. typedef struct {
  12763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  12764. /** unique id identifying the VDEV, generated by the caller */
  12765. A_UINT32 vdev_id;
  12766. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  12767. A_UINT32 new_bcn_intvl;
  12768. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  12769. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  12770. typedef struct {
  12771. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  12772. A_UINT32 tlv_header;
  12773. /** 1: enable fw based adaptive ocs,
  12774. * 0: disable fw based adaptive ocs
  12775. */
  12776. A_UINT32 enable;
  12777. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  12778. union {
  12779. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  12780. /** pdev_id for identifying the MAC
  12781. * See macros starting with WMI_PDEV_ID_ for values.
  12782. */
  12783. A_UINT32 pdev_id;
  12784. };
  12785. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  12786. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  12787. typedef struct {
  12788. /* Frequency of the channel for which the quota is set */
  12789. A_UINT32 chan_mhz;
  12790. /* Requested channel time quota expressed as percentage */
  12791. A_UINT32 channel_time_quota;
  12792. } wmi_resmgr_chan_time_quota;
  12793. typedef struct {
  12794. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  12795. A_UINT32 tlv_header;
  12796. /** number of channel time quota command structures
  12797. * (wmi_resmgr_chan_time_quota) 1 or 2
  12798. */
  12799. A_UINT32 num_chans;
  12800. /* This TLV is followed by another TLV of array of bytes
  12801. * A_UINT8 data[];
  12802. * This data array contains
  12803. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  12804. */
  12805. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  12806. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  12807. typedef struct {
  12808. /* Frequency of the channel for which the latency is set */
  12809. A_UINT32 chan_mhz;
  12810. /* Requested channel latency in milliseconds */
  12811. A_UINT32 latency;
  12812. } wmi_resmgr_chan_latency;
  12813. typedef struct {
  12814. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  12815. A_UINT32 tlv_header;
  12816. /** number of channel latency command structures
  12817. * (wmi_resmgr_chan_latency) 1 or 2
  12818. */
  12819. A_UINT32 num_chans;
  12820. /* This TLV is followed by another TLV of array of bytes
  12821. * A_UINT8 data[];
  12822. * This data array contains
  12823. * num_chans * size of(struct wmi_resmgr_chan_latency)
  12824. */
  12825. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  12826. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  12827. /** STA SMPS Forced Mode */
  12828. typedef enum {
  12829. WMI_SMPS_FORCED_MODE_NONE = 0,
  12830. WMI_SMPS_FORCED_MODE_DISABLED,
  12831. WMI_SMPS_FORCED_MODE_STATIC,
  12832. WMI_SMPS_FORCED_MODE_DYNAMIC
  12833. } wmi_sta_smps_forced_mode;
  12834. typedef struct {
  12835. /** TLV tag and len; tag equals
  12836. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  12837. A_UINT32 tlv_header;
  12838. /** Unique id identifying the VDEV */
  12839. A_UINT32 vdev_id;
  12840. /** The mode of SMPS that is to be forced in the FW. */
  12841. A_UINT32 forced_mode;
  12842. } wmi_sta_smps_force_mode_cmd_fixed_param;
  12843. /** wlan HB commands */
  12844. #define WMI_WLAN_HB_ITEM_UDP 0x1
  12845. #define WMI_WLAN_HB_ITEM_TCP 0x2
  12846. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  12847. must be a multiple of 4 bytes */
  12848. typedef struct {
  12849. /** TLV tag and len; tag equals
  12850. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  12851. A_UINT32 tlv_header; /** TLV header*/
  12852. A_UINT32 vdev_id; /** Vdev ID */
  12853. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  12854. A_UINT32 item; /** 1: UDP, 2: TCP */
  12855. A_UINT32 session; /** Session ID from HOST */
  12856. } wmi_hb_set_enable_cmd_fixed_param;
  12857. typedef struct {
  12858. /** TLV tag and len; tag equals
  12859. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  12860. A_UINT32 tlv_header; /** TLV header*/
  12861. A_UINT32 vdev_id; /** Vdev ID */
  12862. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  12863. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  12864. A_UINT32 seq; /** TCP Sequence no */
  12865. A_UINT32 src_port; /** Source port */
  12866. A_UINT32 dst_port; /** Destination port */
  12867. A_UINT32 interval; /** Keep alive interval */
  12868. A_UINT32 timeout; /** Timeout if keep alive fails */
  12869. A_UINT32 session; /** Session ID from HOST */
  12870. wmi_mac_addr gateway_mac; /** Server Mac Address */
  12871. } wmi_hb_set_tcp_params_cmd_fixed_param;
  12872. typedef struct {
  12873. /** TLV tag and len; tag equals
  12874. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  12875. A_UINT32 tlv_header;
  12876. A_UINT32 vdev_id;
  12877. A_UINT32 length;
  12878. A_UINT32 offset;
  12879. A_UINT32 session;
  12880. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12881. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  12882. typedef struct {
  12883. /** TLV tag and len; tag equals
  12884. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  12885. A_UINT32 tlv_header;
  12886. A_UINT32 vdev_id;
  12887. A_UINT32 srv_ip;
  12888. A_UINT32 dev_ip;
  12889. A_UINT32 src_port;
  12890. A_UINT32 dst_port;
  12891. A_UINT32 interval;
  12892. A_UINT32 timeout;
  12893. A_UINT32 session;
  12894. wmi_mac_addr gateway_mac;
  12895. } wmi_hb_set_udp_params_cmd_fixed_param;
  12896. typedef struct {
  12897. /** TLV tag and len; tag equals
  12898. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  12899. A_UINT32 tlv_header;
  12900. A_UINT32 vdev_id;
  12901. A_UINT32 length;
  12902. A_UINT32 offset;
  12903. A_UINT32 session;
  12904. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12905. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  12906. /** wlan HB events */
  12907. typedef enum {
  12908. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  12909. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  12910. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  12911. } WMI_HB_WAKEUP_REASON;
  12912. typedef struct {
  12913. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  12914. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12915. A_UINT32 session; /** Session ID from HOST */
  12916. A_UINT32 reason; /** wakeup reason */
  12917. } wmi_hb_ind_event_fixed_param;
  12918. typedef struct {
  12919. /** TLV tag and len; tag equals
  12920. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  12921. A_UINT32 tlv_header; /** TLV Header */
  12922. A_UINT32 vdev_id; /** Vdev ID */
  12923. A_UINT32 session; /** Session number from the HOST */
  12924. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  12925. A_UINT32 dev_ip; /** IPv4 address of the device */
  12926. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  12927. A_UINT32 src_port; /** Source port */
  12928. A_UINT32 dst_port; /** Destination port */
  12929. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  12930. 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 */
  12931. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  12932. retries[15:0]: Number of TCP level retries of OIC ping request */
  12933. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  12934. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  12935. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  12936. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  12937. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  12938. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  12939. TLS version [15:00] */
  12940. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  12941. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  12942. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  12943. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  12944. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12945. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  12946. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  12947. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  12948. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  12949. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  12950. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  12951. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  12952. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12953. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  12954. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  12955. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  12956. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  12957. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  12958. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  12959. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  12960. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12961. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  12962. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  12963. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  12964. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  12965. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  12966. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  12967. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  12968. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  12969. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  12970. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12971. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12972. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12973. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  12974. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  12975. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12976. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12977. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12978. } wmi_oic_ping_offload_params_cmd_fixed_param;
  12979. typedef struct {
  12980. /** TLV tag and len; tag equals
  12981. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  12982. A_UINT32 tlv_header; /** TLV Header*/
  12983. A_UINT32 vdev_id; /** Interface number */
  12984. A_UINT32 session; /** Session ID*/
  12985. A_UINT32 enable; /** 1: Enable , 0: Disable */
  12986. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  12987. /** wlan OIC events */
  12988. typedef enum {
  12989. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  12990. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  12991. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  12992. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  12993. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  12994. } WMI_OIC_WAKEUP_REASON;
  12995. typedef struct {
  12996. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  12997. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12998. A_UINT32 session; /** Session ID from driver */
  12999. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  13000. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  13001. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  13002. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  13003. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  13004. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  13005. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  13006. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  13007. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13008. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13009. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13010. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  13011. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13012. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13013. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13014. } wmi_oic_ping_handoff_event;
  13015. typedef struct {
  13016. /** TLV tag and len; tag equals
  13017. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  13018. A_UINT32 tlv_header; /** TLV Header*/
  13019. A_UINT32 vdev_id; /** Vdev ID */
  13020. A_UINT32 enable; /** 1: Enable 0: Disable*/
  13021. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  13022. A_UINT32 client_ip; /** Device IP address (IPv4) */
  13023. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  13024. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  13025. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  13026. /** WLAN DHCP Lease Renew Events */
  13027. typedef enum {
  13028. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  13029. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  13030. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  13031. } WMI_DHCP_RENEW_WAKEUP_REASON;
  13032. typedef struct {
  13033. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  13034. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13035. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  13036. } wmi_dhcp_lease_renew_event;
  13037. /** WMI_STA_SMPS_PARAM_CMDID */
  13038. typedef enum {
  13039. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  13040. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  13041. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  13042. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  13043. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  13044. /** RSSI threshold to disable SMPS modes */
  13045. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  13046. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  13047. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  13048. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  13049. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  13050. /** Enable/Disable DTIM 1chRx feature */
  13051. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  13052. } wmi_sta_smps_param;
  13053. typedef struct {
  13054. /** TLV tag and len; tag equals
  13055. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  13056. A_UINT32 tlv_header;
  13057. /** Unique id identifying the VDEV */
  13058. A_UINT32 vdev_id;
  13059. /** SMPS parameter (see wmi_sta_smps_param) */
  13060. A_UINT32 param;
  13061. /** Value of SMPS parameter */
  13062. A_UINT32 value;
  13063. } wmi_sta_smps_param_cmd_fixed_param;
  13064. typedef struct {
  13065. /** TLV tag and len; tag equals
  13066. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  13067. A_UINT32 tlv_header;
  13068. /* TX stats */
  13069. A_UINT32 txBytesPushed;
  13070. A_UINT32 txPacketsPushed;
  13071. /* RX stats */
  13072. A_UINT32 rxBytesRcvd;
  13073. A_UINT32 rxPacketsRcvd;
  13074. A_UINT32 rxTimeTotal;
  13075. /** peer MAC address */
  13076. wmi_mac_addr peer_macaddr;
  13077. } wmi_mcc_sched_sta_traffic_stats;
  13078. typedef struct {
  13079. /** TLV tag and len; tag equals
  13080. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  13081. A_UINT32 tlv_header;
  13082. /** Duration over which the host stats were collected */
  13083. A_UINT32 duration;
  13084. /** Number of stations filled in following stats array */
  13085. A_UINT32 num_sta;
  13086. /* Following this struct are the TLVs:
  13087. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  13088. */
  13089. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  13090. typedef struct
  13091. {
  13092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  13093. /* unique id identifying the VDEV, generated by the caller */
  13094. A_UINT32 vdev_id;
  13095. /*Batch scan enable command parameters*/
  13096. A_UINT32 scanInterval;
  13097. A_UINT32 numScan2Batch;
  13098. A_UINT32 bestNetworks;
  13099. A_UINT32 rfBand;
  13100. A_UINT32 rtt;
  13101. } wmi_batch_scan_enable_cmd_fixed_param;
  13102. typedef struct
  13103. {
  13104. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  13105. A_UINT32 supportedMscan;
  13106. } wmi_batch_scan_enabled_event_fixed_param;
  13107. typedef struct
  13108. {
  13109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  13110. /* unique id identifying the VDEV, generated by the caller */
  13111. A_UINT32 vdev_id;
  13112. A_UINT32 param;
  13113. } wmi_batch_scan_disable_cmd_fixed_param;
  13114. typedef struct
  13115. {
  13116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  13117. /** unique id identifying the VDEV, generated by the caller */
  13118. A_UINT32 vdev_id;
  13119. A_UINT32 param;
  13120. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  13121. typedef struct
  13122. {
  13123. A_UINT32 tlv_header;
  13124. wmi_mac_addr bssid; /* BSSID */
  13125. wmi_ssid ssid; /* SSID */
  13126. A_UINT32 ch; /* Channel */
  13127. A_UINT32 rssi; /* RSSI or Level */
  13128. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  13129. A_UINT32 timestamp;
  13130. } wmi_batch_scan_result_network_info;
  13131. typedef struct
  13132. {
  13133. A_UINT32 tlv_header;
  13134. A_UINT32 scanId; /* Scan List ID. */
  13135. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  13136. A_UINT32 numNetworksInScanList;
  13137. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  13138. } wmi_batch_scan_result_scan_list;
  13139. #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. */
  13140. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  13141. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  13142. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  13143. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  13144. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  13145. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  13146. #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. */
  13147. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  13148. #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. */
  13149. /*
  13150. * TEMPORARY alias of incorrect old name the correct name.
  13151. * This alias will be removed once all references to the old name have been fixed.
  13152. */
  13153. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  13154. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  13155. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  13156. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  13157. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  13158. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  13159. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  13160. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  13161. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  13162. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  13163. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  13164. #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. */
  13165. #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 */
  13166. #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 */
  13167. #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. */
  13168. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  13169. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  13170. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  13171. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  13172. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  13173. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  13174. typedef struct {
  13175. A_UINT32 tlv_header;
  13176. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  13177. A_UINT32 enable;
  13178. /**LPI snooping mode*/
  13179. A_UINT32 snooping_mode;
  13180. /** LPI interested IEs in snooping context */
  13181. A_UINT32 ie_bitmap;
  13182. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  13183. typedef struct {
  13184. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  13185. /** Scan ID */
  13186. A_UINT32 scan_id;
  13187. /** Scan requestor ID */
  13188. A_UINT32 scan_req_id;
  13189. /** VDEV id(interface) that is requesting scan */
  13190. A_UINT32 vdev_id;
  13191. /** LPI interested IEs in scan context */
  13192. A_UINT32 ie_bitmap;
  13193. /** Scan Priority, input to scan scheduler */
  13194. A_UINT32 scan_priority;
  13195. /** dwell time in msec on active channels */
  13196. A_UINT32 dwell_time_active;
  13197. /** dwell time in msec on passive channels */
  13198. A_UINT32 dwell_time_passive;
  13199. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  13200. A_UINT32 min_rest_time;
  13201. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  13202. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  13203. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  13204. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  13205. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  13206. * irrespective of activity. activity is determined by the idle_time parameter.
  13207. */
  13208. A_UINT32 max_rest_time;
  13209. /** time before sending next set of probe requests.
  13210. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  13211. * The number of probe requests specified depends on the ssid_list and bssid_list
  13212. */
  13213. A_UINT32 repeat_probe_time;
  13214. /** time in msec between 2 consequetive probe requests with in a set. */
  13215. A_UINT32 probe_spacing_time;
  13216. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  13217. A_UINT32 idle_time;
  13218. /** maximum time in msec allowed for scan */
  13219. A_UINT32 max_scan_time;
  13220. /** delay in msec before sending first probe request after switching to a channel */
  13221. A_UINT32 probe_delay;
  13222. /** Scan control flags */
  13223. A_UINT32 scan_ctrl_flags;
  13224. /** Burst duration time in msec*/
  13225. A_UINT32 burst_duration;
  13226. /** # if channels to scan. In the TLV channel_list[] */
  13227. A_UINT32 num_chan;
  13228. /** number of bssids. In the TLV bssid_list[] */
  13229. A_UINT32 num_bssid;
  13230. /** number of ssid. In the TLV ssid_list[] */
  13231. A_UINT32 num_ssids;
  13232. /** number of bytes in ie data. In the TLV ie_data[] */
  13233. A_UINT32 ie_len;
  13234. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  13235. A_UINT32 scan_ctrl_flags_ext;
  13236. /**
  13237. * TLV (tag length value) parameters follow the scan_cmd
  13238. * structure. The TLV's are:
  13239. * A_UINT32 channel_list[];
  13240. * wmi_ssid ssid_list[];
  13241. * wmi_mac_addr bssid_list[];
  13242. * A_UINT8 ie_data[];
  13243. */
  13244. } wmi_lpi_start_scan_cmd_fixed_param;
  13245. typedef struct {
  13246. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  13247. /** Scan requestor ID */
  13248. A_UINT32 scan_req_id;
  13249. /** Scan ID */
  13250. A_UINT32 scan_id;
  13251. /**
  13252. * Req Type
  13253. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  13254. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  13255. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  13256. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  13257. */
  13258. A_UINT32 req_type;
  13259. /**
  13260. * vDev ID
  13261. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  13262. */
  13263. A_UINT32 vdev_id;
  13264. } wmi_lpi_stop_scan_cmd_fixed_param;
  13265. typedef enum {
  13266. WMI_LPI_DEVICE_TYPE_AP = 1,
  13267. WMI_LPI_DEVICE_TYPE_P2P = 2,
  13268. WMI_LPI_DEVICE_TYPE_NAN = 3,
  13269. } wmi_lpi_device_type;
  13270. typedef struct
  13271. {
  13272. A_UINT32 tlv_header;
  13273. /** Scan requestor ID */
  13274. A_UINT32 scan_req_id;
  13275. A_UINT32 ie_bitmap;
  13276. A_UINT32 data_len;
  13277. } wmi_lpi_result_event_fixed_param;
  13278. typedef enum {
  13279. /** User scan Request completed */
  13280. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  13281. /** User Request was never serviced */
  13282. WMI_LPI_STATUS_DROPPED_REQ = 1,
  13283. /** Illegal channel Req */
  13284. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  13285. /** Illegal Operation Req */
  13286. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  13287. /** Request Aborted */
  13288. WMI_LPI_STATUS_REQ_ABORTED = 4,
  13289. /** Request Timed Out */
  13290. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  13291. /** Medium Busy, already there
  13292. * is a scan is going on */
  13293. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  13294. /** Extscan is the scan client whose scan complete event is triggered */
  13295. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  13296. } wmi_lpi_staus;
  13297. typedef struct
  13298. {
  13299. A_UINT32 tlv_header;
  13300. wmi_lpi_staus status;
  13301. /** Scan requestor ID */
  13302. A_UINT32 scan_req_id;
  13303. } wmi_lpi_status_event_fixed_param;
  13304. typedef struct
  13305. {
  13306. A_UINT32 tlv_header;
  13307. wmi_mac_addr bssid;
  13308. wmi_ssid ssid;
  13309. A_UINT32 freq;
  13310. A_UINT32 rssi;
  13311. A_UINT32 vdev_id;
  13312. } wmi_lpi_handoff_event_fixed_param;
  13313. typedef struct
  13314. {
  13315. A_UINT32 tlv_header;
  13316. A_UINT32 timestamp; /*timestamp of batch scan event*/
  13317. A_UINT32 numScanLists; /*number of scan in this event*/
  13318. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  13319. } wmi_batch_scan_result_event_fixed_param;
  13320. typedef struct {
  13321. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  13322. A_UINT32 vdev_id;
  13323. /* This TLV is followed by p2p_noa_info for vdev :
  13324. * wmi_p2p_noa_info p2p_noa_info;
  13325. */
  13326. } wmi_p2p_noa_event_fixed_param;
  13327. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  13328. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  13329. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  13330. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  13331. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  13332. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  13333. typedef struct {
  13334. /** TLV tag and len; tag equals
  13335. * */
  13336. A_UINT32 tlv_header;
  13337. /** gpip pin number */
  13338. A_UINT32 gpio_pin_num;
  13339. /** gpio interupt type */
  13340. A_UINT32 int_type;
  13341. /** RF radio status */
  13342. A_UINT32 radio_state;
  13343. } wmi_rfkill_mode_param;
  13344. typedef enum {
  13345. WMI_SET_LED_SYS_POWEROFF,
  13346. WMI_SET_LED_SYS_S3_SUSPEND,
  13347. WMI_SET_LED_SYS_S4_S5,
  13348. WMI_SET_LED_SYS_DRIVER_DISABLE,
  13349. WMI_SET_LED_SYS_WAKEUP,
  13350. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  13351. WMI_SET_LED_SYS_POWERON,
  13352. } wmi_led_sys_state_param;
  13353. typedef enum {
  13354. WMI_CONFIG_LED_TO_VDD = 0,
  13355. WMI_CONFIG_LED_TO_GND = 1,
  13356. } wmi_config_led_connect_type;
  13357. typedef enum {
  13358. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  13359. WMI_CONFIG_LED_WITH_BT = 1,
  13360. } wmi_config_led_with_bt_flag;
  13361. typedef enum {
  13362. WMI_CONFIG_LED_DISABLE = 0,
  13363. WMI_CONFIG_LED_ENABLE = 1,
  13364. } wmi_config_led_enable_flag;
  13365. typedef enum {
  13366. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  13367. WMI_CONFIG_LED_HIGH_OFF = 1,
  13368. WMI_CONFIG_LED_HIGH_ON = 2,
  13369. } wmi_config_led_on_flag;
  13370. typedef enum {
  13371. WMI_CONFIG_LED_UNSPECIFIED = 0,
  13372. WMI_CONFIG_LED_ON = 1,
  13373. WMI_CONFIG_LED_OFF = 2,
  13374. WMI_CONFIG_LED_DIM = 3,
  13375. WMI_CONFIG_LED_BLINK = 4,
  13376. WMI_CONFIG_LED_TXRX = 5,
  13377. } wmi_config_led_operation_type;
  13378. typedef struct {
  13379. /** TLV tag and len; tag equals
  13380. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  13381. A_UINT32 tlv_header;
  13382. /* Set GPIO pin */
  13383. A_UINT32 led_gpio_pin;
  13384. /* Set connect type defined in wmi_config_led_connect_type */
  13385. A_UINT32 connect_type;
  13386. /* Set flag defined in wmi_config_led_with_bt_flag*/
  13387. A_UINT32 with_bt;
  13388. /* Set LED enablement defined in wmi_config_led_enable_flag */
  13389. A_UINT32 led_enable;
  13390. /** pdev_id for identifying the MAC
  13391. * See macros starting with WMI_PDEV_ID_ for values.
  13392. */
  13393. A_UINT32 pdev_id;
  13394. /* see wmi_config_led_operation_type enum */
  13395. A_UINT32 led_operation_type;
  13396. /* see wmi_config_led_on_flag enum */
  13397. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  13398. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  13399. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  13400. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  13401. } wmi_pdev_set_led_config_cmd_fixed_param;
  13402. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  13403. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  13404. /** WMI_PEER_INFO_REQ_CMDID
  13405. * Request FW to provide peer info */
  13406. typedef struct {
  13407. /** TLV tag and len; tag equals
  13408. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  13409. A_UINT32 tlv_header;
  13410. /** In order to get the peer info for a single peer, host shall
  13411. * issue the peer_mac_address of that peer. For getting the
  13412. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  13413. * address. The firmware will return the peer info for all the
  13414. * peers on the specified vdev_id */
  13415. wmi_mac_addr peer_mac_address;
  13416. /** vdev id */
  13417. A_UINT32 vdev_id;
  13418. } wmi_peer_info_req_cmd_fixed_param;
  13419. typedef struct {
  13420. /** TLV tag and len; tag equals
  13421. * WMITLV_TAG_STRUC_wmi_peer_info */
  13422. A_UINT32 tlv_header;
  13423. /** mac addr of the peer */
  13424. wmi_mac_addr peer_mac_address;
  13425. /** data_rate of the peer */
  13426. A_UINT32 data_rate;
  13427. /** rssi of the peer */
  13428. A_UINT32 rssi;
  13429. /** tx fail count */
  13430. A_UINT32 tx_fail_cnt;
  13431. } wmi_peer_info;
  13432. /** FW response with the peer info */
  13433. typedef struct {
  13434. /** TLV tag and len; tag equals
  13435. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  13436. A_UINT32 tlv_header;
  13437. /** number of peers in peer_info */
  13438. A_UINT32 num_peers;
  13439. /* Set to 1 only if vdev_id field is valid */
  13440. A_UINT32 valid_vdev_id;
  13441. /* VDEV to which the peer belongs to */
  13442. A_UINT32 vdev_id;
  13443. /* This TLV is followed by another TLV of array of structs
  13444. * wmi_peer_info peer_info[];
  13445. */
  13446. } wmi_peer_info_event_fixed_param;
  13447. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  13448. * Request FW to provide peer info */
  13449. typedef struct {
  13450. /** TLV tag and len; tag equals
  13451. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  13452. A_UINT32 tlv_header;
  13453. /** In order to get the peer antdiv info for a single peer, host shall
  13454. * issue the peer_mac_address of that peer. For getting the
  13455. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  13456. * address. The firmware will return the peer info for all the
  13457. * peers on the specified vdev_id */
  13458. wmi_mac_addr peer_mac_address;
  13459. /** vdev id */
  13460. A_UINT32 vdev_id;
  13461. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  13462. /** FW response with the peer antdiv info */
  13463. typedef struct {
  13464. /** TLV tag and len; tag equals
  13465. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  13466. A_UINT32 tlv_header;
  13467. /** number of peers in peer_info */
  13468. A_UINT32 num_peers;
  13469. /* VDEV to which the peer belongs to */
  13470. A_UINT32 vdev_id;
  13471. /* This TLV is followed by another TLV of array of structs
  13472. * wmi_peer_antdiv_info peer_antdiv_info[];
  13473. */
  13474. } wmi_peer_antdiv_info_event_fixed_param;
  13475. typedef struct {
  13476. /** TLV tag and len; tag equals
  13477. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  13478. A_UINT32 tlv_header;
  13479. /** mac addr of the peer */
  13480. wmi_mac_addr peer_mac_address;
  13481. /** per chain rssi of the peer, for up to 8 chains.
  13482. * Each chain's entry reports the RSSI for different bandwidths:
  13483. * bits 7:0 -> primary 20 MHz
  13484. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  13485. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  13486. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  13487. * Each of these 8-bit RSSI reports is in dB units, with respect to
  13488. * the noise floor.
  13489. * 0x80 means invalid.
  13490. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  13491. * All unused chain_rssi indices shall be set to 0x80808080.
  13492. */
  13493. A_INT32 chain_rssi[8];
  13494. } wmi_peer_antdiv_info;
  13495. typedef struct {
  13496. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  13497. /** tid_number */
  13498. A_UINT32 tid_num;
  13499. /** msduq_mask to set the value
  13500. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  13501. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  13502. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  13503. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  13504. * rest of bits are reserved and set to 0.
  13505. */
  13506. A_UINT32 msduq_update_mask;
  13507. /** Qdepth threshold value
  13508. * If number of msdus in a queue excess over qdepth_thresh_value value
  13509. * while queuing msdu's then we drop new msdus.
  13510. * (Though dropping older (stale) data rather than newer data might be
  13511. * preferable, the dropping is performed by MAC HW, and theres no option
  13512. * to configure the HW to do head dropping rather than tail dropping.)
  13513. */
  13514. A_UINT32 qdepth_thresh_value;
  13515. } wmi_msduq_qdepth_thresh_update;
  13516. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  13517. * Request FW to update msduq qdepth threshold per TID per peer */
  13518. typedef struct {
  13519. /** TLV tag and len; tag equals
  13520. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  13521. */
  13522. A_UINT32 tlv_header;
  13523. /** pdev id
  13524. * The pdev_id can be determined from the vdev_id, but the pdev_id
  13525. * is explicitly provided so it can be used for sanity checking.
  13526. */
  13527. A_UINT32 pdev_id;
  13528. /** vdev id */
  13529. A_UINT32 vdev_id;
  13530. /**
  13531. * To set the peer msduq qdepth threshold update for a single peer,
  13532. * the host shall send mac address for which peer need to be updated.
  13533. */
  13534. wmi_mac_addr peer_mac_address;
  13535. /** number of payload update tlvs */
  13536. A_UINT32 num_of_msduq_updates;
  13537. /** Followed by the variable length TLV msduq_qdepth_updates:
  13538. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  13539. */
  13540. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  13541. /**
  13542. * ACK policy to be followed for the TID
  13543. */
  13544. typedef enum {
  13545. /** Used when the host does not want to configure the ACK policy */
  13546. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  13547. /** Allow ACK for the TID */
  13548. WMI_PEER_TID_CONFIG_ACK,
  13549. /** Do not expect ACK for the TID */
  13550. WMI_PEER_TID_CONFIG_NOACK,
  13551. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  13552. /**
  13553. * Aggregation control policy for the TID
  13554. */
  13555. typedef enum {
  13556. /** Used when the host does not want to configure the aggregation policy */
  13557. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  13558. /** Enable aggregation for the TID */
  13559. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  13560. /** Disable aggregation for the TID */
  13561. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  13562. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  13563. /**
  13564. * Rate control policy for the TID
  13565. */
  13566. typedef enum {
  13567. /** Used when the host does not want to configure the rate control policy */
  13568. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  13569. /** Auto rate control */
  13570. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  13571. /** Fixed rate control */
  13572. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  13573. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  13574. /**
  13575. * SW retry threshold for the TID
  13576. */
  13577. typedef enum {
  13578. /** Used when the host does not want to configure the SW retry threshold */
  13579. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  13580. WMI_PEER_TID_SW_RETRY_MIN = 1,
  13581. WMI_PEER_TID_SW_RETRY_MAX = 30,
  13582. /** No SW retry for the TID */
  13583. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  13584. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  13585. /**
  13586. * Command format for the TID configuration
  13587. */
  13588. typedef struct {
  13589. /** TLV tag and len; tag equals
  13590. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  13591. */
  13592. A_UINT32 tlv_header;
  13593. /** vdev id */
  13594. A_UINT32 vdev_id;
  13595. /** peer MAC address */
  13596. wmi_mac_addr peer_mac_address;
  13597. /** TID number, generated by the caller.
  13598. * Valid range for QoS TID : 0-15
  13599. * Valid range for non QOS/Mgmt TID: 16-19
  13600. * Any other TID number is invalid.
  13601. */
  13602. A_UINT32 tid_num;
  13603. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  13604. A_UINT32 ack_policy;
  13605. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  13606. A_UINT32 aggr_control;
  13607. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  13608. A_UINT32 rate_control;
  13609. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  13610. * This is applicable only when rate_control is
  13611. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  13612. */
  13613. A_UINT32 rcode_rcflags;
  13614. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  13615. * This SW retry threshold limits the total number of retransmits of
  13616. * nacked or unacked MPDUs, but it is up to the FW to decide what
  13617. * tx rate to use during each retransmission.
  13618. */
  13619. A_UINT32 sw_retry_threshold;
  13620. } wmi_peer_tid_configurations_cmd_fixed_param;
  13621. /* The below enable/disable macros are used for both per peer CFR capture
  13622. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  13623. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  13624. */
  13625. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  13626. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  13627. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  13628. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  13629. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  13630. /* Bandwidth of peer CFR captures */
  13631. typedef enum {
  13632. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  13633. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  13634. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  13635. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  13636. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  13637. WMI_PEER_CFR_CAPTURE_BW_MAX,
  13638. } WMI_PEER_CFR_CAPTURE_BW;
  13639. /* Peer CFR capture method */
  13640. typedef enum {
  13641. /* Send null frame on the requested bw and capture CFR on ACK */
  13642. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  13643. /* New methods to be added here */
  13644. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  13645. } WMI_PEER_CFR_CAPTURE_METHOD;
  13646. /*
  13647. * Peer command structure to configure the CFR capture
  13648. */
  13649. typedef struct {
  13650. /** TLV tag and len; tag equals
  13651. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  13652. */
  13653. A_UINT32 tlv_header;
  13654. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  13655. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  13656. */
  13657. A_UINT32 request;
  13658. /* Peer MAC address. In AP mode, this is the address of the connected peer
  13659. * for which CFR capture is needed. In case of STA mode, this is the address
  13660. * of the AP to which the STA is connected
  13661. */
  13662. wmi_mac_addr mac_addr;
  13663. /* vdev id */
  13664. A_UINT32 vdev_id;
  13665. /* Periodicity of measurement in ms.
  13666. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  13667. * capture for the request and no periodic CFR captures.
  13668. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  13669. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  13670. */
  13671. A_UINT32 periodicity;
  13672. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  13673. A_UINT32 bandwidth;
  13674. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  13675. A_UINT32 capture_method;
  13676. } wmi_peer_cfr_capture_cmd_fixed_param;
  13677. typedef enum {
  13678. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  13679. WMI_PEER_IND_OMN, /* operating mode notification */
  13680. WMI_PEER_IND_OMI, /* operating mode indication */
  13681. } WMI_PEER_OPER_MODE_IND;
  13682. typedef struct {
  13683. /** TLV tag and len; tag equals
  13684. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  13685. A_UINT32 tlv_header;
  13686. /** mac addr of the peer */
  13687. wmi_mac_addr peer_mac_address;
  13688. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  13689. A_UINT32 ind_type;
  13690. /** new_rxnss valid for all peer_operating mode ind. */
  13691. A_UINT32 new_rxnss;
  13692. /** new_bw valid for peer_operating mode ind. OMN/OMI
  13693. * value of this bw is as per 11ax/ac standard:
  13694. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  13695. */
  13696. A_UINT32 new_bw;
  13697. /** new_txnss valid for peer_operating mode ind. OMI */
  13698. A_UINT32 new_txnss;
  13699. /** new_disablemu: disable mu mode
  13700. * valid for peer_operating mode ind. OMI
  13701. */
  13702. A_UINT32 new_disablemu;
  13703. } wmi_peer_oper_mode_change_event_fixed_param;
  13704. /** FW response when tx failure count has reached threshold
  13705. * for a peer */
  13706. typedef struct {
  13707. /** TLV tag and len; tag equals
  13708. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  13709. A_UINT32 tlv_header;
  13710. /** vdev id*/
  13711. A_UINT32 vdev_id;
  13712. /** mac address */
  13713. wmi_mac_addr peer_mac_address;
  13714. /** tx failure count - will eventually be removed and not used */
  13715. A_UINT32 tx_fail_cnt;
  13716. /** seq number of the nth tx_fail_event */
  13717. A_UINT32 seq_no;
  13718. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  13719. enum wmi_rmc_mode {
  13720. /** Disable RMC */
  13721. WMI_RMC_MODE_DISABLED = 0,
  13722. /** Enable RMC */
  13723. WMI_RMC_MODE_ENABLED = 1,
  13724. };
  13725. /** Enable RMC transmitter functionality. Upon
  13726. * receiving this, the FW shall mutlicast frames with
  13727. * reliablity. This is a vendor
  13728. * proprietary feature. */
  13729. typedef struct {
  13730. /** TLV tag and len; tag equals
  13731. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  13732. A_UINT32 tlv_header;
  13733. /** vdev id*/
  13734. A_UINT32 vdev_id;
  13735. /** enable_rmc contains values from enum wmi_rmc_mode;
  13736. * Default value: 0 (disabled) */
  13737. A_UINT32 enable_rmc;
  13738. } wmi_rmc_set_mode_cmd_fixed_param;
  13739. /** Configure transmission periodicity of action frames in a
  13740. * RMC network for the multicast transmitter */
  13741. typedef struct {
  13742. /** TLV tag and len; tag equals
  13743. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  13744. A_UINT32 tlv_header;
  13745. /** vdev id */
  13746. A_UINT32 vdev_id;
  13747. /** time period in milliseconds. Default: 300 ms.
  13748. An action frame indicating the current leader is transmitted by the
  13749. RMC transmitter once every 'periodity_msec' */
  13750. A_UINT32 periodicity_msec;
  13751. } wmi_rmc_set_action_period_cmd_fixed_param;
  13752. /** Optimise Leader selection process in RMC functionality. For
  13753. * Enhancement/Debug purposes only */
  13754. typedef struct {
  13755. /** TLV tag and len; tag equals
  13756. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  13757. A_UINT32 tlv_header;
  13758. /** vdev id */
  13759. A_UINT32 vdev_id;
  13760. /** flags ::
  13761. * 0x0001 - Enable beacon averaging
  13762. * 0x0002 - Force leader selection
  13763. * 0x0004 - Enable Timer based leader switch
  13764. * 0x0008 - Use qos/NULL based for multicast reliability */
  13765. A_UINT32 flags;
  13766. /** control leader change timeperiod (in seconds) */
  13767. A_UINT32 peridocity_leader_switch;
  13768. /** control activity timeout value for data rx (in seconds) */
  13769. A_UINT32 data_activity_timeout;
  13770. /** mac address of leader */
  13771. wmi_mac_addr forced_leader_mac_addr;
  13772. } wmi_rmc_config_cmd_fixed_param;
  13773. /** MHF is generally implemented in
  13774. * the kernel. To decrease system power consumption, the
  13775. * driver can enable offloading this to the chipset. In
  13776. * order for the offload, the firmware needs the routing table.
  13777. * The host shall plumb the routing table into FW. The firmware
  13778. * shall perform an IP address lookup and forward the packet to
  13779. * the next hop using next hop's mac address. This is a vendor
  13780. * proprietary feature. */
  13781. enum wmi_mhf_ofl_mode {
  13782. /** Disable MHF offload */
  13783. WMI_MHF_OFL_MODE_DISABLED = 0,
  13784. /** Enable MHF offload */
  13785. WMI_MHF_OFL_MODE_ENABLED = 1,
  13786. };
  13787. typedef struct {
  13788. /** TLV tag and len; tag equals
  13789. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  13790. A_UINT32 tlv_header;
  13791. /** vdev id*/
  13792. A_UINT32 vdev_id;
  13793. /** enable_mhf_ofl contains values from enum
  13794. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  13795. A_UINT32 enable_mhf_ofl;
  13796. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  13797. enum wmi_mhf_ofl_table_action {
  13798. /** Create MHF offload table in FW */
  13799. WMI_MHF_OFL_TBL_CREATE = 0,
  13800. /** Append to existing MHF offload table */
  13801. WMI_MHF_OFL_TBL_APPEND = 1,
  13802. /** Flush entire MHF offload table in FW */
  13803. WMI_MHF_OFL_TBL_FLUSH = 2,
  13804. };
  13805. typedef struct {
  13806. /** TLV tag and len; tag equals
  13807. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  13808. A_UINT32 tlv_header;
  13809. /** vdev id*/
  13810. A_UINT32 vdev_id;
  13811. /** action corresponds to values from enum
  13812. * wmi_mhf_ofl_table_action */
  13813. A_UINT32 action;
  13814. /** number of entries in the table */
  13815. A_UINT32 num_entries;
  13816. /** Followed by the variable length TLV
  13817. * wmi_mhf_offload_routing_table_entry entries[] */
  13818. } wmi_mhf_offload_plumb_routing_table_cmd;
  13819. typedef struct {
  13820. /** TLV tag and len; tag equals
  13821. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  13822. A_UINT32 tlv_header;
  13823. /** Destination node's IP address */
  13824. WMI_IPV4_ADDR dest_ipv4_addr;
  13825. /** Next hop node's MAC address */
  13826. wmi_mac_addr next_hop_mac_addr;
  13827. } wmi_mhf_offload_routing_table_entry;
  13828. enum {
  13829. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  13830. };
  13831. typedef struct {
  13832. /** tlv tag and len, tag equals
  13833. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  13834. A_UINT32 tlv_header;
  13835. /** full 64 tsf timestamp get from MAC tsf timer indicates
  13836. * the time that the radar event uploading to host, split
  13837. * it to high 32 bit and lower 32 bit in fulltsf_high and
  13838. * full_tsf_low
  13839. */
  13840. A_UINT32 upload_fullts_low;
  13841. A_UINT32 upload_fullts_high;
  13842. /** timestamp indicates the time when DFS pulse is detected
  13843. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  13844. */
  13845. A_UINT32 pulse_detect_ts;
  13846. /** the duaration of the pulse in us */
  13847. A_UINT32 pulse_duration;
  13848. /** the center frequency of the radar pulse detected, KHz */
  13849. A_UINT32 pulse_center_freq;
  13850. /** bandwidth of current DFS channel, MHz */
  13851. A_UINT32 ch_bandwidth;
  13852. /** center channel frequency1 of current DFS channel, MHz */
  13853. A_UINT16 ch_center_freq1;
  13854. /** center channel frequency2 of current DFS channel, MHz,
  13855. * reserved for 160 BW mode
  13856. */
  13857. A_UINT16 ch_center_freq2;
  13858. /** flag to indicate if this pulse is chirp */
  13859. A_UINT8 pulse_is_chirp;
  13860. /** RSSI recorded in the ppdu */
  13861. A_UINT8 rssi;
  13862. /** extened RSSI info */
  13863. A_UINT8 rssi_ext;
  13864. union {
  13865. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  13866. /** pdev_id for identifying the MAC
  13867. * See macros starting with WMI_PDEV_ID_ for values.
  13868. */
  13869. A_UINT8 pdev_id;
  13870. };
  13871. /** index of peak magnitude bin (signed) */
  13872. A_INT32 peak_sidx;
  13873. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  13874. A_INT32 pulse_delta_peak;
  13875. /** Max pulse chirp velocity variance in delta bins */
  13876. A_INT32 pulse_delta_diff;
  13877. /** the difference in the FFT peak index between short FFT and the first long FFT
  13878. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  13879. */
  13880. A_INT32 psidx_diff;
  13881. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  13882. * 0x0001 - set if psidx_diff is valid
  13883. */
  13884. A_UINT32 pulse_flags;
  13885. } wmi_dfs_radar_event_fixed_param;
  13886. enum {
  13887. /* DEFAULT - target chooses what action to take, based on its thermal
  13888. * management policy
  13889. * Targets which throttle tx (and potentially rx) based on thermal
  13890. * management thresholds specified by the host will shut down tx
  13891. * if the temperature exceeds upper_thresh_degreeC.
  13892. * Targets which simply inform the host about threshold breaches will
  13893. * send a notification message to the host if the temperature exceeds
  13894. * upper_thresh_degreeC.
  13895. * Conversely, if the temperature was above upper_thresh_degreeC but
  13896. * then drops to below lower_threshold_degreeC, the target will either
  13897. * resume tx, or notify the host.
  13898. */
  13899. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  13900. /* HALT_TRAFFIC -
  13901. * If the temperature rises above upper_thresh_degreeC, the target will
  13902. * halt tx.
  13903. * If the temperature falls back below lower_thresh_degreeC, the target
  13904. * will resume tx.
  13905. */
  13906. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  13907. /* NOTIFY_HOST - the target will notify the host if the temperature
  13908. * either rises above upper_thresh_degreeC or falls below
  13909. * lower_thresh_degreeC.
  13910. */
  13911. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  13912. };
  13913. typedef struct {
  13914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  13915. /*Thermal thresholds*/
  13916. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  13917. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  13918. /*Enable/Disable Thermal Monitoring for Mitigation*/
  13919. A_UINT32 enable;
  13920. /* action: what the target should do when a thermal upper/lower threshold
  13921. * is crossed.
  13922. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  13923. */
  13924. A_UINT32 action;
  13925. A_UINT32 threshold_warning_degreeC;
  13926. A_UINT32 sample_rate_ms;
  13927. } wmi_thermal_mgmt_cmd_fixed_param;
  13928. typedef struct {
  13929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  13930. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  13931. } wmi_thermal_mgmt_event_fixed_param;
  13932. /**
  13933. * This command is sent from WLAN host driver to firmware to
  13934. * request firmware to configure auto shutdown timer in fw
  13935. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  13936. */
  13937. typedef struct {
  13938. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  13939. A_UINT32 timer_value; /** timer value; 0=disable */
  13940. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  13941. enum wmi_host_auto_shutdown_reason {
  13942. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  13943. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  13944. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  13945. };
  13946. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  13947. typedef struct{
  13948. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  13949. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  13950. } wmi_host_auto_shutdown_event_fixed_param;
  13951. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  13952. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  13953. * This command is only used by some customer for verification test. It is not for end-user.
  13954. *
  13955. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  13956. *
  13957. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  13958. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  13959. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  13960. * <channel, ack_offset> pair is unique.
  13961. *
  13962. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  13963. * called basic_config_info by bitmap
  13964. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  13965. *
  13966. * '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
  13967. * is ignored.
  13968. * disable will remove preious conditions from FW.
  13969. * conditions from the later command will over write conditions stored from a previous command.
  13970. *
  13971. */
  13972. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  13973. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  13974. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  13975. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  13976. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  13977. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  13978. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  13979. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  13980. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  13981. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  13982. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  13983. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  13984. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  13985. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  13986. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  13987. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  13988. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  13989. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  13990. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  13991. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  13992. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  13993. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  13994. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  13995. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  13996. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  13997. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  13998. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  13999. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  14000. /** Bit map definition for basic_config_info starts */
  14001. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  14002. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  14003. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  14004. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  14005. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  14006. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  14007. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  14008. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  14009. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  14010. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  14011. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  14012. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  14013. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  14014. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  14015. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  14016. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  14017. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  14018. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  14019. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  14020. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  14021. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  14022. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  14023. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  14024. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  14025. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  14026. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  14027. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  14028. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  14029. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  14030. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  14031. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  14032. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  14033. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  14034. /*
  14035. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  14036. * is temporarily maintained as an alias for the correct name
  14037. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14038. */
  14039. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  14040. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  14041. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14042. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14043. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  14044. /*
  14045. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  14046. * is temporarily maintained as an alias for the correct name
  14047. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  14048. */
  14049. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  14050. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  14051. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  14052. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  14053. /** Bit map definition for basic_config_info ends */
  14054. typedef struct{
  14055. A_UINT32 tlv_header;
  14056. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  14057. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  14058. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  14059. * 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
  14060. * 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
  14061. * 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
  14062. * Bit16 : band condition b'0: 2G, b'1: 5G
  14063. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  14064. * 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
  14065. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  14066. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  14067. * Bit23 ~ Bit31: reserved
  14068. */
  14069. A_UINT32 basic_config_info;
  14070. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  14071. * it depends on Bit14 of basic_config_info
  14072. * Total 24 channels for 5G
  14073. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  14074. * Total 14 channels for 2G
  14075. * 1 ~ 14
  14076. */
  14077. A_UINT32 channel;
  14078. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  14079. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  14080. * Legacy rates , 11b, 11g, 11A
  14081. * 11n one stream (ht20, ht40) 8+8
  14082. * 11n two streams (ht20, ht40) 8+8
  14083. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  14084. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  14085. */
  14086. A_UINT32 rate0;
  14087. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  14088. * 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
  14089. */
  14090. /** 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
  14091. */
  14092. A_UINT32 rate1;
  14093. } wmi_tpc_chainmask_config;
  14094. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  14095. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  14096. typedef struct{
  14097. A_UINT32 tlv_header;
  14098. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  14099. A_UINT32 num_tpc_chainmask_configs;
  14100. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  14101. } wmi_tpc_chainmask_config_cmd_fixed_param;
  14102. typedef struct {
  14103. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  14104. A_UINT32 pdev_id;
  14105. /**
  14106. * Bits 31:0: base address of ring [31:0]
  14107. */
  14108. A_UINT32 base_addr_lo;
  14109. /**
  14110. * Bits 3:0: base address of ring [35:32]
  14111. * Bits 31:4: reserved
  14112. */
  14113. A_UINT32 base_addr_hi;
  14114. /**
  14115. * Bits 31:0: address of head index [31:0]
  14116. */
  14117. A_UINT32 head_idx_addr_lo;
  14118. /**
  14119. * Bits 3:0: address of head index [35:32]
  14120. * Bits 31:4: reserved
  14121. */
  14122. A_UINT32 head_idx_addr_hi;
  14123. /**
  14124. * Bits 31:0: address of tail index [31:0]
  14125. */
  14126. A_UINT32 tail_idx_addr_lo;
  14127. /**
  14128. * Bits 3:0: address of tail index [35:32]
  14129. * Bits 31:4: reserved
  14130. */
  14131. A_UINT32 tail_idx_addr_hi;
  14132. A_UINT32 num_ptr; /** Number of pointers in the ring */
  14133. } wmi_oem_dma_ring_cfg_req_fixed_param;
  14134. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  14135. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  14136. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  14137. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  14138. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  14139. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  14140. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  14141. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  14142. typedef struct {
  14143. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  14144. A_UINT32 pdev_id;
  14145. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  14146. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  14147. typedef struct {
  14148. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  14149. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  14150. /**
  14151. * Bits 31:0: address of data [31:0]
  14152. */
  14153. A_UINT32 addr_lo;
  14154. /**
  14155. * Bits 3:0: address of data [35:32]
  14156. * Bits 11:4: reserved
  14157. * Bits 31:12: opaque host context data [19:0]
  14158. */
  14159. A_UINT32 addr_hi;
  14160. A_UINT32 len; /** Length of data in bytes */
  14161. } wmi_oem_indirect_data;
  14162. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  14163. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  14164. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  14165. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  14166. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  14167. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  14168. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  14169. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  14170. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  14171. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  14172. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  14173. #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)
  14174. typedef struct {
  14175. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  14176. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  14177. } wmi_oem_dma_buf_release_fixed_param;
  14178. typedef struct {
  14179. /**
  14180. * Bits 31:0: address of data [31:0]
  14181. */
  14182. A_UINT32 addr_lo;
  14183. /**
  14184. * Bits 3:0: address of data [35:32]
  14185. * Bits 11:4: reserved
  14186. * Bits 31:12: host context data [19:0]
  14187. */
  14188. A_UINT32 addr_hi;
  14189. } wmi_oem_dma_buf_release_entry;
  14190. typedef struct {
  14191. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  14192. A_UINT32 data_len; /** length in byte of data[]. */
  14193. /* This structure is used to send REQ binary blobs
  14194. * from application/service to firmware where Host drv is pass through .
  14195. * Following this structure is the TLV:
  14196. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14197. */
  14198. } wmi_nan_cmd_param;
  14199. typedef struct {
  14200. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  14201. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  14202. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  14203. } wmi_nan_host_config_param;
  14204. typedef struct {
  14205. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  14206. A_UINT32 data_len; /** length in byte of data[]. */
  14207. /* This structure is used to send REQ binary blobs
  14208. * from firmware to application/service where Host drv is pass through .
  14209. * Following this structure is the TLV:
  14210. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14211. */
  14212. } wmi_nan_event_hdr;
  14213. /**
  14214. * Event to indicate NAN discovery interface created
  14215. */
  14216. typedef struct {
  14217. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  14218. A_UINT32 tlv_header;
  14219. /** Unique id identifying the VDEV */
  14220. A_UINT32 vdev_id;
  14221. /** NAN interface MAC address */
  14222. wmi_mac_addr nan_interface_macaddr;
  14223. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  14224. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  14225. /**
  14226. * Event to indicate NAN discovery interface deleted
  14227. */
  14228. typedef struct {
  14229. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  14230. A_UINT32 tlv_header;
  14231. /** Unique id identifying the VDEV */
  14232. A_UINT32 vdev_id;
  14233. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  14234. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  14235. /**
  14236. * Event to indicate NAN device started new cluster
  14237. */
  14238. typedef struct {
  14239. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  14240. A_UINT32 tlv_header;
  14241. /** Unique id identifying the VDEV */
  14242. A_UINT32 vdev_id;
  14243. /** NAN Cluster ID */
  14244. A_UINT32 nan_cluster_id;
  14245. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  14246. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  14247. /**
  14248. * Event to indicate NAN device joined to cluster
  14249. */
  14250. typedef struct {
  14251. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  14252. A_UINT32 tlv_header;
  14253. /** Unique id identifying the VDEV */
  14254. A_UINT32 vdev_id;
  14255. /** NAN Cluster ID */
  14256. A_UINT32 nan_cluster_id;
  14257. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  14258. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  14259. /** NAN DATA CMD's */
  14260. /**
  14261. * NAN Data get capabilities req
  14262. */
  14263. typedef struct {
  14264. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  14265. A_UINT32 tlv_header;
  14266. /** unique id generated in upper layer for the transaction */
  14267. A_UINT32 transaction_id;
  14268. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  14269. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  14270. /**
  14271. * NDP Response code
  14272. */
  14273. typedef enum {
  14274. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  14275. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  14276. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  14277. } wmi_ndp_rsp_code_PROTOTYPE;
  14278. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  14279. /**
  14280. * NDP Channel configuration type
  14281. */
  14282. typedef enum {
  14283. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  14284. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  14285. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  14286. } wmi_ndp_channel_cfg_PROTOTYPE;
  14287. /*
  14288. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  14289. * WMI compatibility.
  14290. */
  14291. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  14292. typedef struct {
  14293. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  14294. /* Presence of ipv6_intf_addr */
  14295. A_UINT32 ipv6_addr_present;
  14296. /* Presence of transport Port */
  14297. A_UINT32 trans_port_present;
  14298. /* Presence of transport Protocol */
  14299. A_UINT32 trans_proto_present;
  14300. /* ipv6 Interface address */
  14301. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  14302. /* Transport Port */
  14303. A_UINT32 transport_port;
  14304. /* Transport Protocol */
  14305. A_UINT32 transport_protocol;
  14306. } wmi_ndp_transport_ip_param;
  14307. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  14308. /**
  14309. * NDP Initiator requesting a data session
  14310. */
  14311. typedef struct {
  14312. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  14313. A_UINT32 tlv_header;
  14314. /** Unique id identifying the VDEV */
  14315. A_UINT32 vdev_id;
  14316. /** unique id generated in upper layer for the transaction */
  14317. A_UINT32 transaction_id;
  14318. /** Unique Instance Id identifying the Responder's service */
  14319. A_UINT32 service_instance_id;
  14320. /** Discovery MAC addr of the publisher/peer */
  14321. wmi_mac_addr peer_discovery_mac_addr;
  14322. /** Actual number of bytes in TLV ndp_cfg */
  14323. A_UINT32 ndp_cfg_len;
  14324. /** Actual number of bytes in TLV ndp_app_info */
  14325. A_UINT32 ndp_app_info_len;
  14326. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  14327. A_UINT32 ndp_channel_cfg;
  14328. /** NAN Cipher Suite Shared Key */
  14329. A_UINT32 nan_csid;
  14330. /** Actual number of bytes in TLV ndp_pmk */
  14331. A_UINT32 nan_pmk_len;
  14332. /** Actual number of bytes in TLV ndp_passphrase */
  14333. A_UINT32 nan_passphrase_len;
  14334. /** Actual number of bytes in TLV nan_servicename */
  14335. A_UINT32 nan_servicename_len;
  14336. /**
  14337. * TLV (tag length value) parameters follow the ndp_initiator_req
  14338. * structure. The TLV's are:
  14339. * wmi_channel channel;
  14340. * A_UINT8 ndp_cfg[];
  14341. * A_UINT8 ndp_app_info[];
  14342. * A_UINT8 ndp_pmk[];
  14343. * A_INT8 ndp_passphrase[];
  14344. * A_INT8 nan_servicename[];
  14345. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  14346. */
  14347. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  14348. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  14349. /**
  14350. * Initiate a data response on the responder side
  14351. * for data request indication from the peer
  14352. */
  14353. typedef struct {
  14354. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  14355. A_UINT32 tlv_header;
  14356. /** Unique id identifying the VDEV */
  14357. A_UINT32 vdev_id;
  14358. /** unique id generated in upper layer for the transaction */
  14359. A_UINT32 transaction_id;
  14360. /**
  14361. * Unique token Id generated on the initiator/responder
  14362. * side used for a NDP session between two NAN devices
  14363. */
  14364. A_UINT32 ndp_instance_id;
  14365. /** Response Code defined in wmi_ndp_rsp_code */
  14366. A_UINT32 rsp_code;
  14367. /** Number of bytes in TLV ndp_cfg */
  14368. A_UINT32 ndp_cfg_len;
  14369. /** Number of bytes in TLV ndp_app_info */
  14370. A_UINT32 ndp_app_info_len;
  14371. /** NAN Cipher Suite Shared Key */
  14372. A_UINT32 nan_csid;
  14373. /** Actual number of bytes in TLV ndp_pmk */
  14374. A_UINT32 nan_pmk_len;
  14375. /** Actual number of bytes in TLV ndp_passphrase */
  14376. A_UINT32 nan_passphrase_len;
  14377. /** Actual number of bytes in TLV nan_servicename */
  14378. A_UINT32 nan_servicename_len;
  14379. /**
  14380. * TLV (tag length value) parameters follow the ndp_responder_req
  14381. * structure. The TLV's are:
  14382. * A_UINT8 ndp_cfg[];
  14383. * A_UINT8 ndp_app_info[];
  14384. * A_UINT8 ndp_pmk[];
  14385. * A_INT8 ndp_passphrase[];
  14386. * A_INT8 nan_servicename[];
  14387. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  14388. */
  14389. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  14390. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  14391. /**
  14392. * NDP end type
  14393. */
  14394. typedef enum {
  14395. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  14396. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  14397. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  14398. } wmi_ndp_end_type_PROTOTYPE;
  14399. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  14400. /**
  14401. * NDP end reason code
  14402. */
  14403. typedef enum {
  14404. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  14405. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  14406. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  14407. } wmi_ndp_end_reason_code_PROTOTYPE;
  14408. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  14409. /**
  14410. * NDP end request
  14411. */
  14412. typedef struct {
  14413. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  14414. A_UINT32 tlv_header;
  14415. /** NDP instance id */
  14416. A_UINT32 ndp_instance_id;
  14417. } wmi_ndp_end_req_PROTOTYPE;
  14418. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  14419. /**
  14420. * NDP End request
  14421. */
  14422. typedef struct {
  14423. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  14424. A_UINT32 tlv_header;
  14425. /** unique id generated in upper layer for the transaction */
  14426. A_UINT32 transaction_id;
  14427. /**
  14428. * TLV (tag length value) parameters follow the ndp_end_req
  14429. * structure. The TLV's are:
  14430. * wmi_ndp_end_req ndp_end_req_list[];
  14431. */
  14432. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  14433. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  14434. /* NAN DATA RSP EVENTS */
  14435. /**
  14436. * Event to indicate NAN Data Interface capabilities cmd
  14437. */
  14438. typedef struct {
  14439. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  14440. A_UINT32 tlv_header;
  14441. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  14442. A_UINT32 transaction_id;
  14443. /** Max ndi interface support */
  14444. A_UINT32 max_ndi_interfaces;
  14445. /** Max ndp sessions can support */
  14446. A_UINT32 max_ndp_sessions;
  14447. /** Max number of peer's per ndi */
  14448. A_UINT32 max_peers_per_ndi;
  14449. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  14450. A_UINT32 nan_data_supported_bands;
  14451. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  14452. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  14453. /**
  14454. * NDP command response code
  14455. */
  14456. typedef enum {
  14457. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  14458. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  14459. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  14460. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  14461. /**
  14462. * Event response for wmi_ndp_initiator_req
  14463. */
  14464. typedef struct {
  14465. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  14466. A_UINT32 tlv_header;
  14467. /** Unique id identifying the VDEV */
  14468. A_UINT32 vdev_id;
  14469. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  14470. A_UINT32 transaction_id;
  14471. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14472. A_UINT32 rsp_status;
  14473. A_UINT32 reason_code;
  14474. /**
  14475. * Unique token Id generated on the initiator/responder
  14476. * side used for a NDP session between two NAN devices
  14477. */
  14478. A_UINT32 ndp_instance_id;
  14479. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  14480. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  14481. /**
  14482. * Event response for wmi_ndp_responder_req cmd
  14483. */
  14484. typedef struct {
  14485. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  14486. A_UINT32 tlv_header;
  14487. /** Unique id identifying the VDEV */
  14488. A_UINT32 vdev_id;
  14489. /** Copy of transaction_id received in wmi_ndp_responder_req */
  14490. A_UINT32 transaction_id;
  14491. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14492. A_UINT32 rsp_status;
  14493. A_UINT32 reason_code;
  14494. /**
  14495. * Unique token Id generated on the initiator/responder
  14496. * side used for a NDP session between two NAN devices
  14497. */
  14498. A_UINT32 ndp_instance_id;
  14499. /** NDI mac address of the peer */
  14500. wmi_mac_addr peer_ndi_mac_addr;
  14501. /** Host can create peer if this entry is TRUE */
  14502. A_UINT32 create_peer;
  14503. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  14504. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  14505. /**
  14506. * Active ndp instance id
  14507. */
  14508. typedef struct {
  14509. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  14510. A_UINT32 tlv_header;
  14511. /** NDP instance id */
  14512. A_UINT32 ndp_instance_id;
  14513. } wmi_active_ndp_instance_id_PROTOTYPE;
  14514. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  14515. /**
  14516. * NDP end response per ndi
  14517. */
  14518. typedef struct {
  14519. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  14520. A_UINT32 tlv_header;
  14521. /** Unique id identifying the VDEV */
  14522. A_UINT32 vdev_id;
  14523. /** Peer MAC addr */
  14524. wmi_mac_addr peer_mac_addr;
  14525. /** Number of active ndps on this ndi */
  14526. A_UINT32 num_active_ndps_on_ndi;
  14527. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  14528. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  14529. /**
  14530. * Event response for wmi_ndp_end_req cmd
  14531. */
  14532. typedef struct {
  14533. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  14534. A_UINT32 tlv_header;
  14535. /** Copy of transaction_id received in wmi_ndp_end_req */
  14536. A_UINT32 transaction_id;
  14537. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14538. A_UINT32 rsp_status;
  14539. A_UINT32 reason_code;
  14540. /**
  14541. * TLV (tag length value) parameters follow the ndp_end_rsp
  14542. * structure. The TLV's are:
  14543. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  14544. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  14545. */
  14546. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  14547. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  14548. /** NAN DATA EVENTS */
  14549. /**
  14550. * NDP self role
  14551. */
  14552. typedef enum {
  14553. WMI_NDP_INITIATOR_ROLE,
  14554. WMI_NDP_RESPONDER_ROLE,
  14555. } wmi_ndp_self_role_PROTOTYPE;
  14556. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  14557. /**
  14558. * NDP accept policy
  14559. */
  14560. typedef enum {
  14561. WMI_NDP_ACCEPT_POLICY_NONE,
  14562. WMI_NDP_ACCEPT_POLICY_ALL,
  14563. } wmi_ndp_accept_policy_PROTOTYPE;
  14564. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  14565. /**
  14566. * Event indication received on the responder side when a NDP Initiator request/
  14567. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  14568. *
  14569. * Event indication received on the initiator side when a
  14570. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  14571. */
  14572. typedef struct {
  14573. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  14574. A_UINT32 tlv_header;
  14575. /** Unique id identifying the VDEV */
  14576. A_UINT32 vdev_id;
  14577. /** Self NDP Role defined in wmi_ndp_self_role */
  14578. A_UINT32 self_ndp_role;
  14579. /** Accept policy defined in wmi_ndp_accept_policy */
  14580. A_UINT32 accept_policy;
  14581. /** Unique Instance Id corresponding to a service/session. */
  14582. A_UINT32 service_instance_id;
  14583. /** Discovery MAC addr of the peer/initiator */
  14584. wmi_mac_addr peer_discovery_mac_addr;
  14585. /** NDI mac address of the peer */
  14586. wmi_mac_addr peer_ndi_mac_addr;
  14587. /**
  14588. * Unique token Id generated on the initiator/responder
  14589. * side used for a NDP session between two NAN devices
  14590. */
  14591. A_UINT32 ndp_instance_id;
  14592. /** Number of bytes in TLV wmi_ndp_cfg */
  14593. A_UINT32 ndp_cfg_len;
  14594. /** Number of bytes in TLV wmi_ndp_app_info */
  14595. A_UINT32 ndp_app_info_len;
  14596. /** Peer NAN Cipher Suite Shared Key */
  14597. A_UINT32 nan_csid;
  14598. /** Actual number of bytes in TLV nan_scid */
  14599. A_UINT32 nan_scid_len;
  14600. /** Self NDI mac address */
  14601. wmi_mac_addr self_ndi_mac_addr;
  14602. /**
  14603. * TLV (tag length value) parameters follow the ndp_indication
  14604. * structure. The TLV's are:
  14605. * A_UINT8 ndp_cfg[];
  14606. * A_UINT8 ndp_app_info[];
  14607. * A_UINT8 nan_scid[];
  14608. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  14609. */
  14610. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  14611. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  14612. /**
  14613. * Event indication of data confirm is received on both
  14614. * initiator and responder side confirming a NDP session
  14615. */
  14616. typedef struct {
  14617. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  14618. A_UINT32 tlv_header;
  14619. /** Unique id identifying the VDEV */
  14620. A_UINT32 vdev_id;
  14621. /**
  14622. * Unique token Id generated on the initiator/responder
  14623. * side used for a NDP session between two NAN devices
  14624. */
  14625. A_UINT32 ndp_instance_id;
  14626. /** NDI mac address of the peer (required to derive target ipv6 address) */
  14627. wmi_mac_addr peer_ndi_mac_addr;
  14628. /** Response Code defined in wmi_ndp_rsp_code */
  14629. A_UINT32 rsp_code;
  14630. /** Number of bytes in TLV wmi_ndp_cfg */
  14631. A_UINT32 ndp_cfg_len;
  14632. /** Number of bytes in TLV wmi_ndp_app_info */
  14633. A_UINT32 ndp_app_info_len;
  14634. /** Reason Code */
  14635. A_UINT32 reason_code;
  14636. /** Number of active ndps on this peer */
  14637. A_UINT32 num_active_ndps_on_peer;
  14638. /** Number of channels on this peer */
  14639. A_UINT32 num_ndp_channels;
  14640. /**
  14641. * TLV (tag length value) parameters follow the ndp_confirm
  14642. * structure. The TLV's are:
  14643. * A_UINT8 ndp_cfg[];
  14644. * A_UINT8 ndp_app_info[];
  14645. * wmi_channel ndp_channel_list[];
  14646. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  14647. * // since Nss is associated with the channel
  14648. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  14649. */
  14650. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  14651. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  14652. /**
  14653. * Event indication received on the initiator/responder side terminating a NDP session
  14654. */
  14655. typedef struct {
  14656. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  14657. A_UINT32 tlv_header;
  14658. /** type defined in wmi_ndp_end_type */
  14659. A_UINT32 type;
  14660. /** Unique id identifying the VDEV */
  14661. A_UINT32 vdev_id;
  14662. /** reason_code defined in wmi_ndp_end_reason_code */
  14663. A_UINT32 reason_code;
  14664. /** NDP instance id */
  14665. A_UINT32 ndp_instance_id;
  14666. /** NDI MAC addr of the peer */
  14667. wmi_mac_addr peer_ndi_mac_addr;
  14668. /** Number of active ndps on this peer */
  14669. A_UINT32 num_active_ndps_on_peer;
  14670. } wmi_ndp_end_indication_PROTOTYPE;
  14671. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  14672. typedef struct
  14673. {
  14674. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  14675. /** Unique id identifying the VDEV */
  14676. A_UINT32 vdev_id;
  14677. /** peer MAC address */
  14678. wmi_mac_addr peer_macaddr;
  14679. /** Flags:
  14680. * Bit 0 -> Nss updated
  14681. * Bit 1 -> channel list updated
  14682. * Bits 2-31 -> Reserved
  14683. */
  14684. A_UINT32 flags;
  14685. /** num of channels */
  14686. A_UINT32 num_channels;
  14687. /** num of ndp instances */
  14688. A_UINT32 num_ndp_instances;
  14689. /**
  14690. * TLV (tag length value) parameters follow the ndl_schedule_update
  14691. * structure. The TLV's are:
  14692. * A_UINT32 ndp_instance_list[];
  14693. * wmi_channel ndl_channel_list[];
  14694. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  14695. * // since Nss is associate with a channel
  14696. */
  14697. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  14698. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  14699. typedef struct {
  14700. A_UINT32 tlv_header;
  14701. A_UINT32 num_data;
  14702. /* followed by WMITLV_TAG_ARRAY_BYTE */
  14703. } wmi_diag_data_container_event_fixed_param;
  14704. enum {
  14705. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  14706. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  14707. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  14708. };
  14709. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  14710. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  14711. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  14712. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  14713. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  14714. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  14715. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  14716. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  14717. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  14718. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  14719. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  14720. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  14721. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  14722. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  14723. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  14724. do { \
  14725. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  14726. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  14727. while (0)
  14728. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  14729. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  14730. /**
  14731. * This command is sent from WLAN host driver to firmware to
  14732. * notify the current modem power state. Host would receive a
  14733. * message from modem when modem is powered on. Host driver
  14734. * would then send this command to firmware. Firmware would then
  14735. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  14736. *
  14737. * This command is only applicable for APQ platform which has
  14738. * modem on the platform. If firmware doesn't support MWS Coex,
  14739. * this command can be dropped by firmware.
  14740. *
  14741. * This is a requirement from modem team that WCN can't toggle
  14742. * UART before modem is powered on.
  14743. */
  14744. typedef struct {
  14745. /** TLV tag and len; tag equals
  14746. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  14747. A_UINT32 tlv_header;
  14748. /** Modem power state parameter */
  14749. A_UINT32 modem_power_state;
  14750. } wmi_modem_power_state_cmd_param;
  14751. enum {
  14752. WMI_MODEM_STATE_OFF = 0,
  14753. WMI_MODEM_STATE_ON
  14754. };
  14755. /**
  14756. * This command is sent from WLAN host driver to firmware to
  14757. * notify the updated Specific Absorption Rate (SAR) limits.
  14758. * A critical regulation for FCC compliance, OEMs require methods to set
  14759. * limits on TX power of WLAN/WWAN.
  14760. * Host would receive instructions on what to set the limits per
  14761. * band/chain/modulation to, it would then interpret and send the limits
  14762. * to FW using this WMI message.
  14763. * Since it is possible to have too many commands to fit into one message,
  14764. * FW will keep receiving the messages, until it finds one with
  14765. * commit_limits = 1, at which point it will apply all the received
  14766. * specifications.
  14767. */
  14768. typedef struct {
  14769. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  14770. A_UINT32 tlv_header;
  14771. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  14772. * with BDF (SET_0 to 4) or WMI
  14773. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  14774. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  14775. */
  14776. A_UINT32 sar_enable;
  14777. /** number of items in sar_limits[] */
  14778. A_UINT32 num_limit_rows;
  14779. /** once received and is set to 1, FW will calculate the power limits
  14780. * and send set_power command to apply them.
  14781. * Otherwise just update local values stored in FW until a future msg
  14782. * with commit_limits=1 arrives.
  14783. */
  14784. A_UINT32 commit_limits;
  14785. /**
  14786. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  14787. * structure. The TLV's are:
  14788. * wmi_sar_limit_cmd_row sar_limits[];
  14789. */
  14790. } wmi_sar_limits_cmd_fixed_param;
  14791. enum wmi_sar_feature_state_flags {
  14792. WMI_SAR_FEATURE_OFF = 0,
  14793. WMI_SAR_FEATURE_ON_SET_0,
  14794. WMI_SAR_FEATURE_ON_SET_1,
  14795. WMI_SAR_FEATURE_ON_SET_2,
  14796. WMI_SAR_FEATURE_ON_SET_3,
  14797. WMI_SAR_FEATURE_ON_SET_4,
  14798. WMI_SAR_FEATURE_NO_CHANGE,
  14799. WMI_SAR_FEATURE_ON_USER_DEFINED,
  14800. WMI_SAR_FEATURE_ON_SAR_V2_0,
  14801. };
  14802. typedef struct {
  14803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  14804. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  14805. * new band_id values .
  14806. */
  14807. A_UINT32 band_id;
  14808. A_UINT32 chain_id;
  14809. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  14810. A_UINT32 mod_id;
  14811. /**
  14812. * To be backwards-compatible with older code use a union with
  14813. * limit_value & limit_index as alternate names / interpretations
  14814. * of the same message information element.
  14815. * The older code still uses limit_value, while the new code will
  14816. * use limit_index.
  14817. * The interpretation of the field as value or index depends on
  14818. * WMI_SAR_FEATURE_ON_*
  14819. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  14820. * still use it as value.
  14821. */
  14822. union {
  14823. /** actual power limit value, in steps of 0.5 dBm */
  14824. A_UINT32 limit_value;
  14825. A_UINT32 limit_index;
  14826. };
  14827. /** in case the OEM doesn't care about one of the qualifiers from above,
  14828. * the bit for that qualifier within the validity_bitmap can be set to 0
  14829. * so that limit is applied to all possible cases of this qualifier
  14830. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  14831. * treated as a wildcard).
  14832. * Current masks:
  14833. * WMI_SAR_BAND_ID_VALID_MASK
  14834. * WMI_SAR_CHAIN_ID_VALID_MASK
  14835. * WMI_SAR_MOD_ID_VALID_MASK
  14836. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  14837. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  14838. * WMI_SAR_MOD_OFDM cases.
  14839. */
  14840. A_UINT32 validity_bitmap;
  14841. } wmi_sar_limit_cmd_row;
  14842. enum wmi_sar_band_id_flags {
  14843. WMI_SAR_2G_ID = 0,
  14844. WMI_SAR_5G_ID
  14845. };
  14846. enum wmi_sar_mod_id_flags {
  14847. WMI_SAR_MOD_CCK = 0,
  14848. WMI_SAR_MOD_OFDM
  14849. };
  14850. /**
  14851. * This message is sent from FW to WLAN host to inform the host of the
  14852. * updated Specific Absorption Rate (SAR) limits currently in use.
  14853. */
  14854. typedef struct {
  14855. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  14856. A_UINT32 tlv_header;
  14857. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  14858. * with BDF (SET_0 to 4) or WMI
  14859. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  14860. */
  14861. A_UINT32 sar_enable;
  14862. /**
  14863. * number of items in sar_limits[].
  14864. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  14865. * Should be zero if any of the BDF sets is activated.
  14866. */
  14867. A_UINT32 num_limit_rows;
  14868. /**
  14869. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  14870. * structure. The TLV's are:
  14871. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  14872. */
  14873. } wmi_sar_get_limits_event_fixed_param;
  14874. typedef struct {
  14875. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  14876. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  14877. * new band_id values .
  14878. */
  14879. A_UINT32 band_id;
  14880. A_UINT32 chain_id;
  14881. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  14882. A_UINT32 mod_id;
  14883. /** actual power limit value, in steps of 0.5 dBm */
  14884. A_UINT32 limit_value;
  14885. } wmi_sar_get_limit_event_row;
  14886. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  14887. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  14888. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  14889. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  14890. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  14891. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  14892. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  14893. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  14894. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  14895. /**
  14896. * This command is sent from WLAN host driver to firmware to
  14897. * get current Specific Absorption Rate (SAR) limits status from firmware.
  14898. * The command does not require any parameters as of now.
  14899. */
  14900. typedef struct {
  14901. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  14902. A_UINT32 tlv_header;
  14903. /** currently no parameters are required. Reserved bit field for future use added */
  14904. /* All bits need to be set to 0 while it is a reserved field. */
  14905. A_UINT32 reserved;
  14906. } wmi_sar_get_limits_cmd_fixed_param;
  14907. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  14908. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  14909. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  14910. generated whenever firmware roamed to new AP silently and
  14911. (a) If the host is awake, FW sends the event to the host immediately .
  14912. (b) If host is in sleep then either
  14913. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  14914. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  14915. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  14916. */
  14917. typedef struct {
  14918. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  14919. A_UINT32 tlv_header;
  14920. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  14921. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  14922. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  14923. } wmi_key_material;
  14924. typedef struct {
  14925. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  14926. /** Unique id identifying the VDEV on which roaming is done by firmware */
  14927. A_UINT32 vdev_id;
  14928. /** auth_status: connected or authorized */
  14929. A_UINT32 auth_status;
  14930. /** roam_reason:
  14931. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  14932. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  14933. * bit 6 for HW mode status, set 1 to indicate host to schedule
  14934. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  14935. */
  14936. A_UINT32 roam_reason;
  14937. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  14938. A_UINT32 rssi;
  14939. /** MAC address of roamed AP */
  14940. wmi_mac_addr bssid; /* BSSID */
  14941. /** whether the frame is beacon or probe rsp */
  14942. A_UINT32 is_beacon;
  14943. /** the length of beacon/probe rsp */
  14944. A_UINT32 bcn_probe_rsp_len;
  14945. /** the length of reassoc rsp */
  14946. A_UINT32 reassoc_rsp_len;
  14947. /** the length of reassoc req */
  14948. A_UINT32 reassoc_req_len;
  14949. /**
  14950. * TLV (tag length value) parameters follows roam_synch_event
  14951. * The TLV's are:
  14952. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  14953. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  14954. * wmi_channel chan;
  14955. * wmi_key_material key;
  14956. * A_UINT32 status; subnet changed status not being used currently.
  14957. * will pass the information using roam_status.
  14958. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  14959. *
  14960. **/
  14961. } wmi_roam_synch_event_fixed_param;
  14962. /**
  14963. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  14964. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  14965. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  14966. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  14967. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  14968. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  14969. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  14970. * reassoc_rsp_len set to 0.
  14971. */
  14972. typedef struct {
  14973. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  14974. /** Unique id identifying the VDEV on which roaming is done by firmware */
  14975. A_UINT32 vdev_id;
  14976. /** More frags to follow? */
  14977. A_UINT32 more_frag;
  14978. /** whether the frame is beacon or probe rsp */
  14979. A_UINT32 is_beacon;
  14980. /** the length of beacon/probe rsp */
  14981. A_UINT32 bcn_probe_rsp_len;
  14982. /** the length of reassoc rsp */
  14983. A_UINT32 reassoc_rsp_len;
  14984. /** the length of reassoc req */
  14985. A_UINT32 reassoc_req_len;
  14986. /**
  14987. * TLV (tag length value) parameters follows roam_synch_event
  14988. * The TLV's are:
  14989. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  14990. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  14991. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  14992. */
  14993. } wmi_roam_synch_frame_event_fixed_param;
  14994. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  14995. typedef struct {
  14996. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  14997. A_UINT32 tlv_header;
  14998. /** MAC address of the peer for which the estimated link speed is required. */
  14999. wmi_mac_addr peer_macaddr;
  15000. /* Set to 1 only if vdev_id field is valid */
  15001. A_UINT32 valid_vdev_id;
  15002. /* VDEV to which the peer belongs to */
  15003. A_UINT32 vdev_id;
  15004. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  15005. typedef struct {
  15006. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  15007. A_UINT32 tlv_header;
  15008. /** MAC address of the peer for which the estimated link speed is required.
  15009. */
  15010. wmi_mac_addr peer_macaddr;
  15011. /* Estimated link speed in kbps.
  15012. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  15013. */
  15014. A_UINT32 est_linkspeed_kbps;
  15015. /* Set to 1 only if vdev_id field is valid */
  15016. A_UINT32 valid_vdev_id;
  15017. /* VDEV to which the peer belongs to */
  15018. A_UINT32 vdev_id;
  15019. } wmi_peer_estimated_linkspeed_event_fixed_param;
  15020. typedef struct {
  15021. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  15022. /* vdev ID */
  15023. A_UINT32 vdev_id;
  15024. A_UINT32 data_len; /** length in byte of data[]. */
  15025. /* This structure is used to send REQ binary blobs
  15026. * from application/service to firmware where Host drv is pass through .
  15027. * Following this structure is the TLV:
  15028. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15029. */
  15030. } wmi_req_stats_ext_cmd_fixed_param;
  15031. typedef struct {
  15032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  15033. A_UINT32 vdev_id; /** vdev ID */
  15034. A_UINT32 data_len; /** length in byte of data[]. */
  15035. /* This structure is used to send REQ binary blobs
  15036. * from firmware to application/service where Host drv is pass through .
  15037. * Following this structure is the TLV:
  15038. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15039. */
  15040. } wmi_stats_ext_event_fixed_param;
  15041. typedef struct {
  15042. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  15043. /** unique id identifying the VDEV, generated by the caller */
  15044. A_UINT32 vdev_id;
  15045. /** peer MAC address */
  15046. wmi_mac_addr peer_macaddr;
  15047. } wmi_peer_delete_resp_event_fixed_param;
  15048. typedef struct {
  15049. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  15050. A_UINT32 tlv_header;
  15051. A_UINT32 vdev_id; /* vdev ID */
  15052. /* MAC address of the peer for which the estimated link speed is required.*/
  15053. wmi_mac_addr peer_macaddr;
  15054. A_UINT32 state; /* peer state */
  15055. } wmi_peer_state_event_fixed_param;
  15056. typedef struct {
  15057. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  15058. A_UINT32 tlv_header;
  15059. /* unique id identifying the VDEV, generated by the caller */
  15060. A_UINT32 vdev_id;
  15061. /* peer MAC address */
  15062. wmi_mac_addr peer_macaddr;
  15063. } wmi_peer_assoc_conf_event_fixed_param;
  15064. enum {
  15065. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  15066. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  15067. };
  15068. typedef struct {
  15069. /**
  15070. * TLV tag and len;
  15071. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  15072. */
  15073. A_UINT32 tlv_header;
  15074. A_UINT32 vdev_id;
  15075. /**
  15076. * active or passive. if active all the channels are actively scanned.
  15077. * if passive then all the channels are passively scanned
  15078. */
  15079. A_UINT32 scan_type;
  15080. /**
  15081. * FW can perform multiple scans with in a OBSS scan interval.
  15082. * For each scan,
  15083. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  15084. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  15085. * The unit for these 2 parameters is TUs.
  15086. */
  15087. A_UINT32 obss_scan_passive_dwell;
  15088. A_UINT32 obss_scan_active_dwell;
  15089. /**
  15090. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  15091. * both min and total per channel dwell time requirement
  15092. */
  15093. A_UINT32 bss_channel_width_trigger_scan_interval;
  15094. /**
  15095. * FW can perform multiple scans with in a OBSS scan interval.
  15096. * For each scan,
  15097. * the total per channel dwell time across all scans with in OBSS scan interval should be
  15098. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  15099. * for active scans and ,
  15100. * The unit for these 2 parameters is TUs.
  15101. */
  15102. A_UINT32 obss_scan_passive_total_per_channel;
  15103. A_UINT32 obss_scan_active_total_per_channel;
  15104. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  15105. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  15106. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  15107. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  15108. A_UINT32 current_operating_class; /** STA current operating class */
  15109. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  15110. A_UINT32 channel_len;
  15111. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  15112. A_UINT32 ie_len;
  15113. } wmi_obss_scan_enable_cmd_fixed_param;
  15114. typedef struct {
  15115. /**
  15116. * TLV tag and len;
  15117. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  15118. */
  15119. A_UINT32 tlv_header;
  15120. A_UINT32 vdev_id;
  15121. } wmi_obss_scan_disable_cmd_fixed_param;
  15122. typedef struct {
  15123. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  15124. A_UINT32 tlv_header;
  15125. /** unique id identifying the VDEV */
  15126. A_UINT32 vdev_id;
  15127. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  15128. A_UINT32 tx_status;
  15129. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  15130. typedef enum {
  15131. WMI_FRAME_TX_OK, /* frame tx ok */
  15132. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  15133. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  15134. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  15135. } WMI_FRAME_TX_STATUS;
  15136. /**
  15137. * This command is sent from WLAN host driver to firmware to
  15138. * request firmware to send the latest channel avoidance range
  15139. * to host.
  15140. *
  15141. * This command is only applicable for APQ platform which has
  15142. * modem on the platform. If firmware doesn't support MWS Coex,
  15143. * this command can be dropped by firmware.
  15144. *
  15145. * Host would send this command to firmware to request a channel
  15146. * avoidance information update.
  15147. */
  15148. typedef struct {
  15149. /** TLV tag and len; tag equals
  15150. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  15151. A_UINT32 tlv_header;
  15152. } wmi_chan_avoid_update_cmd_param;
  15153. /* ExtScan operation mode */
  15154. typedef enum {
  15155. WMI_EXTSCAN_MODE_NONE = 0x0000,
  15156. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  15157. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  15158. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  15159. } wmi_extscan_operation_mode;
  15160. /* Channel Mask */
  15161. typedef enum {
  15162. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  15163. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  15164. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  15165. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  15166. } wmi_channel_band_mask;
  15167. typedef enum {
  15168. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  15169. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  15170. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  15171. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  15172. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  15173. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  15174. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  15175. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  15176. WMI_EXTSCAN_EVENT_MAX = 0x8000
  15177. } wmi_extscan_event_type;
  15178. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  15179. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  15180. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  15181. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  15182. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  15183. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  15184. typedef enum {
  15185. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  15186. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  15187. } wmi_extscan_forwarding_flags;
  15188. typedef enum {
  15189. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  15190. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  15191. } wmi_extscan_configuration_flags;
  15192. typedef enum {
  15193. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  15194. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  15195. } wmi_extscan_bucket_configuration_flags;
  15196. typedef enum {
  15197. WMI_EXTSCAN_STATUS_OK = 0,
  15198. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  15199. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  15200. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  15201. } wmi_extscan_start_stop_status;
  15202. typedef struct {
  15203. /** Request ID - to identify command. Cannot be 0 */
  15204. A_UINT32 request_id;
  15205. /** Requestor ID - client requesting ExtScan */
  15206. A_UINT32 requestor_id;
  15207. /** VDEV id(interface) that is requesting scan */
  15208. A_UINT32 vdev_id;
  15209. } wmi_extscan_command_id;
  15210. typedef struct {
  15211. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15212. /** channel number */
  15213. A_UINT32 channel;
  15214. /** dwell time in msec - use defaults if 0 */
  15215. A_UINT32 min_dwell_time;
  15216. A_UINT32 max_dwell_time;
  15217. /** passive/active channel and other flags */
  15218. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  15219. } wmi_extscan_bucket_channel;
  15220. /* Scan Bucket specification */
  15221. typedef struct {
  15222. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15223. /** Bucket ID - 0-based */
  15224. A_UINT32 bucket_id;
  15225. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  15226. A_UINT32 notify_extscan_events;
  15227. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  15228. A_UINT32 forwarding_flags;
  15229. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  15230. A_UINT32 configuration_flags;
  15231. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  15232. A_UINT32 base_period_multiplier;
  15233. /** dwell time in msec on active channels - use defaults if 0 */
  15234. A_UINT32 min_dwell_time_active;
  15235. A_UINT32 max_dwell_time_active;
  15236. /** dwell time in msec on passive channels - use defaults if 0 */
  15237. A_UINT32 min_dwell_time_passive;
  15238. A_UINT32 max_dwell_time_passive;
  15239. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  15240. A_UINT32 channel_band;
  15241. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  15242. A_UINT32 num_channels;
  15243. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  15244. A_UINT32 min_period;
  15245. /** period above which exponent is not applied anymore */
  15246. A_UINT32 max_period;
  15247. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  15248. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  15249. */
  15250. A_UINT32 exp_backoff;
  15251. /** number of scans performed at a given periodicity after which exponential back off value is
  15252. * applied to current periodicity to obtain a newer one
  15253. */
  15254. A_UINT32 exp_max_step_count;
  15255. /** Followed by the variable length TLV chan_list:
  15256. * wmi_extscan_bucket_channel chan_list[] */
  15257. } wmi_extscan_bucket;
  15258. typedef struct {
  15259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  15260. /** Request ID - to identify command. Cannot be 0 */
  15261. A_UINT32 request_id;
  15262. /** Requestor ID - client requesting ExtScan */
  15263. A_UINT32 requestor_id;
  15264. /** VDEV id(interface) that is requesting scan */
  15265. A_UINT32 vdev_id;
  15266. /** table ID - to allow support for multiple simultaneous requests */
  15267. A_UINT32 table_id;
  15268. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  15269. A_UINT32 base_period;
  15270. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  15271. A_UINT32 max_iterations;
  15272. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  15273. A_UINT32 forwarding_flags;
  15274. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  15275. A_UINT32 configuration_flags;
  15276. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  15277. A_UINT32 notify_extscan_events;
  15278. /** Scan Priority, input to scan scheduler */
  15279. A_UINT32 scan_priority;
  15280. /** Maximum number of BSSIDs to cache on each scan cycle */
  15281. A_UINT32 max_bssids_per_scan_cycle;
  15282. /** Minimum RSSI value to report */
  15283. A_UINT32 min_rssi;
  15284. /** Maximum table usage in percentage */
  15285. A_UINT32 max_table_usage;
  15286. /** default dwell time in msec on active channels */
  15287. A_UINT32 min_dwell_time_active;
  15288. A_UINT32 max_dwell_time_active;
  15289. /** default dwell time in msec on passive channels */
  15290. A_UINT32 min_dwell_time_passive;
  15291. A_UINT32 max_dwell_time_passive;
  15292. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  15293. A_UINT32 min_rest_time;
  15294. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  15295. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  15296. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  15297. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  15298. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  15299. * irrespective of activity. activity is determined by the idle_time parameter.
  15300. */
  15301. A_UINT32 max_rest_time;
  15302. /** time before sending next set of probe requests.
  15303. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  15304. * The number of probe requests specified depends on the ssid_list and bssid_list
  15305. */
  15306. /** Max number of probes to be sent */
  15307. A_UINT32 n_probes;
  15308. /** time in msec between 2 sets of probe requests. */
  15309. A_UINT32 repeat_probe_time;
  15310. /** time in msec between 2 consequetive probe requests with in a set. */
  15311. A_UINT32 probe_spacing_time;
  15312. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  15313. A_UINT32 idle_time;
  15314. /** maximum time in msec allowed for scan */
  15315. A_UINT32 max_scan_time;
  15316. /** delay in msec before sending first probe request after switching to a channel */
  15317. A_UINT32 probe_delay;
  15318. /** Scan control flags */
  15319. A_UINT32 scan_ctrl_flags;
  15320. /** Burst duration time in msec*/
  15321. A_UINT32 burst_duration;
  15322. /** number of bssids in the TLV bssid_list[] */
  15323. A_UINT32 num_bssid;
  15324. /** number of ssid in the TLV ssid_list[] */
  15325. A_UINT32 num_ssids;
  15326. /** number of bytes in TLV ie_data[] */
  15327. A_UINT32 ie_len;
  15328. /** number of buckets in the TLV bucket_list[] */
  15329. A_UINT32 num_buckets;
  15330. /** in number of scans, send notifications to host after these many scans */
  15331. A_UINT32 report_threshold_num_scans;
  15332. /** number of channels in channel_list[] determined by the
  15333. sum of wmi_extscan_bucket.num_channels in array */
  15334. /**
  15335. * TLV (tag length value) parameters follow the extscan_cmd
  15336. * structure. The TLV's are:
  15337. * wmi_ssid ssid_list[];
  15338. * wmi_mac_addr bssid_list[];
  15339. * A_UINT8 ie_data[];
  15340. * wmi_extscan_bucket bucket_list[];
  15341. * wmi_extscan_bucket_channel channel_list[];
  15342. */
  15343. } wmi_extscan_start_cmd_fixed_param;
  15344. typedef struct {
  15345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  15346. /** Request ID - to match running command. 0 matches any request */
  15347. A_UINT32 request_id;
  15348. /** Requestor ID - client requesting stop */
  15349. A_UINT32 requestor_id;
  15350. /** VDEV id(interface) that is requesting scan */
  15351. A_UINT32 vdev_id;
  15352. /** table ID - to allow support for multiple simultaneous requests */
  15353. A_UINT32 table_id;
  15354. } wmi_extscan_stop_cmd_fixed_param;
  15355. enum wmi_extscan_get_cached_results_flags {
  15356. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  15357. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  15358. };
  15359. typedef struct {
  15360. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  15361. /** request ID - used to correlate command with events */
  15362. A_UINT32 request_id;
  15363. /** Requestor ID - client that requested results */
  15364. A_UINT32 requestor_id;
  15365. /** VDEV id(interface) that is requesting scan */
  15366. A_UINT32 vdev_id;
  15367. /** table ID - to allow support for multiple simultaneous requests */
  15368. A_UINT32 table_id;
  15369. /** maximum number of results to be returned */
  15370. A_UINT32 max_results;
  15371. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  15372. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  15373. } wmi_extscan_get_cached_results_cmd_fixed_param;
  15374. typedef struct {
  15375. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  15376. /** request ID - used to correlate command with events */
  15377. A_UINT32 request_id;
  15378. /** Requestor ID - client that requested results */
  15379. A_UINT32 requestor_id;
  15380. /** VDEV id(interface) that is requesting scan */
  15381. A_UINT32 vdev_id;
  15382. /** table ID - to allow support for multiple simultaneous requests */
  15383. A_UINT32 table_id;
  15384. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  15385. typedef struct {
  15386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15387. /**bssid */
  15388. wmi_mac_addr bssid;
  15389. /**channel number */
  15390. A_UINT32 channel;
  15391. /**upper RSSI limit */
  15392. A_UINT32 upper_rssi_limit;
  15393. /**lower RSSI limit */
  15394. A_UINT32 lower_rssi_limit;
  15395. } wmi_extscan_wlan_change_bssid_param;
  15396. typedef struct {
  15397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  15398. /** Request ID - to identify command. Cannot be 0 */
  15399. A_UINT32 request_id;
  15400. /** Requestor ID - client requesting wlan change monitoring */
  15401. A_UINT32 requestor_id;
  15402. /** VDEV id(interface) that is requesting scan */
  15403. A_UINT32 vdev_id;
  15404. /** table ID - to allow support for multiple simultaneous tables */
  15405. A_UINT32 table_id;
  15406. /** operation mode: start/stop */
  15407. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15408. /** number of rssi samples to store */
  15409. A_UINT32 max_rssi_samples;
  15410. /** number of samples to use to calculate RSSI average */
  15411. A_UINT32 rssi_averaging_samples;
  15412. /** number of scans to confirm loss of contact with RSSI */
  15413. A_UINT32 lost_ap_scan_count;
  15414. /** number of out-of-range BSSIDs necessary to send event */
  15415. A_UINT32 max_out_of_range_count;
  15416. /** total number of bssid signal descriptors (in all pages) */
  15417. A_UINT32 total_entries;
  15418. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  15419. A_UINT32 first_entry_index;
  15420. /** number of bssid signal descriptors in this page */
  15421. A_UINT32 num_entries_in_page;
  15422. /* Following this structure is the TLV:
  15423. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  15424. * (number of elements given by field num_page_entries)
  15425. */
  15426. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  15427. typedef struct {
  15428. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15429. /**bssid */
  15430. wmi_mac_addr bssid;
  15431. /**RSSI min threshold for reporting */
  15432. A_UINT32 min_rssi;
  15433. /**Deprecated entry - channel number */
  15434. A_UINT32 channel;
  15435. /** RSSI max threshold for reporting */
  15436. A_UINT32 max_rssi;
  15437. } wmi_extscan_hotlist_entry;
  15438. typedef struct {
  15439. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  15440. /** Request ID - to identify command. Cannot be 0 */
  15441. A_UINT32 request_id;
  15442. /** Requestor ID - client requesting hotlist monitoring */
  15443. A_UINT32 requestor_id;
  15444. /** VDEV id(interface) that is requesting scan */
  15445. A_UINT32 vdev_id;
  15446. /** table ID - to allow support for multiple simultaneous tables */
  15447. A_UINT32 table_id;
  15448. /** operation mode: start/stop */
  15449. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15450. /** total number of bssids (in all pages) */
  15451. A_UINT32 total_entries;
  15452. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  15453. A_UINT32 first_entry_index;
  15454. /** number of bssids in this page */
  15455. A_UINT32 num_entries_in_page;
  15456. /** number of consecutive scans to confirm loss of contact with AP */
  15457. A_UINT32 lost_ap_scan_count;
  15458. /* Following this structure is the TLV:
  15459. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  15460. */
  15461. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  15462. typedef struct {
  15463. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15464. /**ssid */
  15465. wmi_ssid ssid;
  15466. /**band */
  15467. A_UINT32 band;
  15468. /**RSSI threshold for reporting */
  15469. A_UINT32 min_rssi;
  15470. A_UINT32 max_rssi;
  15471. } wmi_extscan_hotlist_ssid_entry;
  15472. typedef struct {
  15473. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  15474. /** Request ID - to identify command. Cannot be 0 */
  15475. A_UINT32 request_id;
  15476. /** Requestor ID - client requesting hotlist ssid monitoring */
  15477. A_UINT32 requestor_id;
  15478. /** VDEV id(interface) that is requesting scan */
  15479. A_UINT32 vdev_id;
  15480. /** table ID - to allow support for multiple simultaneous tables */
  15481. A_UINT32 table_id;
  15482. /** operation mode: start/stop */
  15483. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15484. /**total number of ssids (in all pages) */
  15485. A_UINT32 total_entries;
  15486. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  15487. A_UINT32 first_entry_index;
  15488. /**number of ssids in this page */
  15489. A_UINT32 num_entries_in_page;
  15490. /** number of consecutive scans to confirm loss of an ssid **/
  15491. A_UINT32 lost_ap_scan_count;
  15492. /* Following this structure is the TLV:
  15493. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  15494. */
  15495. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  15496. typedef struct {
  15497. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15498. /** table ID - to allow support for multiple simultaneous tables */
  15499. A_UINT32 table_id;
  15500. /** size in bytes of scan cache entry */
  15501. A_UINT32 scan_cache_entry_size;
  15502. /** maximum number of scan cache entries */
  15503. A_UINT32 max_scan_cache_entries;
  15504. /** maximum number of buckets per extscan request */
  15505. A_UINT32 max_buckets;
  15506. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  15507. A_UINT32 max_bssid_per_scan;
  15508. /** table usage level at which indication must be sent to host */
  15509. A_UINT32 max_table_usage_threshold;
  15510. } wmi_extscan_cache_capabilities;
  15511. typedef struct {
  15512. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15513. /** table ID - to allow support for multiple simultaneous tables */
  15514. A_UINT32 table_id;
  15515. /** size in bytes of wlan change entry */
  15516. A_UINT32 wlan_change_entry_size;
  15517. /** maximum number of entries in wlan change table */
  15518. A_UINT32 max_wlan_change_entries;
  15519. /** number of RSSI samples used for averaging RSSI */
  15520. A_UINT32 max_rssi_averaging_samples;
  15521. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  15522. A_UINT32 max_rssi_history_entries;
  15523. } wmi_extscan_wlan_change_monitor_capabilities;
  15524. typedef struct {
  15525. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15526. /** table ID - to allow support for multiple simultaneous tables */
  15527. A_UINT32 table_id;
  15528. /** size in bytes of hotlist entry */
  15529. A_UINT32 wlan_hotlist_entry_size;
  15530. /** maximum number of entries in wlan change table */
  15531. A_UINT32 max_hotlist_entries;
  15532. } wmi_extscan_hotlist_monitor_capabilities;
  15533. typedef struct {
  15534. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  15535. /** Request ID - matches request ID used to start hot list monitoring */
  15536. A_UINT32 request_id;
  15537. /** Requestor ID - client requesting stop */
  15538. A_UINT32 requestor_id;
  15539. /** number of extscan caches */
  15540. A_UINT32 num_extscan_cache_tables;
  15541. /** number of wlan change lists */
  15542. A_UINT32 num_wlan_change_monitor_tables;
  15543. /** number of hotlists */
  15544. A_UINT32 num_hotlist_monitor_tables;
  15545. /** if one sided rtt data collection is supported */
  15546. A_UINT32 rtt_one_sided_supported;
  15547. /** if 11v data collection is supported */
  15548. A_UINT32 rtt_11v_supported;
  15549. /** if 11mc data collection is supported */
  15550. A_UINT32 rtt_ftm_supported;
  15551. /** number of extscan cache capabilities (one per table) */
  15552. A_UINT32 num_extscan_cache_capabilities;
  15553. /** number of wlan change capabilities (one per table) */
  15554. A_UINT32 num_extscan_wlan_change_capabilities;
  15555. /** number of extscan hotlist capabilities (one per table) */
  15556. A_UINT32 num_extscan_hotlist_capabilities;
  15557. /* Following this structure is the TLV:
  15558. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  15559. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  15560. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  15561. */
  15562. } wmi_extscan_set_capabilities_cmd_fixed_param;
  15563. typedef struct {
  15564. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  15565. /** Request ID - matches request ID used to start hot list monitoring */
  15566. A_UINT32 request_id;
  15567. /** Requestor ID - client requesting capabilities */
  15568. A_UINT32 requestor_id;
  15569. } wmi_extscan_get_capabilities_cmd_fixed_param;
  15570. typedef struct {
  15571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  15572. /** Request ID of the operation that was started/stopped */
  15573. A_UINT32 request_id;
  15574. /** Requestor ID of the operation that was started/stopped */
  15575. A_UINT32 requestor_id;
  15576. /** VDEV id(interface) of the operation that was started/stopped */
  15577. A_UINT32 vdev_id;
  15578. /** extscan WMI command */
  15579. A_UINT32 command;
  15580. /** operation mode: start/stop */
  15581. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15582. /**success/failure */
  15583. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  15584. /** table ID - to allow support for multiple simultaneous requests */
  15585. A_UINT32 table_id;
  15586. } wmi_extscan_start_stop_event_fixed_param;
  15587. typedef struct {
  15588. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  15589. /** Request ID of the extscan operation that is currently running */
  15590. A_UINT32 request_id;
  15591. /** Requestor ID of the extscan operation that is currently running */
  15592. A_UINT32 requestor_id;
  15593. /** VDEV id(interface) of the extscan operation that is currently running */
  15594. A_UINT32 vdev_id;
  15595. /** scan event (wmi_scan_event_type) */
  15596. A_UINT32 event; /* wmi_extscan_event_type */
  15597. /** table ID - to allow support for multiple simultaneous requests */
  15598. A_UINT32 table_id;
  15599. /**number of buckets */
  15600. A_UINT32 num_buckets;
  15601. /* Following this structure is the TLV:
  15602. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  15603. */
  15604. } wmi_extscan_operation_event_fixed_param;
  15605. /* Types of extscan tables */
  15606. typedef enum {
  15607. EXTSCAN_TABLE_NONE = 0,
  15608. EXTSCAN_TABLE_BSSID = 1,
  15609. EXTSCAN_TABLE_RSSI = 2,
  15610. } wmi_extscan_table_type;
  15611. typedef struct {
  15612. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  15613. /** Request ID of the extscan operation that is currently running */
  15614. A_UINT32 request_id;
  15615. /** Requestor ID of the extscan operation that is currently running */
  15616. A_UINT32 requestor_id;
  15617. /** VDEV id(interface) of the extscan operation that is currently running */
  15618. A_UINT32 vdev_id;
  15619. /** table ID - to allow support for multiple simultaneous tables */
  15620. A_UINT32 table_id;
  15621. /**see wmi_extscan_table_type for table reporting usage */
  15622. A_UINT32 table_type;
  15623. /**number of entries in use */
  15624. A_UINT32 entries_in_use;
  15625. /**maximum number of entries in table */
  15626. A_UINT32 maximum_entries;
  15627. } wmi_extscan_table_usage_event_fixed_param;
  15628. typedef enum {
  15629. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  15630. this can be used to discard scan results */
  15631. } wmi_scan_status_flags;
  15632. typedef struct {
  15633. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15634. /** RSSI */
  15635. A_UINT32 rssi;
  15636. /** time stamp in milliseconds */
  15637. A_UINT32 tstamp;
  15638. /** Extscan cycle during which this entry was scanned */
  15639. A_UINT32 scan_cycle_id;
  15640. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  15641. A_UINT32 flags;
  15642. /** Bitmask of buckets (i.e. sets of channels) scanned */
  15643. A_UINT32 buckets_scanned;
  15644. } wmi_extscan_rssi_info;
  15645. typedef struct {
  15646. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15647. /**bssid */
  15648. wmi_mac_addr bssid;
  15649. /**ssid */
  15650. wmi_ssid ssid;
  15651. /**channel number */
  15652. A_UINT32 channel;
  15653. /* capabilities */
  15654. A_UINT32 capabilities;
  15655. /* beacon interval in TUs */
  15656. A_UINT32 beacon_interval;
  15657. /**time stamp in milliseconds - time last seen */
  15658. A_UINT32 tstamp;
  15659. /**flags - _tExtScanEntryFlags */
  15660. A_UINT32 flags;
  15661. /**RTT in ns */
  15662. A_UINT32 rtt;
  15663. /**rtt standard deviation */
  15664. A_UINT32 rtt_sd;
  15665. /* rssi information */
  15666. A_UINT32 number_rssi_samples;
  15667. /** IE length */
  15668. A_UINT32 ie_length; /* length of IE data */
  15669. } wmi_extscan_wlan_descriptor;
  15670. typedef struct {
  15671. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  15672. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15673. A_UINT32 request_id;
  15674. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15675. A_UINT32 requestor_id;
  15676. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15677. A_UINT32 vdev_id;
  15678. /** Request ID of the extscan operation that is currently running */
  15679. A_UINT32 extscan_request_id;
  15680. /** Requestor ID of the extscan operation that is currently running */
  15681. A_UINT32 extscan_requestor_id;
  15682. /** VDEV id(interface) of the extscan operation that is currently running */
  15683. A_UINT32 extscan_vdev_id;
  15684. /** table ID - to allow support for multiple simultaneous tables */
  15685. A_UINT32 table_id;
  15686. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  15687. A_UINT32 current_tstamp;
  15688. /**total number of bssids (in all pages) */
  15689. A_UINT32 total_entries;
  15690. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15691. A_UINT32 first_entry_index;
  15692. /**number of bssids in this page */
  15693. A_UINT32 num_entries_in_page;
  15694. /** number of buckets scanned**/
  15695. A_UINT32 buckets_scanned;
  15696. /* Followed by the variable length TLVs
  15697. * wmi_extscan_wlan_descriptor bssid_list[]
  15698. * wmi_extscan_rssi_info rssi_list[]
  15699. * A_UINT8 ie_list[]
  15700. */
  15701. } wmi_extscan_cached_results_event_fixed_param;
  15702. typedef enum {
  15703. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  15704. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  15705. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  15706. } wmi_extscan_wlan_change_flags;
  15707. typedef struct {
  15708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15709. /**bssid */
  15710. wmi_mac_addr bssid;
  15711. /**time stamp in milliseconds */
  15712. A_UINT32 tstamp;
  15713. /**upper RSSI limit */
  15714. A_UINT32 upper_rssi_limit;
  15715. /**lower RSSI limit */
  15716. A_UINT32 lower_rssi_limit;
  15717. /** channel */
  15718. A_UINT32 channel; /* in MHz */
  15719. /**current RSSI average */
  15720. A_UINT32 rssi_average;
  15721. /**flags - wmi_extscan_wlan_change_flags */
  15722. A_UINT32 flags;
  15723. /**legnth of RSSI history to follow (number of values) */
  15724. A_UINT32 num_rssi_samples;
  15725. } wmi_extscan_wlan_change_result_bssid;
  15726. typedef struct {
  15727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  15728. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15729. A_UINT32 request_id;
  15730. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15731. A_UINT32 requestor_id;
  15732. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15733. A_UINT32 vdev_id;
  15734. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15735. A_UINT32 config_request_id;
  15736. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15737. A_UINT32 config_requestor_id;
  15738. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15739. A_UINT32 config_vdev_id;
  15740. /** table ID - to allow support for multiple simultaneous tables */
  15741. A_UINT32 table_id;
  15742. /**number of entries with RSSI out of range or BSSID not detected */
  15743. A_UINT32 change_count;
  15744. /**total number of bssid signal descriptors (in all pages) */
  15745. A_UINT32 total_entries;
  15746. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  15747. A_UINT32 first_entry_index;
  15748. /**number of bssids signal descriptors in this page */
  15749. A_UINT32 num_entries_in_page;
  15750. /* Following this structure is the TLV:
  15751. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  15752. * (number of descriptors given by field num_entries_in_page)
  15753. * Following this structure is the list of RSSI values (each is an A_UINT8):
  15754. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  15755. */
  15756. } wmi_extscan_wlan_change_results_event_fixed_param;
  15757. enum _tExtScanEntryFlags
  15758. {
  15759. WMI_HOTLIST_FLAG_NONE = 0x00,
  15760. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  15761. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  15762. };
  15763. typedef struct {
  15764. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15765. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15766. A_UINT32 config_request_id;
  15767. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15768. A_UINT32 config_requestor_id;
  15769. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15770. A_UINT32 config_vdev_id;
  15771. /** table ID - to allow support for multiple simultaneous tables */
  15772. A_UINT32 table_id;
  15773. /**total number of bssids (in all pages) */
  15774. A_UINT32 total_entries;
  15775. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15776. A_UINT32 first_entry_index;
  15777. /**number of bssids in this page */
  15778. A_UINT32 num_entries_in_page;
  15779. /* Following this structure is the TLV:
  15780. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15781. */
  15782. } wmi_extscan_hotlist_match_event_fixed_param;
  15783. typedef struct {
  15784. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15785. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15786. A_UINT32 config_request_id;
  15787. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15788. A_UINT32 config_requestor_id;
  15789. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15790. A_UINT32 config_vdev_id;
  15791. /** table ID - to allow support for multiple simultaneous tables */
  15792. A_UINT32 table_id;
  15793. /**total number of ssids (in all pages) */
  15794. A_UINT32 total_entries;
  15795. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15796. A_UINT32 first_entry_index;
  15797. /**number of ssids in this page */
  15798. A_UINT32 num_entries_in_page;
  15799. /* Following this structure is the TLV:
  15800. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15801. */
  15802. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  15803. typedef struct {
  15804. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  15805. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15806. A_UINT32 request_id;
  15807. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15808. A_UINT32 requestor_id;
  15809. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15810. A_UINT32 vdev_id;
  15811. /** number of extscan caches */
  15812. A_UINT32 num_extscan_cache_tables;
  15813. /** number of wlan change lists */
  15814. A_UINT32 num_wlan_change_monitor_tables;
  15815. /** number of hotlists */
  15816. A_UINT32 num_hotlist_monitor_tables;
  15817. /** if one sided rtt data collection is supported */
  15818. A_UINT32 rtt_one_sided_supported;
  15819. /** if 11v data collection is supported */
  15820. A_UINT32 rtt_11v_supported;
  15821. /** if 11mc data collection is supported */
  15822. A_UINT32 rtt_ftm_supported;
  15823. /** number of extscan cache capabilities (one per table) */
  15824. A_UINT32 num_extscan_cache_capabilities;
  15825. /** number of wlan change capabilities (one per table) */
  15826. A_UINT32 num_extscan_wlan_change_capabilities;
  15827. /** number of extscan hotlist capabilities (one per table) */
  15828. A_UINT32 num_extscan_hotlist_capabilities;
  15829. /* max number of roaming ssid whitelist firmware can support */
  15830. A_UINT32 num_roam_ssid_whitelist;
  15831. /* max number of blacklist bssid firmware can support */
  15832. A_UINT32 num_roam_bssid_blacklist;
  15833. /* max number of preferred list firmware can support */
  15834. A_UINT32 num_roam_bssid_preferred_list;
  15835. /* max number of hotlist ssids firmware can support */
  15836. A_UINT32 num_extscan_hotlist_ssid;
  15837. /* max number of epno networks firmware can support */
  15838. A_UINT32 num_epno_networks;
  15839. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  15840. * supports multiple lists of each type.
  15841. *
  15842. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  15843. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  15844. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  15845. */
  15846. } wmi_extscan_capabilities_event_fixed_param;
  15847. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  15848. typedef struct{
  15849. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  15850. A_UINT32 reserved0; /* for future need */
  15851. } wmi_d0_wow_disable_ack_event_fixed_param;
  15852. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  15853. typedef struct {
  15854. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  15855. /** pdev_id for identifying the MAC
  15856. * See macros starting with WMI_PDEV_ID_ for values.
  15857. */
  15858. A_UINT32 pdev_id;
  15859. } wmi_pdev_resume_event_fixed_param;
  15860. /** value representing all modules */
  15861. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  15862. /* param definitions */
  15863. /**
  15864. * Log level for a given module. Value contains both module id and log level.
  15865. * here is the bitmap definition for value.
  15866. * module Id : 16
  15867. * Flags : reserved
  15868. * Level : 8
  15869. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  15870. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  15871. */
  15872. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  15873. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  15874. (val) |= (lvl & 0xff); \
  15875. } while (0)
  15876. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  15877. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  15878. (val) |= ((mid & 0xffff) << 16); \
  15879. } while (0)
  15880. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  15881. /**
  15882. * Enable the debug log for a given vdev. Value is vdev id
  15883. */
  15884. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  15885. /**
  15886. * Disable the debug log for a given vdev. Value is vdev id
  15887. * All the log level for a given VDEV is disabled except the ERROR log messages
  15888. */
  15889. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  15890. /**
  15891. * set vdev enable bitmap. value is the vden enable bitmap
  15892. */
  15893. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  15894. /**
  15895. * set a given log level to all the modules specified in the module bitmap.
  15896. * and set the log levle for all other modules to DBGLOG_ERR.
  15897. * value: log levelt to be set.
  15898. * module_id_bitmap : identifies the modules for which the log level should be set and
  15899. * modules for which the log level should be reset to DBGLOG_ERR.
  15900. */
  15901. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  15902. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  15903. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  15904. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  15905. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  15906. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  15907. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  15908. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  15909. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  15910. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  15911. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  15912. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  15913. typedef struct {
  15914. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  15915. A_UINT32 dbg_log_param; /** param types are defined above */
  15916. A_UINT32 value;
  15917. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  15918. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  15919. */
  15920. } wmi_debug_log_config_cmd_fixed_param;
  15921. typedef struct {
  15922. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  15923. A_UINT32 param; /* Reserved for future use */
  15924. /** pdev_id for identifying the MAC
  15925. * See macros starting with WMI_PDEV_ID_ for values.
  15926. */
  15927. A_UINT32 pdev_id;
  15928. } wmi_pdev_get_temperature_cmd_fixed_param;
  15929. typedef struct {
  15930. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  15931. A_INT32 value; /* temprature value in Celcius degree */
  15932. /** pdev_id for identifying the MAC
  15933. * See macros starting with WMI_PDEV_ID_ for values.
  15934. */
  15935. A_UINT32 pdev_id;
  15936. } wmi_pdev_temperature_event_fixed_param;
  15937. typedef enum {
  15938. ANTDIV_HW_CFG_STATUS,
  15939. ANTDIV_SW_CFG_STATUS,
  15940. ANTDIV_MAX_STATUS_TYPE_NUM
  15941. } ANTDIV_STATUS_TYPE;
  15942. typedef struct {
  15943. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  15944. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  15945. /** pdev_id for identifying the MAC
  15946. * See macros starting with WMI_PDEV_ID_ for values.
  15947. */
  15948. A_UINT32 pdev_id;
  15949. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  15950. typedef struct {
  15951. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  15952. A_UINT32 support; /* ANT DIV feature enabled or not */
  15953. A_UINT32 chain_num; /* how many chain supported */
  15954. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  15955. /*
  15956. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  15957. * the antennas attached to that tx/rx chain.
  15958. */
  15959. A_UINT32 selectable_ant_mask[8];
  15960. /** pdev_id for identifying the MAC
  15961. * See macros starting with WMI_PDEV_ID_ for values.
  15962. */
  15963. A_UINT32 pdev_id;
  15964. } wmi_pdev_antdiv_status_event_fixed_param;
  15965. typedef struct {
  15966. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  15967. A_UINT32 vdev_id;
  15968. A_UINT32 enable;
  15969. A_UINT32 srv_ipv4; /* server IP */
  15970. A_UINT32 start_lsb; /* starting address assigned to client */
  15971. A_UINT32 num_client; /* number of clients we support */
  15972. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  15973. typedef enum {
  15974. AP_RX_DATA_OFFLOAD = 0x00,
  15975. STA_RX_DATA_OFFLOAD = 0x01,
  15976. } wmi_ipa_offload_types;
  15977. /**
  15978. * This command is sent from WLAN host driver to firmware for
  15979. * enabling/disabling IPA data-path offload features.
  15980. *
  15981. *
  15982. * Enabling data path offload to IPA(based on host INI configuration), example:
  15983. * when STA interface comes up,
  15984. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15985. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15986. *
  15987. * Disabling data path offload to IPA, example:
  15988. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15989. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15990. *
  15991. *
  15992. * This command is applicable only on the PCIE LL systems
  15993. *
  15994. */
  15995. typedef struct {
  15996. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  15997. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  15998. A_UINT32 vdev_id;
  15999. A_UINT32 enable; /* 1 == enable, 0 == disable */
  16000. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  16001. typedef enum {
  16002. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  16003. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  16004. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  16005. } wmi_set_led_flashing_type;
  16006. /**
  16007. 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.
  16008. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  16009. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  16010. 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
  16011. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  16012. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  16013. Zero is reached, it is skipped and moves on to the next interval.
  16014. */
  16015. typedef struct{
  16016. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  16017. A_UINT32 pattern_id; /* pattern identifier */
  16018. A_UINT32 led_x0; /* led flashing parameter0 */
  16019. A_UINT32 led_x1; /* led flashing parameter1 */
  16020. A_UINT32 gpio_num; /* GPIO number */
  16021. } wmi_set_led_flashing_cmd_fixed_param;
  16022. /**
  16023. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  16024. * within small networks that do not include a local name server.
  16025. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  16026. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  16027. * global server.
  16028. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  16029. * by type in a specified domain using standard DNS queries.
  16030. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  16031. */
  16032. typedef struct {
  16033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  16034. A_UINT32 vdev_id;
  16035. A_UINT32 enable;
  16036. } wmi_mdns_offload_cmd_fixed_param;
  16037. #define WMI_MAX_MDNS_FQDN_LEN 64
  16038. #define WMI_MAX_MDNS_RESP_LEN 512
  16039. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  16040. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  16041. typedef struct {
  16042. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  16043. A_UINT32 vdev_id;
  16044. /** type of fqdn, general or unique */
  16045. A_UINT32 type;
  16046. /** length of fqdn */
  16047. A_UINT32 fqdn_len;
  16048. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  16049. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  16050. */
  16051. } wmi_mdns_set_fqdn_cmd_fixed_param;
  16052. typedef struct {
  16053. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  16054. A_UINT32 vdev_id;
  16055. /** Answer Resource Record count */
  16056. A_UINT32 AR_count;
  16057. /** length of response */
  16058. A_UINT32 resp_len;
  16059. /* Following this structure is the TLV byte stream of resp data of length resp_len
  16060. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  16061. */
  16062. } wmi_mdns_set_resp_cmd_fixed_param;
  16063. typedef struct {
  16064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  16065. A_UINT32 vdev_id;
  16066. } wmi_mdns_get_stats_cmd_fixed_param;
  16067. typedef struct {
  16068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  16069. A_UINT32 vdev_id;
  16070. /** curTimestamp in milliseconds */
  16071. A_UINT32 curTimestamp;
  16072. /** last received Query in milliseconds */
  16073. A_UINT32 lastQueryTimestamp;
  16074. /** last sent Response in milliseconds */
  16075. A_UINT32 lastResponseTimestamp;
  16076. /** stats of received queries */
  16077. A_UINT32 totalQueries;
  16078. /** stats of macth queries */
  16079. A_UINT32 totalMatches;
  16080. /** stats of responses */
  16081. A_UINT32 totalResponses;
  16082. /** indicate the current status of mDNS offload */
  16083. A_UINT32 status;
  16084. } wmi_mdns_stats_event_fixed_param;
  16085. /**
  16086. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  16087. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  16088. * request and create/remove connection even host is suspended.
  16089. * 3 major components are offloaded:
  16090. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  16091. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  16092. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  16093. * Current implementation only supports WPA2 CCMP.
  16094. */
  16095. typedef struct {
  16096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  16097. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  16098. A_UINT32 vdev_id;
  16099. /** enable/disable sap auth offload */
  16100. A_UINT32 enable;
  16101. /** sap ssid */
  16102. wmi_ssid ap_ssid;
  16103. /** authentication mode (defined above) */
  16104. A_UINT32 rsn_authmode;
  16105. /** unicast cipher set */
  16106. A_UINT32 rsn_ucastcipherset;
  16107. /** mcast/group cipher set */
  16108. A_UINT32 rsn_mcastcipherset;
  16109. /** mcast/group management frames cipher set */
  16110. A_UINT32 rsn_mcastmgmtcipherset;
  16111. /** sap channel */
  16112. A_UINT32 channel;
  16113. /** length of psk */
  16114. A_UINT32 psk_len;
  16115. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  16116. * A_UINT8 psk[];
  16117. */
  16118. } wmi_sap_ofl_enable_cmd_fixed_param;
  16119. typedef struct {
  16120. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  16121. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  16122. A_UINT32 vdev_id;
  16123. /** aid (association id) of this station */
  16124. A_UINT32 assoc_id;
  16125. /** peer station's mac addr */
  16126. wmi_mac_addr peer_macaddr;
  16127. /** length of association request frame */
  16128. A_UINT32 data_len;
  16129. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  16130. * A_UINT8 bufp[];
  16131. */
  16132. } wmi_sap_ofl_add_sta_event_fixed_param;
  16133. typedef enum {
  16134. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  16135. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  16136. } wmi_sap_ofl_del_sta_flags;
  16137. typedef struct {
  16138. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  16139. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  16140. A_UINT32 vdev_id;
  16141. /** aid (association id) of this station */
  16142. A_UINT32 assoc_id;
  16143. /** peer station's mac addr */
  16144. wmi_mac_addr peer_macaddr;
  16145. /** disassociation reason */
  16146. A_UINT32 reason;
  16147. /** flags - wmi_sap_ofl_del_sta_flags */
  16148. A_UINT32 flags;
  16149. } wmi_sap_ofl_del_sta_event_fixed_param;
  16150. typedef struct {
  16151. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  16152. A_UINT32 vdev_id;
  16153. /* Number of client failure connection attempt */
  16154. A_UINT32 num_retry;
  16155. /* Time in milliseconds to record the client's failure connection attempts */
  16156. A_UINT32 retry_allow_time_ms;
  16157. /* Time in milliseconds to drop the connection request if client is blacklisted */
  16158. A_UINT32 blackout_time_ms;
  16159. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  16160. typedef struct {
  16161. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  16162. A_UINT32 data_len; /** length in byte of data[]. */
  16163. /** This structure is used to send REQ binary blobs
  16164. * from application/service to firmware where Host drv is pass through .
  16165. * Following this structure is the TLV:
  16166. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16167. */
  16168. } wmi_apfind_cmd_param;
  16169. typedef enum apfind_event_type_e {
  16170. APFIND_MATCH_EVENT = 0,
  16171. APFIND_WAKEUP_EVENT,
  16172. } APFIND_EVENT_TYPE;
  16173. typedef struct {
  16174. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  16175. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  16176. A_UINT32 data_len; /** length in byte of data[]. */
  16177. /** This structure is used to send event binary blobs
  16178. * from firmware to application/service and Host drv.
  16179. * Following this structure is the TLV:
  16180. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16181. */
  16182. } wmi_apfind_event_hdr;
  16183. /* SAP obss detection offload types */
  16184. typedef enum {
  16185. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  16186. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  16187. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  16188. } WMI_SAP_OBSS_DETECTION_MODE;
  16189. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  16190. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  16191. A_UINT32 vdev_id;
  16192. A_UINT32 detect_period_ms;
  16193. /* detect whether there is 11b ap/ibss */
  16194. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  16195. /* detect whether there is 11b sta connected with other APs */
  16196. A_UINT32 b_sta_detect_mode;
  16197. /* detect whether there is 11g AP */
  16198. A_UINT32 g_ap_detect_mode;
  16199. /* detect whether there is legacy 11a traffic */
  16200. A_UINT32 a_detect_mode;
  16201. /* detect whether there is ap which is ht legacy mode */
  16202. A_UINT32 ht_legacy_detect_mode;
  16203. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  16204. A_UINT32 ht_mixed_detect_mode;
  16205. /* detect whether there is ap which has 20M only station */
  16206. A_UINT32 ht_20mhz_detect_mode;
  16207. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  16208. typedef enum {
  16209. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  16210. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  16211. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  16212. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  16213. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  16214. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  16215. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  16216. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  16217. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  16218. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  16219. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  16220. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  16221. typedef struct wmi_sap_obss_detection_info_evt_s {
  16222. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  16223. A_UINT32 vdev_id;
  16224. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  16225. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  16226. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  16227. } wmi_sap_obss_detection_info_evt_fixed_param;
  16228. /** WMI command to enable STA FW handle bss color change notification from AP */
  16229. typedef struct {
  16230. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  16231. A_UINT32 vdev_id;
  16232. A_UINT32 enable;
  16233. } wmi_bss_color_change_enable_fixed_param;
  16234. typedef enum {
  16235. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  16236. WMI_BSS_COLOR_COLLISION_DETECTION,
  16237. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  16238. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  16239. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  16240. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  16241. typedef struct {
  16242. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  16243. A_UINT32 vdev_id;
  16244. A_UINT32 flags; /* proposed for future use cases */
  16245. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  16246. A_UINT32 current_bss_color;
  16247. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  16248. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  16249. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  16250. } wmi_obss_color_collision_det_config_fixed_param;
  16251. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  16252. typedef struct {
  16253. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  16254. A_UINT32 vdev_id;
  16255. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  16256. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  16257. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  16258. } wmi_obss_color_collision_evt_fixed_param;
  16259. /**
  16260. * OCB DCC types and structures.
  16261. */
  16262. /**
  16263. * DCC types as described in ETSI TS 102 687
  16264. * Type Format stepSize referenceValue numBits
  16265. * -------------------------------------------------------------------------
  16266. * ndlType_acPrio INTEGER (0...7) 1 number 3
  16267. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  16268. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  16269. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  16270. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  16271. * ndlType_datarate INTEGER (0..7) Table 8 3
  16272. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  16273. * ndlType_numberElements INTEGER (0..63) number 6
  16274. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  16275. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  16276. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  16277. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  16278. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  16279. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  16280. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  16281. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  16282. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  16283. * ndlType_queueStatus Enumeration Table A.2 1
  16284. * ndlType_dccMechanism Bitset Table A.2 6
  16285. *
  16286. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  16287. * cannot be changed without breaking WMI compatibility.
  16288. *
  16289. * NOTE: For each of the types, one additional bit is allocated. This
  16290. * leftmost bit is used to indicate that the value is invalid. */
  16291. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  16292. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  16293. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  16294. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  16295. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  16296. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  16297. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  16298. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  16299. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  16300. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  16301. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  16302. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  16303. #define SIZE_NDLTYPE_SNR (1 + 7)
  16304. #define SIZE_NDLTYPE_TIMING (1 + 12)
  16305. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  16306. #define SIZE_NDLTYPE_RATIO (1 + 7)
  16307. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  16308. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  16309. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  16310. #define SIZE_BYTE (8)
  16311. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  16312. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  16313. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  16314. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  16315. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  16316. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  16317. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  16318. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  16319. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  16320. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  16321. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  16322. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  16323. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  16324. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  16325. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  16326. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  16327. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  16328. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  16329. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  16330. /** The MCS_COUNT macro cannot be modified without breaking
  16331. * WMI compatibility. */
  16332. #define MCS_COUNT (8)
  16333. /** Flags for ndlType_dccMechanism. */
  16334. typedef enum {
  16335. DCC_MECHANISM_TPC = 1,
  16336. DCC_MECHANISM_TRC = 2,
  16337. DCC_MECHANISM_TDC = 4,
  16338. DCC_MECHANISM_DSC = 8,
  16339. DCC_MECHANISM_TAC = 16,
  16340. DCC_MECHANISM_RESERVED = 32,
  16341. DCC_MECHANISM_ALL = 0x3f,
  16342. } wmi_dcc_ndl_type_dcc_mechanism;
  16343. /** Values for ndlType_queueStatus. */
  16344. typedef enum {
  16345. DCC_QUEUE_CLOSED = 0,
  16346. DCC_QUEUE_OPEN = 1,
  16347. } wmi_dcc_ndl_type_queue_status;
  16348. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  16349. /** Values for ndlType_datarate */
  16350. typedef enum {
  16351. DCC_DATARATE_3_MBPS = 0,
  16352. DCC_DATARATE_4_5_MBPS = 1,
  16353. DCC_DATARATE_6_MBPS = 2,
  16354. DCC_DATARATE_9_MBPS = 3,
  16355. DCC_DATARATE_12_MBPS = 4,
  16356. DCC_DATARATE_18_MBPS = 5,
  16357. DCC_DATARATE_24_MBPS = 6,
  16358. DCC_DATARATE_27_MBPS = 7,
  16359. } wmi_dcc_ndl_type_datarate;
  16360. /** Data structure for active state configuration. */
  16361. typedef struct {
  16362. /** TLV tag and len; tag equals
  16363. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  16364. A_UINT32 tlv_header;
  16365. /**
  16366. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  16367. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  16368. */
  16369. A_UINT32 state_info;
  16370. /**
  16371. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  16372. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  16373. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  16374. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  16375. */
  16376. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  16377. /**
  16378. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  16379. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  16380. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  16381. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  16382. */
  16383. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  16384. /**
  16385. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  16386. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  16387. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  16388. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  16389. */
  16390. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  16391. /**
  16392. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  16393. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  16394. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  16395. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  16396. */
  16397. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  16398. /**
  16399. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  16400. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  16401. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  16402. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  16403. */
  16404. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  16405. } wmi_dcc_ndl_active_state_config;
  16406. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  16407. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  16408. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  16409. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  16410. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  16411. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  16412. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16413. #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)
  16414. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  16415. #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)
  16416. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  16417. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  16418. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  16419. #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)
  16420. /** Data structure for EDCA/QOS parameters. */
  16421. typedef struct
  16422. {
  16423. /** TLV tag and len; tag equals
  16424. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  16425. A_UINT32 tlv_header;
  16426. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  16427. A_UINT32 aifsn;
  16428. /** Contention Window minimum. Range: 1 - 10 */
  16429. A_UINT32 cwmin;
  16430. /** Contention Window maximum. Range: 1 - 10 */
  16431. A_UINT32 cwmax;
  16432. } wmi_qos_parameter;
  16433. /** Data structure for information specific to a channel. */
  16434. typedef struct {
  16435. /** TLV tag and len; tag equals
  16436. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  16437. A_UINT32 tlv_header;
  16438. A_UINT32 bandwidth; /* MHz units */
  16439. wmi_mac_addr mac_address;
  16440. } wmi_ocb_channel;
  16441. /** Data structure for an element of the schedule array. */
  16442. typedef struct {
  16443. /** TLV tag and len; tag equals
  16444. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  16445. A_UINT32 tlv_header;
  16446. A_UINT32 channel_freq; /* MHz units */
  16447. A_UINT32 total_duration; /* ms units */
  16448. A_UINT32 guard_interval; /* ms units */
  16449. } wmi_ocb_schedule_element;
  16450. /** Data structure for OCB configuration. */
  16451. typedef struct {
  16452. /** TLV tag and len; tag equals
  16453. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  16454. A_UINT32 tlv_header;
  16455. /** VDEV id(interface) that is being configured */
  16456. A_UINT32 vdev_id;
  16457. A_UINT32 channel_count;
  16458. A_UINT32 schedule_size;
  16459. A_UINT32 flags;
  16460. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  16461. /** This is followed by a TLV array of wmi_channel. */
  16462. /** This is followed by a TLV array of wmi_ocb_channel. */
  16463. /** This is followed by a TLV array of wmi_qos_parameter. */
  16464. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  16465. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  16466. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  16467. } wmi_ocb_set_config_cmd_fixed_param;
  16468. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  16469. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  16470. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  16471. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  16472. typedef struct {
  16473. /** TLV tag and len; tag equals
  16474. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  16475. A_UINT32 tlv_header;
  16476. /* VDEV identifier */
  16477. A_UINT32 vdev_id;
  16478. A_UINT32 status;
  16479. } wmi_ocb_set_config_resp_event_fixed_param;
  16480. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  16481. WMI compatibility. */
  16482. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  16483. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  16484. /** Data structure to set the UTC time. */
  16485. typedef struct {
  16486. /** TLV tag and len; tag equals
  16487. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  16488. A_UINT32 tlv_header;
  16489. /* VDEV identifier */
  16490. A_UINT32 vdev_id;
  16491. /** 10 bytes of the utc time. */
  16492. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  16493. /** 5 bytes of the time error. */
  16494. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  16495. } wmi_ocb_set_utc_time_cmd_fixed_param;
  16496. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  16497. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  16498. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  16499. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  16500. /** Data structure start the timing advertisement. The template for the
  16501. * timing advertisement frame follows this structure in the WMI command.
  16502. */
  16503. typedef struct {
  16504. /** TLV tag and len; tag equals
  16505. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  16506. A_UINT32 tlv_header;
  16507. /* VDEV identifier */
  16508. A_UINT32 vdev_id;
  16509. /** Number of times the TA is sent every 5 seconds. */
  16510. A_UINT32 repeat_rate;
  16511. /** The frequency on which to transmit. */
  16512. A_UINT32 channel_freq; /* MHz units */
  16513. /** The offset into the template of the timestamp. */
  16514. A_UINT32 timestamp_offset;
  16515. /** The offset into the template of the time value. */
  16516. A_UINT32 time_value_offset;
  16517. /** The length of the timing advertisement template. The
  16518. * template is in the TLV data. */
  16519. A_UINT32 timing_advert_template_length;
  16520. /** This is followed by a binary array containing the TA template. */
  16521. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  16522. /** Data structure to stop the timing advertisement. */
  16523. typedef struct {
  16524. /** TLV tag and len; tag equals
  16525. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  16526. A_UINT32 tlv_header;
  16527. /* VDEV identifier */
  16528. A_UINT32 vdev_id;
  16529. A_UINT32 channel_freq; /* MHz units */
  16530. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  16531. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  16532. typedef struct {
  16533. /** TLV tag and len; tag equals
  16534. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  16535. A_UINT32 tlv_header;
  16536. /* VDEV identifier */
  16537. A_UINT32 vdev_id;
  16538. A_UINT32 reserved;
  16539. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  16540. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  16541. typedef struct {
  16542. /** TLV tag and len; tag equals
  16543. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  16544. A_UINT32 tlv_header;
  16545. /* VDEV identifier */
  16546. A_UINT32 vdev_id;
  16547. A_UINT32 tsf_timer_high;
  16548. A_UINT32 tsf_timer_low;
  16549. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  16550. /** Data structure for DCC stats configuration per channel. */
  16551. typedef struct {
  16552. /** TLV tag and len; tag equals
  16553. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  16554. A_UINT32 tlv_header;
  16555. /** The channel for which this applies, 16 bits. */
  16556. /** The dcc_stats_bitmap, 8 bits. */
  16557. A_UINT32 chan_info;
  16558. /** Demodulation model parameters. */
  16559. /**
  16560. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  16561. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  16562. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16563. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16564. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16565. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16566. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16567. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16568. */
  16569. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16570. /** Communication ranges. */
  16571. /**
  16572. * tx_power, ndlType_txPower, 1+7 bits.
  16573. * datarate, ndlType_datarate, 1+3 bits.
  16574. */
  16575. A_UINT32 tx_power_datarate;
  16576. /**
  16577. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  16578. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  16579. */
  16580. A_UINT32 carrier_sense_est_comm_range;
  16581. /** Channel load measures. */
  16582. /**
  16583. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  16584. * carrierSense, ndlType_rxPower, 1+7 bits.
  16585. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  16586. */
  16587. A_UINT32 dcc_stats;
  16588. /**
  16589. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  16590. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  16591. */
  16592. A_UINT32 packet_stats;
  16593. /**
  16594. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  16595. */
  16596. A_UINT32 channel_busy_time;
  16597. /** Transmit packet statistics. */
  16598. /**
  16599. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16600. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16601. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16602. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16603. */
  16604. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  16605. /**
  16606. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16607. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16608. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16609. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16610. */
  16611. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16612. /**
  16613. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16614. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16615. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16616. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16617. */
  16618. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  16619. /**
  16620. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16621. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16622. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16623. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16624. */
  16625. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16626. } wmi_dcc_ndl_stats_per_channel;
  16627. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16628. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16629. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16630. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16631. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  16632. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  16633. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16634. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16635. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  16636. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  16637. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  16638. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  16639. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  16640. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  16641. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  16642. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  16643. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  16644. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  16645. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  16646. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  16647. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  16648. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  16649. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  16650. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  16651. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  16652. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  16653. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  16654. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  16655. #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)
  16656. #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)
  16657. #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)
  16658. #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)
  16659. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16660. #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)
  16661. #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)
  16662. #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)
  16663. /** Bitmap for DCC stats. */
  16664. typedef enum {
  16665. DCC_STATS_DEMODULATION_MODEL = 1,
  16666. DCC_STATS_COMMUNICATION_RANGES = 2,
  16667. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  16668. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  16669. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  16670. DCC_STATS_ALL = 0xff,
  16671. } wmi_dcc_stats_bitmap;
  16672. /** Data structure for getting the DCC stats. */
  16673. typedef struct {
  16674. /** TLV tag and len; tag equals
  16675. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  16676. A_UINT32 tlv_header;
  16677. /* VDEV identifier */
  16678. A_UINT32 vdev_id;
  16679. /** The number of channels for which stats are being requested. */
  16680. A_UINT32 num_channels;
  16681. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  16682. } wmi_dcc_get_stats_cmd_fixed_param;
  16683. typedef struct {
  16684. /** TLV tag and len; tag equals
  16685. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  16686. A_UINT32 tlv_header;
  16687. /** The channel for which this applies. */
  16688. A_UINT32 chan_freq; /* MHz units */
  16689. /** The DCC stats being requested. */
  16690. A_UINT32 dcc_stats_bitmap;
  16691. } wmi_dcc_channel_stats_request;
  16692. /** Data structure for the response with the DCC stats. */
  16693. typedef struct {
  16694. /** TLV tag and len; tag equals
  16695. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  16696. A_UINT32 tlv_header;
  16697. /* VDEV identifier */
  16698. A_UINT32 vdev_id;
  16699. /** Number of channels in the response. */
  16700. A_UINT32 num_channels;
  16701. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16702. } wmi_dcc_get_stats_resp_event_fixed_param;
  16703. /** Data structure for clearing the DCC stats. */
  16704. typedef struct {
  16705. /** TLV tag and len; tag equals
  16706. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  16707. A_UINT32 tlv_header;
  16708. /* VDEV identifier */
  16709. A_UINT32 vdev_id;
  16710. A_UINT32 dcc_stats_bitmap;
  16711. } wmi_dcc_clear_stats_cmd_fixed_param;
  16712. /** Data structure for the pushed DCC stats */
  16713. typedef struct {
  16714. /** TLV tag and len; tag equals
  16715. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  16716. A_UINT32 tlv_header;
  16717. /* VDEV identifier */
  16718. A_UINT32 vdev_id;
  16719. /** The number of channels in the response. */
  16720. A_UINT32 num_channels;
  16721. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16722. } wmi_dcc_stats_event_fixed_param;
  16723. /** Data structure for updating NDL per channel. */
  16724. typedef struct {
  16725. /** TLV tag and len; tag equals
  16726. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  16727. A_UINT32 tlv_header;
  16728. /**
  16729. * Channel frequency, 16 bits
  16730. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  16731. */
  16732. A_UINT32 chan_info;
  16733. /**
  16734. * NDL_minDccSampling, 10 bits.
  16735. * Maximum time interval between subsequent checks of the DCC rules.
  16736. */
  16737. A_UINT32 ndl_min_dcc_sampling;
  16738. /**
  16739. * dcc_enable, 1 bit.
  16740. * dcc_stats_enable, 1 bit.
  16741. * dcc_stats_interval, 16 bits.
  16742. */
  16743. A_UINT32 dcc_flags;
  16744. /** General DCC configuration. */
  16745. /**
  16746. * NDL_timeUp, ndlType_timing, 1+12 bits.
  16747. * NDL_timeDown, ndlType_timing, 1+12 bits.
  16748. */
  16749. A_UINT32 general_config;
  16750. /** Transmit power thresholds. */
  16751. /**
  16752. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  16753. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  16754. */
  16755. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  16756. /**
  16757. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  16758. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  16759. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  16760. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  16761. */
  16762. /* see "ETSI TS 102 687" table above for units */
  16763. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16764. /** Packet timing thresholds. */
  16765. /**
  16766. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16767. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16768. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16769. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16770. */
  16771. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16772. /**
  16773. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  16774. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  16775. */
  16776. A_UINT32 min_max_packet_interval;
  16777. /**
  16778. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  16779. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  16780. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  16781. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  16782. */
  16783. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  16784. /** Packet datarate thresholds. */
  16785. /**
  16786. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  16787. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  16788. */
  16789. A_UINT32 min_max_datarate;
  16790. /**
  16791. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  16792. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  16793. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  16794. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  16795. */
  16796. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  16797. /** Receive signal thresholds. */
  16798. /**
  16799. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  16800. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  16801. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  16802. */
  16803. A_UINT32 min_max_def_carrier_sense;
  16804. /** Receive model parameter. */
  16805. /**
  16806. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  16807. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  16808. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  16809. */
  16810. A_UINT32 receive_model_parameter;
  16811. /**
  16812. * NDL_minSNR, ndlType_snr, 1+7 bits.
  16813. */
  16814. A_UINT32 receive_model_parameter_2;
  16815. /** Demodulation model parameters. */
  16816. /**
  16817. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  16818. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  16819. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16820. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16821. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16822. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16823. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16824. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16825. */
  16826. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16827. /** Transmit model parameters. */
  16828. /**
  16829. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16830. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16831. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16832. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16833. */
  16834. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  16835. /**
  16836. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16837. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16838. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16839. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16840. */
  16841. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  16842. /**
  16843. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16844. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16845. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16846. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16847. */
  16848. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  16849. /**
  16850. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  16851. */
  16852. A_UINT32 tm_max_channel_use;
  16853. /**
  16854. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16855. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16856. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16857. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16858. */
  16859. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  16860. /** Channel load thresholds. */
  16861. /**
  16862. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  16863. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  16864. */
  16865. A_UINT32 min_max_channel_load;
  16866. /** Transmit queue parameters. */
  16867. /**
  16868. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  16869. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  16870. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  16871. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  16872. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  16873. */
  16874. A_UINT32 transmit_queue_parameters;
  16875. /**
  16876. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  16877. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  16878. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  16879. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  16880. */
  16881. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  16882. } wmi_dcc_ndl_chan;
  16883. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16884. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16885. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  16886. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  16887. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  16888. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  16889. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  16890. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  16891. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  16892. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  16893. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  16894. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  16895. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  16896. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  16897. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  16898. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  16899. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  16900. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  16901. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  16902. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  16903. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  16904. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  16905. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16906. #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)
  16907. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  16908. #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)
  16909. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  16910. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  16911. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  16912. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  16913. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  16914. #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)
  16915. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  16916. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  16917. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  16918. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  16919. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  16920. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  16921. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  16922. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  16923. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  16924. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  16925. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  16926. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  16927. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  16928. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  16929. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  16930. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  16931. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  16932. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  16933. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  16934. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  16935. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16936. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16937. #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)
  16938. #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)
  16939. #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)
  16940. #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)
  16941. #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)
  16942. #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)
  16943. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  16944. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  16945. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16946. #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)
  16947. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  16948. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  16949. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  16950. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  16951. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  16952. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  16953. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  16954. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  16955. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  16956. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  16957. /** Data structure for updating the NDL. */
  16958. typedef struct {
  16959. /** TLV tag and len; tag equals
  16960. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  16961. A_UINT32 tlv_header;
  16962. /* VDEV identifier */
  16963. A_UINT32 vdev_id;
  16964. /** The number of channels in the request. */
  16965. A_UINT32 num_channel;
  16966. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  16967. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  16968. } wmi_dcc_update_ndl_cmd_fixed_param;
  16969. typedef struct {
  16970. /** TLV tag and len; tag equals
  16971. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  16972. A_UINT32 tlv_header;
  16973. /* VDEV identifier */
  16974. A_UINT32 vdev_id;
  16975. A_UINT32 status;
  16976. } wmi_dcc_update_ndl_resp_event_fixed_param;
  16977. /* Actions for TSF timestamp */
  16978. typedef enum {
  16979. TSF_TSTAMP_CAPTURE_REQ = 1,
  16980. TSF_TSTAMP_CAPTURE_RESET = 2,
  16981. TSF_TSTAMP_READ_VALUE = 3,
  16982. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  16983. } wmi_tsf_tstamp_action;
  16984. typedef struct {
  16985. /** TLV tag and len; tag equals
  16986. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  16987. A_UINT32 tlv_header;
  16988. /** unique id identifying the VDEV, generated by the caller */
  16989. A_UINT32 vdev_id;
  16990. /* action type, refer to wmi_tsf_tstamp_action */
  16991. A_UINT32 tsf_action;
  16992. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  16993. typedef struct {
  16994. /* TLV tag and len; tag equals
  16995. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  16996. A_UINT32 tlv_header;
  16997. /* VDEV identifier */
  16998. A_UINT32 vdev_id;
  16999. /* low 32bit of tsf */
  17000. A_UINT32 tsf_low;
  17001. /* high 32 bit of tsf */
  17002. A_UINT32 tsf_high;
  17003. /* low 32 bits of qtimer */
  17004. A_UINT32 qtimer_low;
  17005. /* high 32 bits of qtimer */
  17006. A_UINT32 qtimer_high;
  17007. } wmi_vdev_tsf_report_event_fixed_param;
  17008. /* ie_id values:
  17009. * 0 to 255 are used for individual IEEE802.11 Information Element types
  17010. */
  17011. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  17012. /* source values: */
  17013. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  17014. /* band values: */
  17015. typedef enum {
  17016. WMI_SET_VDEV_IE_BAND_ALL = 0,
  17017. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  17018. WMI_SET_VDEV_IE_BAND_5GHZ,
  17019. } wmi_set_vdev_ie_band;
  17020. typedef struct {
  17021. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  17022. A_UINT32 tlv_header;
  17023. /** unique id identifying the VDEV, generated by the caller */
  17024. A_UINT32 vdev_id;
  17025. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  17026. A_UINT32 ie_id;
  17027. /** ie_len corresponds to num of bytes in ie_data[] */
  17028. A_UINT32 ie_len;
  17029. /** source of this command */
  17030. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  17031. /** band for this IE - se wmi_set_vdev_ie_band enum */
  17032. A_UINT32 band;
  17033. /**
  17034. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  17035. * A_UINT8 ie_data[];
  17036. *
  17037. */
  17038. } wmi_vdev_set_ie_cmd_fixed_param;
  17039. /* DISA feature related data structures */
  17040. #define MAX_MAC_HEADER_LEN 32
  17041. typedef enum {
  17042. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  17043. WMI_ENCRYPT = 1,
  17044. WMI_DECRYPT = 2,
  17045. } WMI_ENCRYPT_DECRYPT_FLAG;
  17046. typedef struct {
  17047. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  17048. /** unique id identifying the VDEV, generated by the caller */
  17049. A_UINT32 vdev_id;
  17050. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  17051. A_UINT32 key_idx;
  17052. A_UINT32 key_cipher;
  17053. A_UINT32 key_len; /* units = bytes */
  17054. A_UINT32 key_txmic_len; /* units = bytes */
  17055. A_UINT32 key_rxmic_len; /* units = bytes */
  17056. /** Key: This array needs to be provided in little-endian order */
  17057. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  17058. /** Packet number: This array needs to be provided in little-endian order.
  17059. * If the PN is less than 8 bytes, the PN data shall be placed into this
  17060. * pn[] array starting at byte 0, leaving the MSBs empty.
  17061. */
  17062. A_UINT8 pn[8];
  17063. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  17064. * This array needs to be provided in little-endian order.
  17065. */
  17066. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  17067. A_UINT32 data_len; /** Payload length, units = bytes */
  17068. /*
  17069. * Following this struct are this TLV:
  17070. * A_UINT8 data[]; <-- actual data to be encrypted,
  17071. * needs to be provided in little-endian order
  17072. */
  17073. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  17074. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  17075. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  17076. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  17077. * then on receiving the tx completion for the DISA frame this WMI event
  17078. * will be delivered to HOST with the encrypted frame.
  17079. */
  17080. typedef struct {
  17081. /** TLV tag and len; tag equals
  17082. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  17083. A_UINT32 tlv_header;
  17084. /* VDEV identifier */
  17085. A_UINT32 vdev_id;
  17086. A_INT32 status; /* 0: success, -1: Failure, */
  17087. /* 802.11 header length + encrypted payload length (units = bytes) */
  17088. A_UINT32 data_length;
  17089. /*
  17090. * Following this struct is this TLV:
  17091. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  17092. * 802.11 header + encrypted payload,
  17093. * provided in little-endian order
  17094. */
  17095. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  17096. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  17097. typedef struct {
  17098. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  17099. /** Set Preferred Channel List **/
  17100. /** # of channels to scan */
  17101. A_UINT32 num_chan;
  17102. /**
  17103. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  17104. * structure. The TLV's are:
  17105. * A_UINT32 channel_list[];
  17106. **/
  17107. } wmi_soc_set_pcl_cmd_fixed_param;
  17108. /* Values for channel_weight */
  17109. typedef enum {
  17110. WMI_PCL_WEIGHT_DISALLOW = 0,
  17111. WMI_PCL_WEIGHT_LOW = 1,
  17112. WMI_PCL_WEIGHT_MEDIUM = 2,
  17113. WMI_PCL_WEIGHT_HIGH = 3,
  17114. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  17115. } wmi_pcl_chan_weight;
  17116. typedef struct {
  17117. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  17118. /** Set Preferred Channel List **/
  17119. /** pdev_id for identifying the MAC
  17120. * See macros starting with WMI_PDEV_ID_ for values.
  17121. */
  17122. A_UINT32 pdev_id;
  17123. /** # of channels to scan */
  17124. A_UINT32 num_chan;
  17125. /**
  17126. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  17127. * structure. The TLV's are:
  17128. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  17129. **/
  17130. } wmi_pdev_set_pcl_cmd_fixed_param;
  17131. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  17132. typedef struct {
  17133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  17134. /** Set Hardware Mode **/
  17135. /* Hardware Mode Index */
  17136. A_UINT32 hw_mode_index;
  17137. } wmi_soc_set_hw_mode_cmd_fixed_param;
  17138. typedef struct {
  17139. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  17140. /** pdev_id for identifying the MAC
  17141. * See macros starting with WMI_PDEV_ID_ for values.
  17142. */
  17143. A_UINT32 pdev_id;
  17144. /* start frequency in MHz */
  17145. A_UINT32 start_freq;
  17146. /* end frequency in MHz */
  17147. A_UINT32 end_freq;
  17148. } wmi_pdev_band_to_mac;
  17149. typedef struct {
  17150. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  17151. /** Set Hardware Mode **/
  17152. /** pdev_id for identifying the MAC
  17153. * See macros starting with WMI_PDEV_ID_ for values.
  17154. */
  17155. A_UINT32 pdev_id;
  17156. /* Hardware Mode Index */
  17157. A_UINT32 hw_mode_index;
  17158. /* Number of band to mac TLVs */
  17159. A_UINT32 num_band_to_mac;
  17160. /* Followed by TLVs of type
  17161. * num_band_to_mac * wmi_pdev_band_to_mac.
  17162. */
  17163. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  17164. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  17165. typedef struct {
  17166. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  17167. /** Set Dual MAC Firmware Configuration **/
  17168. /* Concurrent scan configuration bits */
  17169. A_UINT32 concurrent_scan_config_bits;
  17170. /* Firmware mode configuration bits */
  17171. A_UINT32 fw_mode_config_bits;
  17172. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  17173. typedef struct {
  17174. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  17175. /** Set Dual MAC Firmware Configuration **/
  17176. /** pdev_id for identifying the MAC
  17177. * See macros starting with WMI_PDEV_ID_ for values.
  17178. */
  17179. A_UINT32 pdev_id;
  17180. /* Concurrent scan configuration bits */
  17181. A_UINT32 concurrent_scan_config_bits;
  17182. /* Firmware mode configuration bits */
  17183. A_UINT32 fw_mode_config_bits;
  17184. } wmi_pdev_set_mac_config_cmd_fixed_param;
  17185. typedef struct { /* DEPRECATED */
  17186. A_UINT32 num_tx_chains;
  17187. A_UINT32 num_rx_chains;
  17188. A_UINT32 reserved[2];
  17189. } soc_num_tx_rx_chains;
  17190. typedef struct {
  17191. A_UINT32 num_tx_chains_2g;
  17192. A_UINT32 num_rx_chains_2g;
  17193. A_UINT32 num_tx_chains_5g;
  17194. A_UINT32 num_rx_chains_5g;
  17195. } band_num_tx_rx_chains;
  17196. typedef union { /* DEPRECATED */
  17197. soc_num_tx_rx_chains soc_txrx_chain_setting;
  17198. band_num_tx_rx_chains band_txrx_chain_setting;
  17199. } antenna_num_tx_rx_chains;
  17200. typedef enum {
  17201. ANTENNA_MODE_DISABLED = 0x0,
  17202. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  17203. /* reserved */
  17204. } antenna_mode_reason;
  17205. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  17206. typedef struct {
  17207. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  17208. /* the reason for setting antenna mode, refer antenna_mode_reason */
  17209. A_UINT32 reason;
  17210. /*
  17211. * The above reason parameter will select whether the following union
  17212. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  17213. */
  17214. antenna_num_tx_rx_chains num_txrx_chains_setting;
  17215. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  17216. typedef struct {
  17217. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  17218. /** pdev_id for identifying the MAC
  17219. * See macros starting with WMI_PDEV_ID_ for values.
  17220. */
  17221. A_UINT32 pdev_id;
  17222. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  17223. A_UINT32 num_txrx_chains;
  17224. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  17225. /** Data structure for information specific to a VDEV to MAC mapping. */
  17226. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  17227. typedef struct {
  17228. /** TLV tag and len; tag equals
  17229. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  17230. A_UINT32 tlv_header;
  17231. A_UINT32 vdev_id; /* VDEV ID */
  17232. A_UINT32 mac_id; /* MAC ID */
  17233. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  17234. /** Data structure for information specific to a VDEV to MAC mapping. */
  17235. typedef struct {
  17236. /** TLV tag and len; tag equals
  17237. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  17238. A_UINT32 tlv_header;
  17239. /** pdev_id for identifying the MAC
  17240. * See macros starting with WMI_PDEV_ID_ for values.
  17241. */
  17242. A_UINT32 pdev_id;
  17243. A_UINT32 vdev_id;
  17244. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  17245. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  17246. typedef struct {
  17247. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  17248. /** Set Hardware Mode Response Event **/
  17249. /* Status of set_hw_mode command */
  17250. /*
  17251. * Values for Status:
  17252. * 0 - OK; command successful
  17253. * 1 - EINVAL; Requested invalid hw_mode
  17254. * 2 - ECANCELED; HW mode change canceled
  17255. * 3 - ENOTSUP; HW mode not supported
  17256. * 4 - EHARDWARE; HW mode change prevented by hardware
  17257. * 5 - EPENDING; HW mode change is pending
  17258. * 6 - ECOEX; HW mode change conflict with Coex
  17259. */
  17260. A_UINT32 status;
  17261. /* Configured Hardware Mode */
  17262. A_UINT32 cfgd_hw_mode_index;
  17263. /* Number of Vdev to Mac entries */
  17264. A_UINT32 num_vdev_mac_entries;
  17265. /**
  17266. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  17267. * structure. The TLV's are:
  17268. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  17269. */
  17270. } wmi_soc_set_hw_mode_response_event_fixed_param;
  17271. typedef struct {
  17272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  17273. /** Set Hardware Mode Response Event **/
  17274. /** pdev_id for identifying the MAC
  17275. * See macros starting with WMI_PDEV_ID_ for values.
  17276. */
  17277. A_UINT32 pdev_id;
  17278. /* Status of set_hw_mode command */
  17279. /*
  17280. * Values for Status:
  17281. * 0 - OK; command successful
  17282. * 1 - EINVAL; Requested invalid hw_mode
  17283. * 2 - ECANCELED; HW mode change canceled
  17284. * 3 - ENOTSUP; HW mode not supported
  17285. * 4 - EHARDWARE; HW mode change prevented by hardware
  17286. * 5 - EPENDING; HW mode change is pending
  17287. * 6 - ECOEX; HW mode change conflict with Coex
  17288. */
  17289. A_UINT32 status;
  17290. /* Configured Hardware Mode */
  17291. A_UINT32 cfgd_hw_mode_index;
  17292. /* Number of Vdev to Mac entries */
  17293. A_UINT32 num_vdev_mac_entries;
  17294. /**
  17295. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  17296. * structure. The TLV's are:
  17297. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  17298. */
  17299. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  17300. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  17301. typedef struct {
  17302. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  17303. /** Hardware Mode Transition Event **/
  17304. /* Original or old Hardware mode */
  17305. A_UINT32 old_hw_mode_index;
  17306. /* New Hardware Mode */
  17307. A_UINT32 new_hw_mode_index;
  17308. /* Number of Vdev to Mac entries */
  17309. A_UINT32 num_vdev_mac_entries;
  17310. /**
  17311. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  17312. * structure. The TLV's are:
  17313. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  17314. */
  17315. } wmi_soc_hw_mode_transition_event_fixed_param;
  17316. typedef struct {
  17317. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  17318. /** Hardware Mode Transition Event **/
  17319. /** pdev_id for identifying the MAC
  17320. * See macros starting with WMI_PDEV_ID_ for values.
  17321. */
  17322. A_UINT32 pdev_id;
  17323. /* Original or old Hardware mode */
  17324. A_UINT32 old_hw_mode_index;
  17325. /* New Hardware Mode */
  17326. A_UINT32 new_hw_mode_index;
  17327. /* Number of Vdev to Mac entries */
  17328. A_UINT32 num_vdev_mac_entries;
  17329. /**
  17330. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  17331. * structure. The TLV's are:
  17332. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  17333. */
  17334. } wmi_pdev_hw_mode_transition_event_fixed_param;
  17335. /**
  17336. * This command is sent from WLAN host driver to firmware for
  17337. * plugging in reorder queue desc to lithium hw.
  17338. *
  17339. * Example: plug-in queue desc for TID 5
  17340. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  17341. * (vdev_id = PEER vdev id,
  17342. * peer_macaddr = PEER mac addr,
  17343. * tid = 5,
  17344. * queue_ptr_lo = queue desc addr lower 32 bits,
  17345. * queue_ptr_hi = queue desc addr higher 32 bits,
  17346. * queue_no = 16-bit number assigned by host for queue,
  17347. * stored in bits 15:0 of queue_no field)
  17348. */
  17349. typedef struct {
  17350. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  17351. A_UINT32 vdev_id;
  17352. wmi_mac_addr peer_macaddr; /* peer mac address */
  17353. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  17354. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  17355. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  17356. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  17357. stored in bits 15:0 of queue_no field */
  17358. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  17359. * 0 = Invalid, 1 = Valid */
  17360. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  17361. * Host sends the message when BA session is
  17362. * established or terminated for the TID. */
  17363. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  17364. /**
  17365. * This command is sent from WLAN host driver to firmware for
  17366. * removing one or more reorder queue desc to lithium hw.
  17367. *
  17368. * Example: remove queue desc for all TIDs
  17369. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  17370. * (vdev_id = PEER vdev id,
  17371. * peer_macaddr = PEER mac addr,
  17372. * tid = 0x1FFFF,
  17373. */
  17374. typedef struct {
  17375. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  17376. A_UINT32 vdev_id;
  17377. wmi_mac_addr peer_macaddr; /* peer mac address */
  17378. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  17379. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  17380. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  17381. typedef struct {
  17382. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  17383. /** Set Dual MAC Config Response Event **/
  17384. /* Status for set_dual_mac_config command */
  17385. /*
  17386. * Values for Status:
  17387. * 0 - OK; command successful
  17388. * 1 - EINVAL; Requested invalid hw_mode
  17389. * 3 - ENOTSUP; HW mode not supported
  17390. * 4 - EHARDWARE; HW mode change prevented by hardware
  17391. * 6 - ECOEX; HW mode change conflict with Coex
  17392. */
  17393. A_UINT32 status;
  17394. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  17395. typedef struct {
  17396. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  17397. /** Set Dual MAC Config Response Event **/
  17398. /** pdev_id for identifying the MAC
  17399. * See macros starting with WMI_PDEV_ID_ for values.
  17400. */
  17401. A_UINT32 pdev_id;
  17402. /* Status for set_dual_mac_config command */
  17403. /*
  17404. * Values for Status:
  17405. * 0 - OK; command successful
  17406. * 1 - EINVAL; Requested invalid hw_mode
  17407. * 3 - ENOTSUP; HW mode not supported
  17408. * 4 - EHARDWARE; HW mode change prevented by hardware
  17409. * 6 - ECOEX; HW mode change conflict with Coex
  17410. */
  17411. A_UINT32 status;
  17412. } wmi_pdev_set_mac_config_response_event_fixed_param;
  17413. typedef enum {
  17414. MAWC_MOTION_STATE_UNKNOWN,
  17415. MAWC_MOTION_STATE_STATIONARY,
  17416. MAWC_MOTION_STATE_WALK,
  17417. MAWC_MOTION_STATE_TRANSIT,
  17418. } MAWC_MOTION_STATE;
  17419. typedef enum {
  17420. MAWC_SENSOR_STATUS_OK,
  17421. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  17422. MAWC_SENSOR_STATUS_SHUTDOWN,
  17423. } MAWC_SENSOR_STATUS;
  17424. typedef struct {
  17425. /* TLV tag and len; tag equals
  17426. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  17427. A_UINT32 tlv_header;
  17428. /** new motion state, MAWC_MOTION_STATE */
  17429. A_UINT32 motion_state;
  17430. /** status code of sensor, MAWC_SENSOR_STATUS */
  17431. A_UINT32 sensor_status;
  17432. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  17433. /* MBO flag field definition */
  17434. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  17435. * 1 - Allow to connect to MBO AP only
  17436. * Bit 1-31 : reserved.
  17437. */
  17438. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  17439. typedef struct {
  17440. /* TLV tag and len; tag equals
  17441. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  17442. A_UINT32 tlv_header;
  17443. /** vdev id */
  17444. A_UINT32 vdev_id;
  17445. /** enable or disable MBO */
  17446. A_UINT32 enable;
  17447. /** MBO flags, refer to definition of MBO flags*/
  17448. A_UINT32 flags;
  17449. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  17450. typedef struct {
  17451. /* TLV tag and len; tag equals
  17452. * WMITLV_TAG_ARRAY_STRUC */
  17453. A_UINT32 tlv_header;
  17454. /** Current operating class number */
  17455. A_UINT32 cur_op_class;
  17456. /** Country string of current reg domain,
  17457. * the expected value should be same as country str defined
  17458. * in country IE.
  17459. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  17460. * The ordering of this array must be maintained,
  17461. * even when a big-endian host's WMI messages undergo
  17462. * automatic byte reordering for conversion to the
  17463. * little-endian ordering required by the target.
  17464. * On big-endian hosts, this array may need to be byte-swapped
  17465. * by the host, so the subsequent automatic byte-swap
  17466. * will result in the correct final byte order.
  17467. * global operating class: set country_str[0]=0
  17468. */
  17469. A_UINT8 country_str[4];
  17470. /** Supported operating class number in current regdomain */
  17471. A_UINT32 supp_op_class_num;
  17472. /* The TLVs will follow. */
  17473. /* A_UINT32 supp_op_class_list[] */
  17474. } wmi_supported_operating_class_param;
  17475. typedef struct {
  17476. /* TLV tag and len; tag equals
  17477. * WMITLV_TAG_ARRAY_STRUC */
  17478. A_UINT32 tlv_header;
  17479. /** non preferred channel attribute length */
  17480. A_UINT32 non_prefer_ch_attr_len;
  17481. /* The TLVs will follow. */
  17482. /** A_UINT8 non_prefer_ch_attr[];*/
  17483. } wmi_mbo_non_preferred_channel_report_param;
  17484. typedef struct {
  17485. /* TLV tag and len; tag equals
  17486. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  17487. A_UINT32 tlv_header;
  17488. /* enable(1) or disable(0) */
  17489. A_UINT32 enable;
  17490. } wmi_mawc_enable_sensor_event_fixed_param;
  17491. typedef struct {
  17492. /* TLV tag and len; tag equals
  17493. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  17494. A_UINT32 tlv_header;
  17495. /* Unique id identifying the VDEV */
  17496. A_UINT32 vdev_id;
  17497. /* enable(1) or disable(0) MAWC */
  17498. A_UINT32 enable;
  17499. /* ratio of skipping suppressing scan, skip one out of x */
  17500. A_UINT32 suppress_ratio;
  17501. } wmi_extscan_configure_mawc_cmd_fixed_param;
  17502. typedef struct {
  17503. /* TLV tag and len; tag equals
  17504. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  17505. A_UINT32 tlv_header;
  17506. /* Unique id identifying the VDEV */
  17507. A_UINT32 vdev_id;
  17508. /* enable(1) or disable(0) packet error rate trigger for roaming */
  17509. A_UINT32 enable;
  17510. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  17511. * If PER monitoring as a trigger for roaming is enabled,
  17512. * it is controlled by high_rate_thresh, low_rate_thresh, and
  17513. * pkt_err_rate_thresh_pct.
  17514. * PER monitoring is performed only when the time-averaged throughput
  17515. * is less than high_rate_thresh.
  17516. * During PER monitoring, the target keeps track of the PHY rate for
  17517. * each of the first N PPDUs within a time window.
  17518. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  17519. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  17520. *
  17521. * This PER monitoring as a trigger for roaming is performed
  17522. * concurrently but independently for rx and tx.
  17523. */
  17524. A_UINT32 high_rate_thresh; /* units = Kbps */
  17525. A_UINT32 low_rate_thresh; /* units = Kbps */
  17526. A_UINT32 pkt_err_rate_thresh_pct;
  17527. /*
  17528. * rest time after associating to a new AP before
  17529. * starting to monitor PER as a roaming trigger,
  17530. * (units are seconds)
  17531. */
  17532. A_UINT32 per_rest_time;
  17533. /* This is the total time for which PER monitoring will be run.
  17534. * After completion of time windows, the average PER over the window
  17535. * will be computed.
  17536. * The parameter value stores specifications for both TX and RX
  17537. * monitor times.
  17538. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  17539. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  17540. */
  17541. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  17542. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  17543. A_INT32 min_candidate_rssi; /* units = dBm */
  17544. } wmi_roam_per_config_fixed_param;
  17545. typedef struct {
  17546. /* TLV tag and len; tag equals
  17547. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  17548. A_UINT32 tlv_header;
  17549. /* Unique id identifying the VDEV */
  17550. A_UINT32 vdev_id;
  17551. /* enable(1) or disable(0) MAWC */
  17552. A_UINT32 enable;
  17553. /* ratio of exponential backoff, next = current + current*ratio/100 */
  17554. A_UINT32 exp_backoff_ratio;
  17555. /* initial scan interval(msec) */
  17556. A_UINT32 init_scan_interval;
  17557. /* max scan interval(msec) */
  17558. A_UINT32 max_scan_interval;
  17559. } wmi_nlo_configure_mawc_cmd_fixed_param;
  17560. typedef struct {
  17561. /* TLV tag and len; tag equals
  17562. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  17563. A_UINT32 tlv_header;
  17564. /* Unique id identifying the VDEV */
  17565. A_UINT32 vdev_id;
  17566. /* enable(1) or disable(0) MAWC */
  17567. A_UINT32 enable;
  17568. /* data traffic load (kBps) to register CMC */
  17569. A_UINT32 traffic_load_threshold;
  17570. /* RSSI threshold (dBm) to scan for Best AP */
  17571. A_UINT32 best_ap_rssi_threshold;
  17572. /* high RSSI threshold adjustment in Stationary to suppress scan */
  17573. A_UINT32 rssi_stationary_high_adjust;
  17574. /* low RSSI threshold adjustment in Stationary to suppress scan */
  17575. A_UINT32 rssi_stationary_low_adjust;
  17576. } wmi_roam_configure_mawc_cmd_fixed_param;
  17577. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  17578. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  17579. typedef enum {
  17580. PACKET_FILTER_TYPE_INVALID = 0,
  17581. PACKET_FILTER_TYPE_FILTER_PKT,
  17582. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  17583. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  17584. } WMI_PACKET_FILTER_FILTER_TYPE;
  17585. typedef enum {
  17586. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  17587. /* L2 header */
  17588. PACKET_FILTER_PROTO_TYPE_MAC,
  17589. PACKET_FILTER_PROTO_TYPE_SNAP,
  17590. /* L3 header (EtherType) */
  17591. PACKET_FILTER_PROTO_TYPE_IPV4,
  17592. PACKET_FILTER_PROTO_TYPE_IPV6,
  17593. /* L4 header (IP protocol) */
  17594. PACKET_FILTER_PROTO_TYPE_UDP,
  17595. PACKET_FILTER_PROTO_TYPE_TCP,
  17596. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  17597. PACKET_FILTER_PROTO_TYPE_MAX
  17598. } WMI_PACKET_FILTER_PROTO_TYPE;
  17599. typedef enum {
  17600. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  17601. PACKET_FILTER_CMP_TYPE_EQUAL,
  17602. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  17603. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  17604. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  17605. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  17606. PACKET_FILTER_CMP_TYPE_MAX
  17607. } WMI_PACKET_FILTER_CMP_TYPE;
  17608. typedef enum {
  17609. PACKET_FILTER_SET_INACTIVE = 0,
  17610. PACKET_FILTER_SET_ACTIVE
  17611. } WMI_PACKET_FILTER_ACTION;
  17612. typedef enum {
  17613. PACKET_FILTER_SET_DISABLE = 0,
  17614. PACKET_FILTER_SET_ENABLE
  17615. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  17616. typedef struct {
  17617. A_UINT32 proto_type;
  17618. A_UINT32 cmp_type;
  17619. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  17620. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  17621. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  17622. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  17623. } WMI_PACKET_FILTER_PARAMS_TYPE;
  17624. typedef struct {
  17625. A_UINT32 tlv_header;
  17626. A_UINT32 vdev_id;
  17627. A_UINT32 filter_id;
  17628. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  17629. A_UINT32 filter_type;
  17630. A_UINT32 num_params; /* how many entries in paramsData are valid */
  17631. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  17632. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  17633. /* deprecated0:
  17634. * This field simply provides filler space to retain the original message
  17635. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  17636. * from 10 to 5.
  17637. */
  17638. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  17639. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  17640. /* enable / disable all filters within the specified vdev */
  17641. typedef struct {
  17642. A_UINT32 tlv_header;
  17643. A_UINT32 vdev_id;
  17644. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  17645. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  17646. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  17647. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  17648. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  17649. WMI_SET_BITS(tcp_flag_u32, \
  17650. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17651. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  17652. tcp_flag_values)
  17653. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  17654. WMI_GET_BITS(tcp_flag_u32, \
  17655. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17656. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  17657. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  17658. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  17659. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  17660. WMI_SET_BITS(tcp_flag_u32, \
  17661. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17662. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  17663. tcp_flags_mask)
  17664. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  17665. WMI_GET_BITS(tcp_flag_u32, \
  17666. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17667. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  17668. typedef struct {
  17669. A_UINT32 tlv_header;
  17670. /**
  17671. * @brief lro_enable - indicates whether lro is enabled
  17672. * [0] LRO Enable
  17673. */
  17674. A_UINT32 lro_enable;
  17675. /**
  17676. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  17677. * values to check for
  17678. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  17679. * the values in this field after masking with TCP flags mask below,
  17680. * LRO eligible will not be set
  17681. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  17682. * provided above with the TCP flags field in the received packet
  17683. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  17684. * macros to isolate the mask field and values field that are packed
  17685. * into this u32 "word".
  17686. */
  17687. A_UINT32 tcp_flag_u32;
  17688. /**
  17689. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17690. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17691. * bytes 0 to 3
  17692. *
  17693. * In this and all the below toeplitz_hash fields, the bytes are
  17694. * specified in little-endian order. For example:
  17695. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  17696. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  17697. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  17698. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  17699. */
  17700. A_UINT32 toeplitz_hash_ipv4_0_3;
  17701. /**
  17702. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17703. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17704. * bytes 4 to 7
  17705. */
  17706. A_UINT32 toeplitz_hash_ipv4_4_7;
  17707. /**
  17708. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17709. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17710. * bytes 8 to 11
  17711. */
  17712. A_UINT32 toeplitz_hash_ipv4_8_11;
  17713. /**
  17714. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17715. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17716. * bytes 12 to 15
  17717. */
  17718. A_UINT32 toeplitz_hash_ipv4_12_15;
  17719. /**
  17720. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17721. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17722. * byte 16
  17723. */
  17724. A_UINT32 toeplitz_hash_ipv4_16;
  17725. /**
  17726. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17727. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17728. * bytes 0 to 3
  17729. */
  17730. A_UINT32 toeplitz_hash_ipv6_0_3;
  17731. /**
  17732. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17733. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17734. * bytes 4 to 7
  17735. */
  17736. A_UINT32 toeplitz_hash_ipv6_4_7;
  17737. /**
  17738. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17739. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17740. * bytes 8 to 11
  17741. */
  17742. A_UINT32 toeplitz_hash_ipv6_8_11;
  17743. /**
  17744. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17745. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17746. * bytes 12 to 15
  17747. */
  17748. A_UINT32 toeplitz_hash_ipv6_12_15;
  17749. /**
  17750. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17751. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17752. * bytes 16 to 19
  17753. */
  17754. A_UINT32 toeplitz_hash_ipv6_16_19;
  17755. /**
  17756. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17757. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17758. * bytes 20 to 22
  17759. */
  17760. A_UINT32 toeplitz_hash_ipv6_20_23;
  17761. /**
  17762. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17763. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17764. * bytes 24 to 27
  17765. */
  17766. A_UINT32 toeplitz_hash_ipv6_24_27;
  17767. /**
  17768. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17769. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17770. * bytes 28 to 31
  17771. */
  17772. A_UINT32 toeplitz_hash_ipv6_28_31;
  17773. /**
  17774. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17775. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17776. * bytes 32 to 35
  17777. */
  17778. A_UINT32 toeplitz_hash_ipv6_32_35;
  17779. /**
  17780. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17781. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17782. * bytes 36 to 39
  17783. */
  17784. A_UINT32 toeplitz_hash_ipv6_36_39;
  17785. /**
  17786. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17787. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17788. * byte 40
  17789. */
  17790. A_UINT32 toeplitz_hash_ipv6_40;
  17791. } wmi_lro_info_cmd_fixed_param;
  17792. typedef struct {
  17793. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  17794. A_UINT32 offset; /* flash offset to write, starting from 0 */
  17795. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  17796. } wmi_transfer_data_to_flash_cmd_fixed_param;
  17797. typedef struct {
  17798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  17799. /** Return status. 0 for success, non-zero otherwise */
  17800. A_UINT32 status;
  17801. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  17802. typedef struct {
  17803. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  17804. A_UINT32 offset; /* flash offset to read, starting from 0 */
  17805. A_UINT32 length; /* data length to read, unit: byte */
  17806. } wmi_read_data_from_flash_cmd_fixed_param;
  17807. typedef struct {
  17808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  17809. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  17810. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  17811. A_UINT32 length; /* length of data being reported, unit: byte */
  17812. } wmi_read_data_from_flash_event_fixed_param;
  17813. typedef enum {
  17814. ENHANCED_MCAST_FILTER_DISABLED,
  17815. ENHANCED_MCAST_FILTER_ENABLED
  17816. } ENHANCED_MCAST_FILTER_CONFIG;
  17817. /*
  17818. * Command to enable/disable filtering of multicast IP with unicast mac
  17819. */
  17820. typedef struct {
  17821. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  17822. /* Unique id identifying the VDEV */
  17823. A_UINT32 vdev_id;
  17824. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  17825. A_UINT32 enable;
  17826. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  17827. typedef struct {
  17828. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  17829. A_UINT32 tlv_header;
  17830. /** unique id identifying the VDEV, generated by the caller */
  17831. A_UINT32 vdev_id;
  17832. /** WISA enable / disable mode */
  17833. A_UINT32 wisa_mode;
  17834. } wmi_vdev_wisa_cmd_fixed_param;
  17835. /*
  17836. * This structure is used to report SMPS force mode set complete to host.
  17837. */
  17838. typedef struct {
  17839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  17840. /* Unique id identifying the VDEV */
  17841. A_UINT32 vdev_id;
  17842. /* Return status. 0 for success, non-zero otherwise */
  17843. A_UINT32 status;
  17844. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  17845. /*
  17846. * This structure is used to report SCPC calibrated data to host.
  17847. */
  17848. typedef struct {
  17849. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  17850. /** number of BDF patches. Each patch contains offset, length and data */
  17851. A_UINT32 num_patch;
  17852. /* This TLV is followed by another TLV of array of bytes
  17853. * A_UINT8 data[];
  17854. * This data array contains, for example
  17855. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  17856. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  17857. *
  17858. */
  17859. } wmi_scpc_event_fixed_param;
  17860. typedef enum {
  17861. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  17862. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  17863. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  17864. } FW_ACTIVE_BPF_MODE;
  17865. /* bpf interface structure */
  17866. typedef struct wmi_bpf_get_capability_cmd_s {
  17867. A_UINT32 tlv_header;
  17868. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  17869. } wmi_bpf_get_capability_cmd_fixed_param;
  17870. typedef struct wmi_bpf_capability_info_evt_s {
  17871. A_UINT32 tlv_header;
  17872. A_UINT32 bpf_version; /* fw's implement version */
  17873. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  17874. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  17875. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17876. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17877. } wmi_bpf_capability_info_evt_fixed_param;
  17878. /* bit 0 of flags: report counters */
  17879. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  17880. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  17881. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  17882. A_UINT32 tlv_header;
  17883. A_UINT32 flags;
  17884. A_UINT32 vdev_id;
  17885. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  17886. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  17887. A_UINT32 tlv_header;
  17888. A_UINT32 vdev_id;
  17889. A_UINT32 num_filters;
  17890. A_UINT32 num_checked_pkts;
  17891. A_UINT32 num_dropped_pkts;
  17892. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  17893. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  17894. A_UINT32 tlv_header;
  17895. A_UINT32 vdev_id;
  17896. A_UINT32 filter_id;
  17897. A_UINT32 bpf_version; /* host bpf version */
  17898. A_UINT32 total_length;
  17899. A_UINT32 current_offset;
  17900. A_UINT32 current_length;
  17901. /*
  17902. * The TLV follows:
  17903. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  17904. */
  17905. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  17906. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  17907. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  17908. A_UINT32 tlv_header;
  17909. A_UINT32 vdev_id;
  17910. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  17911. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  17912. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  17913. A_UINT32 tlv_header;
  17914. A_UINT32 vdev_id;
  17915. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17916. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17917. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  17918. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  17919. A_UINT32 tlv_header;
  17920. A_UINT32 vdev_id;
  17921. A_UINT32 is_enabled; /* fw assume host default enables */
  17922. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  17923. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  17924. A_UINT32 tlv_header;
  17925. A_UINT32 vdev_id;
  17926. A_UINT32 bpf_version; /* bpf instruction version */
  17927. A_UINT32 program_len; /* the program length may be changed by this command */
  17928. A_UINT32 addr_offset; /* start writing addr in the working memory */
  17929. A_UINT32 length; /* the writing size of this command (byte units) */
  17930. /*
  17931. * The TLV follows:
  17932. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  17933. */
  17934. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  17935. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  17936. A_UINT32 tlv_header;
  17937. A_UINT32 vdev_id;
  17938. A_UINT32 addr_offset; /* start reading addr in the working memory */
  17939. A_UINT32 length; /* reading size from addr (byte units) */
  17940. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  17941. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  17942. A_UINT32 tlv_header;
  17943. A_UINT32 vdev_id;
  17944. A_UINT32 offset; /* read memory offset from start_addr */
  17945. A_UINT32 length; /* read memory length of this command */
  17946. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  17947. /*
  17948. * The TLV follows:
  17949. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  17950. */
  17951. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  17952. #define AES_BLOCK_LEN 16 /* in bytes */
  17953. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  17954. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  17955. #define FIPS_ENCRYPT_CMD 0
  17956. #define FIPS_DECRYPT_CMD 1
  17957. #define FIPS_ENGINE_AES_CTR 0
  17958. #define FIPS_ENGINE_AES_MIC 1
  17959. #define FIPS_ERROR_OPER_TIMEOUT 1
  17960. /* WMI_PDEV_FIPS_CMDID */
  17961. typedef struct {
  17962. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  17963. union {
  17964. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17965. /** pdev_id for identifying the MAC
  17966. * See macros starting with WMI_PDEV_ID_ for values.
  17967. */
  17968. A_UINT32 pdev_id;
  17969. };
  17970. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  17971. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  17972. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  17973. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  17974. A_UINT32 data_len; /* data length */
  17975. /*
  17976. * Following this structure is the TLV:
  17977. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  17978. */
  17979. } wmi_pdev_fips_cmd_fixed_param;
  17980. typedef struct {
  17981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  17982. union {
  17983. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17984. /** pdev_id for identifying the MAC
  17985. * See macros starting with WMI_PDEV_ID_ for values.
  17986. */
  17987. A_UINT32 pdev_id;
  17988. };
  17989. A_UINT32 enable; /* 1:enable, 0:disable */
  17990. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  17991. A_UINT32 rx_antenna; /* rx antenna */
  17992. A_UINT32 tx_default_antenna; /* tx default antenna */
  17993. /*
  17994. * Following this structure is the TLV:
  17995. * wmi_pdev_smart_ant_gpio_handle
  17996. */
  17997. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  17998. /** GPIO pins/function values to control antennas */
  17999. typedef struct {
  18000. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  18001. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  18002. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  18003. /** pdev_id for identifying the MAC
  18004. * See macros starting with WMI_PDEV_ID_ for values.
  18005. */
  18006. A_UINT32 pdev_id;
  18007. } wmi_pdev_smart_ant_gpio_handle;
  18008. typedef struct {
  18009. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  18010. union {
  18011. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18012. /** pdev_id for identifying the MAC
  18013. * See macros starting with WMI_PDEV_ID_ for values.
  18014. */
  18015. A_UINT32 pdev_id;
  18016. };
  18017. A_UINT32 rx_antenna;
  18018. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  18019. typedef struct {
  18020. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  18021. /** unique id identifying the vdev, generated by the caller */
  18022. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18023. /** peer MAC address */
  18024. wmi_mac_addr peer_macaddr;
  18025. /*
  18026. * Following this structure is the TLV:
  18027. * wmi_peer_smart_ant_set_tx_antenna_series
  18028. */
  18029. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  18030. typedef struct {
  18031. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  18032. /* antenna array */
  18033. A_UINT32 antenna_series;
  18034. } wmi_peer_smart_ant_set_tx_antenna_series;
  18035. typedef struct {
  18036. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  18037. /* rate array */
  18038. A_UINT32 train_rate_series;
  18039. /* antenna array */
  18040. A_UINT32 train_antenna_series;
  18041. /* Rate flags */
  18042. /* TODO: For future use? */
  18043. A_UINT32 rc_flags;
  18044. } wmi_peer_smart_ant_set_train_antenna_param;
  18045. typedef struct {
  18046. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  18047. /** unique id identifying the VDEV, generated by the caller */
  18048. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18049. /** peer MAC address */
  18050. wmi_mac_addr peer_macaddr;
  18051. /* num packets; 0-stop training */
  18052. A_UINT32 num_pkts;
  18053. /*
  18054. * Following this structure is the TLV:
  18055. * wmi_peer_smart_ant_set_train_antenna_param
  18056. */
  18057. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  18058. typedef struct {
  18059. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  18060. /** unique id identifying the vdev, generated by the caller */
  18061. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18062. /** peer MAC address */
  18063. wmi_mac_addr peer_macaddr;
  18064. /* command id*/
  18065. A_UINT32 cmd_id;
  18066. /* number of arguments passed */
  18067. A_UINT32 args_count;
  18068. /*
  18069. * Following this structure is the TLV:
  18070. * A_UINT32 args[]; <-- argument list
  18071. */
  18072. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  18073. typedef struct {
  18074. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  18075. A_UINT32 antCtrlChain;
  18076. /** pdev_id for identifying the MAC
  18077. * See macros starting with WMI_PDEV_ID_ for values.
  18078. */
  18079. A_UINT32 pdev_id;
  18080. } wmi_pdev_set_ant_ctrl_chain;
  18081. typedef struct {
  18082. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  18083. A_UINT32 mac_id; /* MAC ID */
  18084. A_UINT32 antCtrlCommon1;
  18085. A_UINT32 antCtrlCommon2;
  18086. /*
  18087. * Following this structure is the TLV:
  18088. * wmi_pdev_set_ant_ctrl_chain
  18089. */
  18090. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  18091. typedef struct {
  18092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  18093. union {
  18094. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18095. /** pdev_id for identifying the MAC
  18096. * See macros starting with WMI_PDEV_ID_ for values.
  18097. */
  18098. A_UINT32 pdev_id;
  18099. };
  18100. /** len of CTL info */
  18101. A_UINT32 ctl_len;
  18102. /* ctl array (len adjusted to number of words).
  18103. * Following this structure is the TLV:
  18104. * A_UINT32 ctl_info[1];
  18105. */
  18106. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  18107. typedef struct {
  18108. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  18109. union {
  18110. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18111. /** pdev_id for identifying the MAC
  18112. * See macros starting with WMI_PDEV_ID_ for values.
  18113. */
  18114. A_UINT32 pdev_id;
  18115. };
  18116. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  18117. /*
  18118. * Bit 7:0 len of array gain table
  18119. * Bit 8 bypass multi chain gain or not
  18120. */
  18121. /* array gain table(s) (len adjusted to number of words).
  18122. * Following this structure is the TLV:
  18123. * A_UINT32 arraygain_tbl[1];
  18124. */
  18125. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  18126. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  18127. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  18128. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  18129. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  18130. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  18131. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  18132. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  18133. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  18134. typedef struct {
  18135. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  18136. /** parameter id */
  18137. A_UINT32 param_id;
  18138. /** parameter value */
  18139. A_UINT32 param_value;
  18140. } wmi_fwtest_set_param_cmd_fixed_param;
  18141. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  18142. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  18143. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  18144. typedef struct {
  18145. /** TLV tag and len; tag equals
  18146. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  18147. A_UINT32 tlv_header;
  18148. wmi_mac_addr peer_macaddr;
  18149. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  18150. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  18151. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  18152. A_UINT32 vdev_id;
  18153. A_UINT32 pdev_id;
  18154. } wmi_atf_peer_info;
  18155. typedef struct {
  18156. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  18157. A_UINT32 num_peers;
  18158. /*
  18159. * Following this structure is the TLV:
  18160. * struct wmi_atf_peer_info peer_info[num_peers];
  18161. */
  18162. } wmi_peer_atf_request_fixed_param;
  18163. /* Structure for Bandwidth Fairness peer information */
  18164. typedef struct {
  18165. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  18166. A_UINT32 tlv_header;
  18167. wmi_mac_addr peer_macaddr;
  18168. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  18169. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  18170. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  18171. A_UINT32 vdev_id;
  18172. A_UINT32 pdev_id;
  18173. } wmi_bwf_peer_info;
  18174. /* Structure for Bandwidth Fairness peer request */
  18175. typedef struct {
  18176. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  18177. A_UINT32 num_peers;
  18178. /*
  18179. * Following this structure is the TLV:
  18180. * struct wmi_bwf_peer_info peer_info[num_peers];
  18181. */
  18182. } wmi_peer_bwf_request_fixed_param;
  18183. /* Equal distribution of ATF air time within an VDEV. */
  18184. typedef struct {
  18185. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  18186. A_UINT32 vdev_id;
  18187. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  18188. A_UINT32 pdev_id;
  18189. } wmi_vdev_atf_request_fixed_param;
  18190. typedef struct {
  18191. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  18192. /** pdev_id for identifying the MAC
  18193. * See macros starting with WMI_PDEV_ID_ for values.
  18194. */
  18195. A_UINT32 pdev_id;
  18196. /** parameter */
  18197. A_UINT32 param;
  18198. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  18199. typedef struct {
  18200. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  18201. /** pdev_id for identifying the MAC
  18202. * See macros starting with WMI_PDEV_ID_ for values.
  18203. */
  18204. A_UINT32 pdev_id;
  18205. /** parameter */
  18206. A_UINT32 param;
  18207. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  18208. typedef struct {
  18209. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  18210. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18211. A_UINT32 qb_enable;
  18212. wmi_mac_addr peer_macaddr;
  18213. } WMI_QBOOST_CFG_CMD_fixed_param;
  18214. #define WMI_INST_STATS_INVALID_RSSI 0
  18215. typedef struct {
  18216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  18217. A_UINT32 iRSSI; /* dB above the noise floor */
  18218. /* peer MAC address */
  18219. wmi_mac_addr peer_macaddr;
  18220. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18221. } wmi_inst_rssi_stats_resp_fixed_param;
  18222. typedef struct {
  18223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  18224. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  18225. } wmi_peer_cck_ofdm_rate_info;
  18226. typedef struct {
  18227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  18228. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  18229. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  18230. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  18231. } wmi_peer_mcs_rate_info;
  18232. typedef struct {
  18233. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  18234. wmi_mac_addr peer_macaddr;
  18235. A_UINT32 ratecount; /* Max Rate count for each mode */
  18236. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18237. /*
  18238. * Following this structure are the TLV:
  18239. * struct wmi_peer_cck_ofdm_rate_info;
  18240. * struct wmi_peer_mcs_rate_info;
  18241. */
  18242. } wmi_peer_ratecode_list_event_fixed_param;
  18243. typedef struct wmi_wds_addr_event {
  18244. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  18245. A_UINT32 event_type[4];
  18246. wmi_mac_addr peer_mac;
  18247. wmi_mac_addr dest_mac;
  18248. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18249. } wmi_wds_addr_event_fixed_param;
  18250. typedef struct {
  18251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  18252. wmi_mac_addr peer_macaddr;
  18253. A_UINT32 peer_ps_state;
  18254. } wmi_peer_sta_ps_statechange_event_fixed_param;
  18255. /* WMI_PDEV_FIPS_EVENTID */
  18256. typedef struct {
  18257. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  18258. union {
  18259. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18260. /** pdev_id for identifying the MAC
  18261. * See macros starting with WMI_PDEV_ID_ for values.
  18262. */
  18263. A_UINT32 pdev_id;
  18264. };
  18265. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  18266. A_UINT32 data_len; /* Data length */
  18267. /*
  18268. * Following this structure is the TLV:
  18269. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  18270. */
  18271. } wmi_pdev_fips_event_fixed_param;
  18272. typedef struct {
  18273. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  18274. union {
  18275. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18276. /** pdev_id for identifying the MAC
  18277. * See macros starting with WMI_PDEV_ID_ for values.
  18278. */
  18279. A_UINT32 pdev_id;
  18280. };
  18281. /* Noise threshold iterations with high values */
  18282. A_UINT32 noise_floor_report_iter;
  18283. /* Total noise threshold iterations */
  18284. A_UINT32 noise_floor_total_iter;
  18285. } wmi_pdev_channel_hopping_event_fixed_param;
  18286. enum {
  18287. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  18288. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  18289. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  18290. };
  18291. typedef struct {
  18292. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  18293. union {
  18294. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18295. /** pdev_id for identifying the MAC
  18296. * See macros starting with WMI_PDEV_ID_ for values.
  18297. */
  18298. A_UINT32 pdev_id;
  18299. };
  18300. A_UINT32 rate_flags;
  18301. /**
  18302. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  18303. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  18304. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  18305. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  18306. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  18307. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  18308. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  18309. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  18310. * FLAG_STBC 0x00000100 - STBC is set
  18311. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  18312. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  18313. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  18314. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  18315. * FLAG_RTSENA 0x00001000 - RTS enabled
  18316. * FLAG_CTSENA 0x00002000 - CTS enabled
  18317. * FLAG_LDPC 0x00004000 - LDPC set
  18318. * FLAG_SGI 0x00008000 - Short gaurd interval
  18319. * (0x00010000-0x00080000 unused)
  18320. *------------------
  18321. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  18322. * FLAG_SU 0x00100000 - SU Data
  18323. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  18324. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  18325. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  18326. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  18327. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  18328. *------------------
  18329. * */
  18330. A_UINT32 nss;
  18331. /**
  18332. * NSS 0x0 - 0x7
  18333. * */
  18334. A_UINT32 preamble;
  18335. /**
  18336. * PREAM_OFDM - 0x0
  18337. * PREAM_CCK - 0x1
  18338. * PREAM_HT - 0x2
  18339. * PREAM_VHT - 0x3
  18340. * PREAM_HE - 0x4
  18341. * */
  18342. A_UINT32 hw_rate;
  18343. /**
  18344. * *** HW_OFDM_RATE ***
  18345. * OFDM_48_MBPS - 0x0
  18346. * OFDM_24_MBPS - 0x1
  18347. * OFDM_12_MBPS - 0x2
  18348. * OFDM_6_MBPS - 0x3
  18349. * OFDM_54_MBPS - 0x4
  18350. * OFDM_36_MBPS - 0x5
  18351. * OFDM_18_MBPS - 0x6
  18352. * OFDM_9_MBPS - 0x7
  18353. *
  18354. * *** HW_CCK_RATE ***
  18355. * CCK_11_LONG_MBPS - 0x0
  18356. * CCK_5_5_LONG_MBPS - 0x1
  18357. * CCK_2_LONG_MBPS - 0x2
  18358. * CCK_1_LONG_MBPS - 0x3
  18359. * CCK_11_SHORT_MBPS - 0x4
  18360. * CCK_5_5_SHORT_MBPS - 0x5
  18361. * CCK_2_SHORT_MBPS - 0x6
  18362. *
  18363. * *** HW_HT / VHT_RATE ***
  18364. * MCS 0x0 - 0xb
  18365. * */
  18366. } wmi_pdev_get_tpc_cmd_fixed_param;
  18367. typedef struct {
  18368. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  18369. /** pdev_id for identifying the MAC
  18370. * See macros starting with WMI_PDEV_ID_ for values.
  18371. */
  18372. A_UINT32 pdev_id;
  18373. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  18374. typedef struct {
  18375. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  18376. /** pdev_id for identifying the MAC
  18377. * See macros starting with WMI_PDEV_ID_ for values.
  18378. */
  18379. A_UINT32 pdev_id;
  18380. /*
  18381. * Following this structure is the TLV:
  18382. * A_UINT32 tpc[2];
  18383. * tpc[0] - maximum power per rate
  18384. * tpc[1] - minimum power per rate
  18385. * Currently this event only provides max and min power limits
  18386. * for a single rate. In the future this event may be expanded
  18387. * to provide the information for multiple rates.
  18388. * At that time, the format of the data will be provided.
  18389. */
  18390. } wmi_pdev_tpc_event_fixed_param;
  18391. typedef struct {
  18392. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  18393. union {
  18394. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18395. /** pdev_id for identifying the MAC
  18396. * See macros starting with WMI_PDEV_ID_ for values.
  18397. */
  18398. A_UINT32 pdev_id;
  18399. };
  18400. A_UINT32 nfdBr_len;
  18401. A_UINT32 nfdBm_len;
  18402. A_UINT32 freqNum_len;
  18403. /*
  18404. * Following this structure is the TLV:
  18405. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  18406. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  18407. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  18408. */
  18409. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  18410. typedef struct {
  18411. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  18412. A_UINT32 nfdBr;
  18413. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  18414. typedef struct {
  18415. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  18416. A_UINT32 nfdBm;
  18417. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  18418. typedef struct {
  18419. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  18420. A_UINT32 freqNum;
  18421. } wmi_pdev_nfcal_power_all_channels_freqNum;
  18422. typedef struct {
  18423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  18424. A_UINT32 cck_level;
  18425. } wmi_ani_cck_event_fixed_param;
  18426. typedef enum wmi_power_debug_reg_fmt_type {
  18427. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  18428. * SOC_SYSTEM_SLEEP
  18429. * WLAN_SYSTEM_SLEEP
  18430. * RTC_SYNC_FORCE_WAKE
  18431. * MAC_DMA_ISR
  18432. * MAC_DMA_TXRX_ISR
  18433. * MAC_DMA_ISR_S1
  18434. * MAC_DMA_ISR_S2
  18435. * MAC_DMA_ISR_S3
  18436. * MAC_DMA_ISR_S4
  18437. * MAC_DMA_ISR_S5
  18438. * MAC_DMA_ISR_S6
  18439. * MAC_DMA_ISR_S7
  18440. */
  18441. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  18442. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  18443. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  18444. typedef struct {
  18445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  18446. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  18447. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  18448. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  18449. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  18450. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  18451. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  18452. /*
  18453. * Following this structure is the TLV:
  18454. * A_UINT32 debug_registers[num_debug_registers];
  18455. */
  18456. } wmi_pdev_chip_power_stats_event_fixed_param;
  18457. typedef enum wmi_chip_power_save_failure_reason_code_type {
  18458. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  18459. WMI_HW_POWER_SAVE_FAILURE_REASON,
  18460. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  18461. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  18462. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  18463. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  18464. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  18465. typedef struct {
  18466. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  18467. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  18468. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  18469. } wmi_chip_power_save_failure_detected_fixed_param;
  18470. typedef struct {
  18471. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  18472. A_UINT32 ofdm_level;
  18473. } wmi_ani_ofdm_event_fixed_param;
  18474. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  18475. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  18476. * lower priority when compared to WLAN high priority traffic.
  18477. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  18478. */
  18479. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  18480. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  18481. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  18482. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  18483. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  18484. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  18485. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  18486. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  18487. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  18488. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  18489. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  18490. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  18491. typedef enum wmi_coex_algo_type {
  18492. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  18493. WMI_COEX_ALGO_FREERUN = 1,
  18494. WMI_COEX_ALGO_OCS = 2,
  18495. } WMI_COEX_ALGO_TYPE;
  18496. typedef enum wmi_coex_config_type {
  18497. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  18498. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  18499. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  18500. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  18501. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  18502. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  18503. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  18504. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  18505. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  18506. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  18507. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  18508. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  18509. 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) */
  18510. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  18511. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  18512. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  18513. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  18514. arg1 PTA num,
  18515. arg2 mode (2-wire/3-wire/PTA),
  18516. arg3 first slot time in microsec,
  18517. arg4 BT priority time in microsec,
  18518. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  18519. arg6 PTA priority */
  18520. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  18521. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  18522. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  18523. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  18524. arg2-arg5: BT information parameters */
  18525. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  18526. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  18527. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  18528. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  18529. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN antenna, arg1 isolation in db*/
  18530. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
  18531. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
  18532. arg1 low - lower limit
  18533. arg2 low - upper limit
  18534. arg3 medium - lower limit
  18535. arg4 medium - upper limit
  18536. arg5 high - lower limit
  18537. arg6 high - upper limit */
  18538. } WMI_COEX_CONFIG_TYPE;
  18539. typedef struct {
  18540. A_UINT32 tlv_header;
  18541. A_UINT32 vdev_id;
  18542. A_UINT32 config_type; /* wmi_coex_config_type enum */
  18543. A_UINT32 config_arg1;
  18544. A_UINT32 config_arg2;
  18545. A_UINT32 config_arg3;
  18546. A_UINT32 config_arg4;
  18547. A_UINT32 config_arg5;
  18548. A_UINT32 config_arg6;
  18549. } WMI_COEX_CONFIG_CMD_fixed_param;
  18550. /**
  18551. * This command is sent from WLAN host driver to firmware to
  18552. * request firmware to enable/disable channel avoidance report
  18553. * to host.
  18554. *
  18555. */
  18556. enum {
  18557. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  18558. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  18559. };
  18560. typedef struct {
  18561. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  18562. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  18563. A_UINT32 rpt_allow;
  18564. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  18565. /*
  18566. * Periodic channel stats WMI command structure
  18567. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  18568. */
  18569. typedef struct {
  18570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  18571. /** 1 = enable, 0 = disable */
  18572. A_UINT32 enable;
  18573. /** periodic stats duration (units are milliseconds) */
  18574. A_UINT32 stats_period;
  18575. /** pdev_id for identifying the MAC
  18576. * See macros starting with WMI_PDEV_ID_ for values.
  18577. */
  18578. A_UINT32 pdev_id;
  18579. } wmi_set_periodic_channel_stats_config_fixed_param;
  18580. typedef struct {
  18581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  18582. /** pdev_id for identifying the MAC
  18583. * See macros starting with WMI_PDEV_ID_ for values.
  18584. */
  18585. A_UINT32 pdev_id;
  18586. /* Identify the wlan module */
  18587. A_UINT32 module_id;
  18588. /* Num of elements in the following args[] array */
  18589. A_UINT32 num_args;
  18590. /**
  18591. * Following this structure are the TLVs:
  18592. * A_UINT32 args[];
  18593. **/
  18594. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  18595. typedef struct {
  18596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  18597. /**
  18598. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  18599. * @details
  18600. * Each WMM access category (voice, video, best-effort, background)
  18601. * will have its own timeout value to dictate how long to wait for
  18602. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  18603. * have already been received.
  18604. * This parameter specifies the timeout in milliseconds for each
  18605. * access category.
  18606. * The array elements are indexed by the WMI_AC enum to identify
  18607. * which array element corresponds to which AC / traffic type.
  18608. */
  18609. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  18610. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  18611. /**
  18612. * wlan stats shall be understood as per period.
  18613. * Generally, it is reported periodically based on the period specified by host.
  18614. * But if the variation of one stats of compared to the
  18615. * pervious notification exceeds a threshold,
  18616. * FW will report the wlan stats immediately.
  18617. * The values of the stats becomes the new reference to compute variations.
  18618. * This threshold can be a global setting or per category.
  18619. * Host can enable/disable the mechanism for any stats per bitmap.
  18620. * TX/RX thresholds (percentage value) are shared across ACs,
  18621. * and TX/RX stats comprisons are processed per AC of each peer.
  18622. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  18623. * and the detailed tx_mpdus threshold value is set to 10%,
  18624. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  18625. * and it reaches 110 during the second period,
  18626. * FW will generate and send out a wlan stats event immediately.
  18627. */
  18628. typedef struct {
  18629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  18630. /** Indicate if threshold mechnism is enabled or disabled.
  18631. * It is disabled by default.
  18632. * Host can enable and disable it dynamically.
  18633. */
  18634. A_UINT32 enable_thresh;
  18635. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  18636. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  18637. */
  18638. A_UINT32 use_thresh_bitmap;
  18639. /** global threshold, valid when use_thresh_bitmap equals 0.
  18640. * It takes effect for all counters.
  18641. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  18642. */
  18643. A_UINT32 gbl_thresh;
  18644. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  18645. A_UINT32 cca_thresh_enable_bitmap;
  18646. /** Enable/disable bitmap for threshold mechanism of signal stats */
  18647. A_UINT32 signal_thresh_enable_bitmap;
  18648. /** Enable/disable bitmap for threshold mechanism of TX stats */
  18649. A_UINT32 tx_thresh_enable_bitmap;
  18650. /** Enable/disable bitmap for threshold mechanism of RX stats */
  18651. A_UINT32 rx_thresh_enable_bitmap;
  18652. /* This TLV is followed by TLVs below:
  18653. * wmi_chan_cca_stats_thresh cca_thresh;
  18654. * wmi_peer_signal_stats_thresh signal_thresh;
  18655. * wmi_tx_stats_thresh tx_thresh;
  18656. * wmi_rx_stats_thresh rx_thresh;
  18657. */
  18658. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  18659. typedef enum {
  18660. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  18661. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  18662. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  18663. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  18664. } wmi_wlan_stats_id;
  18665. typedef struct {
  18666. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  18667. wmi_wlan_stats_id stats_id;
  18668. } wmi_request_wlan_stats_cmd_fixed_param;
  18669. typedef enum {
  18670. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  18671. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  18672. } wmi_peer_stats_info_request_type;
  18673. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  18674. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  18675. */
  18676. typedef struct {
  18677. /** TLV tag and len; tag equals
  18678. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  18679. A_UINT32 tlv_header;
  18680. /** request_type to indicate if only stats of
  18681. * one peer or all peers of the VDEV are requested,
  18682. * see wmi_peer_stats_info_request_type.
  18683. */
  18684. A_UINT32 request_type;
  18685. /** VDEV identifier */
  18686. A_UINT32 vdev_id;
  18687. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  18688. wmi_mac_addr peer_macaddr;
  18689. /** flag to indicate if FW needs to reset requested peers stats */
  18690. A_UINT32 reset_after_request;
  18691. } wmi_request_peer_stats_info_cmd_fixed_param;
  18692. typedef enum {
  18693. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  18694. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  18695. } wmi_radio_chan_stats_request_type;
  18696. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  18697. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  18698. */
  18699. typedef struct {
  18700. /** TLV tag and len; tag equals
  18701. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  18702. A_UINT32 tlv_header;
  18703. /** request_type to indicate if only stats of
  18704. * one channel or all channels are requested,
  18705. * see wmi_radio_chan_stats_request_type.
  18706. */
  18707. A_UINT32 request_type;
  18708. /** Frequency of channel whose stats is requested,
  18709. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  18710. */
  18711. A_UINT32 chan_mhz;
  18712. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  18713. A_UINT32 reset_after_request;
  18714. } wmi_request_radio_chan_stats_cmd_fixed_param;
  18715. typedef struct {
  18716. /** TLV tag and len; tag equals
  18717. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  18718. A_UINT32 tlv_header;
  18719. /* VDEV identifier */
  18720. A_UINT32 vdev_id;
  18721. /* Leader's mac address */
  18722. wmi_mac_addr leader_mac_addr;
  18723. } wmi_rmc_set_leader_cmd_fixed_param;
  18724. typedef struct {
  18725. /** TLV tag and len; tag equals
  18726. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  18727. A_UINT32 tlv_header;
  18728. /* VDEV identifier */
  18729. A_UINT32 vdev_id;
  18730. /* 0: success
  18731. * 1: selected leader not found in network, able to find using auto selection
  18732. * -1: error
  18733. * non zero value should be return to userspace in case of failure */
  18734. A_INT32 status;
  18735. /* bssid of new leader */
  18736. wmi_mac_addr leader_mac_addr;
  18737. } wmi_rmc_manual_leader_event_fixed_param;
  18738. typedef enum {
  18739. WLAN_2G_CAPABILITY = 0x1,
  18740. WLAN_5G_CAPABILITY = 0x2,
  18741. } WLAN_BAND_CAPABILITY;
  18742. typedef enum wmi_hw_mode_config_type {
  18743. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  18744. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  18745. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  18746. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  18747. * Support for both PHYs within one band is planned for 5G only
  18748. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  18749. * but could be extended to other bands in the future.
  18750. * The separation of the band between the two PHYs needs to be communicated separately.
  18751. */
  18752. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  18753. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  18754. */
  18755. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  18756. } WMI_HW_MODE_CONFIG_TYPE;
  18757. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18758. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18759. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18760. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18761. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18762. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18763. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18764. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18765. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18766. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18767. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  18768. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  18769. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  18770. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  18771. typedef struct {
  18772. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  18773. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  18774. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  18775. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  18776. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  18777. * though in practice the elements may always be ordered by hw_mode_id */
  18778. A_UINT32 hw_mode_id;
  18779. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  18780. A_UINT32 pdev_id;
  18781. /* phy id. Starts with 0 */
  18782. A_UINT32 phy_id;
  18783. /* supported modulations and number of MU beamformees */
  18784. union {
  18785. struct {
  18786. A_UINT32 supports_11b:1,
  18787. supports_11g:1,
  18788. supports_11a:1,
  18789. supports_11n:1,
  18790. supports_11ac:1,
  18791. supports_11ax:1,
  18792. unused: 22,
  18793. max_mubfee: 4; /* max MU beamformees supported per MAC */
  18794. };
  18795. A_UINT32 supported_flags;
  18796. };
  18797. /* supported bands, enum WLAN_BAND_CAPABILITY */
  18798. A_UINT32 supported_bands;
  18799. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  18800. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  18801. A_UINT32 ampdu_density;
  18802. /* max bw supported 2G, enum wmi_channel_width */
  18803. A_UINT32 max_bw_supported_2G;
  18804. /* WMI HT Capability, WMI_HT_CAP defines */
  18805. A_UINT32 ht_cap_info_2G;
  18806. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18807. A_UINT32 vht_cap_info_2G;
  18808. /* VHT Supported MCS Set field Rx/Tx same
  18809. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18810. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18811. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18812. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18813. * - 3 indicates that n spatial streams is not supported */
  18814. A_UINT32 vht_supp_mcs_2G;
  18815. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18816. A_UINT32 he_cap_info_2G;
  18817. /* HE Supported MCS Set field Rx/Tx same
  18818. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18819. * bit 2-0 indicating max HE MCS of NSS1
  18820. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18821. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18822. * HE BW less than or equal to 80MHZ is encoded as follows
  18823. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18824. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  18825. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  18826. * - 3 indicates that n spatial streams is not supported
  18827. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18828. */
  18829. A_UINT32 he_supp_mcs_2G;
  18830. /* Valid Transmit chain mask */
  18831. A_UINT32 tx_chain_mask_2G;
  18832. /* Valid Receive chain mask */
  18833. A_UINT32 rx_chain_mask_2G;
  18834. /* max bw supported 5G, enum wmi_channel_width */
  18835. A_UINT32 max_bw_supported_5G;
  18836. /* WMI HT Capability, WMI_HT_CAP defines */
  18837. A_UINT32 ht_cap_info_5G;
  18838. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18839. A_UINT32 vht_cap_info_5G;
  18840. /* VHT Supported MCS Set field Rx/Tx same
  18841. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18842. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18843. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18844. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18845. * - 3 indicates that n spatial streams is not supported */
  18846. A_UINT32 vht_supp_mcs_5G;
  18847. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18848. A_UINT32 he_cap_info_5G;
  18849. /* HE Supported MCS Set field Rx/Tx same
  18850. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18851. * bit 2-0 indicating max HE MCS of NSS1
  18852. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18853. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18854. * HE BW less than or equal to 80MHZ is encoded as follows
  18855. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18856. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  18857. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  18858. * - 3 indicates that n spatial streams is not supported
  18859. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18860. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18861. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  18862. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  18863. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  18864. */
  18865. A_UINT32 he_supp_mcs_5G;
  18866. /* Valid Transmit chain mask */
  18867. A_UINT32 tx_chain_mask_5G;
  18868. /* Valid Receive chain mask */
  18869. A_UINT32 rx_chain_mask_5G;
  18870. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  18871. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  18872. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  18873. wmi_ppe_threshold he_ppet2G;
  18874. wmi_ppe_threshold he_ppet5G;
  18875. /* chainmask table to be used for the MAC */
  18876. A_UINT32 chainmask_table_id;
  18877. /* PDEV ID to LMAC ID mapping */
  18878. A_UINT32 lmac_id;
  18879. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  18880. A_UINT32 he_cap_info_2G_ext;
  18881. A_UINT32 he_cap_info_5G_ext;
  18882. } WMI_MAC_PHY_CAPABILITIES;
  18883. typedef struct {
  18884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  18885. /* hw_mode_id - identify a particular set of HW characteristics,
  18886. * as specified by the subsequent fields */
  18887. A_UINT32 hw_mode_id;
  18888. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  18889. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  18890. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  18891. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  18892. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  18893. A_UINT32 phy_id_map;
  18894. /* hw_mode_config_type
  18895. * Identify a particular type of HW mode such as SBS, DBS etc.
  18896. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  18897. */
  18898. A_UINT32 hw_mode_config_type;
  18899. } WMI_HW_MODE_CAPABILITIES;
  18900. /*
  18901. * The following macros are for the bitfields witihin the supported flags field
  18902. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  18903. * Capabilities for the chainmask
  18904. */
  18905. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18906. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18907. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18908. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18909. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18910. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18911. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18912. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18913. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18914. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18915. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  18916. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  18917. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  18918. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  18919. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  18920. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  18921. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  18922. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  18923. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  18924. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  18925. /** Definition of valid chainmask and associated capabilities */
  18926. typedef struct {
  18927. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  18928. /* supported flags: Capabilities for this chianmask*/
  18929. union {
  18930. struct {
  18931. A_UINT32 supports_chan_width_20:1,
  18932. supports_chan_width_40:1,
  18933. supports_chan_width_80:1,
  18934. supports_chan_width_160:1,
  18935. supports_chan_width_80P80:1,
  18936. reserved:22, /* bits 26:5 */
  18937. chain_mask_2G:1,
  18938. chain_mask_5G:1,
  18939. chain_mask_tx:1,
  18940. chain_mask_rx:1,
  18941. supports_aDFS:1; /* agile DFS */
  18942. };
  18943. A_UINT32 supported_flags;
  18944. };
  18945. A_UINT32 chainmask;
  18946. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  18947. typedef struct {
  18948. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  18949. A_UINT32 chainmask_table_id;
  18950. /* Number of vaild Chainmask in the table */
  18951. A_UINT32 num_valid_chainmask;
  18952. /*
  18953. * This TLV is followed by the below TLVs:
  18954. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  18955. */
  18956. } WMI_MAC_PHY_CHAINMASK_COMBO;
  18957. typedef struct {
  18958. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  18959. /* num HW modes */
  18960. A_UINT32 num_hw_modes;
  18961. /* number of unique chainmask combo tables */
  18962. A_UINT32 num_chainmask_tables;
  18963. /*
  18964. * This TLV is followed by the below TLVs:
  18965. *
  18966. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  18967. *
  18968. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  18969. *
  18970. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  18971. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  18972. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  18973. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  18974. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  18975. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  18976. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  18977. * etc.
  18978. */
  18979. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  18980. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  18981. typedef struct {
  18982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  18983. /* phy id */
  18984. A_UINT32 phy_id;
  18985. /* regdomain value specified in EEPROM */
  18986. A_UINT32 eeprom_reg_domain;
  18987. /* regdomain */
  18988. A_UINT32 eeprom_reg_domain_ext;
  18989. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  18990. A_UINT32 regcap1;
  18991. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  18992. A_UINT32 regcap2;
  18993. /* REGDMN MODE, see REGDMN_MODE_ enum */
  18994. A_UINT32 wireless_modes;
  18995. A_UINT32 low_2ghz_chan;
  18996. A_UINT32 high_2ghz_chan;
  18997. A_UINT32 low_5ghz_chan;
  18998. A_UINT32 high_5ghz_chan;
  18999. } WMI_HAL_REG_CAPABILITIES_EXT;
  19000. typedef struct {
  19001. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  19002. A_UINT32 num_phy;
  19003. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  19004. } WMI_SOC_HAL_REG_CAPABILITIES;
  19005. typedef struct {
  19006. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  19007. A_UINT32 pdev_id;
  19008. A_UINT32 min_num_ptr;
  19009. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  19010. A_UINT32 min_buf_size;
  19011. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  19012. A_UINT32 min_buf_align;
  19013. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  19014. } WMI_OEM_DMA_RING_CAPABILITIES;
  19015. typedef struct {
  19016. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  19017. /* sar version in bdf */
  19018. A_UINT32 active_version;
  19019. } WMI_SAR_CAPABILITIES;
  19020. typedef struct {
  19021. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  19022. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  19023. A_UINT32 default_adaptive_dwell_mode;
  19024. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  19025. A_UINT32 adapative_lpf_weight;
  19026. /** interval to monitor passive scan in msec */
  19027. A_UINT32 passive_monitor_interval_ms;
  19028. /** % of wifi activity to switch from passive to active 0-100 */
  19029. A_UINT32 wifi_activity_threshold_pct;
  19030. } wmi_scan_adaptive_dwell_parameters_tlv;
  19031. typedef struct {
  19032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  19033. /* globally enable/disable adaptive dwell */
  19034. A_UINT32 enable;
  19035. /** pdev_id for identifying the MAC
  19036. * See macros starting with WMI_PDEV_ID_ for values.
  19037. * In non-DBDC case host should set it to 0
  19038. */
  19039. A_UINT32 pdev_id;
  19040. /**
  19041. * followed by TLV (tag length value) parameters array
  19042. * The TLV's are:
  19043. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  19044. */
  19045. } wmi_scan_adaptive_dwell_config_fixed_param;
  19046. typedef struct {
  19047. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  19048. /** module_id **/
  19049. A_UINT32 module_id;
  19050. /** number of dbs scans */
  19051. A_UINT32 num_dbs_scans;
  19052. /** number of non-dbs scans */
  19053. A_UINT32 num_non_dbs_scans;
  19054. } wmi_scan_dbs_duty_cycle_tlv_param;
  19055. typedef struct {
  19056. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  19057. /* number of scan client dutycycle param elements */
  19058. A_UINT32 num_clients;
  19059. /** pdev_id for identifying the MAC
  19060. * See macros starting with WMI_PDEV_ID_ for values.
  19061. * In non-DBDC case host should set it to 0
  19062. */
  19063. A_UINT32 pdev_id;
  19064. /**
  19065. * followed by TLV (tag length value) parameters array
  19066. * The TLV's are:
  19067. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  19068. */
  19069. } wmi_scan_dbs_duty_cycle_fixed_param;
  19070. typedef struct {
  19071. /** TLV tag and len; tag equals
  19072. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  19073. A_UINT32 tlv_header;
  19074. /**
  19075. * temperature sensor value in celsius when to exit to lower zone,
  19076. * this value can be lower than HWM of lower zone as zone overlapping
  19077. * is permitted by design to provide hysteresis
  19078. */
  19079. A_UINT32 temp_lwm;
  19080. /**
  19081. * temperature sensor value in celsius when to exit to higher zone,
  19082. * this value can be higher than LWM of higher zone as zone overlapping
  19083. * is permitted by design to provide hysteresis
  19084. */
  19085. A_UINT32 temp_hwm;
  19086. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  19087. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  19088. * Prioritization:
  19089. * 0 = disable all data tx queues, No Prioritization defined
  19090. * 1 = disable BK tx queue
  19091. * 2 = disable BK+BE tx queues
  19092. * 3 = disable BK+BE+VI tx queues
  19093. */
  19094. A_UINT32 prio;
  19095. } wmi_therm_throt_level_config_info;
  19096. typedef struct {
  19097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  19098. A_UINT32 pdev_id; /* config for each pdev */
  19099. A_UINT32 enable; /* 0:disable, 1:enable */
  19100. A_UINT32 dc; /* duty cycle in ms */
  19101. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  19102. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  19103. /*
  19104. * Following this structure is the TLV:
  19105. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  19106. */
  19107. } wmi_therm_throt_config_request_fixed_param;
  19108. /** FW response with the stats event id for every pdev and zones */
  19109. typedef struct {
  19110. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  19111. A_UINT32 tlv_header;
  19112. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  19113. A_UINT32 temp; /* Temperature reading in celsius */
  19114. A_UINT32 level; /* current thermal throttling level */
  19115. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  19116. /* This TLV is followed by another TLV of array of structs
  19117. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  19118. */
  19119. } wmi_therm_throt_stats_event_fixed_param;
  19120. typedef struct {
  19121. /** TLV tag and len; tag equals
  19122. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  19123. A_UINT32 tlv_header;
  19124. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  19125. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  19126. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  19127. } wmi_therm_throt_level_stats_info;
  19128. typedef enum {
  19129. WMI_REG_EXT_FCC_MIDBAND = 0,
  19130. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  19131. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  19132. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  19133. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  19134. WMI_REG_EXT_FCC_CH_144 = 5,
  19135. } WMI_REG_EXT_BITMAP;
  19136. #ifdef WMI_CMD_STRINGS
  19137. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  19138. {
  19139. switch (wmi_command) {
  19140. /* initialize the wlan sub system */
  19141. WMI_RETURN_STRING(WMI_INIT_CMDID);
  19142. /* Scan specific commands */
  19143. /* start scan request to FW */
  19144. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  19145. /* stop scan request to FW */
  19146. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  19147. /* full list of channels as defined by the regulatory
  19148. * that will be used by scanner */
  19149. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  19150. /* overwrite default priority table in scan scheduler */
  19151. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  19152. /* This command to adjust the priority and min.max_rest_time
  19153. * of an on ongoing scan request.
  19154. */
  19155. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  19156. /* PDEV(physical device) specific commands */
  19157. /* set regulatorty ctl id used by FW to determine the exact
  19158. * ctl power limits */
  19159. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  19160. /* set channel. mainly used for supporting monitor mode */
  19161. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  19162. /* set pdev specific parameters */
  19163. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  19164. /* enable packet log */
  19165. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  19166. /* disable packet log*/
  19167. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  19168. /* set wmm parameters */
  19169. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  19170. /* set HT cap ie that needs to be carried probe requests
  19171. * HT/VHT channels */
  19172. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  19173. /* set VHT cap ie that needs to be carried on probe
  19174. * requests on VHT channels */
  19175. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  19176. /* Command to send the DSCP-to-TID map to the target */
  19177. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  19178. /* set quiet ie parameters. primarily used in AP mode */
  19179. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  19180. /* Enable/Disable Green AP Power Save */
  19181. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  19182. /* get TPC config for the current operating channel */
  19183. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  19184. /* set the base MAC address for the physical device before
  19185. * a VDEV is created. For firmware that does not support
  19186. * this feature and this command, the pdev MAC address will
  19187. * not be changed. */
  19188. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  19189. /* eeprom content dump , the same to bdboard data */
  19190. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  19191. /* VDEV(virtual device) specific commands */
  19192. /* vdev create */
  19193. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  19194. /* vdev delete */
  19195. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  19196. /* vdev start request */
  19197. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  19198. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  19199. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  19200. /* vdev up request */
  19201. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  19202. /* vdev stop request */
  19203. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  19204. /* vdev down request */
  19205. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  19206. /* set a vdev param */
  19207. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  19208. /* set a key (used for setting per peer unicast
  19209. * and per vdev multicast) */
  19210. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  19211. /* wnm sleep mode command */
  19212. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  19213. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  19214. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  19215. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  19216. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  19217. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  19218. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  19219. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  19220. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  19221. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  19222. /* peer specific commands */
  19223. /** create a peer */
  19224. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  19225. /** delete a peer */
  19226. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  19227. /** flush specific tid queues of a peer */
  19228. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  19229. /** set a parameter of a peer */
  19230. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  19231. /* set peer to associated state. will cary all parameters
  19232. * determined during assocication time */
  19233. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  19234. /* add a wds (4 address ) entry. used only for testing
  19235. * WDS feature on AP products */
  19236. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  19237. /* remove wds (4 address ) entry. used only for testing WDS
  19238. * feature on AP products */
  19239. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  19240. /* set up mcast info for multicast to unicast conversion */
  19241. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  19242. /* request peer info from FW to get PEER_INFO_EVENTID */
  19243. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  19244. /* beacon/management specific commands */
  19245. /* transmit beacon by reference. used for transmitting beacon
  19246. * on low latency interface like pcie */
  19247. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  19248. /* transmit beacon by value */
  19249. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  19250. /* set the beacon template. used in beacon offload mode to setup
  19251. * the common beacon template with the FW to be used by FW to
  19252. * generate beacons */
  19253. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  19254. /* set beacon filter with FW */
  19255. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  19256. /* enable/disable filtering of probe requests in the firmware */
  19257. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  19258. /* transmit management frame by value. will be deprecated */
  19259. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  19260. /* set the probe response template. used in beacon offload mode
  19261. * to setup the common probe response template with the FW to
  19262. * be used by FW to generate probe responses */
  19263. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  19264. /* commands to directly control ba negotiation directly from
  19265. * host. only used in test mode */
  19266. /* turn off FW Auto addba mode and let host control addba */
  19267. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  19268. /* send add ba request */
  19269. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  19270. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  19271. /* send del ba */
  19272. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  19273. /* set add ba response will be used by FW to generate
  19274. * addba response*/
  19275. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  19276. /* send single VHT MPDU with AMSDU */
  19277. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  19278. /* Station power save specific config */
  19279. /* enable/disable station powersave */
  19280. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  19281. /* set station power save specific parameter */
  19282. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  19283. /* set station mimo powersave mode */
  19284. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  19285. /* DFS-specific commands */
  19286. /* enable DFS (radar detection)*/
  19287. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  19288. /* disable DFS (radar detection)*/
  19289. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  19290. /* enable DFS phyerr/parse filter offload */
  19291. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  19292. /* enable DFS phyerr/parse filter offload */
  19293. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  19294. /* Roaming specific commands */
  19295. /* set roam scan mode */
  19296. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  19297. /* set roam scan rssi threshold below which roam
  19298. * scan is enabled */
  19299. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  19300. /* set roam scan period for periodic roam scan mode */
  19301. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  19302. /* set roam scan trigger rssi change threshold */
  19303. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  19304. /* set roam AP profile */
  19305. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  19306. /* set channel list for roam scans */
  19307. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  19308. /* offload scan specific commands */
  19309. /* set offload scan AP profile */
  19310. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  19311. /* remove offload scan AP profile */
  19312. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  19313. /* set offload scan period */
  19314. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  19315. /* P2P specific commands */
  19316. /* set P2P device info. FW will used by FW to create P2P IE
  19317. * to be carried in probe response generated during p2p listen
  19318. * and for p2p discoverability */
  19319. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  19320. /* enable/disable p2p discoverability on STA/AP VDEVs */
  19321. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  19322. /* set p2p ie to be carried in beacons generated by FW for GO */
  19323. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  19324. /* set p2p ie to be carried in probe response frames generated
  19325. * by FW for GO */
  19326. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  19327. /* set the vendor specific p2p ie data.
  19328. * FW will use this to parse the P2P NoA
  19329. * attribute in the beacons/probe responses received.
  19330. */
  19331. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  19332. /* set the configure of p2p find offload */
  19333. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  19334. /* set the vendor specific p2p ie data for p2p find offload */
  19335. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  19336. /* set the BSSID/device name pattern of p2p find offload */
  19337. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  19338. /* set OppPS related parameters **/
  19339. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  19340. /* AP power save specific config
  19341. * set AP power save specific param */
  19342. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  19343. /* set AP UAPSD coex pecific param */
  19344. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  19345. /* Rate-control specific commands */
  19346. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  19347. /* WLAN Profiling commands. */
  19348. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  19349. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  19350. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  19351. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  19352. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  19353. /* Suspend resume command Ids */
  19354. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  19355. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  19356. /* Beacon filter commands */
  19357. /* add a beacon filter */
  19358. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  19359. /* remove a beacon filter */
  19360. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  19361. /* WOW Specific WMI commands */
  19362. /* add pattern for awake */
  19363. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  19364. /* deleta a wake pattern */
  19365. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  19366. /* enable/deisable wake event */
  19367. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  19368. /* enable WOW */
  19369. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  19370. /* host woke up from sleep event to FW. Generated in response
  19371. * to WOW Hardware event */
  19372. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  19373. /* RTT measurement related cmd */
  19374. /* reques to make an RTT measurement */
  19375. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  19376. /* reques to report a tsf measurement */
  19377. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  19378. /* spectral scan command */
  19379. /* configure spectral scan */
  19380. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  19381. /* enable/disable spectral scan and trigger */
  19382. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  19383. /* F/W stats */
  19384. /* one time request for stats */
  19385. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  19386. /* Push MCC Adaptive Scheduler Stats to Firmware */
  19387. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  19388. /* ARP OFFLOAD REQUEST*/
  19389. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  19390. /* Proactive ARP Response Add Pattern Command*/
  19391. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  19392. /* Proactive ARP Response Del Pattern Command*/
  19393. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  19394. /* NS offload confid*/
  19395. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  19396. /* GTK offload Specific WMI commands */
  19397. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  19398. /* CSA offload Specific WMI commands */
  19399. /* csa offload enable */
  19400. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  19401. /* chan switch command */
  19402. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  19403. /* Chatter commands */
  19404. /* Change chatter mode of operation */
  19405. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  19406. /* chatter add coalescing filter command */
  19407. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  19408. /* chatter delete coalescing filter command */
  19409. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  19410. /* chatter coalecing query command */
  19411. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  19412. /* addba specific commands */
  19413. /* start the aggregation on this TID */
  19414. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  19415. /* stop the aggregation on this TID */
  19416. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  19417. /* set station mimo powersave method */
  19418. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  19419. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  19420. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  19421. /* Configure the Keep Alive Parameters */
  19422. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  19423. /* Request ssn from target for a sta/tid pair */
  19424. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  19425. /* misc command group */
  19426. /* echo command mainly used for testing */
  19427. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  19428. /* !!IMPORTANT!!
  19429. * If you need to add a new WMI command to the
  19430. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  19431. * please make sure you add it BEHIND
  19432. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  19433. * as we MUST have a fixed value here to maintain compatibility between
  19434. * UTF and the ART2 driver
  19435. */
  19436. /* UTF WMI commands */
  19437. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  19438. /* set debug log config */
  19439. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  19440. /* QVIT specific command id */
  19441. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  19442. /* Factory Testing Mode request command
  19443. * used for integrated chipsets */
  19444. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  19445. /* set and get keepalive parameters command */
  19446. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  19447. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  19448. /* For fw recovery test command */
  19449. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  19450. /* Set Mcast/Bdcast filter */
  19451. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  19452. /* set thermal management params */
  19453. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  19454. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  19455. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  19456. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  19457. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  19458. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  19459. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  19460. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  19461. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  19462. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  19463. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  19464. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  19465. /* GPIO Configuration */
  19466. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  19467. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  19468. /* Txbf configuration command */
  19469. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  19470. /* FWTEST Commands */
  19471. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  19472. /* set NoA descs */
  19473. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  19474. /* TDLS Configuration */
  19475. /* enable/disable TDLS */
  19476. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  19477. /* set tdls peer state */
  19478. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  19479. /* Resmgr Configuration */
  19480. /* Adaptive OCS is enabled by default in the FW.
  19481. * This command is used to disable FW based adaptive OCS.
  19482. */
  19483. WMI_RETURN_STRING
  19484. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  19485. /* set the requested channel time quota for the home channels */
  19486. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  19487. /* set the requested latency for the home channels */
  19488. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  19489. /* STA SMPS Configuration */
  19490. /* force SMPS mode */
  19491. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  19492. /* set SMPS parameters */
  19493. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  19494. /* Wlan HB commands */
  19495. /* enalbe/disable wlan HB */
  19496. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  19497. /* set tcp parameters for wlan HB */
  19498. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  19499. /* set tcp pkt filter for wlan HB */
  19500. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  19501. /* set udp parameters for wlan HB */
  19502. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  19503. /* set udp pkt filter for wlan HB */
  19504. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  19505. /* Wlan RMC commands*/
  19506. /* enable/disable RMC */
  19507. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  19508. /* configure action frame period */
  19509. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  19510. /* For debug/future enhancement purposes only,
  19511. * configures/finetunes RMC algorithms */
  19512. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  19513. /* WLAN MHF offload commands */
  19514. /* enable/disable MHF offload */
  19515. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  19516. /* Plumb routing table for MHF offload */
  19517. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  19518. /* location scan commands */
  19519. /* start batch scan */
  19520. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  19521. /* stop batch scan */
  19522. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  19523. /* get batch scan result */
  19524. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  19525. /* OEM related cmd */
  19526. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  19527. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  19528. /* NAN request cmd */
  19529. WMI_RETURN_STRING(WMI_NAN_CMDID);
  19530. /* Modem power state cmd */
  19531. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  19532. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  19533. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  19534. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  19535. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  19536. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  19537. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  19538. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  19539. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  19540. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  19541. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  19542. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  19543. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  19544. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  19545. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  19546. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  19547. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  19548. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  19549. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  19550. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  19551. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  19552. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  19553. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  19554. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  19555. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  19556. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  19557. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  19558. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  19559. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  19560. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  19561. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  19562. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  19563. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  19564. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  19565. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  19566. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  19567. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  19568. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  19569. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  19570. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  19571. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  19572. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  19573. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  19574. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  19575. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  19576. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  19577. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  19578. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  19579. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  19580. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  19581. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  19582. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  19583. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  19584. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  19585. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  19586. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  19587. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  19588. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  19589. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  19590. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  19591. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  19592. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  19593. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  19594. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  19595. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  19596. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  19597. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  19598. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  19599. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  19600. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  19601. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  19602. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  19603. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  19604. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  19605. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  19606. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  19607. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  19608. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  19609. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  19610. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  19611. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  19612. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  19613. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  19614. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  19615. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  19616. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  19617. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  19618. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  19619. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  19620. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  19621. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  19622. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  19623. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  19624. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  19625. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  19626. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  19627. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  19628. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  19629. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  19630. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  19631. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  19632. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  19633. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  19634. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  19635. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  19636. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  19637. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  19638. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  19639. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  19640. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  19641. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  19642. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  19643. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  19644. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  19645. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  19646. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  19647. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  19648. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  19649. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  19650. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  19651. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  19652. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  19653. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  19654. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  19655. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  19656. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  19657. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  19658. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  19659. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  19660. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  19661. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  19662. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  19663. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  19664. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  19665. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  19666. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  19667. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  19668. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  19669. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  19670. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  19671. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  19672. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  19673. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  19674. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  19675. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  19676. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  19677. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  19678. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  19679. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  19680. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  19681. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  19682. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  19683. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  19684. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  19685. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  19686. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  19687. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  19688. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  19689. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  19690. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  19691. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  19692. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  19693. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  19694. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  19695. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  19696. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  19697. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  19698. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  19699. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  19700. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  19701. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  19702. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  19703. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  19704. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  19705. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  19706. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  19707. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  19708. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  19709. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  19710. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  19711. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  19712. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  19713. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  19714. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  19715. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  19716. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  19717. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  19718. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  19719. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  19720. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  19721. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  19722. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  19723. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  19724. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  19725. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  19726. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  19727. }
  19728. return "Invalid WMI cmd";
  19729. }
  19730. #endif /* WMI_CMD_STRINGS */
  19731. /** WMI commands/events for the regulatory offload */
  19732. /** Host indicating current country code to FW */
  19733. typedef struct {
  19734. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  19735. A_UINT32 pdev_id;
  19736. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19737. } wmi_set_current_country_cmd_fixed_param;
  19738. typedef enum {
  19739. WMI_COUNTRYCODE_ALPHA2,
  19740. WMI_COUNTRYCODE_COUNTRY_ID,
  19741. WMI_COUNTRYCODE_DOMAIN_CODE,
  19742. } WMI_COUNTRYCODE_TYPE;
  19743. typedef struct {
  19744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  19745. A_UINT32 pdev_id;
  19746. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  19747. union {
  19748. struct {
  19749. /* Three character for alpha2. The first two is ISO name for country the last one
  19750. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  19751. A_UINT32 alpha2:24,
  19752. unused:8;
  19753. };
  19754. A_UINT32 country_id; /* Country ID */
  19755. A_UINT32 domain_code; /* Domain code */
  19756. } country_code;
  19757. } wmi_set_init_country_cmd_fixed_param;
  19758. /* Freq units in MHz */
  19759. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  19760. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  19761. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  19762. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  19763. /* BW in MHz */
  19764. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  19765. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  19766. /* regpower in dBm */
  19767. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  19768. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  19769. /* antenna gain */
  19770. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  19771. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  19772. typedef enum {
  19773. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  19774. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  19775. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  19776. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  19777. } WMI_REGULATORY_FLAGS;
  19778. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  19779. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  19780. typedef struct {
  19781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  19782. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  19783. * bits 31:16 = u16 end_freq
  19784. * (both in MHz units) */
  19785. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  19786. bits 23:16 = u8 reg_power (dBm units),
  19787. bits 31:24 = u8 ant_gain (dB units) */
  19788. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  19789. bits 31:16 reserved */
  19790. } wmi_regulatory_rule_struct;
  19791. typedef enum {
  19792. WMI_REG_DFS_UNINIT_REGION = 0,
  19793. WMI_REG_DFS_FCC_REGION = 1,
  19794. WMI_REG_DFS_ETSI_REGION = 2,
  19795. WMI_REG_DFS_MKK_REGION = 3,
  19796. WMI_REG_DFS_CN_REGION = 4,
  19797. WMI_REG_DFS_KR_REGION = 5,
  19798. /* Add new items above */
  19799. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  19800. } WMI_REG_DFS_REGION;
  19801. typedef enum {
  19802. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  19803. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  19804. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  19805. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  19806. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  19807. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  19808. } WMI_REGULATORY_PHYBITMAP;
  19809. typedef enum {
  19810. WMI_REG_SET_CC_STATUS_PASS = 0,
  19811. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  19812. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  19813. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  19814. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  19815. WMI_REG_SET_CC_STATUS_FAIL = 5,
  19816. } WMI_REG_SET_CC_STATUS_CODE;
  19817. typedef struct {
  19818. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  19819. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  19820. A_UINT32 phy_id;
  19821. A_UINT32 alpha2;
  19822. A_UINT32 num_phy;
  19823. A_UINT32 country_id;
  19824. A_UINT32 domain_code;
  19825. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  19826. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  19827. A_UINT32 min_bw_2g; /* BW in MHz */
  19828. A_UINT32 max_bw_2g; /* BW in MHz */
  19829. A_UINT32 min_bw_5g; /* BW in MHz */
  19830. A_UINT32 max_bw_5g; /* BW in MHz */
  19831. A_UINT32 num_2g_reg_rules;
  19832. A_UINT32 num_5g_reg_rules;
  19833. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  19834. } wmi_reg_chan_list_cc_event_fixed_param;
  19835. typedef struct {
  19836. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  19837. A_UINT32 vdev_id;
  19838. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  19839. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  19840. } wmi_11d_scan_start_cmd_fixed_param;
  19841. typedef struct {
  19842. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  19843. A_UINT32 vdev_id;
  19844. } wmi_11d_scan_stop_cmd_fixed_param;
  19845. /** FW indicating new current country code to Host */
  19846. typedef struct {
  19847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  19848. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19849. } wmi_11d_new_country_event_fixed_param;
  19850. typedef struct {
  19851. /** TLV tag and len; tag equals
  19852. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  19853. A_UINT32 tlv_header;
  19854. /* Currently there are no parameters for this message. */
  19855. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  19856. typedef struct {
  19857. /** TLV tag and len; tag equals
  19858. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  19859. A_UINT32 tlv_header;
  19860. /** pdev_id for identifying the MAC
  19861. * See macros starting with WMI_PDEV_ID_ for values.
  19862. */
  19863. A_UINT32 pdev_id;
  19864. } wmi_pdev_get_nfcal_power_fixed_param;
  19865. typedef struct {
  19866. /** TLV tag and len; tag equals
  19867. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  19868. A_UINT32 tlv_header;
  19869. /** 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.
  19870. * Currently the HW descriptor only supports 4 chains at most.
  19871. * Further isolation_chainX elements can be added in the future
  19872. * for additional chains, if needed.
  19873. */
  19874. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  19875. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  19876. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  19877. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  19878. } wmi_coex_report_isolation_event_fixed_param;
  19879. typedef enum {
  19880. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  19881. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  19882. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  19883. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  19884. } wmi_rcpi_measurement_type;
  19885. typedef struct {
  19886. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  19887. A_UINT32 tlv_header;
  19888. /* VDEV identifier */
  19889. A_UINT32 vdev_id;
  19890. /* peer MAC address */
  19891. wmi_mac_addr peer_macaddr;
  19892. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19893. A_UINT32 measurement_type;
  19894. } wmi_request_rcpi_cmd_fixed_param;
  19895. typedef struct {
  19896. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  19897. A_UINT32 tlv_header;
  19898. /* VDEV identifier */
  19899. A_UINT32 vdev_id;
  19900. /* peer MAC address */
  19901. wmi_mac_addr peer_macaddr;
  19902. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19903. A_UINT32 measurement_type;
  19904. /* Measured RCPI in dBm of the peer requested by host */
  19905. A_INT32 rcpi;
  19906. /** status
  19907. * 0 - Requested peer RCPI available
  19908. * 1 - Requested peer RCPI not available
  19909. */
  19910. A_UINT32 status;
  19911. } wmi_update_rcpi_event_fixed_param;
  19912. /* Definition of mask for various package id */
  19913. #define WMI_PKGID_MASK_AUTO 0x00000080
  19914. typedef struct {
  19915. /** TLV tag and len; tag equals*/
  19916. A_UINT32 tlv_header;
  19917. /**
  19918. * The value field is filled with WMI_PKGID_MASK values.
  19919. * Currently, the only flag used within values is
  19920. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  19921. */
  19922. A_UINT32 value;
  19923. } wmi_pkgid_event_fixed_param;
  19924. typedef struct {
  19925. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  19926. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  19927. /* enable is set to 1 if mac randomization to be enabled */
  19928. A_UINT32 enable;
  19929. /* randomization mac address if randomization is enabled */
  19930. wmi_mac_addr mac_addr;
  19931. /* To get the PMAC from freq param */
  19932. A_UINT32 freq; /* units in MHz */
  19933. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  19934. typedef struct {
  19935. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  19936. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  19937. A_UINT32 status; /* status is 1 if success and 0 if failed */
  19938. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  19939. /* Definition of HW data filtering */
  19940. typedef enum {
  19941. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  19942. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  19943. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  19944. typedef struct {
  19945. A_UINT32 tlv_header;
  19946. A_UINT32 vdev_id;
  19947. A_UINT32 enable; /* 1 . enable, 0- disable */
  19948. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  19949. } wmi_hw_data_filter_cmd_fixed_param;
  19950. /* This command is used whenever host wants to restart multiple
  19951. * VDEVs using single command and the VDEV that are restarted will
  19952. * need to have same properties they had before restart except for the
  19953. * operating channel
  19954. */
  19955. typedef struct {
  19956. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  19957. /** pdev_id for identifying the MAC
  19958. * See macros starting with WMI_PDEV_ID_ for values.
  19959. * In non-DBDC case host should set it to 0
  19960. */
  19961. A_UINT32 pdev_id;
  19962. /** unique id identifying the module, generated by the caller */
  19963. A_UINT32 requestor_id;
  19964. /** Disable H/W ack.
  19965. * During CAC, Our HW shouldn't ack directed frames
  19966. */
  19967. A_UINT32 disable_hw_ack;
  19968. /* Determine the duration of CAC on the given channel 'chan' */
  19969. A_UINT32 cac_duration_ms;
  19970. A_UINT32 num_vdevs;
  19971. /* The TLVs follows this structure:
  19972. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19973. * wmi_channel chan; <------ WMI channel
  19974. */
  19975. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  19976. typedef struct {
  19977. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  19978. A_UINT32 tlv_header;
  19979. /** pdev_id for identifying the MAC
  19980. * See macros starting with WMI_PDEV_ID_ for values.
  19981. * In non-DBDC case host should set it to 0
  19982. */
  19983. A_UINT32 pdev_id;
  19984. /** CSA switch count value in the last transmitted beacon */
  19985. A_UINT32 current_switch_count;
  19986. A_UINT32 num_vdevs;
  19987. /* The TLVs follows this structure:
  19988. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19989. */
  19990. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  19991. /* Operation types for packet routing command */
  19992. typedef enum {
  19993. WMI_PDEV_ADD_PKT_ROUTING,
  19994. WMI_PDEV_DEL_PKT_ROUTING,
  19995. } wmi_pdev_pkt_routing_op_code;
  19996. /* Packet routing types based on specific data types */
  19997. typedef enum {
  19998. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  19999. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  20000. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  20001. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  20002. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  20003. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  20004. } wmi_pdev_pkt_routing_type;
  20005. /* 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 */
  20006. typedef struct {
  20007. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  20008. A_UINT32 tlv_header;
  20009. /** Identifies pdev on which routing needs to be applied */
  20010. A_UINT32 pdev_id;
  20011. /** Indicates the routing operation type: add/delete */
  20012. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  20013. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  20014. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  20015. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  20016. * packet needs to be routed.
  20017. */
  20018. A_UINT32 dest_ring;
  20019. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  20020. * CCE copies this back in RX_MSDU_END_TLV.
  20021. */
  20022. A_UINT32 meta_data;
  20023. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  20024. typedef enum {
  20025. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  20026. WMI_CALIBRATION_OK, /* The calibration status is OK */
  20027. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  20028. } WMI_CALIBRATION_STATUS;
  20029. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  20030. /**
  20031. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  20032. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  20033. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  20034. * null-terminator
  20035. */
  20036. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  20037. typedef struct {
  20038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  20039. A_UINT32 software_cal_version; /* Current software level calibration data version */
  20040. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  20041. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  20042. /* board_mcn_detail:
  20043. * Provides board's MCN (Material Control Number) information for the host
  20044. * to display. This is used to track the Hardware level revisions/versions.
  20045. * This array carries the ASCII values of the MCN to the host. And host
  20046. * would just print this in a string format whenever user requests.
  20047. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  20048. * of a WMI message will be automatically byteswapped by the copy engine
  20049. * as the messages are transferred between host and target, to convert
  20050. * between the target's little-endianness and the host's big-endianness.
  20051. * Consequently, a big-endian host will have to manually unswap the bytes
  20052. * within the board_mcn_detail string buffer to get the bytes back into
  20053. * the desired natural order.
  20054. */
  20055. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  20056. /** pdev_id for identifying the MAC
  20057. * See macros starting with WMI_PDEV_ID_ for values.
  20058. */
  20059. A_UINT32 pdev_id;
  20060. } wmi_pdev_check_cal_version_event_fixed_param;
  20061. typedef struct {
  20062. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  20063. /** pdev_id for identifying the MAC
  20064. * See macros starting with WMI_PDEV_ID_ for values.
  20065. */
  20066. A_UINT32 pdev_id;
  20067. } wmi_pdev_check_cal_version_cmd_fixed_param;
  20068. typedef struct {
  20069. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  20070. /** Identifies pdev on which diversity gain to be applied */
  20071. A_UINT32 pdev_id;
  20072. /** The number of spatial stream */
  20073. A_UINT32 nss;
  20074. /** The number of gains */
  20075. A_UINT32 num_gains;
  20076. /*
  20077. * This fixed_param TLV is followed by other TLVs:
  20078. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  20079. */
  20080. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  20081. /* flags for unit_test_event */
  20082. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  20083. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  20084. /* from bit 2 to bit 31 are reserved */
  20085. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  20086. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  20087. } while (0)
  20088. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  20089. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  20090. } while (0)
  20091. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  20092. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  20093. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  20094. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  20095. } while (0)
  20096. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  20097. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  20098. } while (0)
  20099. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  20100. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  20101. typedef struct {
  20102. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  20103. A_UINT32 tlv_header;
  20104. /* unique id identifying the VDEV, generated by the caller */
  20105. A_UINT32 vdev_id;
  20106. /* Identify the wlan module */
  20107. A_UINT32 module_id;
  20108. /* unique id identifying the unit test cmd, generated by the caller */
  20109. A_UINT32 diag_token;
  20110. /* flag for the status of the unit_test_cmd */
  20111. A_UINT32 flag;
  20112. /* data length number of bytes for current dump */
  20113. A_UINT32 payload_len;
  20114. /* TLV/Payload after this structure is sent in little endian
  20115. * format for the length mentioned in this structure.
  20116. * A_UINT8 payload[1];
  20117. */
  20118. } wmi_unit_test_event_fixed_param;
  20119. /* Definition of latency levels */
  20120. typedef enum {
  20121. WMI_WLM_LL_NORMAL = 0x0,
  20122. WMI_WLM_LL_MODERATE = 0x1,
  20123. WMI_WLM_LL_LOW = 0x2,
  20124. WMI_WLM_LL_ULTRA_LOW = 0x3,
  20125. } WMI_WLM_LATENCY_LEVEL;
  20126. /*
  20127. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  20128. *
  20129. * |31 17|16 14| 13 | 12 | 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  20130. * +------+-----+----+----+------+------+------+------+------+------+-----+-----+
  20131. * | RSVD | NSS |EDCA| TRY| SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  20132. * +----------------------+-------------+-------------+-------------------------+
  20133. * | WAL | PS | Roam | Scan |
  20134. *
  20135. * Flag values:
  20136. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  20137. * based on the traffic's latency level
  20138. * (0) default tx retry behavior
  20139. * EDCA: (1) Apply VO parameters on BE
  20140. * (0) default behavior
  20141. * NSS: (0) no Nss limits, other than those negotiatied during association
  20142. * (1) during 2-chain operation, tx only a single spatial stream
  20143. * (2) - (7) reserved / invalid
  20144. */
  20145. /* bit 0-3 of flags is used for scan operation */
  20146. /* bit 0: WLM_FLAGS_SCAN_SUPPRESS, suppress all scan and other bits would be ignored if bit is set */
  20147. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  20148. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  20149. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  20150. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  20151. (b2 b3)
  20152. (0 0 ): Default dwell time
  20153. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  20154. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  20155. overall scan duration.
  20156. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  20157. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  20158. the accuracy of scan result.
  20159. (1 1 ): reserved
  20160. */
  20161. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  20162. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  20163. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  20164. /* bit 4-5: reserved for scan */
  20165. /* bit 6-7 of flags is used for roaming operation */
  20166. /* bit 6-7: define roaming policy:
  20167. (b6 b7)
  20168. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  20169. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  20170. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  20171. (1 1 ): reserved
  20172. */
  20173. #define WLM_FLAGS_ROAM_ALLOW 0
  20174. #define WLM_FLAGS_ROAM_SUPPRESS 1
  20175. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  20176. /* bit 8: reserved for roaming */
  20177. /* bit 9-11 of flags is used for powersave operation */
  20178. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  20179. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  20180. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  20181. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  20182. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  20183. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  20184. /* bit 17-31 of flags is reserved for powersave and WAL */
  20185. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  20186. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  20187. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  20188. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  20189. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  20190. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  20191. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  20192. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  20193. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  20194. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  20195. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  20196. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  20197. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  20198. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  20199. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  20200. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  20201. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  20202. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  20203. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  20204. typedef struct {
  20205. /** TLV tag and len; tag equals
  20206. * WMI_WLM_CONFIG_CMD_fixed_param */
  20207. A_UINT32 tlv_header;
  20208. /* VDEV identifier */
  20209. A_UINT32 vdev_id;
  20210. /* Refer to WMI_WLM_LATENCY_LEVEL
  20211. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  20212. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  20213. * operation to support lower latency of WLAN.
  20214. */
  20215. A_UINT32 latency_level;
  20216. /* represent uplink latency in ms
  20217. * This parameter will be used by STAPS module to decide timing parameters, like
  20218. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  20219. * durations.
  20220. */
  20221. A_UINT32 ul_latency;
  20222. /* represent downlink latency in ms
  20223. * Similar usage as ul_latency
  20224. */
  20225. A_UINT32 dl_latency;
  20226. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  20227. A_UINT32 flags;
  20228. } wmi_wlm_config_cmd_fixed_param;
  20229. typedef struct {
  20230. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  20231. /** 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
  20232. */
  20233. A_UINT32 pdev_id;
  20234. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  20235. A_UINT32 mbss_support; /* Flag indicating if AP TWT feature supported in MBSS mode or not */
  20236. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  20237. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  20238. /*
  20239. * The congestion parameters below are in percent of occupied airtime.
  20240. */
  20241. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  20242. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  20243. /*
  20244. * The interference parameters below use an abstract method of evaluating
  20245. * interference. The parameters are in percent, ranging from 0 for no
  20246. * interference, to 100 for interference extreme enough to completely
  20247. * block the signal of interest.
  20248. */
  20249. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  20250. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  20251. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  20252. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  20253. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  20254. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  20255. 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) */
  20256. /*
  20257. * The below interval parameters have units of milliseconds.
  20258. */
  20259. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  20260. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  20261. A_UINT32 remove_sta_slot_interval; /* Inrerval between decisions making to remove TWT slot of STAs */
  20262. } wmi_twt_enable_cmd_fixed_param;
  20263. /* status code of enabling TWT */
  20264. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  20265. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  20266. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  20267. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  20268. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  20269. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  20270. } WMI_ENABLE_TWT_STATUS_T;
  20271. typedef struct {
  20272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  20273. /** 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 */
  20274. A_UINT32 pdev_id;
  20275. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  20276. } wmi_twt_enable_complete_event_fixed_param;
  20277. typedef struct {
  20278. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  20279. /** 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 */
  20280. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  20281. } wmi_twt_disable_cmd_fixed_param;
  20282. typedef struct {
  20283. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  20284. A_UINT32 reserved0; /* unused right now */
  20285. } wmi_twt_disable_complete_event_fixed_param;
  20286. /* from IEEE 802.11ah section 9.4.2.200 */
  20287. typedef enum _WMI_TWT_COMMAND_T {
  20288. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  20289. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  20290. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  20291. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  20292. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  20293. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  20294. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  20295. WMI_TWT_COMMAND_REJECT_TWT = 7,
  20296. } WMI_TWT_COMMAND_T;
  20297. /* TWT command, refer to WMI_TWT_COMMAND_T */
  20298. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  20299. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  20300. /* 0 means Individual TWT, 1 means Broadcast TWT */
  20301. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  20302. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  20303. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  20304. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  20305. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  20306. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  20307. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  20308. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  20309. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  20310. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  20311. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  20312. typedef struct {
  20313. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  20314. A_UINT32 vdev_id; /* VDEV identifier */
  20315. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20316. A_UINT32 dialog_id; /* TWT dialog_id is per peer */
  20317. /* 1. wake_intvl_mantis must be <= 0xFFFF
  20318. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  20319. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  20320. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  20321. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  20322. */
  20323. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  20324. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  20325. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  20326. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 0xFFFF */
  20327. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  20328. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  20329. } wmi_twt_add_dialog_cmd_fixed_param;
  20330. /* status code of adding TWT dialog */
  20331. typedef enum _WMI_ADD_TWT_STATUS_T {
  20332. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  20333. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  20334. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  20335. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  20336. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  20337. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  20338. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  20339. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  20340. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  20341. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  20342. } WMI_ADD_TWT_STATUS_T;
  20343. typedef struct {
  20344. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  20345. A_UINT32 vdev_id; /* VDEV identifier */
  20346. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20347. A_UINT32 dialog_id; /* TWT dialog ID */
  20348. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  20349. } wmi_twt_add_dialog_complete_event_fixed_param;
  20350. typedef struct {
  20351. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  20352. A_UINT32 vdev_id; /* VDEV identifier */
  20353. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20354. A_UINT32 dialog_id; /* TWT dialog ID */
  20355. } wmi_twt_del_dialog_cmd_fixed_param;
  20356. /* status code of deleting TWT dialog */
  20357. typedef enum _WMI_DEL_TWT_STATUS_T {
  20358. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  20359. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  20360. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  20361. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  20362. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  20363. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  20364. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  20365. } WMI_DEL_TWT_STATUS_T;
  20366. typedef struct {
  20367. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  20368. A_UINT32 vdev_id; /* VDEV identifier */
  20369. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20370. A_UINT32 dialog_id; /* TWT dialog ID */
  20371. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  20372. } wmi_twt_del_dialog_complete_event_fixed_param;
  20373. typedef struct {
  20374. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  20375. A_UINT32 vdev_id; /* VDEV identifier */
  20376. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20377. A_UINT32 dialog_id; /* TWT dialog ID */
  20378. } wmi_twt_pause_dialog_cmd_fixed_param;
  20379. /* status code of pausing TWT dialog */
  20380. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  20381. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  20382. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  20383. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  20384. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  20385. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  20386. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  20387. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  20388. } WMI_PAUSE_TWT_STATUS_T;
  20389. typedef struct {
  20390. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  20391. A_UINT32 vdev_id; /* VDEV identifier */
  20392. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20393. A_UINT32 dialog_id; /* TWT dialog ID */
  20394. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  20395. } wmi_twt_pause_dialog_complete_event_fixed_param;
  20396. typedef struct {
  20397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  20398. A_UINT32 vdev_id; /* VDEV identifier */
  20399. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20400. A_UINT32 dialog_id; /* TWT dialog ID */
  20401. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  20402. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax sectin "9.4.1.60 TWT Information field" */
  20403. } wmi_twt_resume_dialog_cmd_fixed_param;
  20404. /* status code of resuming TWT dialog */
  20405. typedef enum _WMI_RESUME_TWT_STATUS_T {
  20406. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  20407. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  20408. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  20409. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  20410. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  20411. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  20412. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  20413. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  20414. } WMI_RESUME_TWT_STATUS_T;
  20415. typedef struct {
  20416. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  20417. A_UINT32 vdev_id; /* VDEV identifier */
  20418. wmi_mac_addr peer_macaddr; /* peer MAC address */
  20419. A_UINT32 dialog_id; /* TWT dialog ID */
  20420. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  20421. } wmi_twt_resume_dialog_complete_event_fixed_param;
  20422. typedef enum {
  20423. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  20424. } WMI_DMA_RING_SUPPORTED_MODULE;
  20425. typedef struct {
  20426. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  20427. A_UINT32 pdev_id;
  20428. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20429. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  20430. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  20431. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  20432. } WMI_DMA_RING_CAPABILITIES;
  20433. #define WMI_DMA_RING_PADDR_LO_S 0
  20434. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  20435. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  20436. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  20437. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  20438. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  20439. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  20440. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  20441. #define WMI_DMA_RING_PADDR_HI_S 0
  20442. #define WMI_DMA_RING_PADDR_HI 0xffff
  20443. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  20444. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  20445. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  20446. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  20447. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  20448. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  20449. typedef struct {
  20450. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  20451. A_UINT32 pdev_id;
  20452. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20453. /**
  20454. * Bits 31:0: base address of ring [31:0]
  20455. */
  20456. A_UINT32 base_paddr_lo;
  20457. /**
  20458. * Bits 15:0: base address of ring [47:32]
  20459. * Bits 31:16: reserved (set to 0x0)
  20460. */
  20461. A_UINT32 base_paddr_hi;
  20462. /**
  20463. * Bits 31:0: address of head index [31:0]
  20464. */
  20465. A_UINT32 head_idx_paddr_lo;
  20466. /**
  20467. * Bits 15:0: address of head index [47:32]
  20468. * Bits 31:16: reserved (set to 0x0)
  20469. */
  20470. A_UINT32 head_idx_paddr_hi;
  20471. /**
  20472. * Bits 31:0: address of tail index [31:0]
  20473. */
  20474. A_UINT32 tail_idx_paddr_lo;
  20475. /**
  20476. * Bits 15:0: address of tail index [47:32]
  20477. * Bits 31:16: reserved (set to 0x0)
  20478. */
  20479. A_UINT32 tail_idx_paddr_hi;
  20480. A_UINT32 num_elems; /** Number of elems in the ring */
  20481. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  20482. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  20483. /**
  20484. * This parameter specifies the timeout in milliseconds.
  20485. * Target should timeout and send whatever resp it has if this time expires.
  20486. */
  20487. A_UINT32 event_timeout_ms;
  20488. } wmi_dma_ring_cfg_req_fixed_param;
  20489. typedef struct {
  20490. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  20491. A_UINT32 pdev_id;
  20492. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20493. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  20494. } wmi_dma_ring_cfg_rsp_fixed_param;
  20495. typedef struct {
  20496. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  20497. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  20498. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20499. A_UINT32 num_buf_release_entry;
  20500. A_UINT32 num_meta_data_entry;
  20501. /* This TLV is followed by another TLV of array of structs.
  20502. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  20503. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  20504. */
  20505. } wmi_dma_buf_release_fixed_param;
  20506. typedef struct {
  20507. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  20508. /**
  20509. * Bits 31:0: address of data [31:0]
  20510. */
  20511. A_UINT32 paddr_lo;
  20512. /**
  20513. * Bits 15:0: address of data [47:32]
  20514. * Bits 31:16: reserved
  20515. */
  20516. A_UINT32 paddr_hi;
  20517. } wmi_dma_buf_release_entry;
  20518. typedef struct {
  20519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  20520. /**
  20521. * meta data information.
  20522. * Host uses the noise floor values as one of the major parameter
  20523. * to classify the spectral data.
  20524. * This information will not be provided by ucode unlike the fft reports
  20525. * which gets DMAed to DDR buffer.
  20526. * Hence sending the NF values in dBm units as meta data information.
  20527. */
  20528. A_INT32 noise_floor[WMI_MAX_CHAINS];
  20529. } wmi_dma_buf_release_spectral_meta_data;
  20530. typedef enum {
  20531. NO_SCALING = 0, /* No bin scaling*/
  20532. /**
  20533. * scaled_bin_mag = bin_mag *
  20534. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  20535. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  20536. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  20537. */
  20538. AGC_GAIN_RSSI_CORR_BASED = 1,
  20539. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  20540. typedef struct
  20541. {
  20542. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  20543. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  20544. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  20545. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  20546. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  20547. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  20548. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  20549. } wmi_spectral_bin_scaling_params;
  20550. typedef struct {
  20551. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  20552. A_UINT32 enable; /* Enable/disable */
  20553. /* Thermal Thresholds,
  20554. * DPD recalibration will be triggered, when current temperature is
  20555. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  20556. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  20557. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  20558. */
  20559. A_UINT32 dlt_tmpt_c_h;
  20560. A_UINT32 dlt_tmpt_c_l;
  20561. /* cooling_time_ms
  20562. * The time (in milliseconds) expected to be needed for the unit
  20563. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  20564. */
  20565. A_UINT32 cooling_time_ms;
  20566. /* Max duration for dpd re-cal. Unit: ms */
  20567. A_UINT32 dpd_dur_max_ms;
  20568. } wmi_runtime_dpd_recal_cmd_fixed_param;
  20569. typedef enum {
  20570. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  20571. WMI_ROAM_TRIGGER_REASON_PER,
  20572. WMI_ROAM_TRIGGER_REASON_BMISS,
  20573. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  20574. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  20575. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  20576. WMI_ROAM_TRIGGER_REASON_MAWC,
  20577. WMI_ROAM_TRIGGER_REASON_DENSE,
  20578. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  20579. WMI_ROAM_TRIGGER_REASON_FORCED,
  20580. WMI_ROAM_TRIGGER_REASON_BTM,
  20581. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  20582. WMI_ROAM_TRIGGER_REASON_MAX,
  20583. } WMI_ROAM_TRIGGER_REASON_ID;
  20584. /* value for DENSE roam trigger */
  20585. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  20586. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  20587. typedef struct {
  20588. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  20589. /* interpretation of trigger value is as follows, for different trigger IDs
  20590. * ID = PER -> value = PER percentage
  20591. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  20592. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  20593. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  20594. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  20595. * ID = PERIODIC -> value = periodicity in ms
  20596. *
  20597. * for other IDs trigger_value would be 0 (invalid)
  20598. */
  20599. A_UINT32 trigger_value;
  20600. } wmi_roam_scan_trigger_reason;
  20601. typedef struct {
  20602. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  20603. A_UINT32 vdev_id;
  20604. } wmi_request_roam_scan_stats_cmd_fixed_param;
  20605. typedef struct {
  20606. /*
  20607. * The timestamp is in units of ticks of a 19.2MHz clock.
  20608. * The timestamp is taken at roam scan start.
  20609. */
  20610. A_UINT32 lower32bit;
  20611. A_UINT32 upper32bit;
  20612. } wmi_roaming_timestamp;
  20613. typedef struct {
  20614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  20615. A_UINT32 vdev_id;
  20616. /* number of roam scans */
  20617. A_UINT32 num_roam_scans;
  20618. /* This TLV is followed by TLV's:
  20619. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  20620. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  20621. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  20622. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  20623. * The num_channels[] elements specify how many elements there are
  20624. * within chan_info[] for each scan.
  20625. * For example, if num_channels = [2, 3] then chan_info will have 5
  20626. * elements, with the first 2 elements from the first scan, and
  20627. * the last 3 elements from the second scan.
  20628. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  20629. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  20630. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  20631. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  20632. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  20633. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  20634. * The num_of_roam_candidates[] elements specify how many elements
  20635. * there are within bssid[] for each scan.
  20636. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  20637. * have 5 elements, with the first 2 elements from the first scan,
  20638. * and the last 3 elements from the second scan.
  20639. * A_UINT32 score[]; score of candidates in each roam scan
  20640. * The num_of_roam_candidates[] elements specify how many elements
  20641. * there are within score[] for each scan.
  20642. * For example, if num_of_roam_candidates = [2, 3] then score will
  20643. * have 5 elements, with the first 2 elements from the first scan,
  20644. * and the last 3 elements from the second scan.
  20645. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  20646. * The num_of_roam_candidates[] elements specify how many elements
  20647. * there are within channel[] for each scan.
  20648. * For example, if num_of_roam_candidates = [2, 3] then channel will
  20649. * have 5 elements, with the first 2 elements from the first scan,
  20650. * and the last 3 elements from the second scan.
  20651. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  20652. * in each roam scan.
  20653. * The num_of_roam_candidates[] elements specify how many elements
  20654. * there are within rssi[] for each scan.
  20655. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  20656. * have 5 elements, with the first 2 elements from the first scan,
  20657. * and the last 3 elements from the second scan.
  20658. */
  20659. } wmi_roam_scan_stats_event_fixed_param;
  20660. typedef struct {
  20661. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  20662. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  20663. /* The mode value has the following meaning :
  20664. * 0 : 11a
  20665. * 1 : 11bg
  20666. * 2 : 11b
  20667. * 3 : 11g only
  20668. * 4 : 11a HT20
  20669. * 5 : 11g HT20
  20670. * 6 : 11a HT40
  20671. * 7 : 11g HT40
  20672. * 8 : 11a VHT20
  20673. * 9 : 11a VHT40
  20674. * 10 : 11a VHT80
  20675. * 11 : 11g VHT20
  20676. * 12 : 11g VHT40
  20677. * 13 : 11g VHT80
  20678. * 14 : unknown
  20679. */
  20680. A_UINT32 mode;
  20681. A_UINT32 rate; /* rate index */
  20682. A_UINT32 nss; /* number of spacial stream */
  20683. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  20684. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  20685. A_UINT32 chain_index; /* index for the antenna */
  20686. } wmi_get_tpc_power_cmd_fixed_param;
  20687. typedef struct {
  20688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  20689. A_UINT32 request_id; /* request ID set by the command */
  20690. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  20691. } wmi_get_tpc_power_evt_fixed_param;
  20692. /* below structures are related to Motion Detection. */
  20693. typedef struct {
  20694. /** TLV tag and len; tag equals
  20695. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  20696. A_UINT32 tlv_header; /** TLV Header */
  20697. A_UINT32 vdev_id; /** Vdev ID */
  20698. A_UINT32 time_t1; /** Time gap of successive bursts of
  20699. * measurement frames during coarse
  20700. * motion detection (in ms) */
  20701. A_UINT32 time_t2; /** Time gap of successive bursts of
  20702. * measurement frames during fine
  20703. * motion detection (in ms) */
  20704. A_UINT32 n1; /** number of measurement frames in one
  20705. * burst, for coarse detection */
  20706. A_UINT32 n2; /** number of measurement frames in one
  20707. * burst, for fine detection */
  20708. A_UINT32 time_t1_gap; /** gap between measurement frames in
  20709. * course detection (in ms) */
  20710. A_UINT32 time_t2_gap; /** gap between measurement frames in
  20711. * fine detection (in ms) */
  20712. A_UINT32 coarse_K; /** number of times motion detection has to
  20713. * be performed for coarse detection */
  20714. A_UINT32 fine_K; /** number of times motion detection has to
  20715. * be performed for fine detection */
  20716. A_UINT32 coarse_Q; /** number of times motion is expected
  20717. * to be detected for success case in
  20718. * coarse detection */
  20719. A_UINT32 fine_Q; /** number of times motion is expected
  20720. * to be detected for success case in
  20721. * fine detection */
  20722. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  20723. * from host to FW, which will be used in
  20724. * coarse detection phase of motion detection.
  20725. * This is the threshold for the correlation
  20726. * of the old RF local-scattering environment
  20727. * with the current RF local-scattering
  20728. * environment. A value of 100(%) indicates
  20729. * that neither the transceiver nor any
  20730. * nearby objects have changed position. */
  20731. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  20732. * from host to FW, which will be used in
  20733. * fine detection phase of motion detection.
  20734. * This is the threshold for correlation
  20735. * between the old and current RF environments,
  20736. * as explained above. */
  20737. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  20738. * for immediate detection of motion in
  20739. * coarse detection phase.
  20740. * This is the threshold for correlation
  20741. * between the old and current RF environments,
  20742. * as explained above. */
  20743. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  20744. * for immediate detection of motion in
  20745. * fine detection phase.
  20746. * This is the threshold for correlation
  20747. * between the old and current RF environments,
  20748. * as explained above. */
  20749. } wmi_motion_det_config_params_cmd_fixed_param;
  20750. typedef struct {
  20751. /** TLV tag and len; tag equals
  20752. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  20753. A_UINT32 tlv_header; /** TLV Header */
  20754. A_UINT32 vdev_id; /** Vdev ID */
  20755. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  20756. * Every bl_time_t, bl_n packets are sent */
  20757. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  20758. * (in ms) */
  20759. A_UINT32 bl_n; /** number of measurement frames to be sent
  20760. * during one baseline */
  20761. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  20762. * to be done */
  20763. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  20764. typedef struct {
  20765. /** TLV tag and len; tag equals
  20766. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  20767. A_UINT32 tlv_header; /** TLV Header */
  20768. A_UINT32 vdev_id; /** Vdev ID */
  20769. A_UINT32 enable; /** start = 1, stop =0 */
  20770. } wmi_motion_det_start_stop_cmd_fixed_param;
  20771. typedef struct {
  20772. /** TLV tag and len; tag equals
  20773. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  20774. A_UINT32 tlv_header; /** TLV Header */
  20775. A_UINT32 vdev_id; /** Vdev ID */
  20776. A_UINT32 enable; /** start = 1, stop =0 */
  20777. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  20778. typedef struct {
  20779. /** TLV tag and len; tag equals
  20780. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  20781. A_UINT32 tlv_header; /** TLV Header */
  20782. A_UINT32 vdev_id; /** Vdev ID */
  20783. A_UINT32 status; /** status = 1 -> motion detected */
  20784. } wmi_motion_det_event;
  20785. typedef struct {
  20786. /** TLV tag and len; tag equals
  20787. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  20788. A_UINT32 tlv_header; /** TLV Header */
  20789. A_UINT32 vdev_id; /** Vdev ID */
  20790. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  20791. * during baselining phase (in %) */
  20792. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  20793. * phase (in %); reserved for future */
  20794. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  20795. * phase (in %); reserved for future */
  20796. } wmi_motion_det_base_line_event;
  20797. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  20798. typedef struct {
  20799. /** TLV tag and len; tag equals
  20800. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  20801. A_UINT32 tlv_header;
  20802. /** Enable/Disable Spatial Reuse */
  20803. A_UINT32 enable;
  20804. /*
  20805. * In the below fields, "OBSS level" refers to the power of the
  20806. * signals received from "Other BSS".
  20807. * Spatial reuse will only be permitted if the Other BSS's signal power
  20808. * is witin the min to max range specified by the below fields.
  20809. */
  20810. /** Minimum OBSS level to use */
  20811. A_INT32 obss_min; /* RSSI in dBm */
  20812. /** Maximum OBSS level to use */
  20813. A_INT32 obss_max; /* RSSI in dBm */
  20814. /** Vdev id*/
  20815. A_UINT32 vdev_id;
  20816. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  20817. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  20818. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  20819. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  20820. /* TWT required */
  20821. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  20822. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  20823. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  20824. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  20825. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  20826. /* VHT Operation Information Present */
  20827. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  20828. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  20829. /* Co-Located BSS */
  20830. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  20831. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  20832. /* ER SU Disable */
  20833. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  20834. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  20835. /* bit17 - bit23 are reserved */
  20836. /* BSS color */
  20837. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  20838. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  20839. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  20840. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  20841. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  20842. /* when set to 1 disables use of BSS color */
  20843. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  20844. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  20845. /* PHY Capabilities Information field */
  20846. /* bit 0 reserved */
  20847. /*
  20848. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  20849. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  20850. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  20851. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  20852. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  20853. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  20854. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  20855. * 242-tone RU mapping in 40 MHz and 80
  20856. * MHz channel width in 5 GHz. Otherwise Reserved.
  20857. * B6: Reserved
  20858. */
  20859. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  20860. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  20861. /*
  20862. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  20863. * where in the preamble only the secondary 20 MHz is punctured
  20864. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  20865. * where in the preamble only one of the two 20 MHz sub-channels in the
  20866. * secondary 40 MHz is punctured
  20867. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  20868. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  20869. * secondary 20 MHz is punctured
  20870. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  20871. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  20872. * primary 40 MHz is present
  20873. */
  20874. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  20875. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  20876. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  20877. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  20878. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  20879. /* Indicates support of transmission and reception of LDPC encoded packets */
  20880. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  20881. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  20882. /*
  20883. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  20884. */
  20885. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  20886. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  20887. /*
  20888. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  20889. * when a midamble is present in the Data field.
  20890. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  20891. * when a midamble is present in the Data field.
  20892. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  20893. * supported for transmission and reception when a midamble is present in the Data field.
  20894. */
  20895. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  20896. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  20897. /*
  20898. * B0: For a transmitting STA acting as beamformee, it indicates support of
  20899. * NDP reception using 4x LTF and 3.2 us guard interval duration
  20900. */
  20901. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  20902. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  20903. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  20904. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  20905. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  20906. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  20907. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  20908. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  20909. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  20910. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  20911. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  20912. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  20913. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  20914. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  20915. /*
  20916. * If the transmitting STA is an AP:
  20917. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  20918. * transmission.
  20919. * If the transmitting STA is a non-AP STA:
  20920. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  20921. * transmission.
  20922. */
  20923. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  20924. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  20925. /*
  20926. * If the transmitting STA is an AP:
  20927. * indicates STA supports of reception of UL MUMIMO transmission on an
  20928. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  20929. * If the transmitting STA is a non-AP STA:
  20930. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  20931. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  20932. */
  20933. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  20934. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  20935. /* Tx DCM
  20936. * B0:B1
  20937. * 00: Does not support DCM
  20938. * 01: BPSK
  20939. * 10: QPSK
  20940. * 11: 16-QAM
  20941. * B2 signals maximum number of spatial streams with DCM
  20942. * 0: 1 spatial stream
  20943. * 1: 2 spatial streams
  20944. */
  20945. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  20946. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  20947. /* Rx DCM
  20948. * B0:B1
  20949. * 00: Does not support DCM
  20950. * 01: BPSK
  20951. * 10: QPSK
  20952. * 11: 16-QAM
  20953. * B2 signals maximum number of spatial streams with DCM
  20954. * 0: 1 spatial stream
  20955. * 1: 2 spatial streams
  20956. */
  20957. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  20958. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  20959. /*
  20960. * Indicates that the STA supports the reception of an HE MU PPDU payload
  20961. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  20962. */
  20963. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  20964. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  20965. /* Indicates support for operation as an SU beamformer */
  20966. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  20967. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  20968. /* Indicates support for operation as an SU beamformee */
  20969. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  20970. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  20971. /* Indicates support for operation as an MU Beamformer */
  20972. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  20973. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  20974. /*
  20975. * Num STS -1 for <= 80MHz (min val 3)
  20976. * The maximum number of space-time streams minus 1 that the STA can
  20977. * receive in an HE NDP
  20978. */
  20979. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  20980. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  20981. /*
  20982. * Num STS -1 for > 80MHz (min val 3)
  20983. * The maximum number of space-time streams minus 1 that the STA can
  20984. * receive in an HE NDP
  20985. */
  20986. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  20987. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  20988. /*
  20989. * Number Of Sounding Dimensions For <= 80 MHz
  20990. * If SU beamformer capable, set to the maximum supported value of the
  20991. * TXVECTOR parameter NUM_STS minus 1.
  20992. * Otherwise, reserved.
  20993. */
  20994. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  20995. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  20996. /*
  20997. * Number Of Sounding Dimensions For > 80 MHz
  20998. * If SU beamformer capable, set to the maximum supported value of the
  20999. * TXVECTOR parameter NUM_STS minus 1.
  21000. * Otherwise, reserved.
  21001. */
  21002. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  21003. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  21004. /*
  21005. * Indicates if the HE beamformee is capable of feedback with tone
  21006. * grouping of 16 in the HE Compressed Beamforming Report field for
  21007. * a SU-type feedback.
  21008. */
  21009. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  21010. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  21011. /*
  21012. * Indicates if the HE beamformee is capable of feedback with tone
  21013. * grouping of 16 in the HE Compressed Beamforming Report field for
  21014. * a MU-type feedback.
  21015. */
  21016. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  21017. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  21018. /*
  21019. * Indicates if HE beamformee is capable of feedback with codebook
  21020. * size {4, 2} in the HECompressed Beamforming Report field for
  21021. * a SU-type feedback.
  21022. */
  21023. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  21024. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  21025. /*
  21026. * Indicates if HE beamformee is capable of feedback with codebook
  21027. * size {7, 5} in the HE Compressed Beamforming Report field for
  21028. * a MU-type feedback.
  21029. */
  21030. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  21031. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  21032. /*
  21033. * Beamforming Feedback With Trigger Frame
  21034. * If the transmitting STA is an AP STA:
  21035. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  21036. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  21037. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  21038. * If the transmitting STA is a non-AP STA:
  21039. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  21040. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  21041. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  21042. */
  21043. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  21044. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  21045. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  21046. * over the right 106-tone RU or partial BW ER
  21047. */
  21048. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  21049. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  21050. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  21051. * where the RU does not span the entire PPDU bandwidth.
  21052. */
  21053. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  21054. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  21055. /* Indicates whether or not the PPE Threshold field is present */
  21056. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  21057. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  21058. /* Indicates that the STA supports SRP-based SR operation */
  21059. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  21060. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  21061. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  21062. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  21063. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  21064. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  21065. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  21066. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  21067. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  21068. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  21069. * minus 1. Otherwise, reserved.
  21070. */
  21071. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  21072. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  21073. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  21074. * STBC with one spatial stream
  21075. */
  21076. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  21077. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  21078. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  21079. * STBC with one spatial stream
  21080. */
  21081. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  21082. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  21083. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  21084. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  21085. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  21086. /*
  21087. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  21088. * 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.
  21089. */
  21090. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  21091. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  21092. /*
  21093. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  21094. * 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.
  21095. */
  21096. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  21097. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  21098. /*
  21099. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  21100. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  21101. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  21102. * 160 MHz HE TB PPDU.
  21103. */
  21104. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  21105. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  21106. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  21107. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  21108. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  21109. /*
  21110. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  21111. * 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
  21112. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  21113. *
  21114. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  21115. * in HE TB PPDU when allowed.
  21116. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  21117. * 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
  21118. * 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
  21119. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  21120. */
  21121. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  21122. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  21123. /*
  21124. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  21125. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  21126. *
  21127. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  21128. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  21129. *
  21130. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  21131. * subfield is reserved.
  21132. *
  21133. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  21134. */
  21135. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  21136. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  21137. /*
  21138. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  21139. * in the HE SIG-B field is greater than 16.
  21140. */
  21141. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  21142. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  21143. /*
  21144. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  21145. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  21146. */
  21147. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  21148. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  21149. /*
  21150. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  21151. * Reserved for an AP.
  21152. */
  21153. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  21154. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  21155. /*
  21156. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  21157. */
  21158. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  21159. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  21160. /*
  21161. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  21162. * compressed HE-SIG-B format.
  21163. */
  21164. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  21165. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  21166. /*
  21167. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  21168. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  21169. */
  21170. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  21171. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  21172. /* HE MAC Capabilities Information field format */
  21173. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  21174. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  21175. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  21176. /* set to 1 to for TWT Requestor support */
  21177. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  21178. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  21179. /* set to 1 to for TWT Responder support */
  21180. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  21181. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  21182. /* Level of frag support
  21183. Set to 0 for no support for dynamic fragmentation.
  21184. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  21185. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  21186. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  21187. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  21188. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  21189. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  21190. */
  21191. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  21192. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  21193. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  21194. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  21195. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  21196. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  21197. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  21198. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  21199. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  21200. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  21201. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  21202. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  21203. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  21204. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  21205. /* Indicates support for link adaptation using the HLA Control subfield. */
  21206. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  21207. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  21208. /* Set to 1 for reception of AllAck support */
  21209. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  21210. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  21211. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  21212. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  21213. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  21214. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  21215. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  21216. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  21217. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  21218. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  21219. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  21220. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  21221. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  21222. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  21223. /* Set to 1 if the STA supports MU cascading operation */
  21224. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  21225. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  21226. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  21227. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  21228. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  21229. /* bit 24 - reserved */
  21230. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  21231. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  21232. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  21233. /*1 if OFDMA Random Access Supported */
  21234. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  21235. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  21236. /* Maximum AMPDU Length Exponent.
  21237. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  21238. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  21239. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  21240. * padding is not included in this limit.
  21241. */
  21242. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  21243. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  21244. /* A-MSDU Fragmentation Support */
  21245. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  21246. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  21247. /* Flexible TWT Schedule Support */
  21248. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  21249. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  21250. /* Rx Control Frame to MultiBSS */
  21251. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  21252. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  21253. /* 2nd DWORD of HE MAC Capabilities */
  21254. /* BSRP A-MPDU Aggregation
  21255. * maintaining compatability since we dont support this now so not wasting memory
  21256. */
  21257. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  21258. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  21259. /* Quiet Time Period (QTP) operation
  21260. * maintaining compatability since we dont support this now so not wasting memory
  21261. */
  21262. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  21263. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  21264. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  21265. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  21266. * that contains a BQR in the A-Control subfield
  21267. * maintaining compatability since we dont support this now so not wasting memory
  21268. */
  21269. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  21270. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  21271. /* Indicates support by the STA for the role of SRP Responder.*/
  21272. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  21273. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  21274. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  21275. * the NDP Feedback Report Poll Trigger frame.
  21276. */
  21277. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  21278. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  21279. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  21280. * frames or TIM frames as described in AP operation for opportunistic power save.
  21281. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  21282. */
  21283. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  21284. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  21285. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  21286. * a QoS Data frame for which no block ack agreement exists.
  21287. */
  21288. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  21289. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  21290. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  21291. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  21292. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  21293. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  21294. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  21295. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  21296. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  21297. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  21298. * Info field indicating 2x996-tone.
  21299. */
  21300. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  21301. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  21302. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  21303. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  21304. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  21305. /*
  21306. * The following conditionally-defined macros can be used in systems
  21307. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  21308. * but not both, and which make this D2 vs. D3 selection at build time.
  21309. */
  21310. #ifdef SUPPORT_11AX_D3
  21311. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  21312. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  21313. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  21314. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  21315. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  21316. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  21317. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  21318. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  21319. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  21320. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  21321. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  21322. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  21323. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  21324. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  21325. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  21326. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  21327. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  21328. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  21329. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  21330. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  21331. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  21332. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  21333. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  21334. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  21335. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  21336. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  21337. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  21338. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  21339. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  21340. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  21341. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  21342. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  21343. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  21344. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  21345. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  21346. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  21347. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  21348. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  21349. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  21350. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  21351. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  21352. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  21353. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  21354. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  21355. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  21356. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  21357. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  21358. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  21359. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  21360. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  21361. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  21362. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  21363. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  21364. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  21365. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  21366. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  21367. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  21368. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  21369. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  21370. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  21371. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  21372. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  21373. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  21374. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  21375. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  21376. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  21377. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  21378. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  21379. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  21380. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  21381. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  21382. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  21383. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  21384. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  21385. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  21386. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  21387. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  21388. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  21389. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  21390. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  21391. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  21392. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  21393. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  21394. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  21395. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  21396. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  21397. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  21398. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  21399. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  21400. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  21401. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  21402. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  21403. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  21404. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  21405. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  21406. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  21407. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  21408. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  21409. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  21410. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  21411. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  21412. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  21413. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  21414. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  21415. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  21416. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  21417. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  21418. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  21419. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  21420. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  21421. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  21422. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  21423. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  21424. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  21425. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  21426. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  21427. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  21428. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  21429. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  21430. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  21431. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  21432. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  21433. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  21434. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  21435. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  21436. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  21437. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  21438. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  21439. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  21440. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  21441. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  21442. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  21443. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  21444. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  21445. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  21446. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  21447. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  21448. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  21449. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  21450. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  21451. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  21452. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  21453. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  21454. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  21455. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  21456. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  21457. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  21458. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  21459. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  21460. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  21461. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  21462. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  21463. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  21464. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  21465. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  21466. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  21467. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  21468. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  21469. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  21470. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  21471. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  21472. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  21473. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  21474. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  21475. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  21476. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  21477. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  21478. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  21479. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  21480. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  21481. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  21482. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  21483. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  21484. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  21485. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  21486. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  21487. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  21488. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  21489. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  21490. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  21491. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  21492. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  21493. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  21494. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  21495. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  21496. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  21497. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  21498. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  21499. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  21500. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  21501. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  21502. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  21503. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  21504. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  21505. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  21506. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  21507. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  21508. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  21509. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  21510. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  21511. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  21512. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  21513. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  21514. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  21515. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  21516. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  21517. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  21518. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  21519. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  21520. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  21521. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  21522. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  21523. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  21524. #else /* SUPPORT_11AX_D3 vs. D2 */
  21525. /* D2 and D2- */
  21526. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  21527. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  21528. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  21529. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  21530. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  21531. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  21532. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Depricated */
  21533. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Depricated */
  21534. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  21535. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  21536. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  21537. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  21538. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  21539. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  21540. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  21541. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  21542. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  21543. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  21544. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  21545. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  21546. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  21547. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  21548. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  21549. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  21550. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  21551. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  21552. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  21553. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  21554. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  21555. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  21556. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  21557. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  21558. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  21559. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  21560. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  21561. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  21562. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  21563. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  21564. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  21565. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  21566. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  21567. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  21568. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  21569. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  21570. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  21571. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  21572. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  21573. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  21574. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  21575. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  21576. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  21577. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  21578. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  21579. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  21580. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  21581. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  21582. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  21583. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  21584. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  21585. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  21586. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  21587. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  21588. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  21589. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  21590. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  21591. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  21592. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  21593. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  21594. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  21595. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  21596. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  21597. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  21598. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  21599. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  21600. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  21601. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  21602. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  21603. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  21604. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  21605. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  21606. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  21607. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  21608. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  21609. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  21610. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  21611. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  21612. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  21613. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  21614. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  21615. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  21616. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  21617. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  21618. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  21619. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  21620. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  21621. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  21622. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  21623. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  21624. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  21625. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  21626. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  21627. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  21628. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  21629. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  21630. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  21631. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  21632. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  21633. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  21634. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  21635. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  21636. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  21637. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  21638. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  21639. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  21640. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  21641. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  21642. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  21643. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  21644. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  21645. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  21646. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  21647. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  21648. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  21649. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  21650. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  21651. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  21652. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  21653. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  21654. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  21655. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  21656. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  21657. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  21658. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  21659. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  21660. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  21661. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  21662. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  21663. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  21664. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  21665. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  21666. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  21667. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  21668. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  21669. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  21670. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  21671. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  21672. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  21673. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  21674. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  21675. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  21676. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  21677. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  21678. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  21679. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  21680. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  21681. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  21682. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  21683. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  21684. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  21685. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  21686. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  21687. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  21688. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  21689. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  21690. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  21691. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  21692. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  21693. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  21694. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  21695. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  21696. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  21697. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  21698. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  21699. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  21700. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  21701. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  21702. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  21703. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  21704. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  21705. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  21706. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  21707. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  21708. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  21709. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  21710. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  21711. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  21712. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  21713. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  21714. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  21715. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  21716. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  21717. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  21718. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  21719. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  21720. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  21721. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  21722. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  21723. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  21724. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  21725. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  21726. #endif /* SUPPORT_11AX_D3 */
  21727. /* ADD NEW DEFS HERE */
  21728. /*****************************************************************************
  21729. * The following structures are deprecated. DO NOT USE THEM!
  21730. */
  21731. /** Max number of channels in the schedule. */
  21732. #define OCB_CHANNEL_MAX (5)
  21733. /* NOTE: Make sure these data structures are identical to those
  21734. * defined in sirApi.h */
  21735. typedef struct
  21736. {
  21737. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  21738. A_UINT32 aifsn;
  21739. /** Contention Window minimum. Range: 1 - 10 */
  21740. A_UINT32 cwmin;
  21741. /** Contention Window maximum. Range: 1 - 10 */
  21742. A_UINT32 cwmax;
  21743. } wmi_qos_params_t;
  21744. typedef struct
  21745. {
  21746. /** Channel frequency in MHz */
  21747. A_UINT32 chan_freq;
  21748. /** Channel duration in ms */
  21749. A_UINT32 duration;
  21750. /** Start guard interval in ms */
  21751. A_UINT32 start_guard_interval;
  21752. /** End guard interval in ms */
  21753. A_UINT32 end_guard_interval;
  21754. /** Transmit power in dBm, range 0 - 23 */
  21755. A_UINT32 tx_power;
  21756. /** Transmit datarate in Mbps */
  21757. A_UINT32 tx_rate;
  21758. /** QoS parameters for each AC */
  21759. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  21760. /** 1 to enable RX stats for this channel, 0 otherwise */
  21761. A_UINT32 rx_stats;
  21762. } wmi_ocb_channel_t;
  21763. typedef struct {
  21764. /** TLV tag and len; tag equals
  21765. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  21766. A_UINT32 tlv_header;
  21767. /* VDEV identifier */
  21768. A_UINT32 vdev_id;
  21769. /** Number of valid channels in the channels array */
  21770. A_UINT32 num_channels;
  21771. /** The array of channels */
  21772. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  21773. /** 1 to allow off-channel tx, 0 otherwise */
  21774. A_UINT32 off_channel_tx; /* Not supported */
  21775. } wmi_ocb_set_sched_cmd_fixed_param;
  21776. typedef struct {
  21777. /** Return status. 0 for success, non-zero otherwise */
  21778. A_UINT32 status;
  21779. } wmi_ocb_set_sched_event_fixed_param;
  21780. /*****************************************************************************
  21781. * END DEPRECATED
  21782. */
  21783. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  21784. #ifdef __cplusplus
  21785. }
  21786. #endif
  21787. #endif /*_WMI_UNIFIED_H_*/
  21788. /**@}*/