wmi_unified.h 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902
  1. /*
  2. * Copyright (c) 2010-2019 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @addtogroup WMIAPI
  28. *@{
  29. */
  30. /** @file
  31. * This file specifies the WMI interface for the Software Architecture.
  32. *
  33. * It includes definitions of all the commands and events. Commands are messages
  34. * from the host to the target. Events and Replies are messages from the target
  35. * to the host.
  36. *
  37. * Ownership of correctness in regards to WMI commands
  38. * belongs to the host driver and the target is not required to validate
  39. * parameters for value, proper range, or any other checking.
  40. *
  41. * Guidelines for extending this interface are below.
  42. *
  43. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  44. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  45. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  46. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  47. * if necessary. Do not use the programming language's bit field definition.
  48. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  49. * variables. Use these macros for set/get of these fields. Try to use this to
  50. * optimize the structure without bloating it with A_UINT32 variables for every lower
  51. * sized field.
  52. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  53. * already 4-byte aligned by virtue of being a A_UINT32 type.
  54. * 6. Comment each parameter part of the WMI command/event structure by using the
  55. * 2 stars at the begining of C comment instead of one star to enable HTML document
  56. * generation using Doxygen.
  57. *
  58. */
  59. #ifndef _WMI_UNIFIED_H_
  60. #define _WMI_UNIFIED_H_
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #include <wlan_defs.h>
  65. #include <wmi_services.h>
  66. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  67. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  68. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  69. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  70. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  71. #define WMI_MAX_CHAINS 8
  72. /* The WLAN_MAX_AC macro cannot be changed without breaking
  73. WMI compatibility. */
  74. /* The maximum value of access category */
  75. #define WLAN_MAX_AC 4
  76. /*
  77. * These don't necessarily belong here; but as the MS/SM macros require
  78. * ar6000_internal.h to be included, it may not be defined as yet.
  79. */
  80. #define WMI_F_MS(_v, _f) \
  81. (((_v) & (_f)) >> (_f##_S))
  82. /*
  83. * This breaks the "good macro practice" of only referencing each
  84. * macro field once (to avoid things like field++ from causing issues.)
  85. */
  86. #define WMI_F_RMW(_var, _v, _f) \
  87. do { \
  88. (_var) &= ~(_f); \
  89. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  90. } while (0)
  91. #define WMI_GET_BITS(_val,_index,_num_bits) \
  92. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  93. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  94. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  95. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  96. } while (0)
  97. /**
  98. * A packed array is an array where each entry in the array is less than
  99. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  100. * For example, if each entry in the array is 11 bits, then you can stuff
  101. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  102. * The first 2 11-bit values will be stored in the first A_UINT32,
  103. * and the last 2 11-bit values will be stored in the second A_UINT32.
  104. */
  105. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  106. (((num_entries) / (32 / (bits_per_entry))) + \
  107. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  108. #define WMI_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  109. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  110. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  111. {
  112. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  113. A_UINT32 uint_index = (entry_index / entries_per_uint);
  114. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  115. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  116. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  117. return (arr[uint_index] >> start_bit_in_uint) &
  118. ((1 << bits_per_entry) - 1);
  119. }
  120. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  121. A_UINT32 bits_per_entry, A_UINT32 val)
  122. {
  123. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  124. A_UINT32 uint_index = (entry_index / entries_per_uint);
  125. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  126. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  127. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  128. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  129. arr[uint_index] |=
  130. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  131. }
  132. /** 2 word representation of MAC addr */
  133. typedef struct _wmi_mac_addr {
  134. /** upper 4 bytes of MAC address */
  135. A_UINT32 mac_addr31to0;
  136. /** lower 2 bytes of MAC address */
  137. A_UINT32 mac_addr47to32;
  138. } wmi_mac_addr;
  139. /** macro to convert MAC address from WMI word format to char array */
  140. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  141. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  142. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  143. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  144. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  145. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  146. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  147. } while (0)
  148. /** macro to convert MAC address from char array to WMI word format */
  149. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  150. (pwmi_mac_addr)->mac_addr31to0 = \
  151. (((c_macaddr)[0] << 0) | \
  152. ((c_macaddr)[1] << 8) | \
  153. ((c_macaddr)[2] << 16) | \
  154. ((c_macaddr)[3] << 24)); \
  155. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  156. } while (0)
  157. /*
  158. * The below function declarations are for implementations on some
  159. * platforms of the above macros, but in function form, to save code
  160. * memory by avoiding macro-inlining of a non-trivial amount of code.
  161. * These function versions of the above macros may not be available
  162. * on all host and target platforms.
  163. */
  164. void wmi_mac_addr_to_char_array(wmi_mac_addr *pwmi_mac_addr, A_UINT8 *c_macaddr);
  165. void wmi_char_array_to_mac_addr(A_UINT8 *c_macaddr, wmi_mac_addr *pwmi_mac_addr);
  166. /*
  167. * wmi command groups.
  168. */
  169. typedef enum {
  170. /* 0 to 2 are reserved */
  171. WMI_GRP_START = 0x3,
  172. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  173. WMI_GRP_PDEV, /* 0x4 */
  174. WMI_GRP_VDEV, /* 0x5 */
  175. WMI_GRP_PEER, /* 0x6 */
  176. WMI_GRP_MGMT, /* 0x7 */
  177. WMI_GRP_BA_NEG, /* 0x8 */
  178. WMI_GRP_STA_PS, /* 0x9 */
  179. WMI_GRP_DFS, /* 0xa */
  180. WMI_GRP_ROAM, /* 0xb */
  181. WMI_GRP_OFL_SCAN, /* 0xc */
  182. WMI_GRP_P2P, /* 0xd */
  183. WMI_GRP_AP_PS, /* 0xe */
  184. WMI_GRP_RATE_CTRL, /* 0xf */
  185. WMI_GRP_PROFILE, /* 0x10 */
  186. WMI_GRP_SUSPEND, /* 0x11 */
  187. WMI_GRP_BCN_FILTER, /* 0x12 */
  188. WMI_GRP_WOW, /* 0x13 */
  189. WMI_GRP_RTT, /* 0x14 */
  190. WMI_GRP_SPECTRAL, /* 0x15 */
  191. WMI_GRP_STATS, /* 0x16 */
  192. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  193. WMI_GRP_NLO_OFL, /* 0x18 */
  194. WMI_GRP_GTK_OFL, /* 0x19 */
  195. WMI_GRP_CSA_OFL, /* 0x1a */
  196. WMI_GRP_CHATTER, /* 0x1b */
  197. WMI_GRP_TID_ADDBA, /* 0x1c */
  198. WMI_GRP_MISC, /* 0x1d */
  199. WMI_GRP_GPIO, /* 0x1e */
  200. WMI_GRP_FWTEST, /* 0x1f */
  201. WMI_GRP_TDLS, /* 0x20 */
  202. WMI_GRP_RESMGR, /* 0x21 */
  203. WMI_GRP_STA_SMPS, /* 0x22 */
  204. WMI_GRP_WLAN_HB, /* 0x23 */
  205. WMI_GRP_RMC, /* 0x24 */
  206. WMI_GRP_MHF_OFL, /* 0x25 */
  207. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  208. WMI_GRP_OEM, /* 0x27 */
  209. WMI_GRP_NAN, /* 0x28 */
  210. WMI_GRP_COEX, /* 0x29 */
  211. WMI_GRP_OBSS_OFL, /* 0x2a */
  212. WMI_GRP_LPI, /* 0x2b */
  213. WMI_GRP_EXTSCAN, /* 0x2c */
  214. WMI_GRP_DHCP_OFL, /* 0x2d */
  215. WMI_GRP_IPA, /* 0x2e */
  216. WMI_GRP_MDNS_OFL, /* 0x2f */
  217. WMI_GRP_SAP_OFL, /* 0x30 */
  218. WMI_GRP_OCB, /* 0x31 */
  219. WMI_GRP_SOC, /* 0x32 */
  220. WMI_GRP_PKT_FILTER, /* 0x33 */
  221. WMI_GRP_MAWC, /* 0x34 */
  222. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  223. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  224. WMI_GRP_NAN_DATA, /* 0x37 */
  225. WMI_GRP_PROTOTYPE, /* 0x38 */
  226. WMI_GRP_MONITOR, /* 0x39 */
  227. WMI_GRP_REGULATORY, /* 0x3a */
  228. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  229. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  230. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  231. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  232. WMI_GRP_MOTION_DET, /* 0x3f */
  233. WMI_GRP_SPATIAL_REUSE, /* 0x40 */
  234. WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */
  235. WMI_GRP_HPCS_PULSE, /* 0x42 */
  236. } WMI_GRP_ID;
  237. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  238. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  239. /**
  240. * Command IDs and commange events
  241. */
  242. typedef enum {
  243. /** initialize the wlan sub system */
  244. WMI_INIT_CMDID = 0x1,
  245. /* Scan specific commands */
  246. /** start scan request to FW */
  247. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  248. /** stop scan request to FW */
  249. WMI_STOP_SCAN_CMDID,
  250. /** full list of channels as defined by the regulatory that will be used by scanner */
  251. WMI_SCAN_CHAN_LIST_CMDID,
  252. /** overwrite default priority table in scan scheduler */
  253. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  254. /** This command to adjust the priority and min.max_rest_time
  255. * of an on ongoing scan request.
  256. */
  257. WMI_SCAN_UPDATE_REQUEST_CMDID,
  258. /** set OUI to be used in probe request if enabled */
  259. WMI_SCAN_PROB_REQ_OUI_CMDID,
  260. /** config adaptive dwell scan */
  261. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  262. /** Only applicable to DBS capable product */
  263. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  264. /* PDEV(physical device) specific commands */
  265. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  266. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  267. /** set channel. mainly used for supporting monitor mode */
  268. WMI_PDEV_SET_CHANNEL_CMDID,
  269. /** set pdev specific parameters */
  270. WMI_PDEV_SET_PARAM_CMDID,
  271. /** enable packet log */
  272. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  273. /** disable packet log*/
  274. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  275. /** set wmm parameters */
  276. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  277. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  278. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  279. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  280. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  281. /** Command to send the DSCP-to-TID map to the target */
  282. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  283. /** set quiet ie parameters. primarily used in AP mode */
  284. WMI_PDEV_SET_QUIET_MODE_CMDID,
  285. /** Enable/Disable Green AP Power Save */
  286. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  287. /** get TPC config for the current operating channel */
  288. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  289. /** set the base MAC address for the physical device before a VDEV is created.
  290. * For firmware that doesn't support this feature and this command, the pdev
  291. * MAC address will not be changed. */
  292. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  293. /* eeprom content dump , the same to bdboard data */
  294. WMI_PDEV_DUMP_CMDID,
  295. /* set LED configuration */
  296. WMI_PDEV_SET_LED_CONFIG_CMDID,
  297. /* Get Current temprature of chip in Celcius degree*/
  298. WMI_PDEV_GET_TEMPERATURE_CMDID,
  299. /* Set LED flashing behavior */
  300. WMI_PDEV_SET_LED_FLASHING_CMDID,
  301. /** Enable/Disable Smart Antenna */
  302. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  303. /** Set Smart Antenna RX antenna*/
  304. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  305. /** Override the antenna switch table */
  306. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  307. /** Override the CTL table */
  308. WMI_PDEV_SET_CTL_TABLE_CMDID,
  309. /** Override the array gain table */
  310. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  311. /** FIPS test mode command */
  312. WMI_PDEV_FIPS_CMDID,
  313. /** get CCK ANI level */
  314. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  315. /** get OFDM ANI level */
  316. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  317. /** NF Cal Power dBr/dBm */
  318. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  319. /** TxPPDU TPC */
  320. WMI_PDEV_GET_TPC_CMDID,
  321. /** Set to enable MIB stats collection */
  322. WMI_MIB_STATS_ENABLE_CMDID,
  323. /** Set preferred channel list for DBS Mgr */
  324. WMI_PDEV_SET_PCL_CMDID,
  325. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  326. WMI_PDEV_SET_HW_MODE_CMDID,
  327. /** Set DFS, SCAN modes and other FW configurations */
  328. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  329. /** Set per band and per pdev antenna chains */
  330. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  331. /** Periodic channel stats request command */
  332. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  333. /** WMI command for power debug framework */
  334. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  335. /** set per-AC rx reorder timeouts */
  336. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  337. /** WMI command for WOW gpio and type */
  338. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  339. /* Get current ANT's per chain's RSSI info */
  340. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  341. /** WMI command for getting Chip Power Stats */
  342. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  343. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  344. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  345. /** vdev restart request for multiple vdevs */
  346. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  347. /** Pdev update packet routing command */
  348. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  349. /** Get Calibration data version details */
  350. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  351. /** Set Diversity Gain */
  352. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  353. /** Get chain RSSI and antena index command */
  354. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  355. /** get bss chan info */
  356. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  357. /** update pmk cache info */
  358. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  359. /** update fils HLP */
  360. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  361. /** update ctltable request **/
  362. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  363. /** Command to set beacon OUI **/
  364. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  365. /** enable/disable per-AC tx queue optimizations */
  366. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  367. /** enable/disable rx promiscuous mode */
  368. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  369. /* set a generic direct DMA ring config */
  370. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  371. /* enable/disable Action frame response as HE TB PPDU */
  372. WMI_PDEV_HE_TB_ACTION_FRM_CMDID,
  373. /** filter packet log based on MAC address */
  374. WMI_PDEV_PKTLOG_FILTER_CMDID,
  375. /* VDEV (virtual device) specific commands */
  376. /** vdev create */
  377. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  378. /** vdev delete */
  379. WMI_VDEV_DELETE_CMDID,
  380. /** vdev start request */
  381. WMI_VDEV_START_REQUEST_CMDID,
  382. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  383. WMI_VDEV_RESTART_REQUEST_CMDID,
  384. /** vdev up request */
  385. WMI_VDEV_UP_CMDID,
  386. /** vdev stop request */
  387. WMI_VDEV_STOP_CMDID,
  388. /** vdev down request */
  389. WMI_VDEV_DOWN_CMDID,
  390. /* set a vdev param */
  391. WMI_VDEV_SET_PARAM_CMDID,
  392. /* set a key (used for setting per peer unicast and per vdev multicast) */
  393. WMI_VDEV_INSTALL_KEY_CMDID,
  394. /* wnm sleep mode command */
  395. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  396. WMI_VDEV_WMM_ADDTS_CMDID,
  397. WMI_VDEV_WMM_DELTS_CMDID,
  398. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  399. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  400. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  401. WMI_VDEV_PLMREQ_START_CMDID,
  402. WMI_VDEV_PLMREQ_STOP_CMDID,
  403. /* TSF timestamp action for specified vdev */
  404. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  405. /** set the additional IEs in probe requests for scan or
  406. * assoc req etc for frames FW locally generates */
  407. WMI_VDEV_SET_IE_CMDID,
  408. WMI_VDEV_RATEMASK_CMDID,
  409. /** ATF VDEV REQUEST commands. */
  410. WMI_VDEV_ATF_REQUEST_CMDID,
  411. /** Command to send the DSCP-to-TID map to the target for VAP */
  412. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  413. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  414. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  415. /** set quiet ie parameters. primarily used in AP mode */
  416. WMI_VDEV_SET_QUIET_MODE_CMDID,
  417. /** To set custom aggregation size for per vdev */
  418. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  419. /* DISA feature: Encrypt-decrypt data request */
  420. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  421. /** Command to enable mac randomizaton **/
  422. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  423. /** WMI commands related to dbg arp stats */
  424. WMI_VDEV_SET_ARP_STAT_CMDID,
  425. WMI_VDEV_GET_ARP_STAT_CMDID,
  426. /** get tx power for the current vdev */
  427. WMI_VDEV_GET_TX_POWER_CMDID,
  428. /* limit STA offchannel activity */
  429. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  430. /** To set custom software retries per-AC for vdev */
  431. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  432. /** To set chainmask configuration for vdev */
  433. WMI_VDEV_CHAINMASK_CONFIG_CMDID,
  434. WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID,
  435. /* request LTE-Coex info */
  436. WMI_VDEV_GET_MWS_COEX_INFO_CMDID,
  437. /* peer specific commands */
  438. /** create a peer */
  439. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  440. /** delete a peer */
  441. WMI_PEER_DELETE_CMDID,
  442. /** flush specific tid queues of a peer */
  443. WMI_PEER_FLUSH_TIDS_CMDID,
  444. /** set a parameter of a peer */
  445. WMI_PEER_SET_PARAM_CMDID,
  446. /** set peer to associated state. will cary all parameters determined during assocication time */
  447. WMI_PEER_ASSOC_CMDID,
  448. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  449. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  450. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  451. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  452. /** set up mcast group infor for multicast to unicast conversion */
  453. WMI_PEER_MCAST_GROUP_CMDID,
  454. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  455. WMI_PEER_INFO_REQ_CMDID,
  456. /** request the estimated link speed for the peer. FW shall respond with
  457. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  458. */
  459. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  460. /** Set the conditions to report peer justified rate to driver
  461. * The justified rate means the user-rate is justified by PER.
  462. */
  463. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  464. /** update a wds (4 address) entry */
  465. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  466. /** add a proxy sta entry */
  467. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  468. /** Set Smart Antenna TX antenna */
  469. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  470. /** Set Smart Antenna TX train info */
  471. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  472. /** Set SA node config options */
  473. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  474. /** ATF PEER REQUEST commands */
  475. WMI_PEER_ATF_REQUEST_CMDID,
  476. /** bandwidth fairness (BWF) peer configuration request command */
  477. WMI_PEER_BWF_REQUEST_CMDID,
  478. /** rx reorder queue setup for peer/tid */
  479. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  480. /** rx reorder queue remove for peer/tid */
  481. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  482. /** specify a limit for rx A-MPDU block size */
  483. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  484. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  485. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  486. /*
  487. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  488. * placed here, amongst the CMDID defs.
  489. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  490. * EVENTID section, but to preserve backwards compatibility, the value
  491. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  492. * is kept reserved/deprecated.
  493. *
  494. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  495. * WMI peer event message ID, though it will be simpler to instead add
  496. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  497. */
  498. WMI_PEER_RESERVED0_CMDID,
  499. /** Peer/Tid/Msduq threshold update */
  500. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  501. /** TID specific configurations per peer of type
  502. * wmi_peer_tid_configurations_cmd_fixed_param
  503. */
  504. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  505. /** Peer configuration for Channel Frequency Response (CFR) capture
  506. * of type wmi_peer_cfr_capture_cmd. The CFR capture is communicated
  507. * through HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND.
  508. */
  509. WMI_PEER_CFR_CAPTURE_CMDID,
  510. /** WMI command related to AP channel width switching */
  511. WMI_PEER_CHAN_WIDTH_SWITCH_CMDID,
  512. /** WMI command to fetch current tx PN for the peer */
  513. WMI_PEER_TX_PN_REQUEST_CMDID,
  514. /** unmap response with peer ids */
  515. WMI_PEER_UNMAP_RESPONSE_CMDID,
  516. /* beacon/management specific commands */
  517. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  518. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  519. /** transmit beacon by value */
  520. WMI_PDEV_SEND_BCN_CMDID,
  521. /** set the beacon template. used in beacon offload mode to setup the
  522. * the common beacon template with the FW to be used by FW to generate beacons */
  523. WMI_BCN_TMPL_CMDID,
  524. /** set beacon filter with FW */
  525. WMI_BCN_FILTER_RX_CMDID,
  526. /* enable/disable filtering of probe requests in the firmware */
  527. WMI_PRB_REQ_FILTER_RX_CMDID,
  528. /** transmit management frame by value. will be deprecated */
  529. WMI_MGMT_TX_CMDID,
  530. /** set the probe response template. used in beacon offload mode to setup the
  531. * the common probe response template with the FW to be used by FW to generate
  532. * probe responses */
  533. WMI_PRB_TMPL_CMDID,
  534. /** Transmit Mgmt frame by reference */
  535. WMI_MGMT_TX_SEND_CMDID,
  536. /** Transmit data frame by reference */
  537. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  538. /** transmit FILS Discovery frame by value */
  539. WMI_PDEV_SEND_FD_CMDID,
  540. /** Cmd to enable/disable offloaded beacons */
  541. WMI_BCN_OFFLOAD_CTRL_CMDID,
  542. /** Cmd to enable FW handling BSS color change notification from AP. */
  543. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  544. /** To configure Beacon offload quiet-ie params */
  545. WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID,
  546. /** commands to directly control ba negotiation directly from host. only used in test mode */
  547. /** turn off FW Auto addba mode and let host control addba */
  548. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  549. /** send add ba request */
  550. WMI_ADDBA_SEND_CMDID,
  551. WMI_ADDBA_STATUS_CMDID,
  552. /** send del ba */
  553. WMI_DELBA_SEND_CMDID,
  554. /** set add ba response will be used by FW to generate addba response*/
  555. WMI_ADDBA_SET_RESP_CMDID,
  556. /** send single VHT MPDU with AMSDU */
  557. WMI_SEND_SINGLEAMSDU_CMDID,
  558. /** Station power save specific config */
  559. /** enable/disable station powersave */
  560. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  561. /** set station power save specific parameter */
  562. WMI_STA_POWERSAVE_PARAM_CMDID,
  563. /** set station mimo powersave mode */
  564. WMI_STA_MIMO_PS_MODE_CMDID,
  565. /** DFS-specific commands */
  566. /** enable DFS (radar detection)*/
  567. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  568. /** disable DFS (radar detection)*/
  569. WMI_PDEV_DFS_DISABLE_CMDID,
  570. /** enable DFS phyerr/parse filter offload */
  571. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  572. /** enable DFS phyerr/parse filter offload */
  573. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  574. /** enable DFS phyerr processing offload */
  575. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  576. /** disable DFS phyerr processing offload */
  577. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  578. /** set ADFS channel config */
  579. WMI_VDEV_ADFS_CH_CFG_CMDID,
  580. /** abort ADFS off-channel-availability-check currently in progress */
  581. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  582. /* Roaming specific commands */
  583. /** set roam scan mode */
  584. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  585. /** set roam scan rssi threshold below which roam scan is enabled */
  586. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  587. /** set roam scan period for periodic roam scan mode */
  588. WMI_ROAM_SCAN_PERIOD,
  589. /** set roam scan trigger rssi change threshold */
  590. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  591. /** set roam AP profile */
  592. WMI_ROAM_AP_PROFILE,
  593. /** set channel list for roam scans */
  594. WMI_ROAM_CHAN_LIST,
  595. /** Stop scan command */
  596. WMI_ROAM_SCAN_CMD,
  597. /** roaming sme offload sync complete */
  598. WMI_ROAM_SYNCH_COMPLETE,
  599. /** set ric request element for 11r roaming */
  600. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  601. /** Invoke roaming forcefully */
  602. WMI_ROAM_INVOKE_CMDID,
  603. /** roaming filter cmd to allow further filtering of roaming candidate */
  604. WMI_ROAM_FILTER_CMDID,
  605. /** set gateway ip, mac and retries for subnet change detection */
  606. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  607. /** configure thresholds for MAWC */
  608. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  609. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  610. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  611. /** configure packet error rate threshold for triggering roaming */
  612. WMI_ROAM_PER_CONFIG_CMDID,
  613. /** configure BSS Transition Management (BTM) offload for roaming */
  614. WMI_ROAM_BTM_CONFIG_CMDID,
  615. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  616. WMI_ENABLE_FILS_CMDID,
  617. /** Request for roam scan stats */
  618. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  619. /** Configure BSS load parameters for roam trigger */
  620. WMI_ROAM_BSS_LOAD_CONFIG_CMDID,
  621. /** offload scan specific commands */
  622. /** set offload scan AP profile */
  623. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  624. /** remove offload scan AP profile */
  625. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  626. /** set offload scan period */
  627. WMI_OFL_SCAN_PERIOD,
  628. /* P2P specific commands */
  629. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  630. * generated during p2p listen and for p2p discoverability */
  631. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  632. /** enable/disable p2p discoverability on STA/AP VDEVs */
  633. WMI_P2P_DEV_SET_DISCOVERABILITY,
  634. /** set p2p ie to be carried in beacons generated by FW for GO */
  635. WMI_P2P_GO_SET_BEACON_IE,
  636. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  637. WMI_P2P_GO_SET_PROBE_RESP_IE,
  638. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  639. * attribute in the beacons/probe responses received.
  640. * Note: This command is currently used only for Apple P2P implementation.
  641. */
  642. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  643. /** set the configure of p2p find offload */
  644. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  645. /** set the vendor specific p2p ie data for p2p find offload using */
  646. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  647. /** set the BSSID/device name pattern of p2p find offload */
  648. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  649. /** set OppPS related parameters **/
  650. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  651. /** set listen offload start related parameters */
  652. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  653. /** set listen offload stop related parameters */
  654. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  655. /** AP power save specific config */
  656. /** set AP power save specific param */
  657. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  658. /** set AP UAPSD coex pecific param */
  659. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  660. /** set Enhanced Green AP param */
  661. WMI_AP_PS_EGAP_PARAM_CMDID,
  662. /** Rate-control specific commands */
  663. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  664. /** WLAN Profiling commands. */
  665. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  666. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  667. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  668. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  669. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  670. /** Suspend resume command Ids */
  671. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  672. WMI_PDEV_RESUME_CMDID,
  673. /* Beacon filter commands */
  674. /** add a beacon filter */
  675. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  676. /** remove a beacon filter */
  677. WMI_RMV_BCN_FILTER_CMDID,
  678. /* WOW Specific WMI commands*/
  679. /** add pattern for awake */
  680. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  681. /** deleta a wake pattern */
  682. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  683. /** enable/deisable wake event */
  684. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  685. /** enable WOW */
  686. WMI_WOW_ENABLE_CMDID,
  687. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  688. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  689. /* IOAC add keep alive cmd. */
  690. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  691. /* IOAC del keep alive cmd. */
  692. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  693. /* IOAC add pattern for awake */
  694. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  695. /* IOAC deleta a wake pattern */
  696. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  697. /* D0-WOW enable or disable cmd */
  698. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  699. /* enable extend WoW */
  700. WMI_EXTWOW_ENABLE_CMDID,
  701. /* Extend WoW command to configure app type1 parameter */
  702. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  703. /* Extend WoW command to configure app type2 parameter */
  704. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  705. /* enable ICMPv6 Network advertisement filtering */
  706. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  707. /*
  708. * Set a pattern to match UDP packet in WOW mode.
  709. * If match, construct a tx frame in a local buffer
  710. * to send through the peer AP to the entity in the
  711. * IP network that sent the UDP packet to this STA.
  712. */
  713. WMI_WOW_UDP_SVC_OFLD_CMDID,
  714. /* configure WOW host wakeup PIN pattern */
  715. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  716. /* Set which action category should wake the host from suspend */
  717. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  718. /* RTT measurement related cmd */
  719. /** request to make an RTT measurement */
  720. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  721. /** request to report a tsf measurement */
  722. WMI_RTT_TSF_CMDID,
  723. /** spectral scan command */
  724. /** configure spectral scan */
  725. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  726. /** enable/disable spectral scan and trigger */
  727. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  728. /* F/W stats */
  729. /** one time request for stats */
  730. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  731. /** Push MCC Adaptive Scheduler Stats to Firmware */
  732. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  733. /** one time request for txrx stats */
  734. WMI_REQUEST_STATS_EXT_CMDID,
  735. /* Link Layer stats */
  736. /** Request for link layer stats */
  737. WMI_REQUEST_LINK_STATS_CMDID,
  738. /** Request for setting params to link layer stats */
  739. WMI_START_LINK_STATS_CMDID,
  740. /** Request to clear stats*/
  741. WMI_CLEAR_LINK_STATS_CMDID,
  742. /** Request for getting the Firmware Memory Dump */
  743. WMI_GET_FW_MEM_DUMP_CMDID,
  744. /** Request to flush of the buffered debug messages */
  745. WMI_DEBUG_MESG_FLUSH_CMDID,
  746. /** Cmd to configure the verbose level */
  747. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  748. /** One time request for wlan stats */
  749. WMI_REQUEST_WLAN_STATS_CMDID,
  750. /** Request for getting RCPI of peer */
  751. WMI_REQUEST_RCPI_CMDID,
  752. /** One time request for peer stats info */
  753. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  754. /** One time request for radio channel stats */
  755. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  756. /** request for WLM (wlan latency manager) stats */
  757. WMI_REQUEST_WLM_STATS_CMDID,
  758. /** ARP OFFLOAD REQUEST*/
  759. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  760. /** Proactive ARP Response Add Pattern Command*/
  761. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  762. /** Proactive ARP Response Del Pattern Command*/
  763. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  764. /** NS offload confid*/
  765. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  766. /** APFIND Config */
  767. WMI_APFIND_CMDID,
  768. /** Passpoint list config */
  769. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  770. /** configure supprssing parameters for MAWC */
  771. WMI_NLO_CONFIGURE_MAWC_CMDID,
  772. /* GTK offload Specific WMI commands*/
  773. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  774. /* CSA offload Specific WMI commands*/
  775. /** csa offload enable */
  776. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  777. /** chan switch command */
  778. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  779. /* Chatter commands*/
  780. /* Change chatter mode of operation */
  781. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  782. /** chatter add coalescing filter command */
  783. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  784. /** chatter delete coalescing filter command */
  785. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  786. /** chatter coalecing query command */
  787. WMI_CHATTER_COALESCING_QUERY_CMDID,
  788. /**addba specific commands */
  789. /** start the aggregation on this TID */
  790. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  791. /** stop the aggregation on this TID */
  792. WMI_PEER_TID_DELBA_CMDID,
  793. /** set station mimo powersave method */
  794. WMI_STA_DTIM_PS_METHOD_CMDID,
  795. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  796. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  797. /** Configure the Keep Alive Parameters */
  798. WMI_STA_KEEPALIVE_CMDID,
  799. /* Request ssn from target for a sta/tid pair */
  800. WMI_BA_REQ_SSN_CMDID,
  801. /* misc command group */
  802. /** echo command mainly used for testing */
  803. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  804. /* !!IMPORTANT!!
  805. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  806. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  807. * as we MUST have a fixed value here to maintain compatibility between
  808. * UTF and the ART2 driver
  809. */
  810. /** UTF WMI commands */
  811. WMI_PDEV_UTF_CMDID,
  812. /** set debug log config */
  813. WMI_DBGLOG_CFG_CMDID,
  814. /* QVIT specific command id */
  815. WMI_PDEV_QVIT_CMDID,
  816. /* Factory Testing Mode request command
  817. * used for integrated chipsets */
  818. WMI_PDEV_FTM_INTG_CMDID,
  819. /* set and get keepalive parameters command */
  820. WMI_VDEV_SET_KEEPALIVE_CMDID,
  821. WMI_VDEV_GET_KEEPALIVE_CMDID,
  822. /* For fw recovery test command */
  823. WMI_FORCE_FW_HANG_CMDID,
  824. /* Set Mcast/Bdcast filter */
  825. WMI_SET_MCASTBCAST_FILTER_CMDID,
  826. /** set thermal management params **/
  827. WMI_THERMAL_MGMT_CMDID,
  828. /** set host auto shutdown params **/
  829. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  830. /** set tpc chainmask config command */
  831. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  832. /** set Antenna diversity command */
  833. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  834. /** Set OCB Sched Request, deprecated */
  835. WMI_OCB_SET_SCHED_CMDID,
  836. /** Set rssi monitoring config command */
  837. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  838. /** Enable/disable Large Receive Offload processing; provide cfg params */
  839. WMI_LRO_CONFIG_CMDID,
  840. /** transfer data from host to firmware to write flash */
  841. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  842. /** Command to enable/disable filtering of multicast IP with unicast mac */
  843. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  844. /** Command to control WISA mode */
  845. WMI_VDEV_WISA_CMDID,
  846. /** set debug log time stamp sync up with host */
  847. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  848. /** Command for host to set/delete multiple mcast filters */
  849. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  850. /** upload a requested section of data from firmware flash to host */
  851. WMI_READ_DATA_FROM_FLASH_CMDID,
  852. /* Thermal Throttling SET CONF commands */
  853. WMI_THERM_THROT_SET_CONF_CMDID,
  854. /* set runtime dpd recalibration params */
  855. WMI_RUNTIME_DPD_RECAL_CMDID,
  856. /* get TX power for input HALPHY parameters */
  857. WMI_GET_TPC_POWER_CMDID,
  858. /* Offload 11k related requests */
  859. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  860. /* invoke neighbor report from FW */
  861. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  862. /* GPIO Configuration */
  863. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  864. WMI_GPIO_OUTPUT_CMDID,
  865. /* Txbf configuration command */
  866. WMI_TXBF_CMDID,
  867. /* FWTEST Commands */
  868. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  869. /** set NoA descs **/
  870. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  871. /* UNIT Tests */
  872. WMI_UNIT_TEST_CMDID,
  873. /* set debug and tuning parameters */
  874. WMI_FWTEST_CMDID,
  875. /* Q-Boost configuration test commands */
  876. WMI_QBOOST_CFG_CMDID,
  877. /** TDLS Configuration */
  878. /** enable/disable TDLS */
  879. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  880. /** set tdls peer state */
  881. WMI_TDLS_PEER_UPDATE_CMDID,
  882. /** TDLS Offchannel control */
  883. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  884. /** Resmgr Configuration */
  885. /** Adaptive OCS is enabled by default in the FW. This command is used to
  886. * disable FW based adaptive OCS.
  887. */
  888. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  889. /** set the requested channel time quota for the home channels */
  890. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  891. /** set the requested latency for the home channels */
  892. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  893. /** STA SMPS Configuration */
  894. /** force SMPS mode */
  895. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  896. /** set SMPS parameters */
  897. WMI_STA_SMPS_PARAM_CMDID,
  898. /* Wlan HB commands*/
  899. /* enalbe/disable wlan HB */
  900. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  901. /* set tcp parameters for wlan HB */
  902. WMI_HB_SET_TCP_PARAMS_CMDID,
  903. /* set tcp pkt filter for wlan HB */
  904. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  905. /* set udp parameters for wlan HB */
  906. WMI_HB_SET_UDP_PARAMS_CMDID,
  907. /* set udp pkt filter for wlan HB */
  908. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  909. /* OIC ping keep alive */
  910. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  911. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  912. /* WMI commands related to DHCP Lease Renew Offload **/
  913. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  914. /** Wlan RMC commands*/
  915. /** enable/disable RMC */
  916. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  917. /** configure action frame period */
  918. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  919. /** For debug/future enhancement purposes only,
  920. * configures/finetunes RMC algorithms */
  921. WMI_RMC_CONFIG_CMDID,
  922. /** select manual leader */
  923. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  924. /** WLAN MHF offload commands */
  925. /** enable/disable MHF offload */
  926. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  927. /** Plumb routing table for MHF offload */
  928. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  929. /*location scan commands*/
  930. /*start batch scan*/
  931. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  932. /*stop batch scan*/
  933. WMI_BATCH_SCAN_DISABLE_CMDID,
  934. /*get batch scan result*/
  935. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  936. /* OEM related cmd */
  937. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  938. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  939. /* OEM related cmd used for Low Power ranging */
  940. WMI_LPI_OEM_REQ_CMDID,
  941. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  942. /** Nan Request */
  943. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  944. /** Modem power state command */
  945. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  946. WMI_CHAN_AVOID_UPDATE_CMDID,
  947. WMI_COEX_CONFIG_CMDID,
  948. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  949. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  950. WMI_SAR_LIMITS_CMDID,
  951. WMI_SAR_GET_LIMITS_CMDID,
  952. /**
  953. * OBSS scan offload enable/disable commands
  954. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  955. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  956. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  957. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  958. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  959. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  960. */
  961. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  962. WMI_OBSS_SCAN_DISABLE_CMDID,
  963. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  964. /**LPI commands*/
  965. /**LPI mgmt snooping config command*/
  966. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  967. /**LPI scan start command*/
  968. WMI_LPI_START_SCAN_CMDID,
  969. /**LPI scan stop command*/
  970. WMI_LPI_STOP_SCAN_CMDID,
  971. /** ExtScan commands */
  972. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  973. WMI_EXTSCAN_STOP_CMDID,
  974. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  975. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  976. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  977. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  978. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  979. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  980. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  981. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  982. /** DHCP server offload commands */
  983. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  984. /** IPA Offload features related commands */
  985. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  986. /** mDNS responder offload commands */
  987. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  988. WMI_MDNS_SET_FQDN_CMDID,
  989. WMI_MDNS_SET_RESPONSE_CMDID,
  990. WMI_MDNS_GET_STATS_CMDID,
  991. /* enable/disable AP Authentication offload */
  992. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  993. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  994. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  995. /** Out-of-context-of-BSS (OCB) commands */
  996. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  997. WMI_OCB_SET_UTC_TIME_CMDID,
  998. WMI_OCB_START_TIMING_ADVERT_CMDID,
  999. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  1000. WMI_OCB_GET_TSF_TIMER_CMDID,
  1001. WMI_DCC_GET_STATS_CMDID,
  1002. WMI_DCC_CLEAR_STATS_CMDID,
  1003. WMI_DCC_UPDATE_NDL_CMDID,
  1004. /* System-On-Chip commands */
  1005. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  1006. WMI_SOC_SET_HW_MODE_CMDID,
  1007. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  1008. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  1009. /* packet filter commands */
  1010. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  1011. WMI_PACKET_FILTER_ENABLE_CMDID,
  1012. /** Motion Aided WiFi Connectivity (MAWC) commands */
  1013. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  1014. /** WMI commands related to PMF 11w Offload */
  1015. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  1016. /** WMI commands related to pkt filter (BPF) offload */
  1017. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1018. WMI_BPF_GET_VDEV_STATS_CMDID,
  1019. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  1020. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  1021. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  1022. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  1023. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  1024. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  1025. /** WMI commands related to monitor mode. */
  1026. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  1027. /** WMI commands related to regulatory offload */
  1028. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  1029. WMI_11D_SCAN_START_CMDID,
  1030. WMI_11D_SCAN_STOP_CMDID,
  1031. WMI_SET_INIT_COUNTRY_CMDID,
  1032. /**
  1033. * Nan Data commands
  1034. * NDI - NAN Data Interface
  1035. * NDP - NAN Data Path
  1036. */
  1037. /* Commands in prototyping phase */
  1038. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1039. WMI_NDP_INITIATOR_REQ_CMDID,
  1040. WMI_NDP_RESPONDER_REQ_CMDID,
  1041. WMI_NDP_END_REQ_CMDID,
  1042. WMI_NDP_CMDID,
  1043. /** WMI commands related to HW data filtering **/
  1044. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1045. /** WMI commands related to WLAN latency module **/
  1046. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1047. /** WMI commands related to STA & AP TWT module **/
  1048. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1049. WMI_TWT_DISABLE_CMDID,
  1050. WMI_TWT_ADD_DIALOG_CMDID,
  1051. WMI_TWT_DEL_DIALOG_CMDID,
  1052. WMI_TWT_PAUSE_DIALOG_CMDID,
  1053. WMI_TWT_RESUME_DIALOG_CMDID,
  1054. /** WMI commands related to motion detection **/
  1055. WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET),
  1056. WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID,
  1057. WMI_MOTION_DET_START_STOP_CMDID,
  1058. WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID,
  1059. /** WMI commands related to OBSS PD Spatial Reuse **/
  1060. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPATIAL_REUSE),
  1061. WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID,
  1062. /** WMI commands related to High Precision Clock Synchronization feature **/
  1063. WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE),
  1064. } WMI_CMD_ID;
  1065. typedef enum {
  1066. /** WMI service is ready; after this event WMI messages can be sent/received */
  1067. WMI_SERVICE_READY_EVENTID = 0x1,
  1068. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1069. WMI_READY_EVENTID,
  1070. /** Specify what WMI services the target supports (for services beyond
  1071. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1072. */
  1073. WMI_SERVICE_AVAILABLE_EVENTID,
  1074. /** Scan specific events */
  1075. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1076. /* PDEV specific events */
  1077. /** TPC config for the current operating channel */
  1078. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1079. /** Channel stats event */
  1080. WMI_CHAN_INFO_EVENTID,
  1081. /** PHY Error specific WMI event */
  1082. WMI_PHYERR_EVENTID,
  1083. /** eeprom dump event */
  1084. WMI_PDEV_DUMP_EVENTID,
  1085. /** traffic pause event */
  1086. WMI_TX_PAUSE_EVENTID,
  1087. /** DFS radar event */
  1088. WMI_DFS_RADAR_EVENTID,
  1089. /** track L1SS entry and residency event */
  1090. WMI_PDEV_L1SS_TRACK_EVENTID,
  1091. /** Report current temprature of the chip in Celcius degree */
  1092. WMI_PDEV_TEMPERATURE_EVENTID,
  1093. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1094. WMI_SERVICE_READY_EXT_EVENTID,
  1095. /** FIPS test mode event */
  1096. WMI_PDEV_FIPS_EVENTID,
  1097. /** Channel hopping avoidance */
  1098. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1099. /** CCK ANI level event */
  1100. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1101. /** OFDM ANI level event */
  1102. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1103. /** Tx PPDU params */
  1104. WMI_PDEV_TPC_EVENTID,
  1105. /** NF Cal Power in DBR/DBM for all channels */
  1106. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1107. /** SOC/PDEV events */
  1108. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1109. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1110. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1111. /** Report ANT DIV feature's status */
  1112. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1113. /** Chip level Power stats */
  1114. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1115. /** Power Save Failure Detected */
  1116. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1117. /* Event to report the switch count in csa of one or more VDEVs */
  1118. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1119. /** Report the caldata version to host */
  1120. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1121. /** Report chain RSSI and antenna index to host */
  1122. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1123. /** provide noise floor and cycle counts for a channel */
  1124. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1125. /** Response received the ctl table to host */
  1126. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1127. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1128. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1129. /** WMI Event to deliver CTL Failsafe application */
  1130. WMI_PDEV_CTL_FAILSAFE_CHECK_EVENTID,
  1131. /* Event to report the switch count in BSS color of one or more VDEVs */
  1132. WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID,
  1133. /* VDEV specific events */
  1134. /** VDEV started event in response to VDEV_START request */
  1135. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1136. /** vdev stopped event , generated in response to VDEV_STOP request */
  1137. WMI_VDEV_STOPPED_EVENTID,
  1138. /* Indicate the set key (used for setting per
  1139. * peer unicast and per vdev multicast)
  1140. * operation has completed */
  1141. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1142. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1143. don't use this for any new implementations */
  1144. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1145. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1146. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1147. /* Return the TSF timestamp of specified vdev */
  1148. WMI_VDEV_TSF_REPORT_EVENTID,
  1149. /* FW response to Host for vdev delete cmdid */
  1150. WMI_VDEV_DELETE_RESP_EVENTID,
  1151. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1152. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1153. /** event to report mac randomization success **/
  1154. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1155. /* event for ARP stats collection */
  1156. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1157. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1158. WMI_VDEV_GET_TX_POWER_EVENTID,
  1159. WMI_VDEV_BCN_RECEPTION_STATS_EVENTID,
  1160. /* provide LTE-Coex state */
  1161. WMI_VDEV_GET_MWS_COEX_STATE_EVENTID,
  1162. /* provide LTE-Coex Dynamic Power Back-off info */
  1163. WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID,
  1164. /* provide LTE-Coex TDM info */
  1165. WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID,
  1166. /* provide LTE-Coex IDRx info */
  1167. WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID,
  1168. /* provide LTE-Coex antenna sharing info */
  1169. WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID,
  1170. /* peer specific events */
  1171. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1172. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1173. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1174. WMI_PEER_INFO_EVENTID,
  1175. /** Event indicating that TX fail count reaching threshold */
  1176. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1177. /* Return the estimate link speed for the Peer specified in the
  1178. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1179. */
  1180. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1181. /* Return the peer state
  1182. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1183. */
  1184. WMI_PEER_STATE_EVENTID,
  1185. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1186. * After that, host will send Mx message.
  1187. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1188. */
  1189. WMI_PEER_ASSOC_CONF_EVENTID,
  1190. /* FW response to Host for peer delete cmdid */
  1191. WMI_PEER_DELETE_RESP_EVENTID,
  1192. /** Valid rate code list for peer */
  1193. WMI_PEER_RATECODE_LIST_EVENTID,
  1194. WMI_WDS_PEER_EVENTID,
  1195. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1196. /** Peer Ant Div Info Event with rssi per chain, etc */
  1197. WMI_PEER_ANTDIV_INFO_EVENTID,
  1198. /*
  1199. * WMI_PEER_RESERVED_EVENTID
  1200. * These values are used for placeholders, to allow the subsequent
  1201. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1202. * as it had in its original location, when it was mistakenly placed
  1203. * amongst the WMI_PEER CMDID defs.
  1204. *
  1205. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1206. * event message IDs, though it will be simpler to instead add new
  1207. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1208. */
  1209. WMI_PEER_RESERVED0_EVENTID,
  1210. WMI_PEER_RESERVED1_EVENTID,
  1211. WMI_PEER_RESERVED2_EVENTID,
  1212. WMI_PEER_RESERVED3_EVENTID,
  1213. WMI_PEER_RESERVED4_EVENTID,
  1214. WMI_PEER_RESERVED5_EVENTID,
  1215. WMI_PEER_RESERVED6_EVENTID,
  1216. WMI_PEER_RESERVED7_EVENTID,
  1217. WMI_PEER_RESERVED8_EVENTID,
  1218. WMI_PEER_RESERVED9_EVENTID,
  1219. WMI_PEER_RESERVED10_EVENTID,
  1220. /** Peer operating mode change indication sent to host to update stats */
  1221. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1222. /** report the current tx PN for the peer */
  1223. WMI_PEER_TX_PN_RESPONSE_EVENTID,
  1224. /* beacon/mgmt specific events */
  1225. /** RX management frame. the entire frame is carried along with the event. */
  1226. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1227. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1228. use only in host beacon mode */
  1229. WMI_HOST_SWBA_EVENTID,
  1230. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1231. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1232. staggered beacon transmission mode */
  1233. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1234. /** event after the first beacon is transmitted following
  1235. a change in the template.*/
  1236. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1237. /** event after the first probe response is transmitted following
  1238. a change in the template.*/
  1239. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1240. /** Event for Mgmt TX completion event */
  1241. WMI_MGMT_TX_COMPLETION_EVENTID,
  1242. /** Event for Mgmt TX bundle completion event */
  1243. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1244. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1245. * Use this event if number of vdevs > 32.
  1246. */
  1247. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1248. /** Event for offchan data TX completion event */
  1249. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1250. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1251. WMI_HOST_SWFDA_EVENTID,
  1252. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1253. * Used only in host beacon mode. */
  1254. WMI_HOST_SWBA_V2_EVENTID,
  1255. /* ADDBA Related WMI Events*/
  1256. /** Indication the completion of the prior
  1257. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1258. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1259. /** Indication the completion of the prior
  1260. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1261. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1262. /* Seq num returned from hw for a sta/tid pair */
  1263. WMI_BA_RSP_SSN_EVENTID,
  1264. /* Aggregation state requested by BTC */
  1265. WMI_AGGR_STATE_TRIG_EVENTID,
  1266. /** Roam event to trigger roaming on host */
  1267. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1268. /** matching AP found from list of profiles */
  1269. WMI_PROFILE_MATCH,
  1270. /** roam synch event */
  1271. WMI_ROAM_SYNCH_EVENTID,
  1272. /** roam synch frame event */
  1273. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1274. /** various roam scan stats */
  1275. WMI_ROAM_SCAN_STATS_EVENTID,
  1276. /** Blacklisted AP information event */
  1277. WMI_ROAM_BLACKLIST_EVENTID,
  1278. /** P2P disc found */
  1279. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1280. /** send noa info to host when noa is changed for beacon tx offload enable */
  1281. WMI_P2P_NOA_EVENTID,
  1282. /** send p2p listen offload stopped event with different reason */
  1283. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1284. /** Send EGAP Info to host */
  1285. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1286. /* send pdev resume event to host after pdev resume. */
  1287. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1288. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1289. will cary wake reason */
  1290. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1291. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1292. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1293. /*RTT related event ID*/
  1294. /** RTT measurement report */
  1295. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1296. /** TSF measurement report */
  1297. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1298. /** RTT error report */
  1299. WMI_RTT_ERROR_REPORT_EVENTID,
  1300. /*STATS specific events*/
  1301. /** txrx stats event requested by host */
  1302. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1303. /** FW iface link stats Event */
  1304. WMI_IFACE_LINK_STATS_EVENTID,
  1305. /** FW iface peer link stats Event */
  1306. WMI_PEER_LINK_STATS_EVENTID,
  1307. /** FW Update radio stats Event */
  1308. WMI_RADIO_LINK_STATS_EVENTID,
  1309. /** Firmware memory dump Complete event*/
  1310. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1311. /** Event indicating the DIAG logs/events supported by FW */
  1312. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1313. /** Instantaneous RSSI event */
  1314. WMI_INST_RSSI_STATS_EVENTID,
  1315. /** FW update tx power levels event */
  1316. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1317. /** This event is used to report wlan stats to host.
  1318. * It is triggered under 3 conditions:
  1319. * (a) Periodic timer timed out, based on the period specified
  1320. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1321. * (b) Whenever any of the (enabled) stats thresholds specified
  1322. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1323. * within the current stats period.
  1324. * (c) In response to the one-time wlan stats request of
  1325. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1326. *
  1327. * If this event is triggered by condition a or b,
  1328. * the stats counters are cleared at the start of each period.
  1329. * But if it is triggered by condition c, stats counters won't be cleared.
  1330. */
  1331. WMI_REPORT_STATS_EVENTID,
  1332. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1333. WMI_UPDATE_RCPI_EVENTID,
  1334. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1335. * and report peer stats info to host */
  1336. WMI_PEER_STATS_INFO_EVENTID,
  1337. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1338. * and report radio channel stats to host */
  1339. WMI_RADIO_CHAN_STATS_EVENTID,
  1340. /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID
  1341. * and report WLM (WLAN latency manager) stats info to host */
  1342. WMI_WLM_STATS_EVENTID,
  1343. /* NLO specific events */
  1344. /** NLO match event after the first match */
  1345. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1346. /** NLO scan complete event */
  1347. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1348. /** APFIND specific events */
  1349. WMI_APFIND_EVENTID,
  1350. /** passpoint network match event */
  1351. WMI_PASSPOINT_MATCH_EVENTID,
  1352. /** GTK offload stautus event requested by host */
  1353. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1354. /** GTK offload failed to rekey event */
  1355. WMI_GTK_REKEY_FAIL_EVENTID,
  1356. /* CSA IE received event */
  1357. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1358. /*chatter query reply event*/
  1359. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1360. /** DFS related events */
  1361. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1362. /** Indicate channel-availability-check completion event to host */
  1363. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1364. /** Indicate off-channel-availability-check completion event to host */
  1365. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1366. /** echo event in response to echo command */
  1367. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1368. /* !!IMPORTANT!!
  1369. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1370. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1371. * as we MUST have a fixed value here to maintain compatibility between
  1372. * UTF and the ART2 driver
  1373. */
  1374. /** UTF specific WMI event */
  1375. WMI_PDEV_UTF_EVENTID,
  1376. /** event carries buffered debug messages */
  1377. WMI_DEBUG_MESG_EVENTID,
  1378. /** FW stats(periodic or on shot) */
  1379. WMI_UPDATE_STATS_EVENTID,
  1380. /** debug print message used for tracing FW code while debugging */
  1381. WMI_DEBUG_PRINT_EVENTID,
  1382. /** DCS wlan or non-wlan interference event
  1383. */
  1384. WMI_DCS_INTERFERENCE_EVENTID,
  1385. /** VI spoecific event */
  1386. WMI_PDEV_QVIT_EVENTID,
  1387. /** FW code profile data in response to profile request */
  1388. WMI_WLAN_PROFILE_DATA_EVENTID,
  1389. /* Factory Testing Mode request event
  1390. * used for integrated chipsets */
  1391. WMI_PDEV_FTM_INTG_EVENTID,
  1392. /* avoid list of frequencies .
  1393. */
  1394. WMI_WLAN_FREQ_AVOID_EVENTID,
  1395. /* Indicate the keepalive parameters */
  1396. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1397. /*Thermal Management event*/
  1398. WMI_THERMAL_MGMT_EVENTID,
  1399. /* Container for DIAG event and log data */
  1400. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1401. /* host auto shutdown event */
  1402. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1403. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1404. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1405. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1406. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1407. WMI_DIAG_EVENTID,
  1408. /** Set OCB Sched Response, deprecated */
  1409. WMI_OCB_SET_SCHED_EVENTID,
  1410. /** event to indicate the flush of the buffered debug messages is complete*/
  1411. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1412. /** event to report mix/max RSSI breach events */
  1413. WMI_RSSI_BREACH_EVENTID,
  1414. /** event to report completion of data storage into flash memory */
  1415. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1416. /** event to report SCPC calibrated data to host */
  1417. WMI_PDEV_UTF_SCPC_EVENTID,
  1418. /** event to provide requested data from the target's flash memory */
  1419. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1420. /** event to report rx aggregation failure frame information */
  1421. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1422. /** event to upload a PKGID to host to identify chip for various products */
  1423. WMI_PKGID_EVENTID,
  1424. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1425. WMI_THERM_THROT_STATS_EVENTID,
  1426. /* WMI UNIT TEST event */
  1427. WMI_UNIT_TEST_EVENTID,
  1428. /** event to report result of host configure SAR2 */
  1429. WMI_SAR2_RESULT_EVENTID,
  1430. /** event to get TX power per input HALPHY parameters */
  1431. WMI_GET_TPC_POWER_EVENTID,
  1432. /* GPIO Event */
  1433. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1434. /** upload H_CV info WMI event
  1435. * to indicate uploaded H_CV info to host
  1436. */
  1437. WMI_UPLOADH_EVENTID,
  1438. /** capture H info WMI event
  1439. * to indicate captured H info to host
  1440. */
  1441. WMI_CAPTUREH_EVENTID,
  1442. /* hw RFkill */
  1443. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1444. /* TDLS Event */
  1445. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1446. /** STA SMPS Event */
  1447. /** force SMPS mode */
  1448. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1449. /*location scan event*/
  1450. /*report the firmware's capability of batch scan*/
  1451. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1452. /*batch scan result*/
  1453. WMI_BATCH_SCAN_RESULT_EVENTID,
  1454. /* OEM Event */
  1455. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1456. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1457. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1458. WMI_OEM_RESPONSE_EVENTID,
  1459. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1460. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1461. /* NAN Event */
  1462. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1463. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1464. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1465. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1466. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1467. /* Coex Event */
  1468. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1469. WMI_SAR_GET_LIMITS_EVENTID,
  1470. /* LPI Event */
  1471. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1472. WMI_LPI_STATUS_EVENTID,
  1473. WMI_LPI_HANDOFF_EVENTID,
  1474. /* ExtScan events */
  1475. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1476. WMI_EXTSCAN_OPERATION_EVENTID,
  1477. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1478. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1479. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1480. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1481. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1482. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1483. /* mDNS offload events */
  1484. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1485. /* SAP Authentication offload events */
  1486. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1487. WMI_SAP_OFL_DEL_STA_EVENTID,
  1488. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1489. /* OBSS Offloads events */
  1490. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1491. /** Out-of-context-of-bss (OCB) events */
  1492. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1493. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1494. WMI_DCC_GET_STATS_RESP_EVENTID,
  1495. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1496. WMI_DCC_STATS_EVENTID,
  1497. /* System-On-Chip events */
  1498. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1499. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1500. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1501. /** Motion Aided WiFi Connectivity (MAWC) events */
  1502. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1503. /** pkt filter (BPF) offload relevant events */
  1504. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1505. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1506. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1507. /* RMC specific event */
  1508. /* RMC manual leader selected event */
  1509. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1510. /** WMI events related to regulatory offload */
  1511. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1512. WMI_11D_NEW_COUNTRY_EVENTID,
  1513. /** Events for TWT(Target Wake Time) of STA and AP */
  1514. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1515. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1516. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1517. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1518. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1519. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1520. /** Events in Prototyping phase */
  1521. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1522. WMI_NDP_INITIATOR_RSP_EVENTID,
  1523. WMI_NDP_RESPONDER_RSP_EVENTID,
  1524. WMI_NDP_END_RSP_EVENTID,
  1525. WMI_NDP_INDICATION_EVENTID,
  1526. WMI_NDP_CONFIRM_EVENTID,
  1527. WMI_NDP_END_INDICATION_EVENTID,
  1528. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1529. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1530. WMI_NDP_EVENTID,
  1531. /** WMI events related to motion detection */
  1532. WMI_MOTION_DET_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MOTION_DET),
  1533. WMI_MOTION_DET_BASE_LINE_HOST_EVENTID,
  1534. /** WMI events related to Estimation of Service Parameters (802.11mc) */
  1535. WMI_ESP_ESTIMATE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ESP),
  1536. } WMI_EVT_ID;
  1537. /* defines for OEM message sub-types */
  1538. #define WMI_OEM_CAPABILITY_REQ 0x01
  1539. #define WMI_OEM_CAPABILITY_RSP 0x02
  1540. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1541. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1542. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1543. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1544. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1545. #define WMI_OEM_NAN_PEER_INFO 0x08
  1546. #define WMI_OEM_CONFIGURE_LCR 0x09
  1547. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1548. #define WMI_CHAN_LIST_TAG 0x1
  1549. #define WMI_SSID_LIST_TAG 0x2
  1550. #define WMI_BSSID_LIST_TAG 0x3
  1551. #define WMI_IE_TAG 0x4
  1552. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1553. typedef struct {
  1554. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1555. /** primary 20 MHz channel frequency in mhz */
  1556. A_UINT32 mhz;
  1557. /** Center frequency 1 in MHz*/
  1558. A_UINT32 band_center_freq1;
  1559. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1560. A_UINT32 band_center_freq2;
  1561. /** channel info described below */
  1562. A_UINT32 info;
  1563. /** contains min power, max power, reg power and reg class id. */
  1564. A_UINT32 reg_info_1;
  1565. /** contains antennamax */
  1566. A_UINT32 reg_info_2;
  1567. } wmi_channel;
  1568. typedef enum {
  1569. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1570. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1571. } wmi_channel_change_cause;
  1572. /** channel info consists of 6 bits of channel mode */
  1573. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1574. (pwmi_channel)->info &= 0xffffffc0; \
  1575. (pwmi_channel)->info |= (val); \
  1576. } while (0)
  1577. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1578. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1579. #define WMI_CHAN_FLAG_PASSIVE 7
  1580. #define WMI_CHAN_ADHOC_ALLOWED 8
  1581. #define WMI_CHAN_AP_DISABLED 9
  1582. #define WMI_CHAN_FLAG_DFS 10
  1583. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1584. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1585. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1586. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1587. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1588. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1589. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1590. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1591. (pwmi_channel)->info |= (1 << flag); \
  1592. } while (0)
  1593. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1594. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1595. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1596. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1597. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1598. } while (0)
  1599. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1600. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1601. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1602. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1603. } while (0)
  1604. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1605. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1606. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1607. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1608. } while (0)
  1609. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1610. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1611. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1612. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1613. } while (0)
  1614. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1615. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1616. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1617. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1618. } while (0)
  1619. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1620. /* max tx power is in 1 dBm units */
  1621. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1622. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1623. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1624. } while (0)
  1625. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1626. /** HT Capabilities*/
  1627. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1628. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1629. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1630. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1631. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1632. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1633. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1634. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1635. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1636. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1637. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1638. #define WMI_HT_CAP_HT40_SGI 0x0800
  1639. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1640. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1641. /* These macros should be used when we wish to advertise STBC support for
  1642. * only 1SS or 2SS or 3SS. */
  1643. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1644. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1645. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1646. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1647. WMI_HT_CAP_HT20_SGI | \
  1648. WMI_HT_CAP_HT40_SGI | \
  1649. WMI_HT_CAP_TX_STBC | \
  1650. WMI_HT_CAP_RX_STBC | \
  1651. WMI_HT_CAP_LDPC | \
  1652. WMI_HT_CAP_TX_LDPC | \
  1653. WMI_HT_CAP_RX_LDPC)
  1654. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1655. field. The fields not defined here are not supported, or reserved.
  1656. Do not change these masks and if you have to add new one follow the
  1657. bitmask as specified by 802.11ac draft.
  1658. */
  1659. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1660. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1661. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1662. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1663. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1664. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1665. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1666. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1667. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1668. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1669. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1670. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1671. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1672. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1673. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1674. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1675. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1676. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1677. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1678. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1679. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1680. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1681. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1682. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1683. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1684. /* TEMPORARY:
  1685. * Preserve the incorrect old name as an alias for the correct new name
  1686. * until all references to the old name have been removed from all hosts
  1687. * and targets.
  1688. */
  1689. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1690. /* These macros should be used when we wish to advertise STBC support for
  1691. * only 1SS or 2SS or 3SS. */
  1692. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1693. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1694. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1695. /* TEMPORARY:
  1696. * Preserve the incorrect old name as an alias for the correct new name
  1697. * until all references to the old name have been removed from all hosts
  1698. * and targets.
  1699. */
  1700. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1701. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1702. WMI_VHT_CAP_SGI_80MHZ | \
  1703. WMI_VHT_CAP_TX_STBC | \
  1704. WMI_VHT_CAP_RX_STBC_MASK | \
  1705. WMI_VHT_CAP_RX_LDPC | \
  1706. WMI_VHT_CAP_TX_LDPC | \
  1707. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1708. WMI_VHT_CAP_RX_FIXED_ANT | \
  1709. WMI_VHT_CAP_TX_FIXED_ANT)
  1710. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1711. 802.11ac
  1712. */
  1713. #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1)
  1714. #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value)
  1715. /* Notification bit for Ext MCS 10/11 support */
  1716. #define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1)
  1717. #define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value)
  1718. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1719. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1720. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1721. /** 11ax capabilities */
  1722. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1723. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1724. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1725. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1726. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1727. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT 0x00000001
  1728. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT 0x00000002
  1729. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT 0x00000004
  1730. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1731. WMI_GET_BITS(he_cap_info_dword1, 0, 1)
  1732. #define WMI_HE_CAP_1X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1733. WMI_SET_BITS(he_cap_info_dword1, 0, 1, value)
  1734. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_GET(he_cap_info_dword1) \
  1735. WMI_GET_BITS(he_cap_info_dword1, 1, 1)
  1736. #define WMI_HE_CAP_2X_LTF_400NS_GI_SUPPORT_SET(he_cap_info_dword1, value) \
  1737. WMI_SET_BITS(he_cap_info_dword1, 1, 1, value)
  1738. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_GET(he_cap_info_dword1) \
  1739. WMI_GET_BITS(he_cap_info_dword1, 2, 1)
  1740. #define WMI_HE_CAP_2X_LTF_160_80_80_SUPPORT_SET(he_cap_info_dword1, value) \
  1741. WMI_SET_BITS(he_cap_info_dword1, 2, 1, value)
  1742. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1743. */
  1744. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1745. /* fragmentation support field value */
  1746. enum {
  1747. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1748. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1749. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1750. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1751. };
  1752. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1753. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1754. #define WMI_MAX_NUM_RU MAX_HE_RU
  1755. /*
  1756. * Figure 8 554ae: -PPE Threshold Info field format
  1757. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1758. *
  1759. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1760. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1761. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1762. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1763. *
  1764. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1765. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1766. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1767. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1768. *
  1769. * etc.
  1770. */
  1771. /*
  1772. * Note that in these macros, "ru" is one-based, not zero-based, while
  1773. * nssm1 is zero-based.
  1774. */
  1775. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1776. do { \
  1777. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1778. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1779. } while (0)
  1780. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1781. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1782. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1783. do { \
  1784. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1785. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1786. } while (0)
  1787. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1788. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1789. typedef struct _wmi_ppe_threshold {
  1790. A_UINT32 numss_m1; /** NSS - 1*/
  1791. union {
  1792. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1793. A_UINT32 ru_mask; /** RU index mask */
  1794. };
  1795. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1796. } wmi_ppe_threshold;
  1797. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1798. */
  1799. #define WMI_SYS_CAP_ENABLE 0x00000001
  1800. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1801. /*
  1802. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1803. * Bits 5:0 are reserved
  1804. */
  1805. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1806. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1807. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1808. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1809. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1810. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1811. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1812. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1813. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1814. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1815. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1816. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1817. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1818. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1819. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1820. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1821. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1822. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1823. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1824. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1825. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1826. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1827. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1828. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1829. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1830. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1831. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1832. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1833. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1834. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1835. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1836. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1837. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1838. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1839. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1840. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1841. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1842. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1843. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1844. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1845. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1846. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1847. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1848. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1849. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1850. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1851. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1852. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1853. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1854. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1855. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1856. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1857. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1858. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1859. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1860. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1861. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1862. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1863. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1864. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1865. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1866. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1867. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1868. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1869. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1870. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1871. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1872. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1873. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1874. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1875. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1876. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1877. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1878. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1879. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1880. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1881. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1882. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1883. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1884. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1885. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1886. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  1887. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  1888. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1889. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1890. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1891. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1892. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1893. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1894. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1895. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1896. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1897. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  1898. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  1899. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  1900. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  1901. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  1902. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  1903. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1904. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1905. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1906. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1907. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  1908. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1909. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  1910. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1911. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  1912. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1913. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1914. typedef struct _wmi_abi_version {
  1915. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  1916. A_UINT32 abi_version_1; /** WMI change revision */
  1917. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  1918. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  1919. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  1920. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  1921. } wmi_abi_version;
  1922. /*
  1923. * maximum number of memroy requests allowed from FW.
  1924. */
  1925. #define WMI_MAX_MEM_REQS 16
  1926. /* !!NOTE!!:
  1927. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1928. * Please don't change it.
  1929. */
  1930. #define HW_BD_INFO_SIZE 5
  1931. /**
  1932. * PDEV ID to identify the physical device,
  1933. * value 0 reserved for SOC level commands/event
  1934. */
  1935. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1936. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1937. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1938. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1939. /*
  1940. * Enum regarding which BDF elements are provided in which elements of the
  1941. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  1942. */
  1943. typedef enum {
  1944. BDF_VERSION = 0,
  1945. REF_DESIGN_ID = 1,
  1946. CUSTOMER_ID = 2,
  1947. PROJECT_ID = 3,
  1948. BOARD_DATA_REV = 4,
  1949. } wmi_hw_bd_info_e;
  1950. /*
  1951. * Macros to get/set BDF details within the
  1952. * wmi_service_ready_event_fixed_param.hw_bd_info[] array
  1953. */
  1954. #define WMI_GET_BDF_VERSION(hw_bd_info) ((hw_bd_info)[BDF_VERSION])
  1955. #define WMI_GET_REF_DESIGN(hw_bd_info) ((hw_bd_info)[REF_DESIGN_ID])
  1956. #define WMI_GET_CUSTOMER_ID(hw_bd_info) ((hw_bd_info)[CUSTOMER_ID])
  1957. #define WMI_GET_PROJECT_ID(hw_bd_info) ((hw_bd_info)[PROJECT_ID])
  1958. #define WMI_GET_BOARD_DATA_REV(hw_bd_info) ((hw_bd_info)[BOARD_DATA_REV])
  1959. #define WMI_SET_BDF_VERSION(hw_bd_info, val) ((hw_bd_info)[BDF_VERSION] = (val))
  1960. #define WMI_SET_REF_DESIGN(hw_bd_info, val) ((hw_bd_info)[REF_DESIGN_ID] = (val))
  1961. #define WMI_SET_CUSTOMER_ID(hw_bd_info, val) ((hw_bd_info)[CUSTOMER_ID] = (val))
  1962. #define WMI_SET_PROJECT_ID(hw_bd_info, val) ((hw_bd_info)[PROJECT_ID] = (val))
  1963. #define WMI_SET_BOARD_DATA_REV(hw_bd_info, val) ((hw_bd_info)[BOARD_DATA_REV] = (val))
  1964. /**
  1965. * The following struct holds optional payload for
  1966. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1967. * device capability to the host.
  1968. */
  1969. typedef struct {
  1970. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1971. A_UINT32 fw_build_vers; /* firmware build number */
  1972. wmi_abi_version fw_abi_vers;
  1973. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1974. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1975. A_UINT32 num_rf_chains;
  1976. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1977. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1978. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1979. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1980. A_UINT32 hw_min_tx_power;
  1981. A_UINT32 hw_max_tx_power;
  1982. /* sys_cap_info:
  1983. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  1984. * bits 31:2 - reserved (must be set to zero)
  1985. */
  1986. A_UINT32 sys_cap_info;
  1987. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1988. /** Max beacon and Probe Response IE offload size (includes
  1989. * optional P2P IEs) */
  1990. A_UINT32 max_bcn_ie_size;
  1991. /*
  1992. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  1993. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  1994. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  1995. * by DMA.
  1996. */
  1997. A_UINT32 num_mem_reqs;
  1998. /* Max No. scan channels target can support
  1999. * If FW is too old and doesn't indicate this number, host side value will default to
  2000. * 0, and host will take the original compatible value (62) for future scan channel
  2001. * setup.
  2002. */
  2003. A_UINT32 max_num_scan_channels;
  2004. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  2005. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  2006. */
  2007. A_UINT32 hw_bd_id;
  2008. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  2009. /*
  2010. * Number of MACs supported, i.e. a DBS-capable device will return 2
  2011. */
  2012. A_UINT32 max_supported_macs;
  2013. /*
  2014. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  2015. */
  2016. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  2017. /*
  2018. * Number of Dual Band Simultaneous (DBS) hardware modes
  2019. */
  2020. A_UINT32 num_dbs_hw_modes;
  2021. /*
  2022. * txrx_chainmask
  2023. * [7:0] - 2G band tx chain mask
  2024. * [15:8] - 2G band rx chain mask
  2025. * [23:16] - 5G band tx chain mask
  2026. * [31:24] - 5G band rx chain mask
  2027. *
  2028. */
  2029. A_UINT32 txrx_chainmask;
  2030. /*
  2031. * default Dual Band Simultaneous (DBS) hardware mode
  2032. */
  2033. A_UINT32 default_dbs_hw_mode_index;
  2034. /*
  2035. * Number of msdu descriptors target would use
  2036. */
  2037. A_UINT32 num_msdu_desc;
  2038. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  2039. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  2040. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  2041. * wlan_host_mem_req mem_reqs[];
  2042. * wlan_dbs_hw_mode_list[];
  2043. */
  2044. } wmi_service_ready_event_fixed_param;
  2045. typedef enum {
  2046. WMI_RXTX_LED_ENABLE = 0x00000001,
  2047. WMI_RFKILL_ENABLE = 0x00000002,
  2048. } WMI_LEDRFKILL_FLAGS;
  2049. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  2050. typedef struct {
  2051. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  2052. /*
  2053. * The wmi_service_segment offset field specifies the position within the
  2054. * logical bitmap of WMI service flags at which the WMI service flags
  2055. * specified within this message begin.
  2056. * Since the first 128 WMI service flags are specified within the
  2057. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  2058. * the wmi_service_segment_offset value is expected to be 128 or more.
  2059. */
  2060. A_UINT32 wmi_service_segment_offset;
  2061. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  2062. } wmi_service_available_event_fixed_param;
  2063. typedef struct {
  2064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  2065. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  2066. A_UINT32 default_conc_scan_config_bits;
  2067. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  2068. A_UINT32 default_fw_config_bits;
  2069. wmi_ppe_threshold ppet;
  2070. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  2071. /*
  2072. * An HT STA shall not allow transmission of more than one MPDU start
  2073. * within the time limit described in the MPDU maximum density field.
  2074. */
  2075. A_UINT32 mpdu_density; /* units are microseconds */
  2076. /*
  2077. * Maximum no of BSSID based RX filters host can program
  2078. * Value 0 means FW hasn't given any limit to host.
  2079. */
  2080. A_UINT32 max_bssid_rx_filters;
  2081. /*
  2082. * Extended FW build version information:
  2083. * bits 27:0 -> reserved
  2084. * bits 31:28 -> CRM sub ID
  2085. */
  2086. A_UINT32 fw_build_vers_ext;
  2087. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2088. * This limit is the maximum number of SSIDs that can be configured in the
  2089. * target for Network List Offload (i.e. scanning for a preferred network).
  2090. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  2091. * If this value is non-zero, the host should send back in the
  2092. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  2093. * is equal to or less than the target capability limit reported here.
  2094. */
  2095. A_UINT32 max_nlo_ssids;
  2096. /* ref to section 8.4.2.48 Multiple BSSID element
  2097. * The Max BSSID Indicator field contains a value assigned to n,
  2098. * where 2^n is the maximum number of BSSIDs
  2099. */
  2100. A_UINT32 max_bssid_indicator;
  2101. /* 2nd DWORD of HE MAC Capabilities */
  2102. A_UINT32 he_cap_info_ext;
  2103. } wmi_service_ready_ext_event_fixed_param;
  2104. typedef enum {
  2105. WMI_FW_STA_RTT_INITR = 0x00000001,
  2106. WMI_FW_STA_RTT_RESPR = 0x00000002,
  2107. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  2108. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  2109. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  2110. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  2111. WMI_FW_AP_RTT_INITR = 0x00000040,
  2112. WMI_FW_AP_RTT_RESPR = 0x00000080,
  2113. WMI_FW_NAN_RTT_INITR = 0x00000100,
  2114. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  2115. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  2116. /*
  2117. * New fw sub feature capabilites before
  2118. * WMI_FW_MAX_SUB_FEAT_CAP
  2119. */
  2120. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  2121. } WMI_FW_SUB_FEAT_CAPS;
  2122. typedef enum {
  2123. WMI_HWBD_NONE = 0, /* No hw board information is given */
  2124. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  2125. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  2126. } WMI_HWBD_ID;
  2127. #define ATH_BD_DATA_REV_MASK 0x000000FF
  2128. #define ATH_BD_DATA_REV_SHIFT 0
  2129. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2130. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2131. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2132. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2133. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2134. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2135. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2136. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2137. #define GET_BD_DATA_REV(bd_data_ver) \
  2138. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2139. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2140. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2141. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2142. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2143. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2144. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2145. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2146. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2147. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2148. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2149. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2150. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2151. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2152. typedef struct {
  2153. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2154. A_UINT32 end_freq; /* end frequency */
  2155. } avoid_freq_range_desc;
  2156. typedef struct {
  2157. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2158. A_UINT32 num_freq_ranges;
  2159. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2160. avoid_freq_range_desc avd_freq_range[0];
  2161. } wmi_wlan_avoid_freq_ranges_event;
  2162. #endif
  2163. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2164. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2165. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2166. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2167. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2168. typedef A_UINT32 WLAN_INIT_STATUS;
  2169. typedef struct {
  2170. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2171. wmi_abi_version fw_abi_vers;
  2172. /*
  2173. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2174. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2175. * for cases where the target specifies one MAC address per pdev
  2176. * (so the host can treat the pdevs within the target as separately
  2177. * as possible) rather than one MAC address for the whole SOC.
  2178. */
  2179. wmi_mac_addr mac_addr;
  2180. A_UINT32 status;
  2181. A_UINT32 num_dscp_table;
  2182. /* num_extra_mac_addr -
  2183. * how many additional MAC addresses besides the above mac_addr
  2184. * are provided in the subsequent mac_addr_list TLV
  2185. */
  2186. A_UINT32 num_extra_mac_addr;
  2187. /*
  2188. * Total number of "real" peers (remote peers of an AP vdev,
  2189. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2190. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2191. * total number of peers.
  2192. */
  2193. A_UINT32 num_total_peers;
  2194. /*
  2195. * Number of extra peers that Firmware adds.
  2196. * These are self peers and/or other FW only peers that don't represent
  2197. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2198. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2199. * to allow each tx queue to belong to a peer object.
  2200. * Peer ID can be up to num_total_peers + num_extra_peers.
  2201. */
  2202. A_UINT32 num_extra_peers;
  2203. /*
  2204. * max_ast_index - max AST index that Firmware can generate
  2205. * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen
  2206. * based on num_peers configutation from Host. Hence Host needs to know the
  2207. * max_ast_index that Firmware can generate.
  2208. * A 0x0 value for max_ast_index means the target has not specified a limit.
  2209. */
  2210. A_UINT32 max_ast_index;
  2211. /*
  2212. * This fixed_param TLV is followed by these additional TLVs:
  2213. * mac_addr_list[num_extra_mac_addr];
  2214. */
  2215. } wmi_ready_event_fixed_param;
  2216. typedef struct {
  2217. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2218. /**
  2219. * @brief num_vdev - number of virtual devices (VAPs) to support
  2220. */
  2221. A_UINT32 num_vdevs;
  2222. /**
  2223. * @brief num_peers - number of peer nodes to support
  2224. */
  2225. A_UINT32 num_peers;
  2226. /*
  2227. * @brief In offload mode target supports features like WOW, chatter and other
  2228. * protocol offloads. In order to support them some functionalities like
  2229. * reorder buffering, PN checking need to be done in target. This determines
  2230. * maximum number of peers suported by target in offload mode
  2231. */
  2232. A_UINT32 num_offload_peers;
  2233. /* @brief Number of reorder buffers available for doing target based reorder
  2234. * Rx reorder buffering
  2235. */
  2236. A_UINT32 num_offload_reorder_buffs;
  2237. /**
  2238. * @brief num_peer_keys - number of keys per peer
  2239. */
  2240. A_UINT32 num_peer_keys;
  2241. /**
  2242. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2243. */
  2244. A_UINT32 num_tids;
  2245. /**
  2246. * @brief ast_skid_limit - max skid for resolving hash collisions
  2247. * @details
  2248. * The address search table is sparse, so that if two MAC addresses
  2249. * result in the same hash value, the second of these conflicting
  2250. * entries can slide to the next index in the address search table,
  2251. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2252. * specifies the upper bound on how many subsequent indices to search
  2253. * over to find an unoccupied space.
  2254. */
  2255. A_UINT32 ast_skid_limit;
  2256. /**
  2257. * @brief tx_chain_mask - the nominal chain mask for transmit
  2258. * @details
  2259. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2260. * a reduced number of chains if no clients are associated.
  2261. * This configuration parameter specifies the nominal chain-mask that
  2262. * should be used when not operating with a reduced set of tx chains.
  2263. */
  2264. A_UINT32 tx_chain_mask;
  2265. /**
  2266. * @brief rx_chain_mask - the nominal chain mask for receive
  2267. * @details
  2268. * The chain mask may be modified dynamically, e.g. for a client to use
  2269. * a reduced number of chains for receive if the traffic to the client
  2270. * is low enough that it doesn't require downlink MIMO or antenna
  2271. * diversity.
  2272. * This configuration parameter specifies the nominal chain-mask that
  2273. * should be used when not operating with a reduced set of rx chains.
  2274. */
  2275. A_UINT32 rx_chain_mask;
  2276. /**
  2277. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2278. * @details
  2279. * Each WMM access class (voice, video, best-effort, background) will
  2280. * have its own timeout value to dictate how long to wait for missing
  2281. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2282. * been received.
  2283. * This parameter specifies the timeout in milliseconds for each class .
  2284. * NOTE: the number of class (defined as 4) cannot be
  2285. * changed in the future without breaking WMI compatibility.
  2286. */
  2287. A_UINT32 rx_timeout_pri[4];
  2288. /**
  2289. * @brief rx_decap mode - what mode the rx should decap packets to
  2290. * @details
  2291. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2292. * THis setting also determines the default TX behavior, however TX
  2293. * behavior can be modified on a per VAP basis during VAP init
  2294. */
  2295. A_UINT32 rx_decap_mode;
  2296. /**
  2297. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2298. */
  2299. A_UINT32 scan_max_pending_req;
  2300. /**
  2301. * @brief maximum VDEV that could use BMISS offload
  2302. */
  2303. A_UINT32 bmiss_offload_max_vdev;
  2304. /**
  2305. * @brief maximum VDEV that could use offload roaming
  2306. */
  2307. A_UINT32 roam_offload_max_vdev;
  2308. /**
  2309. * @brief maximum AP profiles that would push to offload roaming
  2310. */
  2311. A_UINT32 roam_offload_max_ap_profiles;
  2312. /**
  2313. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2314. * @details
  2315. * The target's WAL maintains a table to hold information regarding which
  2316. * peers belong to a given multicast group, so that if multicast->unicast
  2317. * conversion is enabled, the target can convert multicast tx frames to a
  2318. * series of unicast tx frames, to each peer within the multicast group.
  2319. * This num_mcast_groups configuration parameter tells the target how
  2320. * many multicast groups to provide storage for within its multicast
  2321. * group membership table.
  2322. */
  2323. A_UINT32 num_mcast_groups;
  2324. /**
  2325. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2326. * @details
  2327. * This num_mcast_table_elems configuration parameter tells the target
  2328. * how many peer elements it needs to provide storage for in its
  2329. * multicast group membership table.
  2330. * These multicast group membership table elements are shared by the
  2331. * multicast groups stored within the table.
  2332. */
  2333. A_UINT32 num_mcast_table_elems;
  2334. /**
  2335. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2336. * @details
  2337. * This configuration parameter specifies whether the target should
  2338. * perform multicast --> unicast conversion on transmit, and if so,
  2339. * what to do if it finds no entries in its multicast group membership
  2340. * table for the multicast IP address in the tx frame.
  2341. * Configuration value:
  2342. * 0 -> Do not perform multicast to unicast conversion.
  2343. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2344. * from the tx frame is found in the multicast group membership
  2345. * table. If the IP multicast address is not found, drop the frame.
  2346. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2347. * from the tx frame is found in the multicast group membership
  2348. * table. If the IP multicast address is not found, transmit the
  2349. * frame as multicast.
  2350. */
  2351. A_UINT32 mcast2ucast_mode;
  2352. /**
  2353. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2354. * @details
  2355. * This parameter controls how much memory the target will allocate to
  2356. * store a log of tx PPDU meta-information (how large the PPDU was,
  2357. * when it was sent, whether it was successful, etc.)
  2358. */
  2359. A_UINT32 tx_dbg_log_size;
  2360. /**
  2361. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2362. */
  2363. A_UINT32 num_wds_entries;
  2364. /**
  2365. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2366. * this limit can be 0 -default, 1 256B
  2367. */
  2368. A_UINT32 dma_burst_size;
  2369. /**
  2370. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2371. * to account for interface latency to avoid underrun.
  2372. */
  2373. A_UINT32 mac_aggr_delim;
  2374. /**
  2375. * @brief rx_skip_defrag_timeout_dup_detection_check
  2376. * @details
  2377. * determine whether target is responsible for detecting duplicate
  2378. * non-aggregate MPDU and timing out stale fragments.
  2379. *
  2380. * A-MPDU reordering is always performed on the target.
  2381. *
  2382. * 0: target responsible for frag timeout and dup checking
  2383. * 1: host responsible for frag timeout and dup checking
  2384. */
  2385. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2386. /**
  2387. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2388. * and Max no of descriptors for each Video link (node).
  2389. */
  2390. A_UINT32 vow_config;
  2391. /**
  2392. * @brief maximum VDEV that could use GTK offload
  2393. */
  2394. A_UINT32 gtk_offload_max_vdev;
  2395. /**
  2396. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2397. */
  2398. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2399. /**
  2400. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2401. * @details
  2402. * This parameter controls the max number of Tx fragments per MSDU.
  2403. * This is sent by the target as part of the WMI_SERVICE_READY event
  2404. * and is overriden by the OS shim as required.
  2405. */
  2406. A_UINT32 max_frag_entries;
  2407. /**
  2408. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2409. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2410. */
  2411. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2412. /**
  2413. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2414. * @details
  2415. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2416. * peers in a connection tracking table for possible TDLS link creation
  2417. * or deletion. This controls the number of tracked peers per vdev.
  2418. */
  2419. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2420. A_UINT32 beacon_tx_offload_max_vdev;
  2421. A_UINT32 num_multicast_filter_entries;
  2422. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2423. /**
  2424. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2425. * from host.
  2426. */
  2427. A_UINT32 num_keep_alive_pattern;
  2428. /**
  2429. * @brief keep_alive_pattern_size - keep alive pattern size.
  2430. */
  2431. A_UINT32 keep_alive_pattern_size;
  2432. /**
  2433. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2434. * @details
  2435. * Each TDLS STA can become a sleep STA independently. This parameter
  2436. * mentions how many such sleep STAs can be supported concurrently.
  2437. */
  2438. A_UINT32 max_tdls_concurrent_sleep_sta;
  2439. /**
  2440. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2441. * @details
  2442. * Each TDLS STA can become a buffer STA independently. This parameter
  2443. * mentions how many such buffer STAs can be supported concurrently.
  2444. */
  2445. A_UINT32 max_tdls_concurrent_buffer_sta;
  2446. /**
  2447. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2448. */
  2449. A_UINT32 wmi_send_separate;
  2450. /**
  2451. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2452. */
  2453. A_UINT32 num_ocb_vdevs;
  2454. /**
  2455. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2456. */
  2457. A_UINT32 num_ocb_channels;
  2458. /**
  2459. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2460. */
  2461. A_UINT32 num_ocb_schedules;
  2462. /**
  2463. * @brief specific configuration from host, such as per platform configuration
  2464. */
  2465. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2466. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2467. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2468. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2469. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2470. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2471. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2472. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2473. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2474. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2475. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2476. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2477. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2478. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2479. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2480. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2481. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2482. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2483. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2484. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2485. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2486. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2487. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2488. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2489. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  2490. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  2491. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  2492. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  2493. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_S 14
  2494. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_M 0x4000
  2495. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_S 15
  2496. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_M 0x8000
  2497. /*
  2498. * If the AC override valid bit is set then this field will specify the
  2499. * access category to use for EAPOL frames
  2500. * 0 - WMM_AC_BE
  2501. * 1 - WMM_AC_BK
  2502. * 2 - WMM_AC_VI
  2503. * 3 - WMM_AC_VO
  2504. */
  2505. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_S 16
  2506. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_M 0x30000
  2507. /*
  2508. * If TX_ACK_RSSI is set, then the target should populate the ack_rssi
  2509. * field within the WMI_MGMT_TX_COMPLETION_EVENT message, the ack_rssi
  2510. * TLV within the WMI_MGMT_TX_BUNDLE_COMPLETION_EVENT message, and the
  2511. * "MSDU ACK RSSI" array within the HTT_T2H TX_COMPL_IND message.
  2512. */
  2513. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_S 18
  2514. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_M 0x40000
  2515. /*
  2516. * If HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN is set, the host will not
  2517. * include the HTC header length in the payload length for all HTT_H2T
  2518. * messages.
  2519. * Otherwise, only when sending HTT_H2T_MSG_TYPE_TX_FRM message,
  2520. * payload length includes HTC header length. Other HTT_H2T messages'
  2521. * payload length does not include HTC header length.
  2522. * The host will only set this HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN flag
  2523. * if the target has set the WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN
  2524. * flag to indicate its support for this option.
  2525. */
  2526. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_S 19
  2527. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_M 0x80000
  2528. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20
  2529. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000
  2530. /*
  2531. * If this HTT_PEER_STATS is set, then the target should use the
  2532. * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats;
  2533. * else the target should avoid sending the PEER_STATS_IND message.
  2534. */
  2535. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21
  2536. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000
  2537. /*
  2538. * If this BIT is set, then the target should use peer_tid_ext to analyze
  2539. * per peer per tid extended configurations
  2540. */
  2541. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22
  2542. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000
  2543. A_UINT32 flag1;
  2544. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2545. * @details
  2546. * 1 - Smart antenna is enabled.
  2547. * 0 - Smart antenna is disabled.
  2548. * In future this can contain smart antenna specifc capabilities.
  2549. */
  2550. A_UINT32 smart_ant_cap;
  2551. /**
  2552. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2553. * during init
  2554. */
  2555. A_UINT32 BK_Minfree;
  2556. A_UINT32 BE_Minfree;
  2557. A_UINT32 VI_Minfree;
  2558. A_UINT32 VO_Minfree;
  2559. /**
  2560. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2561. * descriptor memory allocation.
  2562. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2563. * If host wants to transmit data packet at its desired rate,
  2564. * this field must be set.
  2565. * 0 - Don't allocate fragment descriptor for data packet.
  2566. */
  2567. A_UINT32 alloc_frag_desc_for_data_pkt;
  2568. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2569. A_UINT32 num_ns_ext_tuples_cfg;
  2570. /**
  2571. * size (in bytes) of the buffer the FW shall allocate per vdev
  2572. * firmware can dynamic allocate memory (or disable)
  2573. * packet filtering feature.
  2574. * 0 - fw chooses its default value
  2575. * -1 (0XFFFFFFFF) - disable APF
  2576. */
  2577. A_UINT32 bpf_instruction_size;
  2578. /**
  2579. * Maximum no of BSSID based RX filters host would program
  2580. * Value 0 means host doesn't given any limit to FW.
  2581. */
  2582. A_UINT32 max_bssid_rx_filters;
  2583. /**
  2584. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2585. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2586. */
  2587. A_UINT32 use_pdev_id;
  2588. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2589. A_UINT32 max_num_dbs_scan_duty_cycle;
  2590. /** Maximum number of Multi group key to support */
  2591. A_UINT32 max_num_group_keys;
  2592. /**
  2593. * HTT peer map/unmap V2 format support
  2594. * 0 -> host doesn't support HTT peer map/unmap v2 format.
  2595. * 1 -> host supports HTT peer map/unmap v2 format; the target is
  2596. * allowed but not required to use peer map/unmap v2 format.
  2597. */
  2598. A_UINT32 peer_map_unmap_v2_support;
  2599. /** Sched config params for all pdevs
  2600. * These tx scheduling configuration parameters are currently only
  2601. * used for internal testing purposes; therefore the non-default
  2602. * values for this field are not currently documented.
  2603. * For regular use, this field should be set to 0x0.
  2604. */
  2605. A_UINT32 sched_params;
  2606. /* Number of MAC on which AP TWT feature is supported */
  2607. A_UINT32 twt_ap_pdev_count;
  2608. /* Max no of STA with which TWT sessions can be formed by the AP */
  2609. A_UINT32 twt_ap_sta_count;
  2610. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2611. * This parameter provides the final specification for the maximum number
  2612. * of SSIDs for the target to support for Network List Offload's scanning
  2613. * for preferred networks.
  2614. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  2615. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  2616. * (If the target didn't provide a max_nlo_ssids field in the
  2617. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  2618. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  2619. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  2620. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  2621. * the host does not support dynamic negotiation of max NLO SSIDs.
  2622. * In such a case, the target will respond as follows:
  2623. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  2624. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  2625. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  2626. * abort its boot-up, due to receiving an invalid/unsupported
  2627. * configuration specification.
  2628. */
  2629. A_UINT32 max_nlo_ssids;
  2630. /**
  2631. * num_packet_filters: the num that host requests fw to support for
  2632. * pktfilter in total, then firmware can dynamic allocate
  2633. * memory(or disable) pktfilter feature.
  2634. *
  2635. * 0 - fw chooses its default value.
  2636. * -1(0XFFFFFFFF)- disable pktfilter.
  2637. */
  2638. A_UINT32 num_packet_filters;
  2639. /**
  2640. * num_max_sta_vdevs: the max num for the sta vdevs
  2641. * fw will use it to config the memory of offload features that
  2642. * are only for sta vdevs.
  2643. * p2p client should be included.
  2644. *
  2645. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  2646. */
  2647. A_UINT32 num_max_sta_vdevs;
  2648. /* ref to section 8.4.2.48 Multiple BSSID element
  2649. * The Max BSSID Indicator field contains a value assigned to n,
  2650. * where 2^n is the maximum number of BSSIDs
  2651. */
  2652. A_UINT32 max_bssid_indicator;
  2653. /** @brief ul_resp_config - Configures the 11ax uplink ofdma feature on STA.
  2654. * I.e. sending uplink response to a trigger frame sent by AP.
  2655. * @details
  2656. * 0 - fw default behavior, based on chipset
  2657. * 1 - UL_RESP is disabled.
  2658. * 2 - UL_RESP is enabled.
  2659. * other - reserved.
  2660. */
  2661. A_UINT32 ul_resp_config;
  2662. } wmi_resource_config;
  2663. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2664. do { \
  2665. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2666. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2667. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2668. } while (0)
  2669. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2670. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2671. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2672. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2673. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2674. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2675. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2676. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2677. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2678. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2679. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2680. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2681. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2682. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2683. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2684. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2685. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2686. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2687. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2688. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2689. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2690. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2691. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2692. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2693. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2694. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2695. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2696. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2697. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2698. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2699. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2700. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2701. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2702. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2703. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2704. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2705. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2706. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2707. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2708. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2709. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2710. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2711. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2712. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  2713. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  2714. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  2715. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  2716. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  2717. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  2718. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  2719. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  2720. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  2721. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  2722. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  2723. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  2724. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_SET(word32, value) \
  2725. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE, (value))
  2726. #define WMI_RSRC_CFG_FLAG_EAPOL_REKEY_MINRATE_SUPPORT_ENABLE_GET(word32) \
  2727. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_REKEY_MINRATE_SUPPORT_ENABLE)
  2728. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_SET(word32, value) \
  2729. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE_VALID, (value))
  2730. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_VALID_GET(word32) \
  2731. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE_VALID)
  2732. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_SET(word32, value) \
  2733. WMI_RSRC_CFG_FLAG_SET((word32), EAPOL_AC_OVERRIDE, (value))
  2734. #define WMI_RSRC_CFG_FLAG_EAPOL_AC_OVERRIDE_GET(word32) \
  2735. WMI_RSRC_CFG_FLAG_GET((word32), EAPOL_AC_OVERRIDE)
  2736. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_SET(word32, value) \
  2737. WMI_RSRC_CFG_FLAG_SET((word32), TX_ACK_RSSI, (value))
  2738. #define WMI_RSRC_CFG_FLAG_TX_ACK_RSSI_GET(word32) \
  2739. WMI_RSRC_CFG_FLAG_GET((word32), TX_ACK_RSSI)
  2740. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET(word32, value) \
  2741. WMI_RSRC_CFG_FLAG_SET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN, (value))
  2742. #define WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_GET(word32) \
  2743. WMI_RSRC_CFG_FLAG_GET((word32), HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN)
  2744. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(word32, value) \
  2745. WMI_RSRC_CFG_FLAG_SET((word32), PEER_UNMAP_RESPONSE_SUPPORT, (value))
  2746. #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \
  2747. WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT)
  2748. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \
  2749. WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value))
  2750. #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \
  2751. WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS)
  2752. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \
  2753. WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value))
  2754. #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \
  2755. WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT)
  2756. typedef struct {
  2757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2758. /** The following indicate the WMI versions to be supported by
  2759. * the host driver. Note that the host driver decide to
  2760. * "downgrade" its WMI version support and this may not be the
  2761. * native version of the host driver. */
  2762. wmi_abi_version host_abi_vers;
  2763. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  2764. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  2765. * wmi_resource_config resource_config;
  2766. * wlan_host_memory_chunk host_mem_chunks[];
  2767. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2768. * Note that the hw_mode_config, in spite of its "pdev" name,
  2769. * applies to the entire target rather than for a single pdev
  2770. * within the target.
  2771. * To avoid specifying a HW mode for the target, the host should
  2772. * fill hw_mode_config's fields with 0x0.
  2773. */
  2774. } wmi_init_cmd_fixed_param;
  2775. /**
  2776. * TLV for channel list
  2777. */
  2778. typedef struct {
  2779. /** WMI_CHAN_LIST_TAG */
  2780. A_UINT32 tag;
  2781. /** # of channels to scan */
  2782. A_UINT32 num_chan;
  2783. /** channels in Mhz */
  2784. A_UINT32 channel_list[1];
  2785. } wmi_chan_list;
  2786. /**
  2787. * TLV for bssid list
  2788. */
  2789. typedef struct {
  2790. /** WMI_BSSID_LIST_TAG */
  2791. A_UINT32 tag;
  2792. /** number of bssids */
  2793. A_UINT32 num_bssid;
  2794. /** bssid list */
  2795. wmi_mac_addr bssid_list[1];
  2796. } wmi_bssid_list;
  2797. /**
  2798. * TLV for ie data.
  2799. */
  2800. typedef struct {
  2801. /** WMI_IE_TAG */
  2802. A_UINT32 tag;
  2803. /** number of bytes in ie data */
  2804. A_UINT32 ie_len;
  2805. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  2806. A_UINT32 ie_data[1];
  2807. } wmi_ie_data;
  2808. /**
  2809. * TLV used for length/buffer
  2810. */
  2811. typedef struct {
  2812. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  2813. A_UINT32 buf_len; /** Length of buf */
  2814. /**
  2815. * Following this structure is the TLV byte stream of buf of length buf_len:
  2816. * A_UINT8 buf[];
  2817. *
  2818. */
  2819. } wmi_tlv_buf_len_param;
  2820. /**
  2821. * TLV used for specifying the demensions of a multi-dimensional array
  2822. * that has been stored in a flat buffer
  2823. */
  2824. typedef struct {
  2825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_arrays_len_param */
  2826. /**
  2827. * d1_len, d2_len, d3_len, and d4_len are the lengths of each dimension
  2828. * for a multi-dimensional array.
  2829. * If the length of outer dimension is not 1, the inner dimension
  2830. * shouldn't be 1.
  2831. * If the multi-dimensional array has less than 4 dimensions, the outer
  2832. * dimensions' lengths should be 1. For example, a buf[3][4] array
  2833. * would have d1_len = 4, d2_len = 3, d3_len = 1, d4_len = 1.
  2834. * The outermost dimension of the array can be inferred from the array
  2835. * length; thus, this struct supports up to 5-D arrays. For a 5-D array,
  2836. * the outermost (5th) dimension would be
  2837. * array length / (d1_len * d2_len * d3_len * d4_len)
  2838. *
  2839. * For security (to ensure no out-of-bounds memory access),
  2840. * the receiver shall validate that the product of all dimensions
  2841. * is equal to (or less than) the array length.
  2842. */
  2843. A_UINT32 d1_len; /* the length of 1st (innermost) dimension array */
  2844. A_UINT32 d2_len; /* the length of 2nd dimension array */
  2845. A_UINT32 d3_len; /* the length of 3rd dimension array */
  2846. A_UINT32 d4_len; /* the length of 4th dimension array */
  2847. /**
  2848. * Following this structure is the TLV multi-dimension array buffer:
  2849. * <type> buf[L1*L2*L3*L4];
  2850. * where, L1, L2, L3, and L4 are the values of
  2851. * d1_len, d2_len, d3_len and d4_len.
  2852. * To access the 4-D element a[i][j][k][l], the buf[] array would be
  2853. * indexed as buf[i*L3*L2*L1 + j*L2*L1 + k*L1 + l].
  2854. */
  2855. } wmi_tlv_arrays_len_param;
  2856. typedef struct {
  2857. /** Len of the SSID */
  2858. A_UINT32 ssid_len;
  2859. /** SSID */
  2860. A_UINT32 ssid[8];
  2861. } wmi_ssid;
  2862. typedef struct {
  2863. /** WMI_SSID_LIST_TAG */
  2864. A_UINT32 tag;
  2865. A_UINT32 num_ssids;
  2866. wmi_ssid ssids[1];
  2867. } wmi_ssid_list;
  2868. typedef struct {
  2869. /** WMI_SCAN_START_OFFSET_TAG */
  2870. A_UINT32 tag;
  2871. /** Number of start TSF offsets */
  2872. A_UINT32 num_offset;
  2873. /** Array of start TSF offsets provided in milliseconds */
  2874. A_UINT32 start_tsf_offset[1];
  2875. } wmi_scan_start_offset;
  2876. /**
  2877. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  2878. */
  2879. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  2880. * 0 to be used to represent unspecified / don't care / default values.
  2881. * Therefore, WMI phy mode = WLAN phy mode + 1.
  2882. */
  2883. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  2884. * and the FW will use any mode as long as the frequency matches.
  2885. */
  2886. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  2887. * be equal to num_chan. (Unless the host does not specify phymode_list values
  2888. * at all, in which case the number of phymode_list elements will be zero.)
  2889. * The indexing of the phymode_list[] array corresponds to same index of
  2890. * the chan_list[] array.
  2891. */
  2892. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  2893. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  2894. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  2895. /* prefix used by scan requestor ids on the host */
  2896. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2897. /* prefix used by scan request ids generated on the host */
  2898. /* host cycles through the lower 12 bits to generate ids */
  2899. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2900. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2901. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2902. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2903. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  2904. #define WMI_IE_BITMAP_SIZE 8
  2905. typedef struct {
  2906. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2907. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  2908. A_UINT32 scan_id;
  2909. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  2910. A_UINT32 scan_req_id;
  2911. /** VDEV id(interface) that is requesting scan */
  2912. A_UINT32 vdev_id;
  2913. /** Scan Priority, input to scan scheduler */
  2914. A_UINT32 scan_priority;
  2915. /** Scan events subscription */
  2916. A_UINT32 notify_scan_events;
  2917. /** dwell time in msec on active channels */
  2918. A_UINT32 dwell_time_active;
  2919. /** dwell time in msec on passive channels */
  2920. A_UINT32 dwell_time_passive;
  2921. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2922. A_UINT32 min_rest_time;
  2923. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2924. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2925. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2926. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2927. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2928. * irrespective of activity. activity is determined by the idle_time parameter.
  2929. */
  2930. A_UINT32 max_rest_time;
  2931. /** time before sending next set of probe requests.
  2932. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2933. * The number of probe requests specified depends on the ssid_list and bssid_list
  2934. */
  2935. A_UINT32 repeat_probe_time;
  2936. /** time in msec between 2 consequetive probe requests with in a set. */
  2937. A_UINT32 probe_spacing_time;
  2938. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2939. A_UINT32 idle_time;
  2940. /** maximum time in msec allowed for scan */
  2941. A_UINT32 max_scan_time;
  2942. /** delay in msec before sending first probe request after switching to a channel */
  2943. A_UINT32 probe_delay;
  2944. /** Scan control flags */
  2945. A_UINT32 scan_ctrl_flags;
  2946. /** Burst duration time in msec*/
  2947. A_UINT32 burst_duration;
  2948. /** # if channels to scan. In the TLV channel_list[] */
  2949. A_UINT32 num_chan;
  2950. /** number of bssids. In the TLV bssid_list[] */
  2951. A_UINT32 num_bssid;
  2952. /** number of ssid. In the TLV ssid_list[] */
  2953. A_UINT32 num_ssids;
  2954. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2955. A_UINT32 ie_len;
  2956. /** Max number of probes to be sent */
  2957. A_UINT32 n_probes;
  2958. /** MAC Address to use in Probe Req as SA **/
  2959. wmi_mac_addr mac_addr;
  2960. /** Mask on which MAC has to be randomized **/
  2961. wmi_mac_addr mac_mask;
  2962. /** ie bitmap to use in probe req **/
  2963. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2964. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2965. A_UINT32 num_vendor_oui;
  2966. /** Scan control flags extended **/
  2967. A_UINT32 scan_ctrl_flags_ext;
  2968. /** dwell time in msec on active 2G channels, if it's not zero */
  2969. A_UINT32 dwell_time_active_2g;
  2970. /**
  2971. * TLV (tag length value) parameters follow the scan_cmd
  2972. * structure. The TLV's are:
  2973. * A_UINT32 channel_list[num_chan];
  2974. * wmi_ssid ssid_list[num_ssids];
  2975. * wmi_mac_addr bssid_list[num_bssid];
  2976. * A_UINT8 ie_data[ie_len];
  2977. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  2978. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  2979. */
  2980. } wmi_start_scan_cmd_fixed_param;
  2981. /**
  2982. * scan control flags.
  2983. */
  2984. /** passively scan all channels including active channels */
  2985. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2986. /** add wild card ssid probe request even though ssid_list is specified. */
  2987. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2988. /** add cck rates to rates/xrate ie for the generated probe request */
  2989. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2990. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2991. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2992. /** To enable indication of Chan load and Noise floor to host */
  2993. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2994. /** Filter Probe request frames */
  2995. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2996. /**When set, not to scan DFS channels*/
  2997. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2998. /**When set, certain errors are ignored and scan continues.
  2999. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  3000. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  3001. /** Enable promiscous mode for CCXv4 */
  3002. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  3003. /** allow to send probe req on DFS channel */
  3004. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  3005. /** add TPC content in probe req frame */
  3006. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  3007. /** add DS content in probe req frame */
  3008. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  3009. /** use random mac address for TA for probe request frame and add
  3010. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  3011. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  3012. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  3013. /** allow mgmt transmission during off channel scan */
  3014. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  3015. /** allow data transmission during off channel scan */
  3016. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  3017. /** allow capture ppdu with phy errrors */
  3018. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  3019. /** always do passive scan on passive channels */
  3020. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  3021. /** set HALF (10MHz) rate support */
  3022. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  3023. /** set Quarter (5MHz) rate support */
  3024. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  3025. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  3026. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  3027. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  3028. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  3029. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  3030. typedef enum {
  3031. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  3032. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  3033. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  3034. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  3035. WMI_SCAN_DWELL_MODE_STATIC = 4,
  3036. } WMI_SCAN_DWELL_MODE;
  3037. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  3038. do { \
  3039. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  3040. WMI_SCAN_DWELL_MODE_MASK); \
  3041. } while (0)
  3042. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  3043. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  3044. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  3045. #define WMI_SCAN_CLASS_MASK 0xFF000000
  3046. /*
  3047. * Masks identifying types/ID of scans
  3048. * Scan_Stop macros should be the same value as below defined in UMAC
  3049. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  3050. * #define IEEE80211_VAP_SCAN 0x01000000
  3051. * #define IEEE80211_ALL_SCANS 0x04000000
  3052. */
  3053. #define WMI_SCAN_STOP_ONE 0x00000000
  3054. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  3055. #define WMI_SCAN_STOP_ALL 0x04000000
  3056. /** extended Scan ctrl flags **/
  3057. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  3058. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  3059. policy scan manager computes */
  3060. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  3061. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  3062. policy scan manager computes*/
  3063. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  3064. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  3065. /** Enable Reception of Public Action frame with this flag
  3066. * (inside scan_ctrl_flags_ext field of wmi_start_scan_cmd_fixed_param)
  3067. */
  3068. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x4
  3069. typedef struct {
  3070. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  3071. /** requestor requesting cancel */
  3072. A_UINT32 requestor;
  3073. /** Scan ID */
  3074. A_UINT32 scan_id;
  3075. /**
  3076. * Req Type
  3077. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  3078. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  3079. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  3080. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  3081. */
  3082. A_UINT32 req_type;
  3083. /**
  3084. * vDev ID
  3085. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  3086. */
  3087. A_UINT32 vdev_id;
  3088. /** pdev_id for identifying the MAC
  3089. * See macros starting with WMI_PDEV_ID_ for values.
  3090. * In non-DBDC case host should set it to 0
  3091. */
  3092. A_UINT32 pdev_id;
  3093. } wmi_stop_scan_cmd_fixed_param;
  3094. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  3095. #define APPEND_TO_EXISTING_CHAN_LIST 1
  3096. typedef struct {
  3097. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  3098. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  3099. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  3100. 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. */
  3101. /** Followed by the variable length TLV chan_info:
  3102. * wmi_channel chan_info[] */
  3103. } wmi_scan_chan_list_cmd_fixed_param;
  3104. /*
  3105. * Priority numbers must be sequential, starting with 0.
  3106. */
  3107. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  3108. typedef enum {
  3109. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  3110. WMI_SCAN_PRIORITY_LOW,
  3111. WMI_SCAN_PRIORITY_MEDIUM,
  3112. WMI_SCAN_PRIORITY_HIGH,
  3113. WMI_SCAN_PRIORITY_VERY_HIGH,
  3114. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  3115. } wmi_scan_priority;
  3116. /* Five Levels for Requested Priority */
  3117. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  3118. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  3119. /**
  3120. * 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
  3121. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  3122. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  3123. */
  3124. typedef struct {
  3125. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  3126. /**
  3127. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  3128. * 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
  3129. */
  3130. A_UINT32 vdev_type;
  3131. /**
  3132. * number of rows in mapping_table for a specific vdev
  3133. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  3134. */
  3135. A_UINT32 number_rows;
  3136. /**
  3137. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  3138. * In non-DBDC case host should set it to 0
  3139. */
  3140. A_UINT32 pdev_id;
  3141. /** mapping_table for a specific vdev follows this TLV
  3142. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  3143. } wmi_scan_sch_priority_table_cmd_fixed_param;
  3144. /** update flags */
  3145. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  3146. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  3147. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  3148. typedef struct {
  3149. A_UINT32 tlv_header;
  3150. /** requestor requesting update scan request */
  3151. A_UINT32 requestor;
  3152. /** Scan ID of the scan request that need to be update */
  3153. A_UINT32 scan_id;
  3154. /** update flags, indicating which of the following fields are valid and need to be updated*/
  3155. A_UINT32 scan_update_flags;
  3156. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  3157. A_UINT32 scan_priority;
  3158. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  3159. A_UINT32 min_rest_time;
  3160. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  3161. A_UINT32 max_rest_time;
  3162. /** 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 */
  3163. A_UINT32 pdev_id;
  3164. } wmi_scan_update_request_cmd_fixed_param;
  3165. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  3166. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  3167. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  3168. typedef struct _wmi_vendor_oui {
  3169. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  3170. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  3171. }wmi_vendor_oui;
  3172. typedef struct {
  3173. A_UINT32 tlv_header;
  3174. /** oui to be used in probe request frame when random mac addresss is
  3175. * requested part of scan parameters. this is applied to both FW internal scans and
  3176. * host initated scans. host can request for random mac address with
  3177. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  3178. A_UINT32 prob_req_oui;
  3179. A_UINT32 vdev_id;
  3180. /** Control Flags **/
  3181. A_UINT32 flags;
  3182. /** ie bitmap to use in probe req **/
  3183. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  3184. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  3185. A_UINT32 num_vendor_oui;
  3186. /** 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 */
  3187. A_UINT32 pdev_id;
  3188. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  3189. wmi_vendor_oui vendor_oui[];*/
  3190. } wmi_scan_prob_req_oui_cmd_fixed_param;
  3191. enum wmi_scan_event_type {
  3192. WMI_SCAN_EVENT_STARTED = 0x1,
  3193. WMI_SCAN_EVENT_COMPLETED = 0x2,
  3194. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  3195. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  3196. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  3197. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  3198. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  3199. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  3200. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  3201. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  3202. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  3203. WMI_SCAN_EVENT_MAX = 0x8000
  3204. };
  3205. enum wmi_scan_completion_reason {
  3206. /** scan related events */
  3207. WMI_SCAN_REASON_NONE = 0xFF,
  3208. WMI_SCAN_REASON_COMPLETED = 0,
  3209. WMI_SCAN_REASON_CANCELLED = 1,
  3210. WMI_SCAN_REASON_PREEMPTED = 2,
  3211. WMI_SCAN_REASON_TIMEDOUT = 3,
  3212. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  3213. WMI_SCAN_REASON_SUSPENDED = 5,
  3214. WMI_SCAN_REASON_DFS_VIOLATION = 6, /* Failure when tried to SCAN channel in NOL list */
  3215. WMI_SCAN_REASON_MAX,
  3216. };
  3217. typedef struct {
  3218. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  3219. /** scan event (wmi_scan_event_type) */
  3220. A_UINT32 event;
  3221. /** status of the scan completion event */
  3222. A_UINT32 reason;
  3223. /** channel freq , only valid for FOREIGN channel event*/
  3224. A_UINT32 channel_freq;
  3225. /**id of the requestor whose scan is in progress */
  3226. A_UINT32 requestor;
  3227. /**id of the scan that is in progress */
  3228. A_UINT32 scan_id;
  3229. /**id of VDEV that requested the scan */
  3230. A_UINT32 vdev_id;
  3231. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  3232. * In case of AP it is TSF of the AP vdev
  3233. * In case of STA connected state this is the TSF of the AP
  3234. * In case of STA not connected it will be the free running HW timer
  3235. */
  3236. A_UINT32 tsf_timestamp;
  3237. } wmi_scan_event_fixed_param;
  3238. /* WMI Diag event */
  3239. typedef struct {
  3240. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  3241. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  3242. A_UINT32 count; /* Number of diag frames added to current event */
  3243. A_UINT32 dropped;
  3244. /* followed by WMITLV_TAG_ARRAY_BYTE */
  3245. } wmi_diag_event_fixed_param;
  3246. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  3247. typedef struct {
  3248. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  3249. 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 */
  3250. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  3251. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  3252. 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 */
  3253. 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
  3254. * neighbor report requests that will be sent by FW after every roam */
  3255. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  3256. * interested in candidate of the same SSID */
  3257. } wmi_neighbor_report_offload;
  3258. typedef struct {
  3259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  3260. A_UINT32 vdev_id;
  3261. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  3262. } wmi_11k_offload_report_fixed_param;
  3263. typedef struct {
  3264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  3265. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  3266. } wmi_neighbor_report_11k_offload_tlv_param;
  3267. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  3268. typedef struct {
  3269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  3270. A_UINT32 vdev_id;
  3271. A_UINT32 flags;
  3272. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  3273. * In that case AP gives all the candidates in ESS without SSID filter
  3274. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  3275. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  3276. #define WMI_MAX_PMKID_LEN 16
  3277. #define WMI_MAX_PMK_LEN 64
  3278. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  3279. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  3280. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  3281. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  3282. typedef struct {
  3283. A_UINT32 tlv_header;
  3284. A_UINT32 pmk_len;
  3285. 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,
  3286. in spite of the automatic byte-swap applied to WMI messages during download*/
  3287. A_UINT32 pmkid_len;
  3288. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3289. wmi_mac_addr bssid;
  3290. wmi_ssid ssid;
  3291. A_UINT32 cache_id;
  3292. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  3293. A_UINT32 action_flag; // add/delete the entry
  3294. } wmi_pmk_cache;
  3295. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  3296. typedef struct {
  3297. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  3298. A_UINT32 op_flag; //option to flush all the cache at once
  3299. A_UINT32 vdev_id;
  3300. A_UINT32 num_cache;
  3301. /**
  3302. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  3303. * structure. The TLV's are:
  3304. * wmi_pmk_cache cache_list[];
  3305. */
  3306. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  3307. #define WMI_FILS_MAX_USERNAME_LEN 16
  3308. #define WMI_FILS_MAX_REALM_LEN 256
  3309. #define WMI_FILS_MAX_RRK_LEN 64
  3310. #define WMI_FILS_MAX_RIK_LEN 64
  3311. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3312. in spite of the automatic byte-swap applied to WMI messages during download*/
  3313. typedef struct {
  3314. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  3315. A_UINT32 username_length;
  3316. A_UINT32 next_erp_seq_num;
  3317. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  3318. A_UINT32 rRk_length;
  3319. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  3320. A_UINT32 rIk_length;
  3321. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3322. A_UINT32 realm_len;
  3323. } wmi_erp_info;
  3324. enum wmi_fils_hlp_pkt_type {
  3325. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  3326. };
  3327. typedef struct {
  3328. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  3329. A_UINT32 flags;
  3330. wmi_erp_info vdev_erp_info;
  3331. } wmi_roam_fils_offload_tlv_param;
  3332. typedef struct {
  3333. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  3334. A_UINT32 flags;
  3335. A_UINT32 vdev_id;
  3336. A_UINT32 size;
  3337. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  3338. // A_UINT8 fils_hlp_pkt[];
  3339. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  3340. #define WMI_MAX_KEK_LEN 64
  3341. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  3342. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  3343. typedef struct {
  3344. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  3345. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  3346. A_UINT32 next_erp_seq_num;
  3347. A_UINT32 kek_len;
  3348. A_UINT8 kek[WMI_MAX_KEK_LEN];
  3349. A_UINT32 pmk_len;
  3350. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  3351. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3352. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3353. A_UINT32 realm_len;
  3354. } wmi_roam_fils_synch_tlv_param;
  3355. /*
  3356. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3357. * then these stats are combined stats for all the active channels.
  3358. */
  3359. typedef struct {
  3360. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3361. /** ack count, it is an incremental number, not accumulated number */
  3362. A_UINT32 ackRcvBad;
  3363. /** bad rts count, it is an incremental number, not accumulated number */
  3364. A_UINT32 rtsBad;
  3365. /** good rts, it is an incremental number, not accumulated number */
  3366. A_UINT32 rtsGood;
  3367. /** fcs count, it is an incremental number, not accumulated number */
  3368. A_UINT32 fcsBad;
  3369. /** beacon count, it is an incremental number, not accumulated number */
  3370. A_UINT32 noBeacons;
  3371. } wmi_update_whal_mib_stats_event_fixed_param;
  3372. /*
  3373. * This defines how much headroom is kept in the
  3374. * receive frame between the descriptor and the
  3375. * payload, in order for the WMI PHY error and
  3376. * management handler to insert header contents.
  3377. *
  3378. * This is in bytes.
  3379. */
  3380. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3381. /** This event will be used for sending scan results
  3382. * as well as rx mgmt frames to the host. The rx buffer
  3383. * will be sent as part of this WMI event. It would be a
  3384. * good idea to pass all the fields in the RX status
  3385. * descriptor up to the host.
  3386. */
  3387. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3388. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3389. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3390. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3391. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3392. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3393. #define MAX_ANTENNA_EIGHT 8
  3394. typedef struct {
  3395. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3396. /** channel on which this frame is received. */
  3397. A_UINT32 channel;
  3398. /** snr information used to cal rssi */
  3399. A_UINT32 snr;
  3400. /** Rate kbps */
  3401. A_UINT32 rate;
  3402. /** rx phy mode WLAN_PHY_MODE */
  3403. A_UINT32 phy_mode;
  3404. /** length of the frame */
  3405. A_UINT32 buf_len;
  3406. /** rx status */
  3407. A_UINT32 status;
  3408. /** RSSI of PRI 20MHz for each chain. */
  3409. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3410. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3411. A_UINT32 flags;
  3412. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3413. A_INT32 rssi;
  3414. /** delta between local TSF(TSF timestamp when frame was RXd)
  3415. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3416. * beacon,proberesp for e.g). If remote TSF is not available,
  3417. * delta set to 0.
  3418. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3419. * and thus would need to be sign-extended if added to a value
  3420. * larger than 32 bits.
  3421. */
  3422. A_UINT32 tsf_delta;
  3423. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3424. * TSF timestamp in the RX MAC descriptor provided by HW.
  3425. */
  3426. A_UINT32 rx_tsf_l32;
  3427. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3428. * after the packet is received.
  3429. */
  3430. A_UINT32 rx_tsf_u32;
  3431. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3432. * See macros starting with WMI_PDEV_ID_ for values.
  3433. */
  3434. A_UINT32 pdev_id;
  3435. /* This TLV is followed by array of bytes:
  3436. * A_UINT8 bufp[]; <-- management frame buffer
  3437. */
  3438. /* This TLV is optionally followed by array of struct:
  3439. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3440. */
  3441. } wmi_mgmt_rx_hdr;
  3442. /*
  3443. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3444. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3445. */
  3446. typedef struct
  3447. {
  3448. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3449. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3450. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3451. } wmi_rssi_ctl_ext;
  3452. typedef struct {
  3453. /** TSF timestamp */
  3454. A_UINT32 tsf_timestamp;
  3455. /**
  3456. * Current freq1, freq2
  3457. *
  3458. * [7:0]: freq1[lo]
  3459. * [15:8] : freq1[hi]
  3460. * [23:16]: freq2[lo]
  3461. * [31:24]: freq2[hi]
  3462. */
  3463. A_UINT32 freq_info_1;
  3464. /**
  3465. * Combined RSSI over all chains and channel width for this PHY error
  3466. *
  3467. * [7:0]: RSSI combined
  3468. * [15:8]: Channel width (MHz)
  3469. * [23:16]: PHY error code
  3470. * [24:16]: reserved (future use)
  3471. */
  3472. A_UINT32 freq_info_2;
  3473. /**
  3474. * RSSI on chain 0 through 3
  3475. *
  3476. * This is formatted the same as the PPDU_START RX descriptor
  3477. * field:
  3478. *
  3479. * [7:0]: pri20
  3480. * [15:8]: sec20
  3481. * [23:16]: sec40
  3482. * [31:24]: sec80
  3483. */
  3484. A_UINT32 rssi_chain0;
  3485. A_UINT32 rssi_chain1;
  3486. A_UINT32 rssi_chain2;
  3487. A_UINT32 rssi_chain3;
  3488. /**
  3489. * Last calibrated NF value for chain 0 through 3
  3490. *
  3491. * nf_list_1:
  3492. *
  3493. * + [15:0] - chain 0
  3494. * + [31:16] - chain 1
  3495. *
  3496. * nf_list_2:
  3497. *
  3498. * + [15:0] - chain 2
  3499. * + [31:16] - chain 3
  3500. */
  3501. A_UINT32 nf_list_1;
  3502. A_UINT32 nf_list_2;
  3503. /** Length of the frame */
  3504. A_UINT32 buf_len;
  3505. } wmi_single_phyerr_rx_hdr;
  3506. typedef struct {
  3507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3508. /**
  3509. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3510. *
  3511. * This is formatted the same as the PPDU_START RX descriptor
  3512. * field:
  3513. *
  3514. * [7:0]: pri20
  3515. * [15:8]: sec20
  3516. * [23:16]: sec40
  3517. * [31:24]: sec80
  3518. */
  3519. A_UINT32 rssi_chain4;
  3520. A_UINT32 rssi_chain5;
  3521. A_UINT32 rssi_chain6;
  3522. A_UINT32 rssi_chain7;
  3523. /**
  3524. * Last calibrated NF value for chain 4 through 7 in dbm
  3525. *
  3526. * nf_list_3:
  3527. * + [15:0] - chain 4
  3528. * + [31:16] - chain 5
  3529. *
  3530. * nf_list_4:
  3531. * + [15:0] - chain 6
  3532. * + [31:16] - chain 7
  3533. *
  3534. * Each chain's noise floor is stored as a sign-extended (negative)
  3535. * value in dBm units.
  3536. */
  3537. A_UINT32 nf_list_3;
  3538. A_UINT32 nf_list_4;
  3539. } wmi_single_phyerr_ext_rx_hdr;
  3540. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  3541. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  3542. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  3543. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  3544. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  3545. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  3546. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  3547. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  3548. /*
  3549. * Please keep in mind that these _SET macros break macro side effect
  3550. * assumptions; don't be clever with them.
  3551. */
  3552. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  3553. (WMI_F_MS((hdr)->freq_info_1, \
  3554. WMI_UNIFIED_FREQINFO_##f##_LO) \
  3555. | (WMI_F_MS((hdr)->freq_info_1, \
  3556. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  3557. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  3558. do { \
  3559. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  3560. WMI_UNIFIED_FREQINFO_##f##_LO); \
  3561. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  3562. WMI_UNIFIED_FREQINFO_##f##_HI); \
  3563. } while (0)
  3564. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  3565. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  3566. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  3567. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  3568. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  3569. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  3570. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  3571. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  3572. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  3573. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  3574. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3575. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  3576. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  3577. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  3578. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  3579. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3580. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  3581. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  3582. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  3583. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  3584. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3585. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  3586. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  3587. #define WMI_UNIFIED_CHAIN_0_S 0
  3588. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  3589. #define WMI_UNIFIED_CHAIN_1_S 16
  3590. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  3591. #define WMI_UNIFIED_CHAIN_2_S 0
  3592. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  3593. #define WMI_UNIFIED_CHAIN_3_S 16
  3594. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  3595. #define WMI_UNIFIED_CHAIN_4_S 0
  3596. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  3597. #define WMI_UNIFIED_CHAIN_5_S 16
  3598. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  3599. #define WMI_UNIFIED_CHAIN_6_S 0
  3600. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  3601. #define WMI_UNIFIED_CHAIN_7_S 16
  3602. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  3603. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  3604. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  3605. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  3606. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  3607. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  3608. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  3609. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  3610. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  3611. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  3612. WMI_UNIFIED_CHAIN_##c)))
  3613. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  3614. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  3615. WMI_UNIFIED_CHAIN_##c);
  3616. /*
  3617. * For now, this matches what the underlying hardware is doing.
  3618. * Update ar6000ProcRxDesc() to use these macros when populating
  3619. * the rx descriptor and then we can just copy the field over
  3620. * to the WMI PHY notification without worrying about breaking
  3621. * things.
  3622. */
  3623. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  3624. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  3625. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  3626. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  3627. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  3628. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  3629. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  3630. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  3631. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  3632. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  3633. WMI_UNIFIED_RSSI_CHAN_##ch);
  3634. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  3635. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  3636. WMI_UNIFIED_RSSI_CHAN_##ch)))
  3637. typedef struct {
  3638. /** Phy error event header */
  3639. wmi_single_phyerr_rx_hdr hdr;
  3640. /** frame buffer */
  3641. A_UINT8 bufp[1];
  3642. } wmi_single_phyerr_rx_event;
  3643. /* PHY ERROR MASK 0 */
  3644. /* bits 1:0 defined but not published */
  3645. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  3646. /* bits 23:3 defined but not published */
  3647. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  3648. /* bits 25:24 defined but not published */
  3649. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  3650. /* bits 31:27 defined but not published */
  3651. /* PHY ERROR MASK 1 */
  3652. /* bits 13:0 defined but not published */
  3653. /* bits 31:14 reserved */
  3654. /* PHY ERROR MASK 2 */
  3655. /* bits 31:0 reserved */
  3656. typedef struct {
  3657. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  3658. /** Phy error phy error count */
  3659. A_UINT32 num_phyerr_events;
  3660. A_UINT32 tsf_l32;
  3661. A_UINT32 tsf_u32;
  3662. A_UINT32 buf_len;
  3663. union {
  3664. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  3665. /** pdev_id for identifying the MAC
  3666. * See macros starting with WMI_PDEV_ID_ for values.
  3667. */
  3668. A_UINT32 pdev_id;
  3669. };
  3670. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  3671. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  3672. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  3673. /* This TLV is followed by array of bytes:
  3674. * frame buffer - contains multiple payloads in the order:
  3675. * header - payload, header - payload...
  3676. * (The header is of type: wmi_single_phyerr_rx_hdr)
  3677. * A_UINT8 bufp[];
  3678. * The extension hdr will repeat num_phyerr_events of times
  3679. * and will have 1:1 mapping with above header. i.e the 1st
  3680. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  3681. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  3682. */
  3683. } wmi_comb_phyerr_rx_hdr;
  3684. /* WMI MGMT TX */
  3685. typedef struct {
  3686. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  3687. /** unique id identifying the VDEV, generated by the caller */
  3688. A_UINT32 vdev_id;
  3689. /** peer MAC address */
  3690. wmi_mac_addr peer_macaddr;
  3691. /** xmit rate */
  3692. A_UINT32 tx_rate;
  3693. /** xmit power */
  3694. A_UINT32 tx_power;
  3695. /** Buffer length in bytes */
  3696. A_UINT32 buf_len;
  3697. /* This TLV is followed by array of bytes:
  3698. * A_UINT8 bufp[]; <-- management frame buffer
  3699. */
  3700. } wmi_mgmt_tx_hdr;
  3701. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  3702. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  3703. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  3704. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  3705. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  3706. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  3707. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  3708. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  3709. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  3710. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  3711. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  3712. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  3713. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  3714. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  3715. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  3716. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  3717. typedef struct {
  3718. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  3719. union {
  3720. struct {
  3721. /* DWORD 0: tx power, tx rate, retry_limit */
  3722. A_UINT32
  3723. /* pwr -
  3724. * Specify what power the tx frame needs to be transmitted at.
  3725. * The power a signed (two's complement) value is in units of 0.5 dBm.
  3726. * The value needs to be appropriately sign-extended when extracting
  3727. * the value from the message and storing it in a variable that is
  3728. * larger than A_INT8. (fw automatically handles this sign-extension.)
  3729. * If the transmission uses multiple tx chains, this power spec is
  3730. * the total transmit power, assuming incoherent combination of
  3731. * per-chain power to produce the total power.
  3732. */
  3733. pwr: 8,
  3734. /* mcs_mask -
  3735. * Specify the allowable values for MCS index (modulation and coding)
  3736. * to use for transmitting the frame.
  3737. *
  3738. * For HT / VHT preamble types, this mask directly corresponds to
  3739. * the HT or VHT MCS indices that are allowed. For each bit N set
  3740. * within the mask, MCS index N is allowed for transmitting the frame.
  3741. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  3742. * rates versus OFDM rates, so the host has the option of specifying
  3743. * that the target must transmit the frame with CCK or OFDM rates
  3744. * (not HT or VHT), but leaving the decision to the target whether
  3745. * to use CCK or OFDM.
  3746. *
  3747. * For CCK and OFDM, the bits within this mask are interpreted as
  3748. * follows:
  3749. * bit 0 -> CCK 1 Mbps rate is allowed
  3750. * bit 1 -> CCK 2 Mbps rate is allowed
  3751. * bit 2 -> CCK 5.5 Mbps rate is allowed
  3752. * bit 3 -> CCK 11 Mbps rate is allowed
  3753. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  3754. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  3755. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  3756. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  3757. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  3758. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  3759. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  3760. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  3761. *
  3762. * The MCS index specification needs to be compatible with the
  3763. * bandwidth mask specification. For example, a MCS index == 9
  3764. * specification is inconsistent with a preamble type == VHT,
  3765. * Nss == 1, and channel bandwidth == 20 MHz.
  3766. *
  3767. * Furthermore, the host has only a limited ability to specify to
  3768. * the target to select from HT + legacy rates, or VHT + legacy rates,
  3769. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  3770. * If no bits are set, target can choose what MCS type to use.
  3771. */
  3772. mcs_mask: 12,
  3773. /* nss_mask -
  3774. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  3775. * Each bit in this mask corresponds to a Nss value:
  3776. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  3777. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  3778. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  3779. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  3780. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  3781. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  3782. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  3783. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  3784. * The values in the Nss mask must be suitable for the recipient, e.g.
  3785. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  3786. * recipient which only supports 2x2 MIMO.
  3787. * If no bits are set, target can choose what NSS type to use.
  3788. */
  3789. nss_mask: 8,
  3790. /* retry_limit -
  3791. * Specify the maximum number of transmissions, including the
  3792. * initial transmission, to attempt before giving up if no ack
  3793. * is received.
  3794. * If the tx rate is specified, then all retries shall use the
  3795. * same rate as the initial transmission.
  3796. * If no tx rate is specified, the target can choose whether to
  3797. * retain the original rate during the retransmissions, or to
  3798. * fall back to a more robust rate.
  3799. */
  3800. retry_limit: 4;
  3801. };
  3802. A_UINT32 tx_param_dword0;
  3803. };
  3804. union {
  3805. struct {
  3806. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  3807. A_UINT32
  3808. /* chain_mask - specify which chains to transmit from
  3809. * If not set, target will choose what chain_mask to use.
  3810. */
  3811. chain_mask: 8,
  3812. /* The bits in this mask correspond to the values as below
  3813. * bit 0 -> 5MHz
  3814. * bit 1 -> 10MHz
  3815. * bit 2 -> 20MHz
  3816. * bit 3 -> 40MHz
  3817. * bit 4 -> 80MHz
  3818. * bit 5 -> 160MHz
  3819. * bit 6 -> 80_80MHz
  3820. * If no bits are set, target can choose what BW to use.
  3821. */
  3822. bw_mask: 7,
  3823. /* preamble_type_mask -
  3824. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  3825. * may choose from for transmitting this frame.
  3826. * Each bit in this mask corresponds to a preamble_type value:
  3827. * bit 0: if set, OFDM
  3828. * bit 1: if set, CCK
  3829. * bit 2: if set, HT
  3830. * bit 3: if set, VHT
  3831. * bit 4: if set, HE
  3832. * If no bits are set, target can choose what preamble type to use.
  3833. */
  3834. preamble_type: 5,
  3835. /* Data:1 Mgmt:0
  3836. */
  3837. frame_type: 1,
  3838. reserved1_31_21: 11;
  3839. };
  3840. A_UINT32 tx_param_dword1;
  3841. };
  3842. } wmi_tx_send_params;
  3843. typedef struct {
  3844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  3845. A_UINT32 vdev_id;
  3846. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3847. A_UINT32 chanfreq; /* MHz units */
  3848. /* WMI_MGMT_TX_SEND_CMDID is used for both pass by value and
  3849. * pass by reference WMI management frames.
  3850. *
  3851. * a) If the command is for pass by reference,
  3852. * paddr_lo and padd_hi will hold the address of remote/host buffer
  3853. * b) If the command is for pass by value,
  3854. * paddr_lo and paddr_hi will be NULL.
  3855. */
  3856. A_UINT32 paddr_lo;
  3857. A_UINT32 paddr_hi;
  3858. A_UINT32 frame_len;
  3859. A_UINT32 buf_len; /** Buffer length in bytes */
  3860. /*
  3861. * The frame which will have tx_params_valid set will be always be RAW
  3862. * frame, as it will be tx'ed on non-pause tid
  3863. */
  3864. A_UINT32 tx_params_valid;
  3865. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  3866. * A_UINT8 bufp[];
  3867. */
  3868. /* This TLV is followed by wmi_tx_send_params
  3869. * wmi_tx_send_params tx_send_params;
  3870. */
  3871. } wmi_mgmt_tx_send_cmd_fixed_param;
  3872. typedef struct {
  3873. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  3874. A_UINT32 vdev_id;
  3875. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3876. A_UINT32 chanfreq; /* MHz units */
  3877. A_UINT32 paddr_lo;
  3878. A_UINT32 paddr_hi;
  3879. A_UINT32 frame_len;
  3880. A_UINT32 buf_len; /** Buffer length in bytes */
  3881. /* The frame which will have tx_params_valid set will be always be RAW
  3882. * frame, as it will be tx'ed on non-pause tid
  3883. */
  3884. A_UINT32 tx_params_valid;
  3885. /* This TLV is followed by array of bytes: First 64 bytes of frame
  3886. * A_UINT8 bufp[];
  3887. */
  3888. /* This TLV is followed by wmi_tx_send_params
  3889. * wmi_tx_send_params tx_send_params;
  3890. */
  3891. } wmi_offchan_data_tx_send_cmd_fixed_param;
  3892. typedef struct {
  3893. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  3894. A_UINT32 value;
  3895. } wmi_echo_event_fixed_param;
  3896. typedef struct {
  3897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  3898. A_UINT32 value;
  3899. } wmi_echo_cmd_fixed_param;
  3900. typedef struct {
  3901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  3902. /** pdev_id for identifying the MAC
  3903. * See macros starting with WMI_PDEV_ID_ for values.
  3904. */
  3905. A_UINT32 pdev_id;
  3906. /** reg domain code */
  3907. A_UINT32 reg_domain;
  3908. A_UINT32 reg_domain_2G;
  3909. A_UINT32 reg_domain_5G;
  3910. A_UINT32 conformance_test_limit_2G;
  3911. A_UINT32 conformance_test_limit_5G;
  3912. A_UINT32 dfs_domain;
  3913. } wmi_pdev_set_regdomain_cmd_fixed_param;
  3914. typedef struct {
  3915. /** TRUE for scan start and flase for scan end */
  3916. A_UINT32 scan_start;
  3917. } wmi_pdev_scan_cmd;
  3918. /* WMI support for setting ratemask in target */
  3919. typedef struct {
  3920. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  3921. A_UINT32 vdev_id;
  3922. /*
  3923. * 0 - cck/ofdm
  3924. * 1 - HT
  3925. * 2 - VHT
  3926. * 3 - HE
  3927. */
  3928. A_UINT32 type;
  3929. A_UINT32 mask_lower32;
  3930. A_UINT32 mask_higher32;
  3931. A_UINT32 mask_lower32_2;
  3932. A_UINT32 mask_higher32_2;
  3933. } wmi_vdev_config_ratemask_cmd_fixed_param;
  3934. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  3935. enum {
  3936. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  3937. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  3938. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  3939. }; /* nrp - Neighbor Rx Packets */
  3940. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  3941. enum {
  3942. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  3943. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  3944. };
  3945. /* nrp flag - Filter Neighbor Rx Packets
  3946. * (capture flag, 2 & 3 not initially supported)
  3947. */
  3948. enum {
  3949. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  3950. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  3951. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  3952. };
  3953. typedef struct {
  3954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  3955. A_UINT32 vdev_id;
  3956. /* AP Bssid or Client Mac-addr */
  3957. wmi_mac_addr addr;
  3958. /* Add/Remove NRF Filter */
  3959. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  3960. /* client/ap filter */
  3961. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  3962. /* optional - tx/rx capture */
  3963. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  3964. /* BSSID index - index of the BSSID register */
  3965. A_UINT32 bssid_idx;
  3966. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  3967. /*Command to set/unset chip in quiet mode*/
  3968. typedef struct {
  3969. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  3970. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  3971. A_UINT32 period; /*period in TUs*/
  3972. A_UINT32 duration; /*duration in TUs*/
  3973. A_UINT32 next_start; /*offset in TUs*/
  3974. A_UINT32 enabled; /*enable/disable*/
  3975. } wmi_pdev_set_quiet_cmd_fixed_param;
  3976. typedef struct {
  3977. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  3978. A_UINT32 vdev_id; /* Virtual interface ID */
  3979. A_UINT32 period; /* period in TUs */
  3980. A_UINT32 duration; /* duration in TUs */
  3981. A_UINT32 next_start; /* offset in TUs */
  3982. A_UINT32 enabled; /* enable/disable */
  3983. } wmi_vdev_set_quiet_cmd_fixed_param;
  3984. /*
  3985. * START_STOP flag value: 1 - Start, 0 - Stop
  3986. */
  3987. #define WMI_OFFLOAD_QUIET_FLAG_START_STOP 0x00000001
  3988. /*
  3989. * ONE_SHOT flag value: 1 - One shot, 0 - Repeat
  3990. * This flag is only relevant if the START_STOP flag == 1 (start).
  3991. */
  3992. #define WMI_OFFLOAD_QUIET_FLAG_ONE_SHOT 0x00000002
  3993. /*
  3994. * Enable/Disable sending Quiet IE info in SWBA event from the target
  3995. * 0 - Don't include Quiet IE in WMI SWBA Event
  3996. * 1 - Include Quiet IE in WMI SWBA Event
  3997. */
  3998. #define WMI_OFFLOAD_QUIET_FLAG_INFO_IN_SWBA_START_STOP 0x00000004
  3999. typedef struct {
  4000. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param */
  4001. A_UINT32 vdev_id; /* Virtual interface ID */
  4002. A_UINT32 period; /* period in TUs */
  4003. A_UINT32 duration; /* duration in TUs */
  4004. A_UINT32 next_start; /* offset in TUs from beacon */
  4005. A_UINT32 flags; /* STOP or START (and single vs. repeated) Quiet IE
  4006. * See WMI_OFFLOAD_QUIET_FLAG_xxx defs.
  4007. */
  4008. } wmi_vdev_bcn_offload_quiet_config_cmd_fixed_param;
  4009. typedef struct {
  4010. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  4011. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  4012. /* Size for tx aggregation for the vdev mentioned in vdev id
  4013. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  4014. */
  4015. A_UINT32 tx_aggr_size;
  4016. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  4017. /*
  4018. * To set TX aggregation size limits per VDEV per AC
  4019. * bits 1:0 (ac):
  4020. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  4021. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  4022. * for all Access Categories
  4023. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  4024. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  4025. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  4026. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  4027. * bits 31:6: Reserved bits. should be set to zero.
  4028. */
  4029. A_UINT32 enable_bitmap;
  4030. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  4031. typedef enum {
  4032. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  4033. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  4034. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  4035. } wmi_vdev_custom_aggr_type_t;
  4036. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  4037. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  4038. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  4039. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  4040. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  4041. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  4042. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  4043. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  4044. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  4045. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  4046. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  4047. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4048. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  4049. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  4050. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  4051. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  4052. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  4053. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4054. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  4055. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  4056. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  4057. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  4058. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  4059. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4060. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  4061. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  4062. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  4063. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  4064. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  4065. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4066. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  4067. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  4068. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  4069. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  4070. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  4071. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4072. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  4073. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  4074. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  4075. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  4076. typedef enum {
  4077. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  4078. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  4079. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  4080. } wmi_vdev_custom_sw_retry_type_t;
  4081. typedef struct {
  4082. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  4083. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  4084. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  4085. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  4086. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  4087. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  4088. typedef struct {
  4089. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_chainmask_config_cmd_fixed_param */
  4090. A_UINT32 tlv_header;
  4091. /* vdev id indicating to which the vdev, this chainmask configuration will be applied. */
  4092. A_UINT32 vdev_id;
  4093. /* number of chains to use for transmissions in 2.4 GHz band */
  4094. A_UINT32 num_tx_chains_2g;
  4095. /* number of chains to use for reception in 2.4 GHz band */
  4096. A_UINT32 num_rx_chains_2g;
  4097. /* nss to use for transmissions in 2.4 GHz band */
  4098. A_UINT32 tx_nss_2g;
  4099. /* nss to use for reception in 2.4 GHz band */
  4100. A_UINT32 rx_nss_2g;
  4101. /* number of chains to use for 11b transmissions. Valid only in 2.4 GHz */
  4102. A_UINT32 num_tx_chains_b;
  4103. /* number of chains to use for 11g transmissions. Valid only in 2.4 GHz */
  4104. A_UINT32 num_tx_chains_g;
  4105. /* number of chains to use for transmissions in 5 GHz band */
  4106. A_UINT32 num_tx_chains_5g;
  4107. /* number of chains to use for reception in 5 GHz band */
  4108. A_UINT32 num_rx_chains_5g;
  4109. /* nss to use for transmissions in 5 GHz band */
  4110. A_UINT32 tx_nss_5g;
  4111. /* nss to use for reception in 5 GHz band */
  4112. A_UINT32 rx_nss_5g;
  4113. /* number of chains to use for 11a transmissions. Valid only in 5 GHz */
  4114. A_UINT32 num_tx_chains_a;
  4115. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 2.4 GHz */
  4116. A_UINT32 disable_tx_mrc_2g;
  4117. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 2.4 GHz */
  4118. A_UINT32 disable_rx_mrc_2g;
  4119. /* If non-zero then use only one chain for TX when connection tx_nss is 1 in 5 GHz */
  4120. A_UINT32 disable_tx_mrc_5g;
  4121. /* If non-zero then use only one chain for RX when connection rx_nss is 1 in 5 GHz */
  4122. A_UINT32 disable_rx_mrc_5g;
  4123. } wmi_vdev_chainmask_config_cmd_fixed_param;
  4124. /*
  4125. * Command to enable/disable Green AP Power Save.
  4126. * This helps conserve power during AP operation. When the AP has no
  4127. * stations associated with it, the host can enable Green AP Power Save
  4128. * to request the firmware to shut down all but one transmit and receive
  4129. * chains.
  4130. */
  4131. typedef struct {
  4132. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  4133. /** pdev_id for identifying the MAC
  4134. * See macros starting with WMI_PDEV_ID_ for values.
  4135. */
  4136. A_UINT32 pdev_id;
  4137. A_UINT32 enable; /*1:enable, 0:disable*/
  4138. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  4139. #define MAX_HT_IE_LEN 32
  4140. /* DEPRECATED */
  4141. typedef struct {
  4142. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  4143. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4144. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  4145. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4146. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4147. /** The TLV for the HT IE follows:
  4148. * A_UINT32 ie_data[];
  4149. */
  4150. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  4151. #define MAX_VHT_IE_LEN 32
  4152. /* DEPRECATED */
  4153. typedef struct {
  4154. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  4155. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4156. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  4157. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  4158. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  4159. /** The TLV for the VHT IE follows:
  4160. * A_UINT32 ie_data[];
  4161. */
  4162. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  4163. typedef struct {
  4164. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  4165. /** pdev_id for identifying the MAC
  4166. * See macros starting with WMI_PDEV_ID_ for values.
  4167. */
  4168. A_UINT32 pdev_id;
  4169. wmi_mac_addr base_macaddr;
  4170. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  4171. /*
  4172. * For now, the spectral configuration is global rather than
  4173. * per-vdev. The vdev is a placeholder and will be ignored
  4174. * by the firmware.
  4175. */
  4176. typedef struct {
  4177. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  4178. A_UINT32 vdev_id;
  4179. A_UINT32 spectral_scan_count;
  4180. A_UINT32 spectral_scan_period;
  4181. A_UINT32 spectral_scan_priority;
  4182. A_UINT32 spectral_scan_fft_size;
  4183. A_UINT32 spectral_scan_gc_ena;
  4184. A_UINT32 spectral_scan_restart_ena;
  4185. A_UINT32 spectral_scan_noise_floor_ref;
  4186. A_UINT32 spectral_scan_init_delay;
  4187. A_UINT32 spectral_scan_nb_tone_thr;
  4188. A_UINT32 spectral_scan_str_bin_thr;
  4189. A_UINT32 spectral_scan_wb_rpt_mode;
  4190. A_UINT32 spectral_scan_rssi_rpt_mode;
  4191. A_UINT32 spectral_scan_rssi_thr;
  4192. A_UINT32 spectral_scan_pwr_format;
  4193. A_UINT32 spectral_scan_rpt_mode;
  4194. A_UINT32 spectral_scan_bin_scale;
  4195. A_UINT32 spectral_scan_dBm_adj;
  4196. A_UINT32 spectral_scan_chn_mask;
  4197. } wmi_vdev_spectral_configure_cmd_fixed_param;
  4198. /*
  4199. * Enabling, disabling and triggering the spectral scan
  4200. * is a per-vdev operation. That is, it will set channel
  4201. * flags per vdev rather than globally; so concurrent scan/run
  4202. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  4203. */
  4204. typedef struct {
  4205. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  4206. A_UINT32 vdev_id;
  4207. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  4208. A_UINT32 trigger_cmd;
  4209. /* 0 - ignore; 1 - enable, 2 - disable */
  4210. A_UINT32 enable_cmd;
  4211. } wmi_vdev_spectral_enable_cmd_fixed_param;
  4212. typedef struct {
  4213. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  4214. A_UINT32 vdev_id;
  4215. } wmi_vdev_get_tx_power_cmd_fixed_param;
  4216. #define WMI_BEACON_CTRL_TX_DISABLE 0
  4217. #define WMI_BEACON_CTRL_TX_ENABLE 1
  4218. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  4219. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  4220. typedef struct {
  4221. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  4222. /** unique id identifying the VDEV, generated by the caller */
  4223. A_UINT32 vdev_id;
  4224. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  4225. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  4226. /** common structure used for wmi_vedv_get_tx_power_event */
  4227. typedef struct {
  4228. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  4229. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  4230. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  4231. } wmi_vdev_get_tx_power_event_fixed_param;
  4232. typedef enum {
  4233. /** Limit the offchannel duration */
  4234. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  4235. /** Skip DFS channels from Scan channel list.
  4236. * valid for both host scans and FW scans */
  4237. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  4238. } wmi_vdev_limit_offchan_flags;
  4239. typedef struct {
  4240. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  4241. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  4242. A_UINT32 vdev_id;
  4243. /** see enum wmi_vdev_limit_offchan_flags */
  4244. A_UINT32 flags;
  4245. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  4246. A_UINT32 max_offchan_time;
  4247. /** rest time in msec on the BSS channel */
  4248. A_UINT32 rest_time;
  4249. } wmi_vdev_limit_offchan_cmd_fixed_param;
  4250. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  4251. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  4252. #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) */
  4253. #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) */
  4254. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  4255. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  4256. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  4257. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  4258. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  4259. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4260. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  4261. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4262. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  4263. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  4264. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  4265. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  4266. typedef enum {
  4267. WMI_CSA_IE_PRESENT = 0x00000001,
  4268. WMI_XCSA_IE_PRESENT = 0x00000002,
  4269. WMI_WBW_IE_PRESENT = 0x00000004,
  4270. WMI_CSWARP_IE_PRESENT = 0x00000008,
  4271. WMI_QSBW_ISE_PRESENT = 0x00000010,
  4272. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  4273. /* wmi CSA receive event from beacon frame */
  4274. typedef struct {
  4275. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  4276. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  4277. wmi_mac_addr i_addr1;
  4278. wmi_mac_addr i_addr2;
  4279. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  4280. * changed in the future without breaking WMI compatibility */
  4281. A_UINT32 csa_ie[2];
  4282. A_UINT32 xcsa_ie[2];
  4283. A_UINT32 wb_ie[2];
  4284. A_UINT32 cswarp_ie;
  4285. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  4286. A_UINT32 qsbw_ise;
  4287. } wmi_csa_event_fixed_param;
  4288. typedef enum {
  4289. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  4290. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  4291. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  4292. } WMI_PEER_MCAST2UCAST_MODE;
  4293. typedef enum {
  4294. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  4295. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  4296. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  4297. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  4298. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  4299. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  4300. /** MACROs to get user setting for enabling/disabling Secondary Rate Feature set
  4301. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4302. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4303. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4304. * Bit 3-5 : "Xretry threshold" to use
  4305. * Bit 6~31 : reserved for future use.
  4306. */
  4307. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT_S 0
  4308. #define WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT 0x00000001
  4309. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT_S 1
  4310. #define WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT 0x00000002
  4311. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION_S 2
  4312. #define WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION 0x00000004
  4313. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD_S 3
  4314. #define WMI_PDEV_PARAM_XRETRY_THRESHOLD 0x00000038
  4315. #define WMI_PDEV_PARAM_IS_SECONDARY_RATE_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_SECONDARY_RATE_ENABLE_BIT)
  4316. #define WMI_PDEV_PARAM_IS_RTS_BL_WL_ENABLED(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_RTS_BL_WL_ENABLE_BIT)
  4317. #define WMI_PDEV_PARAM_IS_HIGHER_MCS_XRETRY_RESTRICTION_SET(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_HIGHER_MCS_XRETRY_RESTRICTION)
  4318. #define WMI_PDEV_PARAM_GET_XRETRY_THRESHOLD(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_XRETRY_THRESHOLD)
  4319. typedef enum {
  4320. /** TX chain mask */
  4321. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  4322. /** RX chain mask */
  4323. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  4324. /** TX power limit for 2G Radio */
  4325. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  4326. /** TX power limit for 5G Radio */
  4327. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  4328. /** TX power scale */
  4329. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  4330. /** Beacon generation mode . 0: host, 1: target */
  4331. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  4332. /** Beacon generation mode . 0: staggered 1: bursted */
  4333. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  4334. /** Resource manager off chan mode .
  4335. * 0: turn off off chan mode. 1: turn on offchan mode
  4336. */
  4337. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  4338. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  4339. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  4340. /** Dynamic bandwidth 0: disable 1: enable */
  4341. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  4342. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  4343. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  4344. /** aggregrate sw retry threshold. 0-disable*/
  4345. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  4346. /** Station kickout threshold (non of consecutive failures).0-disable */
  4347. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  4348. /** Aggerate size scaling configuration per AC */
  4349. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  4350. /** LTR enable */
  4351. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  4352. /** LTR latency for BE, in us */
  4353. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  4354. /** LTR latency for BK, in us */
  4355. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  4356. /** LTR latency for VI, in us */
  4357. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  4358. /** LTR latency for VO, in us */
  4359. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  4360. /** LTR AC latency timeout, in ms */
  4361. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  4362. /** LTR platform latency override, in us */
  4363. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  4364. /** LTR-M override, in us */
  4365. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  4366. /** Tx activity timeout for LTR, in us */
  4367. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  4368. /** L1SS state machine enable */
  4369. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  4370. /** Deep sleep state machine enable */
  4371. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  4372. /** RX buffering flush enable */
  4373. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  4374. /** RX buffering matermark */
  4375. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  4376. /** RX buffering timeout enable */
  4377. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  4378. /** RX buffering timeout value */
  4379. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  4380. /** pdev level stats update period in ms */
  4381. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  4382. /** vdev level stats update period in ms */
  4383. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  4384. /** peer level stats update period in ms */
  4385. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  4386. /** beacon filter status update period */
  4387. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  4388. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4389. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  4390. /** Access category on which ARP frames are sent */
  4391. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  4392. /** DCS configuration */
  4393. WMI_PDEV_PARAM_DCS, /* 0x24 */
  4394. /** Enable/Disable ANI on target */
  4395. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  4396. /** configure the ANI polling period */
  4397. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  4398. /** configure the ANI listening period */
  4399. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  4400. /** configure OFDM immunity level */
  4401. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  4402. /** configure CCK immunity level */
  4403. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  4404. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4405. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  4406. /** Enable/Disable proxy STA */
  4407. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  4408. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4409. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  4410. /** Enable/Disable power gating sleep */
  4411. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  4412. /** Enable/Disable Rfkill */
  4413. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  4414. /** Set Bursting DUR */
  4415. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  4416. /** Set Bursting ENABLE */
  4417. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  4418. /** HW rfkill config */
  4419. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  4420. /** Enable radio low power features */
  4421. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  4422. /** L1SS entry and residency time track */
  4423. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  4424. /** set hyst at runtime, requirement from SS */
  4425. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  4426. /** Enable/ Disable POWER COLLAPSE */
  4427. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  4428. /** configure LED system state */
  4429. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  4430. /** Enable/Disable LED */
  4431. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  4432. /** set DIRECT AUDIO time latency */
  4433. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  4434. /** set DIRECT AUDIO Feature ENABLE */
  4435. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  4436. /** pdev level whal mib stats update enable */
  4437. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  4438. /** ht/vht info based on vdev */
  4439. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  4440. /** Set CTS channel BW for dynamic BW adjustment feature */
  4441. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  4442. /** Set GPIO pin info used by WNTS */
  4443. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  4444. /** Enable/Disable hardware adaptive early rx feature */
  4445. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  4446. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4447. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  4448. /** Increasing/decreasing step used by hardware */
  4449. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  4450. /** The fixed early rx duration when adaptive early rx is disabled */
  4451. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  4452. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4453. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  4454. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4455. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  4456. /** Increasing/decreasing step used by hardware */
  4457. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  4458. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4459. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  4460. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4461. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  4462. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4463. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  4464. /** 2G TX chain mask */
  4465. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  4466. /** 2G RX chain mask */
  4467. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  4468. /** 5G TX chain mask */
  4469. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  4470. /** 5G RX chain mask */
  4471. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  4472. /* Set tx chain mask for CCK rates */
  4473. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  4474. /* Set tx chain mask for 1SS stream */
  4475. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  4476. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4477. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  4478. /** TX power backoff in dB: tx power -= param value
  4479. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4480. * the values. Safety check will happen in Halphy
  4481. */
  4482. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  4483. /** enable and disable aggregate burst along with duration */
  4484. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  4485. /** Set the global RX decap mode */
  4486. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  4487. /** Enable/Disable Fast channel reset */
  4488. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  4489. /** Default antenna for Smart antenna */
  4490. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  4491. /** Set the user-specified antenna gain */
  4492. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  4493. /** Set the user-specified RX filter */
  4494. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  4495. /** configure the user-specified MCAST tid for managed mcast feature
  4496. * 0-15 is the valid range. 0xff will clear the tid setting */
  4497. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  4498. /** Enable/Disable Proxy sta mode */
  4499. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  4500. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4501. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4502. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  4503. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4504. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  4505. /** Remove the Mcast buffers added by host */
  4506. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  4507. /** En/disable station power save state indication */
  4508. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  4509. /** Access category on which ARP frames are sent */
  4510. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  4511. /** allow or disallow interbss frame forwarding */
  4512. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  4513. /** Enable/Disable reset */
  4514. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  4515. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  4516. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  4517. /** Set global PPDU duration limit (usec). */
  4518. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  4519. /** set txbf sounding period of vap in milliseconds */
  4520. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  4521. /** Set promiscuous mode */
  4522. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  4523. /** Set burst mode */
  4524. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  4525. /** enable enhanced stats */
  4526. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  4527. /** Set mu-grouping policy */
  4528. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  4529. /** Channel Hopping Enable */
  4530. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  4531. /** Set Channel Hopping NF threshold in dBm */
  4532. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  4533. /** Set PAPRD policy */
  4534. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  4535. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  4536. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  4537. /** ATF enable/disable strict schedule */
  4538. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  4539. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  4540. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  4541. /** Default antenna polarization */
  4542. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  4543. /** Set mgmt retry limit */
  4544. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  4545. /** Set CCA sensitivity level in dBm */
  4546. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  4547. /** Set 2G positive and negative Tx power in 0.5dBm units */
  4548. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  4549. /** Set 5G positive and negative Tx power in 0.5dBm
  4550. * units */
  4551. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  4552. /** Enable/disble AMSDU for tids */
  4553. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  4554. /** Enable/disable AMPDU for tids */
  4555. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  4556. /** Set CCA threshold in dBm */
  4557. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  4558. /** RTS Fixed rate setting */
  4559. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  4560. /** Pdev reset */
  4561. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  4562. /** wapi mbssid offset **/
  4563. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  4564. /** ARP DEBUG source address*/
  4565. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  4566. /** ARP DEBUG destination address*/
  4567. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  4568. /** ATF enable/disable obss noise scheduling */
  4569. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  4570. /** ATF obss noise scaling factor */
  4571. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  4572. /**
  4573. * TX power reduction scaling exponent - final tx power is the
  4574. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  4575. * 2^(scale exponent). For example:
  4576. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  4577. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  4578. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  4579. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  4580. */
  4581. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  4582. /** ATF enabe/disabe dynamically */
  4583. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  4584. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  4585. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  4586. /** Set propagation delay for 2G / 5G band.
  4587. * The propagation delay is fundamentally a per-peer property, but
  4588. * the target may not support per-peer settings for ack timeouts.
  4589. * This pdev parameter allows the MAC-level ack timeout to be set to
  4590. * a value suitable for the worst-case propagation delay of any peer
  4591. * within that pdev.
  4592. * Units are microseconds.
  4593. */
  4594. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  4595. /**
  4596. * Host can enable/disable ANT DIV feature
  4597. * if it's been enabled in BDF
  4598. */
  4599. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  4600. /** Host can force one chain to select a specific ANT */
  4601. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  4602. /**
  4603. * Start a cycle ANT self test periodically.
  4604. * In the test, the FW would select each ANT pair
  4605. * one by one, the cycle time could be configured
  4606. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  4607. */
  4608. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  4609. /**
  4610. * Configure the cycle time of ANT self test,
  4611. * the unit is micro second. Per the timer
  4612. * limitation, too small value could be not so
  4613. * accurate.
  4614. */
  4615. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  4616. /**
  4617. * wlan stats observation period, the unit is millisecond.
  4618. * The value of 0 is used to turn off periodic stats report.
  4619. */
  4620. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  4621. /**
  4622. * Set tx_ppdu_delay[] bin size to specify how many
  4623. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  4624. * histogram represents.
  4625. */
  4626. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  4627. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  4628. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  4629. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  4630. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  4631. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  4632. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  4633. /** Set TX delay value in TX sch module, unit is microseconds */
  4634. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  4635. /** Set RTS enable for SIFS bursting */
  4636. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  4637. /** Set Maximum number of MPDUs in an AMPDU*/
  4638. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  4639. /** Enable/disable peer stats info mechanism
  4640. * A zero value disables; a non-zero value enables.
  4641. */
  4642. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  4643. /** Configure Fast PWR Transition mode
  4644. * 0x0 -> inidcates Fast PWR transition disabled
  4645. * 0x1 -> indicates Static mode enabled
  4646. * 0x2 -> indicates Dynamic mode enabled
  4647. */
  4648. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  4649. /** Enable/disable radio channel stats mechanism
  4650. * A zero value disables; a non-zero value enables.
  4651. */
  4652. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  4653. /** Enable/disable radio diagnosis feature
  4654. * which allows retrieving the status of radio.
  4655. * A zero value disables; a non-zero value enables.
  4656. */
  4657. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  4658. /** Enable/Disable mesh mcast traffic
  4659. * 1 - Allow mesh mcast traffic
  4660. * 0 - Disallow mesh mcast traffic
  4661. */
  4662. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  4663. /** Enable/Disable smart chainmask scheme
  4664. * 1 - Enable smart chainmask scheme
  4665. * 0 - Disable smart chainmask scheme
  4666. */
  4667. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  4668. /** Enable/Disable alternate chainmask scheme
  4669. * 1 - Enable alternate chainmask scheme
  4670. * 0 - Disable alternate chainmask scheme
  4671. */
  4672. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  4673. /** User configured parameters for antenna diversity algorithm
  4674. * BIT[25..13]: Probe period (milliseconds units)
  4675. * BIT[12..0]: Stay period (milliseconds units)
  4676. */
  4677. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  4678. /** pdev packet power save levels,
  4679. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  4680. */
  4681. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  4682. /** Define IOT pattern to be enabled/disabled
  4683. * bit values: 0 - disable, 1 - enable
  4684. * BIT[0..31]: each bit represents an IOT pattern
  4685. * -----
  4686. * Bit 0 - avoid SMPS with certain APs
  4687. * Bits 31:1 - reserved
  4688. */
  4689. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  4690. /** ACK timeout - change wireless packet ack timeout configuration,
  4691. * units are microseconds
  4692. */
  4693. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  4694. /** Number of TX chains to use for a/b/g rates.
  4695. * bit 0~15 : 11b mode TX chain number.
  4696. * bit 16~31 : 11ag mode TX chain number.
  4697. */
  4698. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  4699. /** Enable/Disable cck txfir override
  4700. * bit 0 - enable (1) or disable (0) CCK tx FIR
  4701. * bits 31:1 - unused / reserved (set to 0)
  4702. */
  4703. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  4704. /** Enable/Disable DTIM Synth
  4705. * 1- Enable DTIM Synth
  4706. * 0- Disable DTIM Synth
  4707. */
  4708. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  4709. /** Configure auto detect power failure feature.
  4710. * 0 - FW will trigger crash if power failure happens.
  4711. * 1 - FW will send a failure notification to host, and the host
  4712. * framework determines how to respond to the power failure
  4713. * 2 - Silently rejuvenate if power failure occurs.
  4714. * 3 - Feature disabled.
  4715. */
  4716. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  4717. /** Configure operating voltage corner mode based on phymode and bw.
  4718. * bit 0-1 - operating voltage corner mode for 11a/b.
  4719. * bit 2-3 - operating voltage corner mode for 11g.
  4720. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  4721. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  4722. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  4723. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  4724. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  4725. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  4726. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  4727. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  4728. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  4729. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  4730. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  4731. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  4732. * ---------------------------------------------
  4733. * 00 - Static voltage corner SVS
  4734. * 01 - static voltage corner LOW SVS
  4735. * 10 - Dynamic voltage corner selection based on TPUT
  4736. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  4737. */
  4738. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  4739. /* Enable/Disable data stall detection */
  4740. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  4741. /* GCMP Support indication to FW */
  4742. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  4743. /** Enable/Disable chain selection optimization for one chain dtim
  4744. * non-zero - Enable optimization and use this non-zero value as the
  4745. * chain imbalance threshold for optimization to kick in
  4746. * (units = dB)
  4747. * 0- Disable optimization
  4748. */
  4749. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  4750. /*
  4751. * Override default FW behavior and explicitly enable / disable
  4752. * the use of CCK for PPDU transmissions.
  4753. *
  4754. * When CCK transmissions are disabled, the default OFDM legacy
  4755. * rate will be used instead.
  4756. */
  4757. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  4758. /*
  4759. * Set the user-specified antenna gain, but in 0.5 dB units.
  4760. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  4761. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  4762. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  4763. */
  4764. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  4765. /*
  4766. * Global Enable/Disable control for Secondary Retry Feature Set
  4767. *
  4768. * Bit-0 : Enable/Disable Control for "PPDU Secondary Retry Support"
  4769. * Bit-1 : Enable/Disable Control for "RTS Black/White-listing Support"
  4770. * Bit-2 : Enable/Disable Control for "Higher MCS retry restriction on XRETRY failures"
  4771. * Bit 3-5: "Xretry threshold" to use
  4772. */
  4773. WMI_PDEV_PARAM_SECONDARY_RETRY_ENABLE, /* 0xA0 */
  4774. /** Set global uplink triggered PPDU duration limit (usec). */
  4775. WMI_PDEV_PARAM_SET_UL_PPDU_DURATION, /* 0xA1 */
  4776. /** Set target buffer status report trigger interval (ms) */
  4777. WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL, /* 0xA2 */
  4778. /** Use simplified equal RU allocation for DL and UL OFDMA */
  4779. WMI_PDEV_PARAM_EQUAL_RU_ALLOCATION_ENABLE, /* 0xA3 */
  4780. /** Enable/disable MWS-COEX 4G (LTE) Quick FTDM.
  4781. * 0 - Don't allow quick FTDM Policy (Default)
  4782. * 1 - Allow quick FTDM policy.
  4783. */
  4784. WMI_PDEV_PARAM_MWSCOEX_4G_ALLOW_QUICK_FTDM, /* 0xA4 */
  4785. /** Set MWS-COEX 5G-NR power limit.
  4786. * 0: Don't apply user specific power limit,
  4787. * use internal power limit (Default)
  4788. * 1-2: invalid value (ignored)
  4789. * 3-21: apply the specified value as the external power limit, in dBm
  4790. * >21: invalid value (ignored)
  4791. */
  4792. WMI_PDEV_PARAM_MWSCOEX_SET_5GNR_PWR_LIMIT, /* 0xA5 */
  4793. /** Set max msdus available for cong ctrl in target */
  4794. WMI_PDEV_PARAM_SET_CONG_CTRL_MAX_MSDUS, /* 0xA6 */
  4795. /*
  4796. * Configures the Estimated Throughput Calculation indication (802.11mc) settings.
  4797. * The accompanying A_UINT32 parameter, in units of seconds, specifies how often FW needs to send the ESP estimation indication to the host.
  4798. * Value 0: Disable this feature
  4799. * Non zero Value: Periodicity (seconds)
  4800. */
  4801. WMI_PDEV_PARAM_ESP_INDICATION_PERIOD, /* 0xA7 */
  4802. /*
  4803. * Enable/Disable periodic peer CFR capture
  4804. * WMI_PEER_CFR_CAPTURE_ENABLE - Enable per peer periodic CFR capture
  4805. * WMI_PEER_CFR_CAPTURE_DISABLE - Disable per peer periodic CFR capture
  4806. */
  4807. WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE,
  4808. /*
  4809. * Set the base timer for the periodic CFR capture. By default this is 10ms.
  4810. * The period ('periodicity' param in wmi_peer_cfr_capture_cmd) of
  4811. * CFR measurment of other peers will be in multiples of this base timer.
  4812. * The unit is in milliseconds.
  4813. */
  4814. WMI_PDEV_PARAM_PERIODIC_CFR_BASE_TIMER,
  4815. /*
  4816. * Once the periodic capture is enabled using
  4817. * WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE, the timer starts running in
  4818. * the target. This parameter will ensure that the timer stops if there are
  4819. * no active peers in the capture list. Once the peers are added again to
  4820. * the capture list, the timer will not start again. The timer has to be
  4821. * started again using WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE.
  4822. * Value 1: Enable this feature
  4823. * Value 0: Disable this feature
  4824. */
  4825. WMI_PDEV_PARAM_ENABLE_OPTIMIZED_PERIODIC_CFR_TIMER,
  4826. /*
  4827. * Configures a portion of the Estimated Service Params indication
  4828. * (802.11mc) settings, which together specify estimated throughput.
  4829. * The accompanying A_UINT32 parameter is the ESP BA WINDOW size advertised
  4830. * Value 0: Disable this feature
  4831. * Non zero Value: ESP BA WINDOW size
  4832. */
  4833. WMI_PDEV_PARAM_ESP_BA_WINDOW,
  4834. /*
  4835. * Configures a portion of the Estimated Service Params indication
  4836. * (802.11mc) settings, which together specify estimated throughput.
  4837. * The accompanying A_UINT32 parameter is the air time fraction to be
  4838. * advertised in the ESP IE
  4839. * Value 0: Disable this feature
  4840. * Non zero Value: Air time fraction in percentage
  4841. */
  4842. WMI_PDEV_PARAM_ESP_AIRTIME_FRACTION,
  4843. /*
  4844. * Configures a portion of the Estimated Service Params indication
  4845. * (802.11mc) settings, which together specify estimated throughput.
  4846. * The accompanying A_UINT32 parameter specifies PPDU duration in units
  4847. * of milliseconds.
  4848. * Value 0: Disable this feature
  4849. * Non zero Value: PPDU duration in milliseconds
  4850. */
  4851. WMI_PDEV_PARAM_ESP_PPDU_DURATION,
  4852. /*
  4853. * Enable/Disable NOL(Non Occupancy list) in firmware
  4854. * 1- Use NOL in firmware
  4855. * 0- Don't use NOL in firmware
  4856. */
  4857. WMI_PDEV_PARAM_USE_NOL,
  4858. /*
  4859. * Allow / Not Allow RU26 in any user's RU allocation field in UL OFDMA
  4860. * trigger frames sent by AP
  4861. * 1 - Allow RU26
  4862. * 0 - Do not allow RU26
  4863. */
  4864. WMI_PDEV_PARAM_UL_RU26_ALLOWED,
  4865. /*
  4866. * Enable/Disable sub channel marking
  4867. * 1 - Enable sub channel marking
  4868. * 0 - Disable sub channel marking (default value)
  4869. */
  4870. WMI_PDEV_PARAM_SUB_CHANNEL_MARKING,
  4871. /*
  4872. * Enable/Disable/Set MGMT_TTL in milliseconds.
  4873. * non_zero - Enable, with the specified value
  4874. * 0 - Disable
  4875. */
  4876. WMI_PDEV_PARAM_SET_MGMT_TTL,
  4877. /*
  4878. * Enable/Disable/Set PROBE_RESP_TTL in milliseconds.
  4879. * non_zero - Enable, with the specified value
  4880. * 0 - Disable
  4881. */
  4882. WMI_PDEV_PARAM_SET_PROBE_RESP_TTL,
  4883. /*
  4884. * TBTT_CTRL_CFG
  4885. * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum)
  4886. * 0 - DEFAULT -> HW_TBTT
  4887. * 1 - SW_TBTT -> HW_TBTT disabled,
  4888. * software would truncate BURST near TBTT
  4889. * 2 - IGNORE_TBTT
  4890. *
  4891. * BITS 3 - 31 Reserved, must be set to 0x0
  4892. */
  4893. WMI_PDEV_PARAM_SET_TBTT_CTRL,
  4894. /*
  4895. * BITS0 ~1 (refer to enum)
  4896. * 0 - default --> always update
  4897. * 1 - ignore to update
  4898. * 2 - update if larger than threshould
  4899. * 3 - update if less or equal than threshould
  4900. *
  4901. * BITS 2 ~ 31 Threshould
  4902. */
  4903. WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG,
  4904. } WMI_PDEV_PARAM;
  4905. typedef struct {
  4906. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  4907. /** pdev_id for identifying the MAC
  4908. * See macros starting with WMI_PDEV_ID_ for values.
  4909. */
  4910. A_UINT32 pdev_id;
  4911. /** parameter id */
  4912. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  4913. /** parameter value */
  4914. A_UINT32 param_value;
  4915. } wmi_pdev_set_param_cmd_fixed_param;
  4916. /* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */
  4917. typedef enum {
  4918. WMI_TBTT_CTRL_HW_TRUNCATE = 0,
  4919. WMI_TBTT_CTRL_SW_TRUNCATE,
  4920. WMI_TBTT_CTRL_IGNORE_TBTT,
  4921. WMI_TBTT_CTRL_MAX = 0x7,
  4922. } WMI_TBTT_CTRL_CFG;
  4923. /** MACRO to set / get TBTT_CTRL_CFG bit-field within
  4924. * WMI_PDEV_PARAM_SET_TBTT_CTRL:
  4925. * bits 0~2 : TBTT_CTRL_CFG
  4926. * bits 3~31: Reserved (set to 0x0)
  4927. */
  4928. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0
  4929. #define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007
  4930. #define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \
  4931. WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  4932. #define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \
  4933. WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG)
  4934. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  4935. * bit 0~15 : 11b mode TX chain number.
  4936. * bit 16~31: 11ag mode TX chain number.
  4937. */
  4938. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  4939. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  4940. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  4941. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  4942. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4943. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4944. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4945. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4946. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  4947. typedef enum {
  4948. WMI_CTS_CBW_INVALID = 0,
  4949. WMI_CTS_CBW_20,
  4950. WMI_CTS_CBW_40,
  4951. WMI_CTS_CBW_80,
  4952. WMI_CTS_CBW_80_80,
  4953. WMI_CTS_CBW_160,
  4954. } WMI_CTS_CBW;
  4955. typedef struct {
  4956. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  4957. /** pdev_id for identifying the MAC
  4958. * See macros starting with WMI_PDEV_ID_ for values.
  4959. */
  4960. A_UINT32 pdev_id;
  4961. /** parameter */
  4962. A_UINT32 param;
  4963. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  4964. typedef struct {
  4965. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  4966. /** pdev_id for identifying the MAC */
  4967. A_UINT32 pdev_id;
  4968. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4969. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4970. /** index of the last-used antenna for each chain */
  4971. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4972. /** mac address of diversity peer */
  4973. wmi_mac_addr macaddr;
  4974. } wmi_pdev_div_get_rssi_antid_fixed_param;
  4975. typedef struct {
  4976. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  4977. A_UINT32 param; /* 1 = read only, 2= read and clear */
  4978. } wmi_pdev_bss_chan_info_request_fixed_param;
  4979. typedef struct {
  4980. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  4981. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  4982. A_UINT32 len; /* the number of ctltable bytes in current payload */
  4983. A_UINT32 seq; /* the number of current transfers */
  4984. /*
  4985. * This TLV is followed by the following additional TLVs:
  4986. * ARRAY_BYTE TLV of ctltable_data
  4987. */
  4988. } wmi_pdev_update_ctltable_request_fixed_param;
  4989. #define WMI_ESP_ESTIMATE_GET_BE(airtime) WMI_GET_BITS(airtime, 0, 8)
  4990. #define WMI_ESP_ESTIMATE_SET_BE(airtime, value) WMI_SET_BITS(airtime, 0, 8, value)
  4991. #define WMI_ESP_ESTIMATE_GET_BK(airtime) WMI_GET_BITS(airtime, 8, 8)
  4992. #define WMI_ESP_ESTIMATE_SET_BK(airtime, value) WMI_SET_BITS(airtime, 8, 8, value)
  4993. #define WMI_ESP_ESTIMATE_GET_VI(airtime) WMI_GET_BITS(airtime, 16, 8)
  4994. #define WMI_ESP_ESTIMATE_SET_VI(airtime, value) WMI_SET_BITS(airtime, 16, 8, value)
  4995. #define WMI_ESP_ESTIMATE_GET_VO(airtime) WMI_GET_BITS(airtime, 24, 8)
  4996. #define WMI_ESP_ESTIMATE_SET_VO(airtime, value) WMI_SET_BITS(airtime, 24, 8, value)
  4997. typedef struct {
  4998. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_esp_estimate_event_fixed_param */
  4999. /** pdev_id for identifying the MAC
  5000. * See macros starting with WMI_PDEV_ID_ for values.
  5001. * In non-DBDC case host should set it to 0
  5002. */
  5003. A_UINT32 pdev_id;
  5004. /*
  5005. * Percentage of air time available for each AC
  5006. * BIT[0-7] : AC_BE
  5007. * BIT[8-15] : AC_BK
  5008. * BIT[16-23] : AC_VI
  5009. * BIT[24-31] : AC_VO
  5010. */
  5011. A_UINT32 ac_airtime_percentage;
  5012. } wmi_esp_estimate_event_fixed_param;
  5013. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  5014. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  5015. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  5016. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5017. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  5018. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  5019. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  5020. do { \
  5021. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5022. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  5023. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  5024. } while (0)
  5025. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  5026. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5027. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  5028. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  5029. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  5030. do { \
  5031. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5032. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  5033. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  5034. } while (0)
  5035. typedef struct {
  5036. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  5037. union {
  5038. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  5039. /** pdev_id for identifying the MAC
  5040. * See macros starting with WMI_PDEV_ID_ for values.
  5041. */
  5042. A_UINT32 pdev_id;
  5043. };
  5044. /**
  5045. * The following "value" field is divided into bit fields as follows:
  5046. * bits | purpose
  5047. * -----+---------------------------------------
  5048. * 0 | enable/disable FAST diversity
  5049. * 1 | enable/disable SLOW diversity
  5050. * 5:2 | chain0 slow-diversity weighting factor
  5051. * 9:6 | chain1 slow-diversity weighting factor
  5052. * 31:10| currenty unused (set to 0x0)
  5053. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  5054. */
  5055. A_UINT32 value;
  5056. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  5057. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  5058. typedef struct {
  5059. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  5060. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  5061. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  5062. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  5063. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  5064. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  5065. 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] */
  5066. 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] */
  5067. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  5068. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  5069. } wmi_rssi_breach_monitor_config_fixed_param;
  5070. typedef struct {
  5071. /** parameter */
  5072. A_UINT32 param;
  5073. } wmi_pdev_dump_cmd;
  5074. typedef enum {
  5075. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  5076. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  5077. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  5078. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5079. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  5080. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  5081. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  5082. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  5083. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  5084. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  5085. } wmi_tx_pause_type;
  5086. typedef enum {
  5087. ACTION_PAUSE = 0x0,
  5088. ACTION_UNPAUSE = 0x1,
  5089. } wmi_tx_pause_action;
  5090. typedef struct {
  5091. A_UINT32 tlv_header;
  5092. A_UINT32 pause_type;
  5093. A_UINT32 action;
  5094. A_UINT32 vdev_map;
  5095. A_UINT32 peer_id;
  5096. A_UINT32 tid_map;
  5097. } wmi_tx_pause_event_fixed_param;
  5098. typedef enum {
  5099. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  5100. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  5101. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  5102. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  5103. WMI_MGMT_TX_COMP_TYPE_MAX,
  5104. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  5105. typedef struct {
  5106. A_UINT32 tlv_header;
  5107. A_UINT32 desc_id; /* from tx_send_cmd */
  5108. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  5109. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5110. * See macros starting with WMI_PDEV_ID_ for values.
  5111. */
  5112. A_UINT32 pdev_id;
  5113. /* ppdu_id
  5114. * Hardware PPDU ID for tracking the completion stats
  5115. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5116. */
  5117. A_UINT32 ppdu_id;
  5118. /* ack_rssi
  5119. * TX mgmt ack RSSI report to host.
  5120. * Only valid when status == COMPLETE_OK and the ACK_RSSI report is enabled
  5121. * ACK RSSI is reported as SNR dB, i.e. how many dB the RSSI is above
  5122. * the noise floor.
  5123. */
  5124. A_UINT32 ack_rssi;
  5125. } wmi_mgmt_tx_compl_event_fixed_param;
  5126. typedef struct {
  5127. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  5128. A_UINT32 desc_id; /* from tx_send_cmd */
  5129. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  5130. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  5131. * See macros starting with WMI_PDEV_ID_ for values.
  5132. */
  5133. A_UINT32 pdev_id;
  5134. /* ppdu_id
  5135. * Hardware PPDU ID for tracking the completion stats
  5136. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  5137. */
  5138. A_UINT32 ppdu_id;
  5139. } wmi_offchan_data_tx_compl_event_fixed_param;
  5140. typedef struct {
  5141. A_UINT32 tlv_header;
  5142. A_UINT32 num_reports;
  5143. /* tlv for completion
  5144. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  5145. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  5146. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  5147. * A_UINT32 ack_rssi[num_reports]; <- list of ack RSSI
  5148. * RSSI units = dB w.r.t. noise floor
  5149. */
  5150. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  5151. #define WMI_TPC_RATE_MAX 160
  5152. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5153. #define WMI_TPC_TX_NUM_CHAIN 4
  5154. typedef enum {
  5155. /* bits 0-7 for table flags */
  5156. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  5157. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  5158. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  5159. /* bits 8-11 for interface version flags */
  5160. WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00,
  5161. WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100,
  5162. } WMI_TPC_CONFIG_EVENT_FLAG;
  5163. typedef struct {
  5164. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  5165. A_UINT32 regDomain;
  5166. A_UINT32 chanFreq;
  5167. A_UINT32 phyMode;
  5168. A_UINT32 twiceAntennaReduction;
  5169. A_UINT32 twiceMaxRDPower;
  5170. A_INT32 twiceAntennaGain;
  5171. A_UINT32 powerLimit;
  5172. A_UINT32 rateMax;
  5173. A_UINT32 numTxChain;
  5174. A_UINT32 ctl;
  5175. A_UINT32 flags;
  5176. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  5177. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  5178. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5179. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5180. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  5181. /** pdev_id for identifying the MAC
  5182. * See macros starting with WMI_PDEV_ID_ for values.
  5183. */
  5184. A_UINT32 pdev_id;
  5185. /* This TLV is followed by further TLVs:
  5186. * 1. byte array:
  5187. * A_UINT8 ratesArray[];
  5188. * 2a. multi-dimensional array dimension spec:
  5189. * wmi_tlv_arrays_len_param ctlPwrTbl_param[0 or 1]
  5190. *
  5191. * 2b. ctl power table
  5192. * A_UINT8 ctlPwrTbl_buf[bf][modes][nss], i.e.
  5193. * A_UINT8 ctlPwrTbl_buf[d3_len * d2_len * d1_len]
  5194. * bf is [0 or 1] for [on or off].
  5195. * For 2G, modes is [0, 1, 2, or 3] for
  5196. * [cck, legacy, (v)ht20, or (v)ht40]
  5197. * For 5G, modes is [0, 1, 2, or 3] for
  5198. * [legacy, (v)ht20, (v)ht40, or vht80]
  5199. * nss is [0, 1, 2, or 3] for the number of streams 1~4.
  5200. */
  5201. } wmi_pdev_tpc_config_event_fixed_param;
  5202. typedef struct {
  5203. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  5204. A_UINT32 tlv_header;
  5205. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  5206. A_UINT32 num_chains_valid;
  5207. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  5208. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  5209. /** index of the last-used antenna for each chain */
  5210. A_UINT32 ant_id[WMI_MAX_CHAINS];
  5211. /** mac address of diversity peer */
  5212. wmi_mac_addr macaddr;
  5213. /* EVM value for stream0 and stream1 20Mhz, dB units */
  5214. A_INT32 chain_evm[WMI_MAX_CHAINS];
  5215. } wmi_pdev_div_rssi_antid_event_fixed_param;
  5216. typedef struct {
  5217. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  5218. A_UINT32 freq; /* Units in MHz */
  5219. A_INT32 noise_floor; /* units are dBm */
  5220. /* rx clear - how often the channel was unused */
  5221. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  5222. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  5223. /* cycle count - elapsed time during the measured period, in clock ticks */
  5224. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  5225. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  5226. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  5227. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  5228. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  5229. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  5230. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  5231. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  5232. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  5233. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  5234. } wmi_pdev_bss_chan_info_event_fixed_param;
  5235. typedef struct {
  5236. /* WMI event response update ctltable request to host */
  5237. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  5238. A_UINT32 total_len; /* the total number of bytes to be transferred */
  5239. A_UINT32 len; /* the number of FW received bytes from host */
  5240. A_UINT32 seq; /* the number of current transfers */
  5241. } wmi_pdev_update_ctltable_event_fixed_param;
  5242. typedef struct {
  5243. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  5244. A_UINT32 periodCnt;
  5245. A_UINT32 L1Cnt;
  5246. A_UINT32 L11Cnt;
  5247. A_UINT32 L12Cnt;
  5248. A_UINT32 L1Entry;
  5249. A_UINT32 L11Entry;
  5250. A_UINT32 L12Entry;
  5251. /** pdev_id for identifying the MAC
  5252. * See macros starting with WMI_PDEV_ID_ for values.
  5253. */
  5254. A_UINT32 pdev_id;
  5255. } wmi_pdev_l1ss_track_event_fixed_param;
  5256. typedef struct {
  5257. A_UINT32 len;
  5258. A_UINT32 msgref;
  5259. A_UINT32 segmentInfo;
  5260. } wmi_pdev_seg_hdr_info;
  5261. /*
  5262. * Transmit power scale factor.
  5263. *
  5264. */
  5265. typedef enum {
  5266. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  5267. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  5268. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  5269. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  5270. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  5271. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  5272. } WMI_TP_SCALE;
  5273. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  5274. typedef struct {
  5275. /** message buffer, NULL terminated */
  5276. char bufp[WMI_MAX_DEBUG_MESG];
  5277. } wmi_debug_mesg_event;
  5278. enum {
  5279. /** P2P device */
  5280. VDEV_SUBTYPE_P2PDEV = 0,
  5281. /** P2P client */
  5282. VDEV_SUBTYPE_P2PCLI,
  5283. /** P2P GO */
  5284. VDEV_SUBTYPE_P2PGO,
  5285. /** BT3.0 HS */
  5286. VDEV_SUBTYPE_BT,
  5287. };
  5288. typedef struct {
  5289. /** idnore power , only use flags , mode and freq */
  5290. wmi_channel chan;
  5291. } wmi_pdev_set_channel_cmd;
  5292. typedef enum {
  5293. WMI_PKTLOG_EVENT_RX = 0x1,
  5294. WMI_PKTLOG_EVENT_TX = 0x2,
  5295. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  5296. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  5297. /* 0x10 used by deprecated DBG_PRINT */
  5298. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  5299. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  5300. } WMI_PKTLOG_EVENT;
  5301. typedef enum {
  5302. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  5303. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  5304. } WMI_PKTLOG_ENABLE;
  5305. typedef enum {
  5306. WMI_PKTLOG_FILTER_IN = 0, /* capture only for the MAC addresses in pktlog_mac_addr_list*/
  5307. WMI_PKTLOG_FILTER_OUT = 1, /* capture for all MAC addresses except those in pktlog_mac_addr_list */
  5308. } WMI_PKTLOG_FILTER_TYPE;
  5309. typedef struct {
  5310. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  5311. /** pdev_id for identifying the MAC
  5312. * See macros starting with WMI_PDEV_ID_ for values.
  5313. */
  5314. A_UINT32 pdev_id;
  5315. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  5316. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  5317. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  5318. typedef struct {
  5319. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  5320. /** pdev_id for identifying the MAC
  5321. * See macros starting with WMI_PDEV_ID_ for values.
  5322. */
  5323. A_UINT32 pdev_id;
  5324. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  5325. typedef struct {
  5326. /** TLV tag and len; tag equals
  5327. * WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_info */
  5328. A_UINT32 tlv_header;
  5329. /** mac addr of the peer to be filtered */
  5330. wmi_mac_addr peer_mac_address;
  5331. } wmi_pdev_pktlog_filter_info;
  5332. typedef struct {
  5333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_filter_cmd_fixed_param */
  5334. /** pdev_id for identifying the MAC
  5335. * See macros starting with WMI_PDEV_ID_ for values.
  5336. */
  5337. A_UINT32 pdev_id;
  5338. /** 0 - disable filtering, 1 - enable filtering */
  5339. A_UINT32 enable;
  5340. A_UINT32 filter_type; /* WMI_PKTLOG_FILTER_TYPE */
  5341. A_UINT32 num_of_mac_addresses;
  5342. /* This TLV is followed by another TLV of array of structs
  5343. * wmi_pdev_pktlog_filter_info pdev_pktlog_filter_info[];
  5344. */
  5345. } wmi_pdev_pktlog_filter_cmd_fixed_param;
  5346. typedef struct {
  5347. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  5348. /** pdev_id for identifying the MAC
  5349. * See macros starting with WMI_PDEV_ID_ for values.
  5350. */
  5351. A_UINT32 pdev_id;
  5352. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  5353. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  5354. } wmi_mib_stats_enable_cmd_fixed_param;
  5355. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  5356. * NOTE: This constant cannot be changed without breaking
  5357. * WMI Compatibility. */
  5358. #define WMI_DSCP_MAP_MAX (64)
  5359. /*
  5360. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  5361. * @details
  5362. * Create an API for sending the custom DSCP-to-TID map to the target
  5363. * If this is a request from the user space or from above the UMAC
  5364. * then the best place to implement this is in the umac_if_offload of the OL path.
  5365. * Provide a place holder for this API in the ieee80211com (ic).
  5366. *
  5367. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  5368. * in the target should be directed to the function pointer in the ic.
  5369. *
  5370. * Implementation details of the API to send the map to the target are as described-
  5371. *
  5372. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  5373. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  5374. * 64 TID values for 2^6 (64) DSCP ids.
  5375. * Example:
  5376. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  5377. * 0, 0, 0, 0, 0, 0, 0, 0,
  5378. * 1, 1, 1, 1, 1, 1, 1, 1,
  5379. * 2, 2, 2, 2, 2, 2, 2, 2,
  5380. * 3, 3, 3, 3, 3, 3, 3, 3,
  5381. * 4, 4, 4, 4, 4, 4, 4, 4,
  5382. * 5, 5, 5, 5, 5, 5, 5, 5,
  5383. * 6, 6, 6, 6, 6, 6, 6, 6,
  5384. * 7, 7, 7, 7, 7, 7, 7, 7,
  5385. * };
  5386. *
  5387. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  5388. *
  5389. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  5390. *
  5391. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  5392. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  5393. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  5394. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  5395. *
  5396. */
  5397. /* DEPRECATED - use VDEV level command instead
  5398. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  5399. */
  5400. typedef struct {
  5401. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  5402. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5403. /* map indicating DSCP to TID conversion */
  5404. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  5405. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  5406. typedef struct {
  5407. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  5408. A_UINT32 vdev_id;
  5409. /** map indicating DSCP to TID conversion */
  5410. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  5411. A_UINT32 enable_override;
  5412. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  5413. enum WMI_WAKE_GPIO_TYPE {
  5414. WMI_WAKE_GPIO_LOW = 1,
  5415. WMI_WAKE_GPIO_HIGH = 2,
  5416. WMI_WAKE_GPIO_RISING_EDGE = 3,
  5417. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  5418. };
  5419. /**
  5420. * Set GPIO numbers used to wakeup host and wakeup target.
  5421. */
  5422. typedef struct {
  5423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  5424. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  5425. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  5426. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  5427. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  5428. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  5429. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  5430. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  5431. * @details
  5432. * Create an API for setting the custom rate for the MCAST and BCAST frames
  5433. * in the target. If this is a request from the user space or from above the UMAC
  5434. * then the best place to implement this is in the umac_if_offload of the OL path.
  5435. * Provide a place holder for this API in the ieee80211com (ic).
  5436. *
  5437. * Implementation details of the API to set custom rates for MCAST and BCAST in
  5438. * the target are as described-
  5439. *
  5440. * 1. The function will have 3 arguments-
  5441. * vap structure,
  5442. * MCAST/ BCAST identifier code,
  5443. * 8 bit rate code
  5444. *
  5445. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5446. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5447. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5448. * b'3-b'0 indicate the rate, which is indicated as follows:
  5449. * OFDM : 0: OFDM 48 Mbps
  5450. * 1: OFDM 24 Mbps
  5451. * 2: OFDM 12 Mbps
  5452. * 3: OFDM 6 Mbps
  5453. * 4: OFDM 54 Mbps
  5454. * 5: OFDM 36 Mbps
  5455. * 6: OFDM 18 Mbps
  5456. * 7: OFDM 9 Mbps
  5457. * CCK (pream == 1)
  5458. * 0: CCK 11 Mbps Long
  5459. * 1: CCK 5.5 Mbps Long
  5460. * 2: CCK 2 Mbps Long
  5461. * 3: CCK 1 Mbps Long
  5462. * 4: CCK 11 Mbps Short
  5463. * 5: CCK 5.5 Mbps Short
  5464. * 6: CCK 2 Mbps Short
  5465. * HT/VHT (pream == 2/3)
  5466. * 0..7: MCS0..MCS7 (HT)
  5467. * 0..9: MCS0..MCS9 (VHT)
  5468. *
  5469. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  5470. * to the target.
  5471. * Arguments to the API are-
  5472. * wmi handle,
  5473. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  5474. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  5475. * rate value.
  5476. */
  5477. typedef enum {
  5478. WMI_SET_MCAST_RATE,
  5479. WMI_SET_BCAST_RATE
  5480. } MCAST_BCAST_RATE_ID;
  5481. typedef struct {
  5482. MCAST_BCAST_RATE_ID rate_id;
  5483. A_UINT32 rate;
  5484. } mcast_bcast_rate;
  5485. typedef struct {
  5486. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  5487. A_UINT32 cwmin;
  5488. A_UINT32 cwmax;
  5489. A_UINT32 aifs;
  5490. A_UINT32 txoplimit;
  5491. A_UINT32 acm;
  5492. A_UINT32 no_ack;
  5493. } wmi_wmm_params;
  5494. /* DEPRECATED - use VDEV level command instead
  5495. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  5496. */
  5497. typedef struct {
  5498. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  5499. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  5500. A_UINT32 dg_type;
  5501. /* The TLVs for the 4 AC follows:
  5502. * wmi_wmm_params wmm_params_ac_be;
  5503. * wmi_wmm_params wmm_params_ac_bk;
  5504. * wmi_wmm_params wmm_params_ac_vi;
  5505. * wmi_wmm_params wmm_params_ac_vo;
  5506. */
  5507. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  5508. typedef enum {
  5509. WMI_REQUEST_PEER_STAT = 0x0001,
  5510. WMI_REQUEST_AP_STAT = 0x0002,
  5511. WMI_REQUEST_PDEV_STAT = 0x0004,
  5512. WMI_REQUEST_VDEV_STAT = 0x0008,
  5513. WMI_REQUEST_BCNFLT_STAT = 0x0010,
  5514. WMI_REQUEST_VDEV_RATE_STAT = 0x0020,
  5515. WMI_REQUEST_INST_STAT = 0x0040,
  5516. WMI_REQUEST_MIB_STAT = 0x0080,
  5517. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x0100,
  5518. WMI_REQUEST_CONGESTION_STAT = 0x0200,
  5519. WMI_REQUEST_PEER_EXTD_STAT = 0x0400,
  5520. WMI_REQUEST_BCN_STAT = 0x0800,
  5521. WMI_REQUEST_BCN_STAT_RESET = 0x1000,
  5522. WMI_REQUEST_PEER_EXTD2_STAT = 0x2000,
  5523. } wmi_stats_id;
  5524. /*
  5525. * cfg_retry_count is set to max number of times the AP should try sending
  5526. * QoS Null frames to the STA for measuring the instantaneous RSSI
  5527. *
  5528. * retry_count is used to maintain the number of times the AP has tried sending
  5529. * QoS Null frames to the STA for measuring the instantaneous RSSI
  5530. */
  5531. typedef struct {
  5532. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  5533. A_UINT32 cfg_retry_count;
  5534. A_UINT32 retry_count;
  5535. } wmi_inst_rssi_stats_params;
  5536. typedef struct {
  5537. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  5538. wmi_stats_id stats_id;
  5539. /** unique id identifying the VDEV, generated by the caller */
  5540. A_UINT32 vdev_id;
  5541. /** peer MAC address */
  5542. wmi_mac_addr peer_macaddr;
  5543. 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. */
  5544. /*
  5545. * This TLV is (optionally) followed by other TLVs:
  5546. * wmi_inst_rssi_stats_params inst_rssi_params;
  5547. */
  5548. } wmi_request_stats_cmd_fixed_param;
  5549. /* stats type bitmap */
  5550. #define WMI_LINK_STATS_RADIO 0x00000001
  5551. #define WMI_LINK_STATS_IFACE 0x00000002
  5552. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  5553. #define WMI_LINK_STATS_PER_PEER 0x00000008
  5554. /* wifi clear statistics bitmap */
  5555. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  5556. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  5557. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  5558. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  5559. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  5560. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  5561. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  5562. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  5563. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  5564. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  5565. /** Default value for stats if the stats collection has not started */
  5566. #define WMI_STATS_VALUE_INVALID 0xffffffff
  5567. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  5568. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  5569. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  5570. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  5571. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  5572. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  5573. typedef struct {
  5574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  5575. A_UINT32 num_of_diag_events_logs;
  5576. /* The TLVs will follow.
  5577. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  5578. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  5579. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  5580. */
  5581. } wmi_diag_event_log_config_fixed_param;
  5582. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  5583. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  5584. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  5585. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  5586. typedef struct {
  5587. A_UINT32 tlv_header;
  5588. A_UINT32 num_of_diag_events_logs;
  5589. /* The TLVs will follow.
  5590. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  5591. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  5592. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  5593. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  5594. */
  5595. } wmi_diag_event_log_supported_event_fixed_params;
  5596. typedef struct {
  5597. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  5598. A_UINT32 reserved0; /** placeholder for future */
  5599. } wmi_debug_mesg_flush_fixed_param;
  5600. typedef struct {
  5601. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  5602. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  5603. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  5604. /** reason_code1:
  5605. * The information stored in reason_code1 varies based on the data stally
  5606. * type values:
  5607. * data_stall_type | reason_code1
  5608. * -----------------------------------------------------
  5609. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  5610. * RX_REFILL_FAILED | ring_id (0-7)
  5611. * RX_FCS_LEN_ERROR | exact error type
  5612. */
  5613. A_UINT32 reason_code1;
  5614. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  5615. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  5616. } wmi_debug_mesg_fw_data_stall_param;
  5617. typedef struct {
  5618. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  5619. A_UINT32 reserved0; /** placeholder for future */
  5620. } wmi_debug_mesg_flush_complete_fixed_param;
  5621. typedef struct {
  5622. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  5623. /* vdev_id, where RSSI breach event occurred */
  5624. A_UINT32 vdev_id;
  5625. /* request id */
  5626. A_UINT32 request_id;
  5627. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  5628. A_UINT32 event_bitmap;
  5629. /* rssi at the time of RSSI breach. Unit dBm */
  5630. A_UINT32 rssi;
  5631. /* bssid of the monitored AP's */
  5632. wmi_mac_addr bssid;
  5633. } wmi_rssi_breach_event_fixed_param;
  5634. typedef struct {
  5635. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  5636. /** unique id identifying the segment */
  5637. A_UINT32 seg_id;
  5638. /** Start address of the segment to be read */
  5639. A_UINT32 seg_start_addr_lo;
  5640. A_UINT32 seg_start_addr_hi;
  5641. /** Length of the segment to be read */
  5642. A_UINT32 seg_length;
  5643. /** Host bufeer address to which the segment will be read and dumped */
  5644. A_UINT32 dest_addr_lo;
  5645. A_UINT32 dest_addr_hi;
  5646. } wmi_fw_mem_dump;
  5647. /* Command to get firmware memory dump*/
  5648. typedef struct {
  5649. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  5650. /** unique id identifying the request */
  5651. A_UINT32 request_id;
  5652. /** number of memory dump segments */
  5653. A_UINT32 num_fw_mem_dump_segs;
  5654. /**
  5655. * This TLV is followed by another TLV
  5656. * wmi_fw_mem_dump fw_mem_dump[];
  5657. */
  5658. } wmi_get_fw_mem_dump_fixed_param;
  5659. /** Event to indicate the completion of fw mem dump */
  5660. typedef struct {
  5661. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  5662. /** unique id identifying the request, given in the request stats command */
  5663. A_UINT32 request_id;
  5664. /*In case of Firmware memory dump */
  5665. A_UINT32 fw_mem_dump_complete;
  5666. } wmi_update_fw_mem_dump_fixed_param;
  5667. typedef enum {
  5668. WMI_ROAMING_IDLE = 0,
  5669. WMI_ROAMING_ACTIVE = 1,
  5670. } wmi_roam_state;
  5671. /* access categories */
  5672. typedef enum {
  5673. WMI_AC_VO = 0,
  5674. WMI_AC_VI = 1,
  5675. WMI_AC_BE = 2,
  5676. WMI_AC_BK = 3,
  5677. WMI_AC_MAX = 4,
  5678. } wmi_traffic_ac;
  5679. typedef enum {
  5680. WMI_STA_STATS = 0,
  5681. WMI_SOFTAP_STATS = 1,
  5682. WMI_IBSS_STATS = 2,
  5683. WMI_P2P_CLIENT_STATS = 3,
  5684. WMI_P2P_GO_STATS = 4,
  5685. WMI_NAN_STATS = 5,
  5686. WMI_MESH_STATS = 6,
  5687. } wmi_link_iface_type;
  5688. /* channel operating width */
  5689. typedef enum {
  5690. WMI_CHAN_WIDTH_20 = 0,
  5691. WMI_CHAN_WIDTH_40 = 1,
  5692. WMI_CHAN_WIDTH_80 = 2,
  5693. WMI_CHAN_WIDTH_160 = 3,
  5694. WMI_CHAN_WIDTH_80P80 = 4,
  5695. WMI_CHAN_WIDTH_5 = 5,
  5696. WMI_CHAN_WIDTH_10 = 6,
  5697. } wmi_channel_width;
  5698. /*Clear stats*/
  5699. typedef struct {
  5700. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  5701. /** unique id identifying the VDEV, generated by the caller */
  5702. A_UINT32 vdev_id;
  5703. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  5704. A_UINT32 stop_stats_collection_req;
  5705. /** identifies what stats to be cleared */
  5706. A_UINT32 stats_clear_req_mask;
  5707. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  5708. wmi_mac_addr peer_macaddr;
  5709. } wmi_clear_link_stats_cmd_fixed_param;
  5710. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  5711. typedef struct {
  5712. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  5713. /** threshold to classify the pkts as short or long */
  5714. A_UINT32 mpdu_size_threshold;
  5715. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  5716. A_UINT32 aggressive_statistics_gathering;
  5717. } wmi_start_link_stats_cmd_fixed_param;
  5718. typedef struct {
  5719. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  5720. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  5721. A_UINT32 stats_type;
  5722. /** unique id identifying the VDEV, generated by the caller */
  5723. A_UINT32 vdev_id;
  5724. /** unique id identifying the request, generated by the caller */
  5725. A_UINT32 request_id;
  5726. /** peer MAC address */
  5727. wmi_mac_addr peer_macaddr;
  5728. } wmi_request_link_stats_cmd_fixed_param;
  5729. #define WLM_STATS_REQ_LINK 0x00000001
  5730. typedef struct {
  5731. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */
  5732. /** unique id identifying the VDEV, generated by the caller */
  5733. A_UINT32 vdev_id;
  5734. /** WLM event request bitmask
  5735. * Used by host to customize the wlm stats report.
  5736. * Filled with a combination of WLM_STATS_xxx values.
  5737. */
  5738. A_UINT32 request_bitmask;
  5739. } wmi_request_wlm_stats_cmd_fixed_param;
  5740. /* channel statistics */
  5741. typedef struct {
  5742. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  5743. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  5744. A_UINT32 channel_width;
  5745. /** Primary 20 MHz channel */
  5746. A_UINT32 center_freq;
  5747. /** center frequency (MHz) first segment */
  5748. A_UINT32 center_freq0;
  5749. /** center frequency (MHz) second segment */
  5750. A_UINT32 center_freq1;
  5751. /** msecs the radio is awake (32 bits number accruing over time) */
  5752. A_UINT32 radio_awake_time;
  5753. /** msecs the CCA register is busy (32 bits number accruing over time) */
  5754. A_UINT32 cca_busy_time;
  5755. } wmi_channel_stats;
  5756. /*
  5757. * Each step represents 0.5 dB. The starting value is 0 dBm.
  5758. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  5759. */
  5760. #define MAX_TPC_LEVELS 64
  5761. /* radio statistics */
  5762. typedef struct {
  5763. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  5764. /** Wifi radio (if multiple radio supported) */
  5765. A_UINT32 radio_id;
  5766. /** msecs the radio is awake (32 bits number accruing over time) */
  5767. A_UINT32 on_time;
  5768. /** msecs the radio is transmitting (32 bits number accruing over time) */
  5769. A_UINT32 tx_time;
  5770. /** msecs the radio is in active receive (32 bits number accruing over time) */
  5771. A_UINT32 rx_time;
  5772. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  5773. A_UINT32 on_time_scan;
  5774. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  5775. A_UINT32 on_time_nbd;
  5776. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  5777. A_UINT32 on_time_gscan;
  5778. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  5779. A_UINT32 on_time_roam_scan;
  5780. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  5781. A_UINT32 on_time_pno_scan;
  5782. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  5783. A_UINT32 on_time_hs20;
  5784. /** number of channels */
  5785. A_UINT32 num_channels;
  5786. /** tx time per TPC level - DEPRECATED
  5787. * This field is deprecated.
  5788. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  5789. */
  5790. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  5791. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  5792. A_UINT32 on_time_host_scan;
  5793. /** msecs the radio is awake due to LPI scan (accruing over time) */
  5794. A_UINT32 on_time_lpi_scan;
  5795. } wmi_radio_link_stats;
  5796. /** tx time per power level statistics */
  5797. typedef struct {
  5798. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  5799. /** total number of tx power levels */
  5800. A_UINT32 total_num_tx_power_levels;
  5801. /** number of tx power levels that are carried in this event */
  5802. A_UINT32 num_tx_power_levels;
  5803. /** offset of current stats
  5804. * If ((num_tx_power_levels + power_level_offset)) ==
  5805. * total_num_tx_power_levels)
  5806. * this message completes the report of tx time per power levels.
  5807. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  5808. * will be sent by the target to deliver the remainder of the tx time
  5809. * per power level stats.
  5810. */
  5811. A_UINT32 power_level_offset;
  5812. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  5813. A_UINT32 radio_id;
  5814. /*
  5815. * This TLV will be followed by a TLV containing a variable-length array of
  5816. * A_UINT32 with tx time per power level data
  5817. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  5818. * The tx time is in units of milliseconds.
  5819. * The power levels are board-specific values; a board-specific translation
  5820. * has to be applied to determine what actual power corresponds to each
  5821. * power level.
  5822. * Just as the host has a BDF file available, the host should also have
  5823. * a data file available that provides the power level to power translations.
  5824. */
  5825. } wmi_tx_power_level_stats_evt_fixed_param;
  5826. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  5827. typedef struct {
  5828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5829. /** unique id identifying the request, given in the request stats command */
  5830. A_UINT32 request_id;
  5831. /** Number of radios*/
  5832. A_UINT32 num_radio;
  5833. /** more_data will be set depending on the number of radios */
  5834. A_UINT32 more_radio_events;
  5835. /*
  5836. * This TLV is followed by another TLV of array of bytes
  5837. * size of(struct wmi_radio_link_stats);
  5838. *
  5839. * This TLV is followed by another TLV of array of bytes
  5840. * num_channels * size of(struct wmi_channel_stats)
  5841. */
  5842. } wmi_radio_link_stats_event_fixed_param;
  5843. /* per rate statistics */
  5844. typedef struct {
  5845. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  5846. /** rate information
  5847. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5848. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5849. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5850. * b'3-b'0 indicate the rate, which is indicated as follows:
  5851. * OFDM : 0: OFDM 48 Mbps
  5852. * 1: OFDM 24 Mbps
  5853. * 2: OFDM 12 Mbps
  5854. * 3: OFDM 6 Mbps
  5855. * 4: OFDM 54 Mbps
  5856. * 5: OFDM 36 Mbps
  5857. * 6: OFDM 18 Mbps
  5858. * 7: OFDM 9 Mbps
  5859. * CCK (pream == 1)
  5860. * 0: CCK 11 Mbps Long
  5861. * 1: CCK 5.5 Mbps Long
  5862. * 2: CCK 2 Mbps Long
  5863. * 3: CCK 1 Mbps Long
  5864. * 4: CCK 11 Mbps Short
  5865. * 5: CCK 5.5 Mbps Short
  5866. * 6: CCK 2 Mbps Short
  5867. * HT/VHT (pream == 2/3)
  5868. * 0..7: MCS0..MCS7 (HT)
  5869. * 0..9: MCS0..MCS9 (VHT)
  5870. */
  5871. A_UINT32 rate;
  5872. /** units of 100 Kbps */
  5873. A_UINT32 bitrate;
  5874. /** number of successfully transmitted data pkts (ACK rcvd) */
  5875. A_UINT32 tx_mpdu;
  5876. /** number of received data pkts */
  5877. A_UINT32 rx_mpdu;
  5878. /** number of data packet losses (no ACK) */
  5879. A_UINT32 mpdu_lost;
  5880. /** total number of data pkt retries */
  5881. A_UINT32 retries;
  5882. /** number of short data pkt retries */
  5883. A_UINT32 retries_short;
  5884. /** number of long data pkt retries */
  5885. A_UINT32 retries_long;
  5886. } wmi_rate_stats;
  5887. typedef struct {
  5888. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  5889. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  5890. A_UINT32 peer_type;
  5891. /** mac address */
  5892. wmi_mac_addr peer_mac_address;
  5893. /** peer wmi_CAPABILITY_XXX */
  5894. A_UINT32 capabilities;
  5895. /** number of rates */
  5896. A_UINT32 num_rates;
  5897. } wmi_peer_link_stats;
  5898. /** PEER statistics (once started) reset and start afresh after each connection */
  5899. typedef struct {
  5900. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  5901. /** unique id identifying the request, given in the request stats command */
  5902. A_UINT32 request_id;
  5903. /** number of peers accomidated in this particular event */
  5904. A_UINT32 num_peers;
  5905. /** Indicates the fragment number */
  5906. A_UINT32 peer_event_number;
  5907. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  5908. A_UINT32 more_data;
  5909. /**
  5910. * This TLV is followed by another TLV
  5911. * num_peers * size of(struct wmi_peer_stats)
  5912. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  5913. */
  5914. } wmi_peer_stats_event_fixed_param;
  5915. /* per access category statistics */
  5916. typedef struct {
  5917. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  5918. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  5919. A_UINT32 ac_type;
  5920. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  5921. A_UINT32 tx_mpdu;
  5922. /** number of received unicast mpdus */
  5923. A_UINT32 rx_mpdu;
  5924. /** number of succesfully transmitted multicast data packets */
  5925. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  5926. A_UINT32 tx_mcast;
  5927. /** number of received multicast data packets */
  5928. A_UINT32 rx_mcast;
  5929. /** number of received unicast a-mpdus */
  5930. A_UINT32 rx_ampdu;
  5931. /** number of transmitted unicast a-mpdus */
  5932. A_UINT32 tx_ampdu;
  5933. /** number of data pkt losses (no ACK) */
  5934. A_UINT32 mpdu_lost;
  5935. /** total number of data pkt retries */
  5936. A_UINT32 retries;
  5937. /** number of short data pkt retries */
  5938. A_UINT32 retries_short;
  5939. /** number of long data pkt retries */
  5940. A_UINT32 retries_long;
  5941. /** data pkt min contention time (usecs) */
  5942. A_UINT32 contention_time_min;
  5943. /** data pkt max contention time (usecs) */
  5944. A_UINT32 contention_time_max;
  5945. /** data pkt avg contention time (usecs) */
  5946. A_UINT32 contention_time_avg;
  5947. /** num of data pkts used for contention statistics */
  5948. A_UINT32 contention_num_samples;
  5949. /** number of pending pkts */
  5950. A_UINT32 tx_pending_msdu;
  5951. } wmi_wmm_ac_stats;
  5952. /* interface statistics */
  5953. typedef struct {
  5954. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  5955. /** access point beacon received count from connected AP */
  5956. A_UINT32 beacon_rx;
  5957. /** access point mgmt frames received count from connected AP (including Beacon) */
  5958. A_UINT32 mgmt_rx;
  5959. /** action frames received count */
  5960. A_UINT32 mgmt_action_rx;
  5961. /** action frames transmit count */
  5962. A_UINT32 mgmt_action_tx;
  5963. /** access Point Beacon and Management frames RSSI (averaged) */
  5964. A_UINT32 rssi_mgmt;
  5965. /** access Point Data Frames RSSI (averaged) from connected AP */
  5966. A_UINT32 rssi_data;
  5967. /** access Point ACK RSSI (averaged) from connected AP */
  5968. A_UINT32 rssi_ack;
  5969. /** number of peers */
  5970. A_UINT32 num_peers;
  5971. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  5972. A_UINT32 num_peer_events;
  5973. /** number of ac */
  5974. A_UINT32 num_ac;
  5975. /** Roaming Stat */
  5976. A_UINT32 roam_state;
  5977. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  5978. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  5979. A_UINT32 avg_bcn_spread_offset_high;
  5980. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  5981. A_UINT32 avg_bcn_spread_offset_low;
  5982. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  5983. A_UINT32 is_leaky_ap;
  5984. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  5985. A_UINT32 avg_rx_frms_leaked;
  5986. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  5987. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  5988. a data frame with PM bit set) */
  5989. A_UINT32 rx_leak_window;
  5990. A_UINT32 tx_rts_succ_cnt;
  5991. A_UINT32 tx_rts_fail_cnt;
  5992. A_UINT32 tx_ppdu_succ_cnt;
  5993. A_UINT32 tx_ppdu_fail_cnt;
  5994. /** msecs the interface is in Connected state (accruing over time) */
  5995. A_UINT32 connected_duration;
  5996. /** msecs the interface is in DisConnected state (accruing over time) */
  5997. A_UINT32 disconnected_duration;
  5998. /** msecs the interface is doing RTT ranging (accruing over time) */
  5999. A_UINT32 rtt_ranging_duration;
  6000. /** msecs the interface is in RTT responder mode (accruing over time) */
  6001. A_UINT32 rtt_responder_duration;
  6002. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  6003. A_UINT32 num_probes_tx;
  6004. /** Number of Beacon misses on this interface (accruing over time) */
  6005. A_UINT32 num_beacon_miss;
  6006. } wmi_iface_link_stats;
  6007. typedef enum {
  6008. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  6009. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  6010. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  6011. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  6012. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  6013. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  6014. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  6015. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  6016. /* Add New offload stat type here */
  6017. WMI_OFFLOAD_STATS_TYPE_MAX,
  6018. } wmi_offload_stats_type;
  6019. typedef struct {
  6020. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  6021. /** Type of offload stat. enum wmi_offload_stats_type **/
  6022. A_UINT32 type;
  6023. /** Number of (MSDUs) frames Received **/
  6024. A_UINT32 rx_count;
  6025. /** Number of frames Dropped **/
  6026. A_UINT32 drp_count;
  6027. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  6028. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  6029. A_UINT32 fwd_count;
  6030. } wmi_iface_offload_stats;
  6031. /** Interface statistics (once started) reset and start afresh after each connection */
  6032. typedef struct {
  6033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  6034. /** unique id identifying the request, given in the request stats command */
  6035. A_UINT32 request_id;
  6036. /** unique id identifying the VDEV, generated by the caller */
  6037. A_UINT32 vdev_id;
  6038. /** Number of offload stats **/
  6039. A_UINT32 num_offload_stats;
  6040. /*
  6041. * This TLV is followed by other TLVs:
  6042. * wmi_iface_link_stats iface_link_stats;
  6043. * num_ac * size of(struct wmi_wmm_ac_stats)
  6044. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  6045. */
  6046. } wmi_iface_link_stats_event_fixed_param;
  6047. typedef struct {
  6048. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */
  6049. /** bitmask listing which WLM stats are provided.
  6050. * Copied from wlm_stats_cmd_fixed_param.
  6051. * (This field is provided for convenience rather than necessity, since
  6052. * the recipient can directly check which TLV arrays have non-zero length.)
  6053. */
  6054. A_UINT32 request_bitmask;
  6055. /** unique id identifying the VDEV, generated by the caller */
  6056. A_UINT32 vdev_id;
  6057. /**
  6058. * timestamp of event report, in microseconds units
  6059. * This timestamp is for debugging purposes only.
  6060. * It can be used to correlate this WLM stats event data with
  6061. * other WLM information uploaded through other means.
  6062. */
  6063. A_UINT32 timestamp;
  6064. /**
  6065. * Interval between two consecutive WLM stats query requests,
  6066. * in microseconds units.
  6067. * This interval is used for converting the scan_period and pwr_on_period
  6068. * values from within wmi_wlm_link_stats from percentage units to time
  6069. * units.
  6070. */
  6071. A_UINT32 req_interval;
  6072. /*
  6073. * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload.
  6074. */
  6075. } wmi_wlm_stats_event_fixed_param;
  6076. /** Suspend option */
  6077. enum {
  6078. WMI_PDEV_SUSPEND, /* suspend */
  6079. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  6080. };
  6081. typedef struct {
  6082. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  6083. /* suspend option sent to target */
  6084. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6085. A_UINT32 suspend_opt;
  6086. } wmi_pdev_suspend_cmd_fixed_param;
  6087. typedef struct {
  6088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  6089. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  6090. } wmi_pdev_resume_cmd_fixed_param;
  6091. typedef struct {
  6092. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  6093. A_UINT32 num_vdev_stats; /* number of vdevs */
  6094. } wmi_vdev_rate_stats_event_fixed_param;
  6095. typedef struct {
  6096. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  6097. A_UINT32 vdevid; /* Id of the wlan vdev*/
  6098. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  6099. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  6100. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  6101. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  6102. } wmi_vdev_rate_ht_info;
  6103. typedef struct {
  6104. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  6105. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  6106. } wmi_rx_aggr_failure_event_fixed_param;
  6107. typedef struct {
  6108. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  6109. A_UINT32 start_seq; /* start sequence number of the hole */
  6110. A_UINT32 end_seq; /* end sequence number of the hole */
  6111. } wmi_rx_aggr_failure_info;
  6112. typedef struct {
  6113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_request_cmd_fixed_param */
  6114. /** unique id identifying the VDEV, generated by the caller */
  6115. A_UINT32 vdev_id;
  6116. /** peer MAC address */
  6117. wmi_mac_addr peer_macaddr;
  6118. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6119. } wmi_peer_tx_pn_request_cmd_fixed_param;
  6120. typedef struct {
  6121. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_pn_response_event_fixed_param */
  6122. /** unique id identifying the VDEV, generated by the caller */
  6123. A_UINT32 vdev_id;
  6124. /** peer MAC address */
  6125. wmi_mac_addr peer_macaddr;
  6126. A_UINT32 key_type; /* use standard cipher types - see WMI_CIPHER_ defs */
  6127. /** Packet Number
  6128. * The PN is provided in little endian order, with bits 7:0 of the PN
  6129. * residing in pn[0].
  6130. * The key_type indirectly specifies the packet number length, and thus
  6131. * how many bytes within pn[] are filled with valid data.
  6132. */
  6133. A_UINT8 pn[16];
  6134. } wmi_peer_tx_pn_response_event_fixed_param;
  6135. typedef struct {
  6136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  6137. wmi_stats_id stats_id;
  6138. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  6139. A_UINT32 num_pdev_stats;
  6140. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  6141. A_UINT32 num_vdev_stats;
  6142. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  6143. A_UINT32 num_peer_stats;
  6144. A_UINT32 num_bcnflt_stats;
  6145. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  6146. A_UINT32 num_chan_stats;
  6147. /** number of MIB stats event structures (wmi_mib_stats) */
  6148. A_UINT32 num_mib_stats;
  6149. 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. */
  6150. /** number of beacon stats event structures (wmi_bcn_stats) */
  6151. A_UINT32 num_bcn_stats;
  6152. /** number of extended peer stats event structures (wmi_peer_extd_stats) */
  6153. A_UINT32 num_peer_extd_stats;
  6154. /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */
  6155. A_UINT32 num_peer_extd2_stats;
  6156. /* This TLV is followed by another TLV of array of bytes
  6157. * A_UINT8 data[];
  6158. * This data array contains
  6159. * num_pdev_stats * size of(struct wmi_pdev_stats)
  6160. * num_vdev_stats * size of(struct wmi_vdev_stats)
  6161. * num_peer_stats * size of(struct wmi_peer_stats)
  6162. * num_bcnflt_stats * size_of()
  6163. * num_chan_stats * size of(struct wmi_chan_stats)
  6164. * num_mib_stats * size of(struct wmi_mib_stats)
  6165. * num_bcn_stats * size of(struct wmi_bcn_stats)
  6166. */
  6167. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  6168. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  6169. * following the information elements listed above.
  6170. */
  6171. } wmi_stats_event_fixed_param;
  6172. /* WLAN channel CCA stats bitmap */
  6173. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  6174. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  6175. #define WLAN_STATS_TX_TIME_SHIFT 1
  6176. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  6177. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  6178. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  6179. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  6180. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  6181. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  6182. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  6183. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  6184. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  6185. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  6186. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  6187. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  6188. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  6189. /* WLAN peer signal stats bitmap */
  6190. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  6191. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  6192. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  6193. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  6194. /* WLAN TX stats bitmap */
  6195. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  6196. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  6197. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  6198. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  6199. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  6200. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  6201. #define WLAN_STATS_TX_BYTES_SHIFT 3
  6202. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  6203. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  6204. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  6205. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  6206. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  6207. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  6208. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  6209. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  6210. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  6211. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  6212. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  6213. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  6214. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  6215. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  6216. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  6217. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  6218. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  6219. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  6220. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  6221. /* WLAN RX stats bitmap */
  6222. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  6223. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  6224. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  6225. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  6226. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  6227. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  6228. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  6229. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  6230. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  6231. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  6232. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  6233. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  6234. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  6235. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  6236. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  6237. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  6238. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  6239. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  6240. #define WLAN_STATS_RX_MCS_SHIFT 9
  6241. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  6242. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  6243. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  6244. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  6245. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  6246. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  6247. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  6248. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  6249. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  6250. typedef struct
  6251. {
  6252. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  6253. A_UINT32 vdev_id;
  6254. /** Percentage of idle time, no TX, no RX, no interference */
  6255. A_UINT32 idle_time;
  6256. /** Percentage of time transmitting packets */
  6257. A_UINT32 tx_time;
  6258. /** Percentage of time receiving packets in current BSSs */
  6259. A_UINT32 rx_in_bss_time;
  6260. /** Percentage of time receiving packets not in current BSSs */
  6261. A_UINT32 rx_out_bss_time;
  6262. /** Percentage of time interference detected. */
  6263. A_UINT32 rx_busy_time;
  6264. /** Percentage of time receiving packets with errors
  6265. * or packets flagged as retransmission or seqnum discontinued. */
  6266. A_UINT32 rx_in_bad_cond_time;
  6267. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  6268. A_UINT32 tx_in_bad_cond_time;
  6269. /** Percentage of time the chip is unable to work in normal conditions. */
  6270. A_UINT32 wlan_not_avail_time;
  6271. } wmi_chan_cca_stats;
  6272. /** Thresholds of cca stats, stands for percentages of stats variation.
  6273. * Check wmi_chan_cca_stats for each stats's meaning.
  6274. */
  6275. typedef struct
  6276. {
  6277. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  6278. A_UINT32 idle_time; /* units = percent */
  6279. A_UINT32 tx_time; /* units = percent */
  6280. A_UINT32 rx_in_bss_time; /* units = percent */
  6281. A_UINT32 rx_out_bss_time; /* units = percent */
  6282. A_UINT32 rx_busy_time; /* units = percent */
  6283. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  6284. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  6285. A_UINT32 wlan_not_avail_time; /* units = percent */
  6286. } wmi_chan_cca_stats_thresh;
  6287. typedef struct
  6288. {
  6289. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  6290. A_UINT32 vdev_id;
  6291. A_UINT32 peer_id;
  6292. /** per chain SNR in current bss, units are dB */
  6293. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  6294. /** per chain background noise, units are dBm */
  6295. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  6296. /** per antenna rx MPDUs */
  6297. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  6298. /** per antenna tx MPDUs */
  6299. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  6300. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  6301. A_UINT32 num_chains_valid;
  6302. } wmi_peer_signal_stats;
  6303. /** Thresholds of signal stats, stand for percentage of stats variation.
  6304. * Check wmi_peer_signal_stats for each stats's meaning.
  6305. */
  6306. typedef struct
  6307. {
  6308. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  6309. A_UINT32 per_chain_snr; /* units = dB */
  6310. A_UINT32 per_chain_nf; /* units = dBm */
  6311. } wmi_peer_signal_stats_thresh;
  6312. typedef struct
  6313. {
  6314. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  6315. /** Number of total TX MSDUs on MAC layer in the period */
  6316. A_UINT32 tx_msdu_cnt;
  6317. /** Number of total TX MPDUs on MAC layer in the period */
  6318. A_UINT32 tx_mpdu_cnt;
  6319. /** Number of total TX PPDUs on MAC layer in the period */
  6320. A_UINT32 tx_ppdu_cnt;
  6321. /** Bytes of tx data on MAC layer in the period */
  6322. A_UINT32 tx_bytes;
  6323. /** Number of TX MSDUs cancelled due to any reason in the period,
  6324. * such as WMM limitation/bandwidth limitation/radio congestion */
  6325. A_UINT32 tx_msdu_drop_cnt;
  6326. /** Bytes of dropped TX packets in the period */
  6327. A_UINT32 tx_drop_bytes;
  6328. /** Number of unacked transmissions of MPDUs */
  6329. A_UINT32 tx_mpdu_retry_cnt;
  6330. /** Number of MPDUs have not been ACKed despite retried */
  6331. A_UINT32 tx_mpdu_fail_cnt;
  6332. /** Number of PPDUs which received no block ack */
  6333. A_UINT32 tx_ppdu_fail_cnt;
  6334. /* This TLV is followed by TLVs below: :
  6335. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  6336. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  6337. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  6338. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  6339. */
  6340. } wmi_tx_stats;
  6341. /** Thresholds of tx stats, stand for percentage of stats variation.
  6342. * Check wmi_tx_stats for each stats's meaning.
  6343. */
  6344. typedef struct
  6345. {
  6346. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  6347. A_UINT32 tx_msdu_cnt;
  6348. A_UINT32 tx_mpdu_cnt;
  6349. A_UINT32 tx_ppdu_cnt;
  6350. A_UINT32 tx_bytes;
  6351. A_UINT32 tx_msdu_drop_cnt;
  6352. A_UINT32 tx_drop_bytes;
  6353. A_UINT32 tx_mpdu_retry_cnt;
  6354. A_UINT32 tx_mpdu_fail_cnt;
  6355. A_UINT32 tx_ppdu_fail_cnt;
  6356. A_UINT32 tx_mpdu_aggr;
  6357. A_UINT32 tx_succ_mcs;
  6358. A_UINT32 tx_fail_mcs;
  6359. A_UINT32 tx_ppdu_delay;
  6360. } wmi_tx_stats_thresh;
  6361. typedef struct
  6362. {
  6363. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  6364. A_UINT32 vdev_id;
  6365. A_UINT32 peer_id;
  6366. /* The TLVs for the 4 AC follows:
  6367. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  6368. */
  6369. } wmi_peer_ac_tx_stats;
  6370. typedef struct
  6371. {
  6372. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  6373. /** Number of RX MPDUs on MAC layer */
  6374. A_UINT32 mac_rx_mpdu_cnt;
  6375. /** Bytes of RX packets on MAC layer */
  6376. A_UINT32 mac_rx_bytes;
  6377. /** Number of RX PPDU on PHY layer */
  6378. A_UINT32 phy_rx_ppdu_cnt;
  6379. /** Bytes of RX packets on PHY layer */
  6380. A_UINT32 phy_rx_bytes;
  6381. /** Number of discontinuity in seqnum */
  6382. A_UINT32 rx_disorder_cnt;
  6383. /** Number of RX MPDUs flagged as retransmissions */
  6384. A_UINT32 rx_mpdu_retry_cnt;
  6385. /** Number of RX MPDUs identified as duplicates */
  6386. A_UINT32 rx_mpdu_dup_cnt;
  6387. /** Number of RX MPDUs discarded */
  6388. A_UINT32 rx_mpdu_discard_cnt;
  6389. /* This TLV is followed by TLVs below:
  6390. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  6391. * A_UINT32 rx_mcs[rx_mcs_array_len];
  6392. */
  6393. } wmi_rx_stats;
  6394. /** Thresholds of rx stats, stands for percentage of stats variation.
  6395. * Check wmi_rx_stats for each stats's meaning.
  6396. */
  6397. typedef struct
  6398. {
  6399. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  6400. A_UINT32 mac_rx_mpdu_cnt;
  6401. A_UINT32 mac_rx_bytes;
  6402. A_UINT32 phy_rx_ppdu_cnt;
  6403. A_UINT32 phy_rx_bytes;
  6404. A_UINT32 rx_disorder_cnt;
  6405. A_UINT32 rx_mpdu_retry_cnt;
  6406. A_UINT32 rx_mpdu_dup_cnt;
  6407. A_UINT32 rx_mpdu_discard_cnt;
  6408. A_UINT32 rx_mpdu_aggr;
  6409. A_UINT32 rx_mcs;
  6410. A_UINT32 sta_ps_inds;
  6411. A_UINT32 sta_ps_durs;
  6412. A_UINT32 rx_probe_reqs;
  6413. A_UINT32 rx_oth_mgmts;
  6414. } wmi_rx_stats_thresh;
  6415. typedef struct
  6416. {
  6417. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  6418. A_UINT32 vdev_id;
  6419. A_UINT32 peer_id;
  6420. /** How many times STAs go to sleep */
  6421. A_UINT32 sta_ps_inds;
  6422. /** Total sleep time of STAs, milliseconds units */
  6423. A_UINT32 sta_ps_durs;
  6424. /** Number of probe requests received */
  6425. A_UINT32 rx_probe_reqs;
  6426. /** Number of other management frames received, not including probe requests */
  6427. A_UINT32 rx_oth_mgmts;
  6428. /* The TLVs for the 4 AC follows:
  6429. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  6430. */
  6431. } wmi_peer_ac_rx_stats;
  6432. typedef struct
  6433. {
  6434. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  6435. /*
  6436. * This struct provides the timestamps from a low-frequency timer
  6437. * for the start and end of a stats period.
  6438. * Each timestamp is reported twice, with different units.
  6439. * The _msec timestamp is in millisecond units.
  6440. * The _count timestamp is in clock tick units.
  6441. * The timestamp is reported in clock ticks as well as in milliseconds
  6442. * so that if the stats start and end times fall within the same
  6443. * millisecond, the clock tick timestamps can still be used to
  6444. * determine what fraction of a millisecond the stats period occupied.
  6445. */
  6446. A_UINT32 start_low_freq_msec;
  6447. A_UINT32 start_low_freq_count;
  6448. A_UINT32 end_low_freq_msec;
  6449. A_UINT32 end_low_freq_count;
  6450. } wmi_stats_period;
  6451. typedef enum {
  6452. /** Periodic timer timed out, based on the period specified
  6453. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  6454. */
  6455. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  6456. /** Any of the (enabled) stats thresholds specified
  6457. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  6458. * within the current stats period.
  6459. */
  6460. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  6461. /** In Response to the one-time wlan stats request of
  6462. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  6463. */
  6464. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  6465. } wmi_report_stats_event_trigger_cond_id;
  6466. typedef struct {
  6467. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  6468. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  6469. A_UINT32 trigger_cond_id;
  6470. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  6471. A_UINT32 cca_chgd_bitmap;
  6472. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  6473. A_UINT32 sig_chgd_bitmap;
  6474. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  6475. A_UINT32 tx_chgd_bitmap;
  6476. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  6477. A_UINT32 rx_chgd_bitmap;
  6478. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  6479. A_UINT32 num_chan_cca_stats;
  6480. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  6481. A_UINT32 num_peer_signal_stats;
  6482. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  6483. A_UINT32 num_peer_ac_tx_stats;
  6484. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  6485. * The array indicates number of MPDUs sent on specified aggregation size
  6486. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  6487. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  6488. A_UINT32 tx_mpdu_aggr_array_len;
  6489. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  6490. * The array indicates number of acked PPDUs sent at a specific rate */
  6491. A_UINT32 tx_succ_mcs_array_len;
  6492. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  6493. * The array indicates number of unacked PPDUs sent at a specific rate */
  6494. A_UINT32 tx_fail_mcs_array_len;
  6495. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  6496. * The array counts numbers of PPDUs encountering different TX time delays.
  6497. * TX delay here means time interval between the time a PPDU is queued
  6498. * to the MAC HW for transmission and the time the lower layers of
  6499. * tx FW return a tx status.
  6500. *
  6501. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  6502. * each bin of the tx_ppdu_delay histogram represents.
  6503. * By default the bin size is 10ms.
  6504. * tx_ppdu_delay[0] -> delays between 0-9 ms
  6505. * tx_ppdu_delay[1] -> delays between 10-19 ms
  6506. * ...
  6507. * tx_ppdu_delay[9] -> delays between 90-99 ms
  6508. * tx_ppdu_delay[10] -> delays >= 100 ms
  6509. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  6510. */
  6511. A_UINT32 tx_ppdu_delay_bin_size_ms;
  6512. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  6513. A_UINT32 tx_ppdu_delay_array_len;
  6514. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  6515. A_UINT32 num_peer_ac_rx_stats;
  6516. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  6517. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  6518. A_UINT32 rx_mpdu_aggr_array_len;
  6519. /** Array size of rx_mcs[] which is histogram of encoding rate.
  6520. * The array indicates number of PPDUs received at a specific rate */
  6521. A_UINT32 rx_mcs_array_len;
  6522. /** Array size of stats_period[] which contains several stats periods. */
  6523. A_UINT32 stats_period_array_len;
  6524. /**
  6525. * This TLV is followed by TLVs below:
  6526. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  6527. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  6528. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  6529. * 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)
  6530. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  6531. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  6532. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  6533. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  6534. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  6535. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  6536. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  6537. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  6538. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  6539. * 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)
  6540. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  6541. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  6542. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  6543. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  6544. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  6545. **/
  6546. } wmi_report_stats_event_fixed_param;
  6547. typedef struct {
  6548. /** TLV tag and len; tag equals
  6549. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  6550. A_UINT32 tlv_header;
  6551. /** peer MAC address */
  6552. wmi_mac_addr peer_macaddr;
  6553. /** bytes (size of MPDUs) transmitted to this peer */
  6554. struct {
  6555. /* lower 32 bits of the tx_bytes value */
  6556. A_UINT32 low_32;
  6557. /* upper 32 bits of the tx_bytes value */
  6558. A_UINT32 high_32;
  6559. } tx_bytes;
  6560. /** packets (MSDUs) transmitted to this peer */
  6561. struct {
  6562. /* lower 32 bits of the tx_packets value */
  6563. A_UINT32 low_32;
  6564. /* upper 32 bits of the tx_packets value */
  6565. A_UINT32 high_32;
  6566. } tx_packets;
  6567. /** bytes (size of MPDUs) received from this peer */
  6568. struct {
  6569. /* lower 32 bits of the rx_bytes value */
  6570. A_UINT32 low_32;
  6571. /* upper 32 bits of the rx_bytes value */
  6572. A_UINT32 high_32;
  6573. } rx_bytes;
  6574. /** packets (MSDUs) received from this peer */
  6575. struct {
  6576. /* lower 32 bits of the rx_packets value */
  6577. A_UINT32 low_32;
  6578. /* upper 32 bits of the rx_packets value */
  6579. A_UINT32 high_32;
  6580. } rx_packets;
  6581. /** cumulative retry counts (MPDUs) */
  6582. A_UINT32 tx_retries;
  6583. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  6584. A_UINT32 tx_failed;
  6585. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  6586. * (in format of 0x1000RRRR)
  6587. * The rate-code is a 4-bytes field in which,
  6588. * for given rate, nss and preamble
  6589. *
  6590. * b'31-b'29 unused / reserved
  6591. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  6592. * b'27-b'11 unused / reserved
  6593. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  6594. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  6595. * b'4-b'0 indicate the rate, which is indicated as follows:
  6596. * OFDM : 0: OFDM 48 Mbps
  6597. * 1: OFDM 24 Mbps
  6598. * 2: OFDM 12 Mbps
  6599. * 3: OFDM 6 Mbps
  6600. * 4: OFDM 54 Mbps
  6601. * 5: OFDM 36 Mbps
  6602. * 6: OFDM 18 Mbps
  6603. * 7: OFDM 9 Mbps
  6604. * CCK (pream == 1)
  6605. * 0: CCK 11 Mbps Long
  6606. * 1: CCK 5.5 Mbps Long
  6607. * 2: CCK 2 Mbps Long
  6608. * 3: CCK 1 Mbps Long
  6609. * 4: CCK 11 Mbps Short
  6610. * 5: CCK 5.5 Mbps Short
  6611. * 6: CCK 2 Mbps Short
  6612. * HT/VHT (pream == 2/3)
  6613. * 0..7: MCS0..MCS7 (HT)
  6614. * 0..9: MCS0..MCS9 (11AC VHT)
  6615. * 0..11: MCS0..MCS11 (11AX VHT)
  6616. */
  6617. /** rate-code of the last transmission */
  6618. A_UINT32 last_tx_rate_code;
  6619. /** rate-code of the last received PPDU */
  6620. A_UINT32 last_rx_rate_code;
  6621. /** bitrate of the last transmission, in units of kbps */
  6622. A_UINT32 last_tx_bitrate_kbps;
  6623. /** bitrate of the last received PPDU, in units of kbps */
  6624. A_UINT32 last_rx_bitrate_kbps;
  6625. /** combined RSSI of the last received PPDU, in unit of dBm */
  6626. A_INT32 peer_rssi;
  6627. } wmi_peer_stats_info;
  6628. typedef struct {
  6629. /** TLV tag and len; tag equals
  6630. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  6631. A_UINT32 tlv_header;
  6632. /** VDEV to which the peers belong to */
  6633. A_UINT32 vdev_id;
  6634. /** number of peers in peer_stats_info[] */
  6635. A_UINT32 num_peers;
  6636. /** flag to indicate if there are more peers which will
  6637. * be sent a following seperate peer_stats_info event */
  6638. A_UINT32 more_data;
  6639. /* This TLV is followed by another TLV of array of structs
  6640. * wmi_peer_stats_info peer_stats_info[];
  6641. */
  6642. } wmi_peer_stats_info_event_fixed_param;
  6643. typedef struct {
  6644. /** TLV tag and len; tag equals
  6645. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  6646. A_UINT32 tlv_header;
  6647. /** primary channel freq of the channel whose stats is sent */
  6648. A_UINT32 chan_mhz;
  6649. /** accumulation of time the radio is tuned to this channel,
  6650. * in units of microseconds */
  6651. A_UINT32 on_chan_us;
  6652. /** accumulation of the TX PPDU duration over the measurement period,
  6653. * in units of microseconds */
  6654. A_UINT32 tx_duration_us;
  6655. /** accumulation of the RX PPDU duration over the measurement period,
  6656. * in units of microseconds */
  6657. A_UINT32 rx_duration_us;
  6658. /** ratio of channel busy time to on_chan_us, in units of percent */
  6659. A_UINT32 chan_busy_ratio;
  6660. /** ratio of on_chan_us to the measurement period, in units of percent */
  6661. A_UINT32 on_chan_ratio;
  6662. /** measurement period, in units of microseconds */
  6663. A_UINT32 measurement_period_us;
  6664. /** MPDUs transmitted on this channel */
  6665. A_UINT32 tx_mpdus;
  6666. /** MSDUs transmitted on this channel */
  6667. A_UINT32 tx_msdus;
  6668. /** MPDUS successfully received on this channel */
  6669. A_UINT32 rx_succ_mpdus;
  6670. /** Failed MPDUs (CRC failures) received on this channel */
  6671. A_UINT32 rx_fail_mpdus;
  6672. } wmi_radio_chan_stats;
  6673. typedef struct {
  6674. /** TLV tag and len; tag equals
  6675. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  6676. A_UINT32 tlv_header;
  6677. /** number of channel stats in radio_chan_stats[] */
  6678. A_UINT32 num_chans;
  6679. /* This TLV is followed by another TLV of array of structs
  6680. * wmi_radio_chan_stats radio_chan_stats[];
  6681. */
  6682. } wmi_radio_chan_stats_event_fixed_param;
  6683. /**
  6684. * PDEV statistics
  6685. *
  6686. * This struct incorporates the wlan_dbg_stats struct, which is
  6687. * conditionally defined, based on the AR900B flag.
  6688. * The below _v1 struct variant is the unconditional definition
  6689. * that matches what would be conditionally defined by builds that
  6690. * don't use the AR900B flag. The _v2 struct variant is the
  6691. * unconditional definition that matches what would be conditionally
  6692. * defined by builds that use the AR900B flag.
  6693. * The _v2 struct def can be used within host or target builds
  6694. * that don't use the AR900B flag, but needs to interoperate with a
  6695. * target or host build that does use the AR900B flag.
  6696. * Similarly, the _v1 struct def can be used by a host or target build
  6697. * that does use the AR900B flag, but needs to interoperate with a
  6698. * target or host build that doesn't use the AR900B flag.
  6699. *
  6700. * For backwards compatibility, wmi_pdev_stats is still (conditionally)
  6701. * defined, as an alias for either the _v1 or _v2 variant.
  6702. */
  6703. typedef struct {
  6704. /** Channel noise floor */
  6705. A_INT32 chan_nf;
  6706. /** TX frame count */
  6707. A_UINT32 tx_frame_count;
  6708. /** RX frame count */
  6709. A_UINT32 rx_frame_count;
  6710. /** rx clear count */
  6711. A_UINT32 rx_clear_count;
  6712. /** cycle count */
  6713. A_UINT32 cycle_count;
  6714. /** Phy error count */
  6715. A_UINT32 phy_err_count;
  6716. /** Channel Tx Power */
  6717. A_UINT32 chan_tx_pwr;
  6718. /** WAL dbg stats */
  6719. struct wlan_dbg_stats_v1 pdev_stats;
  6720. } wmi_pdev_stats_v1;
  6721. typedef struct {
  6722. /** Channel noise floor */
  6723. A_INT32 chan_nf;
  6724. /** TX frame count */
  6725. A_UINT32 tx_frame_count;
  6726. /** RX frame count */
  6727. A_UINT32 rx_frame_count;
  6728. /** rx clear count */
  6729. A_UINT32 rx_clear_count;
  6730. /** cycle count */
  6731. A_UINT32 cycle_count;
  6732. /** Phy error count */
  6733. A_UINT32 phy_err_count;
  6734. /** Channel Tx Power */
  6735. A_UINT32 chan_tx_pwr;
  6736. /** WAL dbg stats */
  6737. struct wlan_dbg_stats_v2 pdev_stats;
  6738. } wmi_pdev_stats_v2;
  6739. #if defined(AR900B)
  6740. #define wmi_pdev_stats wmi_pdev_stats_v2
  6741. #else
  6742. #define wmi_pdev_stats wmi_pdev_stats_v1
  6743. #endif
  6744. /**
  6745. * VDEV statistics
  6746. * @todo
  6747. * add all VDEV stats here
  6748. */
  6749. typedef struct {
  6750. A_INT32 bcn_snr;
  6751. A_INT32 dat_snr;
  6752. } wmi_snr_info;
  6753. typedef struct {
  6754. /** unique id identifying the VDEV, generated by the caller */
  6755. A_UINT32 vdev_id;
  6756. wmi_snr_info vdev_snr;
  6757. 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) */
  6758. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  6759. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  6760. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  6761. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  6762. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  6763. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  6764. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  6765. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  6766. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  6767. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  6768. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  6769. } wmi_vdev_stats;
  6770. /*
  6771. * vdev ext stats with additonal bcn stats
  6772. * (Due to backward compatiblity requirements, these new stats fields cannot be
  6773. * added inside wmi_vdev_stats.)
  6774. */
  6775. typedef struct {
  6776. A_UINT32 vdev_id;
  6777. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  6778. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  6779. } wmi_bcn_stats;
  6780. /**
  6781. * peer statistics.
  6782. */
  6783. typedef struct {
  6784. /** peer MAC address */
  6785. wmi_mac_addr peer_macaddr;
  6786. /** rssi */
  6787. A_UINT32 peer_rssi;
  6788. /** last tx data rate used for peer */
  6789. A_UINT32 peer_tx_rate;
  6790. /** last rx data rate used for peer */
  6791. A_UINT32 peer_rx_rate;
  6792. } wmi_peer_stats;
  6793. /**
  6794. * Peer extension statistics
  6795. */
  6796. typedef struct {
  6797. /** peer MAC address */
  6798. wmi_mac_addr peer_macaddr;
  6799. /* lower 32 bits of rx duration in microseconds */
  6800. A_UINT32 rx_duration;
  6801. /** Total TX bytes (including dot11 header) sent to peer */
  6802. A_UINT32 peer_tx_bytes;
  6803. /** Total RX bytes (including dot11 header) received from peer */
  6804. A_UINT32 peer_rx_bytes;
  6805. /** last TX ratecode */
  6806. A_UINT32 last_tx_rate_code;
  6807. /** TX power used by peer - units are 0.5 dBm */
  6808. A_INT32 last_tx_power;
  6809. /* Total number of received multicast & broadcast data frames corresponding to this peer */
  6810. A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */
  6811. /* upper 32 bits of rx duration in microseconds */
  6812. A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */
  6813. A_UINT32 reserved[2]; /** for future use - add new peer stats here */
  6814. } wmi_peer_extd_stats;
  6815. typedef struct {
  6816. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_extd2_stats */
  6817. /** peer MAC address */
  6818. wmi_mac_addr peer_macaddr;
  6819. /*
  6820. * The following rx_bytes field (lower/upper pair) counts only the
  6821. * MSDU bytes (after 802.11 decap, if applicable), and thus doesn't
  6822. * count the 802.11 header, unlike the wmi_peer_extd_stats.peer_rx_bytes
  6823. * and wmi_peer_stats_info.rx_bytes fields.
  6824. */
  6825. /** Lower 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  6826. A_UINT32 rx_bytes_l32;
  6827. /** Upper 32 bits of the rx_bytes (size of MSDUs) excluding dot11 header from this peer */
  6828. A_UINT32 rx_bytes_u32;
  6829. /** Number of MPDUS received with FCS error from this peer */
  6830. A_UINT32 rx_fcs_err;
  6831. /** Number of MPDUs(both data and non data) received from this peer */
  6832. A_UINT32 rx_mpdus;
  6833. } wmi_peer_extd2_stats;
  6834. typedef struct {
  6835. /** Primary channel freq of the channel for which stats are sent */
  6836. A_UINT32 chan_mhz;
  6837. /** Time spent on the channel */
  6838. A_UINT32 sampling_period_us;
  6839. /** Aggregate duration over a sampling period for which channel activity was observed */
  6840. A_UINT32 rx_clear_count;
  6841. /** Accumalation of the TX PPDU duration over a sampling period */
  6842. A_UINT32 tx_duration_us;
  6843. /** Accumalation of the RX PPDU duration over a sampling period */
  6844. A_UINT32 rx_duration_us;
  6845. } wmi_chan_stats;
  6846. typedef struct {
  6847. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  6848. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  6849. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  6850. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  6851. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  6852. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  6853. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  6854. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  6855. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  6856. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  6857. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  6858. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  6859. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  6860. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  6861. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  6862. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  6863. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  6864. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  6865. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  6866. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  6867. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  6868. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  6869. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  6870. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  6871. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  6872. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  6873. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  6874. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  6875. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  6876. union {
  6877. A_UINT64 counter; /* for use by target only */
  6878. struct {
  6879. A_UINT32 low;
  6880. A_UINT32 high;
  6881. } upload; /* for use by host */
  6882. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  6883. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  6884. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  6885. union {
  6886. A_UINT64 counter; /* for use by target only */
  6887. struct {
  6888. A_UINT32 rx_octets_in_ampdu_low;
  6889. A_UINT32 rx_octets_in_ampdu_high;
  6890. } upload; /* for use by host */
  6891. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  6892. A_UINT32 reserved_1;
  6893. A_UINT32 reserved_2;
  6894. A_UINT32 reserved_3;
  6895. A_UINT32 reserved_4;
  6896. } wmi_mib_stats;
  6897. typedef struct {
  6898. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  6899. A_UINT32 vdev_id;
  6900. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  6901. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  6902. wmi_mac_addr peer_macaddr;
  6903. } wmi_rssi_stats;
  6904. typedef struct {
  6905. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  6906. A_UINT32 vdev_id;
  6907. /* congestion -
  6908. * This field holds the congestion percentage = (busy_time/total_time)*100
  6909. * for the interval from when the vdev was started to the current time
  6910. * (or the time at which the vdev was stopped).
  6911. */
  6912. A_UINT32 congestion;
  6913. } wmi_congestion_stats;
  6914. typedef struct {
  6915. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  6916. A_UINT32 num_per_chain_rssi_stats;
  6917. /* This TLV is followed by another TLV of array of structs:
  6918. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  6919. */
  6920. } wmi_per_chain_rssi_stats;
  6921. /* vdev control flags (per bits) */
  6922. #define VDEV_FLAGS_NON_MBSSID_AP 0x00000001 /* legacy AP */
  6923. #define VDEV_FLAGS_TRANSMIT_AP 0x00000002 /* indicate if this vdev is transmitting AP */
  6924. #define VDEV_FLAGS_NON_TRANSMIT_AP 0x00000004 /* explicitly indicate this vdev is non-transmitting AP */
  6925. typedef struct {
  6926. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  6927. /** unique id identifying the VDEV, generated by the caller */
  6928. A_UINT32 vdev_id;
  6929. /** VDEV type (AP,STA,IBSS,MONITOR) */
  6930. A_UINT32 vdev_type;
  6931. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  6932. A_UINT32 vdev_subtype;
  6933. /** VDEV MAC address */
  6934. wmi_mac_addr vdev_macaddr;
  6935. /** Number of configured txrx streams */
  6936. A_UINT32 num_cfg_txrx_streams;
  6937. /**
  6938. * pdev_id for identifying the MAC,
  6939. * See macros starting with WMI_PDEV_ID_ for values.
  6940. */
  6941. A_UINT32 pdev_id;
  6942. /** control flags for this vdev */
  6943. A_UINT32 flags;
  6944. /** vdevid of transmitted AP (mbssid case) */
  6945. A_UINT32 vdevid_trans;
  6946. /* This TLV is followed by another TLV of array of structures
  6947. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  6948. */
  6949. } wmi_vdev_create_cmd_fixed_param;
  6950. typedef struct {
  6951. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  6952. /* band - Should take values from wmi_channel_band_mask */
  6953. A_UINT32 band;
  6954. /* max supported tx streams per given band for this vdev */
  6955. A_UINT32 supported_tx_streams;
  6956. /* max supported rx streams per given band for this vdev */
  6957. A_UINT32 supported_rx_streams;
  6958. } wmi_vdev_txrx_streams;
  6959. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  6960. typedef struct {
  6961. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  6962. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  6963. A_UINT32 duration; /** Absent period duration in micro seconds */
  6964. A_UINT32 interval; /** Absent period interval in micro seconds */
  6965. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  6966. } wmi_p2p_noa_descriptor;
  6967. /** values for vdev_type */
  6968. #define WMI_VDEV_TYPE_AP 0x1
  6969. #define WMI_VDEV_TYPE_STA 0x2
  6970. #define WMI_VDEV_TYPE_IBSS 0x3
  6971. #define WMI_VDEV_TYPE_MONITOR 0x4
  6972. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  6973. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  6974. * operations like Network discovery, service provisioning and service
  6975. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  6976. * WMI command to create this VDEV once during initialization and host is not
  6977. * expected to use any VDEV specific WMI commands on this VDEV.
  6978. **/
  6979. #define WMI_VDEV_TYPE_NAN 0x5
  6980. #define WMI_VDEV_TYPE_OCB 0x6
  6981. /* NAN Data Interface */
  6982. #define WMI_VDEV_TYPE_NDI 0x7
  6983. /*
  6984. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  6985. * which are used in 11ax systems
  6986. */
  6987. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  6988. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  6989. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  6990. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  6991. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  6992. /*
  6993. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  6994. * which are used in 11ax systems
  6995. */
  6996. #define WMI_HE_LTF_DEFAULT 0x0
  6997. #define WMI_HE_LTF_1X 0x1
  6998. #define WMI_HE_LTF_2X 0x2
  6999. #define WMI_HE_LTF_4X 0x3
  7000. /** values for vdev_subtype */
  7001. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  7002. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  7003. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  7004. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  7005. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  7006. /* new subtype for 11S mesh is required as 11S functionality differs
  7007. * in many ways from proprietary mesh
  7008. * 11S uses 6-addr frame format and supports peering between mesh
  7009. * stations and dynamic best path selection between mesh stations.
  7010. * While in proprietary mesh, neighboring mesh station MAC is manually
  7011. * added to AST table for traffic flow between mesh stations
  7012. */
  7013. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  7014. /** values for vdev_start_request flags */
  7015. /** Indicates that AP VDEV uses hidden ssid. only valid for
  7016. * AP/GO */
  7017. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  7018. /** Indicates if robust management frame/management frame
  7019. * protection is enabled. For GO/AP vdevs, it indicates that
  7020. * it may support station/client associations with RMF enabled.
  7021. * For STA/client vdevs, it indicates that sta will
  7022. * associate with AP with RMF enabled. */
  7023. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  7024. /*
  7025. * Host is sending bcn_tx_rate to override the beacon tx rates.
  7026. */
  7027. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  7028. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  7029. * of assoc request/response
  7030. */
  7031. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  7032. /* BSS color 0-6 */
  7033. #define WMI_HEOPS_COLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  7034. #define WMI_HEOPS_COLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  7035. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  7036. #define WMI_HEOPS_DEFPE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  7037. #define WMI_HEOPS_DEFPE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  7038. /* TWT required */
  7039. #define WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  7040. #define WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  7041. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  7042. #define WMI_HEOPS_TWT_GET_D2(he_ops) \
  7043. WMI_HEOPS_TWT_REQUIRED_GET_D2(he_ops)
  7044. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  7045. #define WMI_HEOPS_TWT_SET_D2(he_ops, value) \
  7046. WMI_HEOPS_TWT_REQUIRED_SET_D2(he_ops, value)
  7047. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  7048. #define WMI_HEOPS_RTSTHLD_GET_D2(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  7049. #define WMI_HEOPS_RTSTHLD_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  7050. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  7051. #define WMI_HEOPS_PARTBSSCOLOR_GET_D2(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  7052. #define WMI_HEOPS_PARTBSSCOLOR_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  7053. /* MAX BSS supported by MultiBSS element */
  7054. #define WMI_HEOPS_MAXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  7055. #define WMI_HEOPS_MAXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  7056. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  7057. #define WMI_HEOPS_TXBSSID_GET_D2(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  7058. #define WMI_HEOPS_TXBSSID_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  7059. /* when set to 1 disables use of BSS color */
  7060. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D2(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  7061. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D2(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  7062. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  7063. /* When set to 1 HE AP transmits beacons using two PHY formats,
  7064. * one in non-HE format and other in an HE_EXT_SU PHY format
  7065. */
  7066. #define WMI_HEOPS_DUALBEACON_GET_D2(he_ops) (0)
  7067. #define WMI_HEOPS_DUALBEACON_SET_D2(he_ops, value) {;}
  7068. #define WMI_MAX_HECAP_PHY_SIZE (3)
  7069. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  7070. #define WMI_HECAP_PHY_DB_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  7071. #define WMI_HECAP_PHY_DB_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  7072. /*
  7073. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  7074. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  7075. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  7076. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  7077. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  7078. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  7079. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  7080. * 242-tone RU mapping in 40 MHz and 80
  7081. * MHz channel width in 5 GHz. Otherwise Reserved.
  7082. * B6: Reserved
  7083. */
  7084. #define WMI_HECAP_PHY_CBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  7085. #define WMI_HECAP_PHY_CBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  7086. /*
  7087. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7088. * where in the preamble only the secondary 20 MHz is punctured
  7089. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  7090. * where in the preamble only one of the two 20 MHz sub-channels in the
  7091. * secondary 40 MHz is punctured
  7092. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  7093. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  7094. * secondary 20 MHz is punctured
  7095. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  7096. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  7097. * primary 40 MHz is present
  7098. */
  7099. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  7100. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  7101. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  7102. #define WMI_HECAP_PHY_COD_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  7103. #define WMI_HECAP_PHY_COD_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  7104. /* Indicates support of transmission and reception of LDPC encoded packets */
  7105. #define WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  7106. #define WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  7107. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7108. #define WMI_HECAP_PHY_TXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7109. #define WMI_HECAP_PHY_TXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7110. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  7111. #define WMI_HECAP_PHY_RXLDPC_GET_D2(he_cap_phy) WMI_HECAP_PHY_LDPC_GET_D2(he_cap_phy)
  7112. #define WMI_HECAP_PHY_RXLDPC_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET_D2(he_cap_phy, value)
  7113. /*
  7114. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  7115. */
  7116. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  7117. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  7118. /*
  7119. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  7120. * time streams supported for reception when midamble is used in the Data field.
  7121. */
  7122. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  7123. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  7124. /*
  7125. * B0: For a transmitting STA acting as beamformee, it indicates support of
  7126. * NDP reception using 4x LTF and 3.2 us guard interval duration
  7127. */
  7128. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  7129. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  7130. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7131. #define WMI_HECAP_PHY_TXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  7132. #define WMI_HECAP_PHY_TXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  7133. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  7134. #define WMI_HECAP_PHY_RXSTBC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  7135. #define WMI_HECAP_PHY_RXSTBC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  7136. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  7137. #define WMI_HECAP_PHY_TXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  7138. #define WMI_HECAP_PHY_TXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  7139. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  7140. #define WMI_HECAP_PHY_RXDOPPLER_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  7141. #define WMI_HECAP_PHY_RXDOPPLER_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  7142. /*
  7143. * If the transmitting STA is an AP:
  7144. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  7145. * transmission.
  7146. * If the transmitting STA is a non-AP STA:
  7147. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  7148. * transmission.
  7149. */
  7150. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  7151. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  7152. /*
  7153. * If the transmitting STA is an AP:
  7154. * indicates STA supports of reception of UL MUMIMO transmission on an
  7155. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7156. * If the transmitting STA is a non-AP STA:
  7157. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  7158. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  7159. */
  7160. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  7161. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  7162. /* Tx DCM
  7163. * B0:B1
  7164. * 00: Does not support DCM
  7165. * 01: BPSK
  7166. * 10: QPSK
  7167. * 11: 16-QAM
  7168. * B2 signals maximum number of spatial streams with DCM
  7169. * 0: 1 spatial stream
  7170. * 1: 2 spatial streams
  7171. */
  7172. #define WMI_HECAP_PHY_DCMTX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  7173. #define WMI_HECAP_PHY_DCMTX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  7174. /* Rx DCM
  7175. * B0:B1
  7176. * 00: Does not support DCM
  7177. * 01: BPSK
  7178. * 10: QPSK
  7179. * 11: 16-QAM
  7180. * B2 signals maximum number of spatial streams with DCM
  7181. * 0: 1 spatial stream
  7182. * 1: 2 spatial streams
  7183. */
  7184. #define WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  7185. #define WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  7186. /*
  7187. * Indicates that the STA supports the reception of an HE MU PPDU payload
  7188. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  7189. */
  7190. #define WMI_HECAP_PHY_ULHEMU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  7191. #define WMI_HECAP_PHY_ULHEMU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  7192. /* Indicates support for operation as an SU beamformer */
  7193. #define WMI_HECAP_PHY_SUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  7194. #define WMI_HECAP_PHY_SUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  7195. /* Indicates support for operation as an SU beamformee */
  7196. #define WMI_HECAP_PHY_SUBFME_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  7197. #define WMI_HECAP_PHY_SUBFME_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  7198. /* Indicates support for operation as an MU Beamformer */
  7199. #define WMI_HECAP_PHY_MUBFMR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  7200. #define WMI_HECAP_PHY_MUBFMR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  7201. /*
  7202. * Num STS -1 for <= 80MHz (min val 3)
  7203. * The maximum number of space-time streams minus 1 that the STA can
  7204. * receive in an HE NDP
  7205. */
  7206. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  7207. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  7208. /*
  7209. * Num STS -1 for > 80MHz (min val 3)
  7210. * The maximum number of space-time streams minus 1 that the STA can
  7211. * receive in an HE NDP
  7212. */
  7213. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  7214. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  7215. /*
  7216. * Number Of Sounding Dimensions For <= 80 MHz
  7217. * If SU beamformer capable, set to the maximum supported value of the
  7218. * TXVECTOR parameter NUM_STS minus 1.
  7219. * Otherwise, reserved.
  7220. */
  7221. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  7222. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  7223. /*
  7224. * Number Of Sounding Dimensions For > 80 MHz
  7225. * If SU beamformer capable, set to the maximum supported value of the
  7226. * TXVECTOR parameter NUM_STS minus 1.
  7227. * Otherwise, reserved.
  7228. */
  7229. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  7230. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  7231. /*
  7232. * Indicates if the HE beamformee is capable of feedback with tone
  7233. * grouping of 16 in the HE Compressed Beamforming Report field for
  7234. * a SU-type feedback.
  7235. */
  7236. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  7237. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  7238. /*
  7239. * Indicates if the HE beamformee is capable of feedback with tone
  7240. * grouping of 16 in the HE Compressed Beamforming Report field for
  7241. * a MU-type feedback.
  7242. */
  7243. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  7244. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  7245. /*
  7246. * Indicates if HE beamformee is capable of feedback with codebook
  7247. * size {4, 2} in the HECompressed Beamforming Report field for
  7248. * a SU-type feedback.
  7249. */
  7250. #define WMI_HECAP_PHY_CODBK42SU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  7251. #define WMI_HECAP_PHY_CODBK42SU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  7252. /*
  7253. * Indicates if HE beamformee is capable of feedback with codebook
  7254. * size {7, 5} in the HE Compressed Beamforming Report field for
  7255. * a MU-type feedback.
  7256. */
  7257. #define WMI_HECAP_PHY_CODBK75MU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  7258. #define WMI_HECAP_PHY_CODBK75MU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  7259. /*
  7260. * Beamforming Feedback With Trigger Frame
  7261. * If the transmitting STA is an AP STA:
  7262. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  7263. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  7264. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  7265. * If the transmitting STA is a non-AP STA:
  7266. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  7267. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  7268. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  7269. */
  7270. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  7271. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  7272. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  7273. * over the right 106-tone RU or partial BW ER
  7274. */
  7275. #define WMI_HECAP_PHY_HEERSU_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  7276. #define WMI_HECAP_PHY_HEERSU_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  7277. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  7278. * where the RU does not span the entire PPDU bandwidth.
  7279. */
  7280. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  7281. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  7282. /* Indicates whether or not the PPE Threshold field is present */
  7283. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  7284. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  7285. /* Indicates that the STA supports SRP-based SR operation */
  7286. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  7287. #define WMI_HECAP_PHY_SRPPRESENT_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  7288. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  7289. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  7290. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  7291. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  7292. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  7293. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  7294. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  7295. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  7296. * minus 1. Otherwise, reserved.
  7297. */
  7298. #define WMI_HECAP_PHY_MAXNC_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  7299. #define WMI_HECAP_PHY_MAXNC_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  7300. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  7301. * STBC with one spatial stream
  7302. */
  7303. #define WMI_HECAP_PHY_STBCTXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  7304. #define WMI_HECAP_PHY_STBCTXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  7305. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  7306. * STBC with one spatial stream
  7307. */
  7308. #define WMI_HECAP_PHY_STBCRXGT80_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  7309. #define WMI_HECAP_PHY_STBCRXGT80_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  7310. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  7311. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  7312. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  7313. /*
  7314. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  7315. * 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.
  7316. */
  7317. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  7318. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  7319. /*
  7320. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  7321. * 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.
  7322. */
  7323. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  7324. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  7325. /*
  7326. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  7327. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  7328. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  7329. * 160 MHz HE TB PPDU.
  7330. */
  7331. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  7332. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  7333. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  7334. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  7335. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  7336. /*
  7337. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  7338. * 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
  7339. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  7340. */
  7341. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  7342. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  7343. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  7344. #define WMI_HECAP_MAC_HECTRL_GET_D2(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  7345. #define WMI_HECAP_MAC_HECTRL_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  7346. /* set to 1 to for TWT Requestor support*/
  7347. #define WMI_HECAP_MAC_TWTREQ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  7348. #define WMI_HECAP_MAC_TWTREQ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  7349. /* set to 1 to for TWT Responder support*/
  7350. #define WMI_HECAP_MAC_TWTRSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  7351. #define WMI_HECAP_MAC_TWTRSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  7352. /* Level of frag support
  7353. Set to 0 for no support for dynamic fragmentation.
  7354. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  7355. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  7356. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  7357. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  7358. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  7359. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  7360. */
  7361. #define WMI_HECAP_MAC_HEFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  7362. #define WMI_HECAP_MAC_HEFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  7363. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  7364. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  7365. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  7366. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  7367. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D2(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  7368. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  7369. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  7370. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  7371. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  7372. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  7373. #define WMI_HECAP_MAC_MTID_GET_D2(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  7374. #define WMI_HECAP_MAC_MTID_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  7375. /*
  7376. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  7377. * a QoS Data frame for which no block ack agreement exists.
  7378. */
  7379. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  7380. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  7381. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  7382. /*0=No Feedback,2=Unsolicited,3=Both*/
  7383. #define WMI_HECAP_MAC_HELKAD_GET_D2(he_cap) (0)
  7384. #define WMI_HECAP_MAC_HELKAD_SET_D2(he_cap, value) {;}
  7385. /* bit 16 reserved. */
  7386. /*Set to 1 for reception of AllAck support*/
  7387. #define WMI_HECAP_MAC_AACK_GET_D2(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  7388. #define WMI_HECAP_MAC_AACK_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  7389. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  7390. #define WMI_HECAP_MAC_ULMURSP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  7391. #define WMI_HECAP_MAC_ULMURSP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  7392. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  7393. #define WMI_HECAP_MAC_BSR_GET_D2(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  7394. #define WMI_HECAP_MAC_BSR_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  7395. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  7396. #define WMI_HECAP_MAC_BCSTTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  7397. #define WMI_HECAP_MAC_BCSTTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  7398. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  7399. #define WMI_HECAP_MAC_32BITBA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  7400. #define WMI_HECAP_MAC_32BITBA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  7401. /*Set to 1 if the STA supports MU cascading operation*/
  7402. #define WMI_HECAP_MAC_MUCASCADE_GET_D2(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  7403. #define WMI_HECAP_MAC_MUCASCADE_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  7404. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  7405. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  7406. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  7407. /*Set to 1 when the STA supports its reception*/
  7408. #define WMI_HECAP_MAC_GROUPMSTABA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  7409. #define WMI_HECAP_MAC_GROUPMSTABA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  7410. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  7411. #define WMI_HECAP_MAC_OMI_GET_D2(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  7412. #define WMI_HECAP_MAC_OMI_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  7413. /*1 if OFDMA Random Access Supported*/
  7414. #define WMI_HECAP_MAC_OFDMARA_GET_D2(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  7415. #define WMI_HECAP_MAC_OFDMARA_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  7416. /* Maximum AMPDU Length Exponent.
  7417. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  7418. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  7419. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  7420. * padding is not included in this limit.
  7421. */
  7422. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  7423. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  7424. /*A-MSDU Fragmentation Support*/
  7425. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D2(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  7426. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  7427. /*Flexible TWT Schedule Support*/
  7428. #define WMI_HECAP_MAC_FLEXTWT_GET_D2(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  7429. #define WMI_HECAP_MAC_FLEXTWT_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  7430. /*Rx Control Frame to MultiBSS*/
  7431. #define WMI_HECAP_MAC_MBSS_GET_D2(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  7432. #define WMI_HECAP_MAC_MBSS_SET_D2(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  7433. /* BSRP A-MPDU Aggregation
  7434. * maintaining compatability since we dont support this now so not wasting memory
  7435. */
  7436. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D2(he_cap) (0)
  7437. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D2(he_cap, value) {;}
  7438. /* Quiet Time Period (QTP) operation
  7439. * maintaining compatability since we dont support this now so not wasting memory
  7440. */
  7441. #define WMI_HECAP_MAC_QTP_GET_D2(he_cap) (0)
  7442. #define WMI_HECAP_MAC_QTP_SET_D2(he_cap, value) {;}
  7443. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  7444. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  7445. * that contains a BQR in the A-Control subfield
  7446. * maintaining compatability since we dont support this now so not wasting memory
  7447. */
  7448. #define WMI_HECAP_MAC_ABQR_GET_D2(he_cap) (0)
  7449. #define WMI_HECAP_MAC_ABQR_SET_D2(he_cap, value) {;}
  7450. /*Indicates support by the STA for the role of SR Responder.*/
  7451. #define WMI_HECAP_MAC_SRRESP_GET_D2(he_cap) (0)
  7452. #define WMI_HECAP_MAC_SRRESP_SET_D2(he_cap, value) {;}
  7453. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  7454. * frames or TIM frames as described in AP operation for opportunistic power save.
  7455. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  7456. */
  7457. #define WMI_HECAP_MAC_OPS_GET_D2(he_cap) (0)
  7458. #define WMI_HECAP_MAC_OPS_SET_D2(he_cap, value) {;}
  7459. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  7460. * the NDP Feedback Report Poll Trigger frame.
  7461. */
  7462. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D2(he_cap) (0)
  7463. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D2(he_cap, value) {;}
  7464. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  7465. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  7466. * removed by standard
  7467. */
  7468. #define WMI_HECAP_MAC_MBAHECTRL_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  7469. #define WMI_HECAP_MAC_MBAHECTRL_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  7470. #define WMI_HECAP_MAC_MURTS_GET_D2(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  7471. #define WMI_HECAP_MAC_MURTS_SET_D2(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  7472. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  7473. #define WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET_D2(he_cap_phy)
  7474. #define WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET_D2(he_cap_phy, value)
  7475. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  7476. #define WMI_HECAP_PHY_OLTF_GET_D2(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET_D2(he_cap_phy)
  7477. #define WMI_HECAP_PHY_OLTF_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET_D2(he_cap_phy, value)
  7478. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  7479. #define WMI_HECAP_PHY_SUBFMESTS_GET_D2(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2(he_cap_phy)
  7480. #define WMI_HECAP_PHY_SUBFMESTS_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2(he_cap_phy, value)
  7481. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  7482. #define WMI_HECAP_PHY_PADDING_GET_D2(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET_D2(he_cap_phy)
  7483. #define WMI_HECAP_PHY_PADDING_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET_D2(he_cap_phy, value)
  7484. /**DO NOT USE - DEPRECATED*/
  7485. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2(he_cap_phy) (0)
  7486. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2(he_cap_phy, value) {;}
  7487. /*DO NOT USE - DEPRECATED**/
  7488. #define WMI_HECAP_PHY_32GI_GET_D2(he_cap_phy) (0)
  7489. #define WMI_HECAP_PHY_32GI_SET_D2(he_cap_phy, value) {;}
  7490. /*DO NOT USE - DEPRECATED**/
  7491. #define WMI_HECAP_PHY_NOSUNDIMENS_GET_D2(he_cap_phy) (0)
  7492. #define WMI_HECAP_PHY_NOSUNDIMENS_SET_D2(he_cap_phy, value) {;}
  7493. /*DO NOT USE - DEPRECATED**/
  7494. #define WMI_HECAP_PHY_40MHZNSS_GET_D2(he_cap_phy)(0)
  7495. #define WMI_HECAP_PHY_40MHZNSS_SET_D2(he_cap_phy, value) {;}
  7496. /* START TEMPORARY WORKAROUND -
  7497. * Leave legacy names as aliases for new names, until all references to the
  7498. * legacy names have been removed.
  7499. */
  7500. #define WMI_HECAP_PHY_ULOFDMA_GET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  7501. #define WMI_HECAP_PHY_ULOFDMA_SET_D2 WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  7502. /* END TEMPORARY WORKAROUND */
  7503. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  7504. #define WMI_HECAP_PHY_DCM_GET_D2(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET_D2(he_cap_phy)
  7505. #define WMI_HECAP_PHY_DCM_SET_D2(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET_D2(he_cap_phy, value)
  7506. /*
  7507. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  7508. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  7509. */
  7510. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  7511. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  7512. /*
  7513. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  7514. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  7515. */
  7516. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  7517. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  7518. /*
  7519. * Indicates the spatial multiplexing power save mode after receiving a
  7520. * Trigger frame that is in operation immediately after (re)association.
  7521. */
  7522. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0)
  7523. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;}
  7524. /* Indicates support for Punctured Sounding */
  7525. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0)
  7526. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;}
  7527. /*
  7528. * Indicates support for receiving a Trigger frame in an HT PPDU and
  7529. * receiving a Trigger frame in a VHT PPDU
  7530. */
  7531. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0)
  7532. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;}
  7533. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  7534. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  7535. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  7536. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  7537. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  7538. typedef struct {
  7539. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  7540. /** unique id identifying the VDEV, generated by the caller */
  7541. A_UINT32 vdev_id;
  7542. /** requestor id identifying the caller module */
  7543. A_UINT32 requestor_id;
  7544. /** beacon interval from received beacon */
  7545. A_UINT32 beacon_interval;
  7546. /** DTIM Period from the received beacon */
  7547. A_UINT32 dtim_period;
  7548. /** Flags */
  7549. A_UINT32 flags;
  7550. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  7551. wmi_ssid ssid;
  7552. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  7553. /** This field will be invalid and ignored unless the */
  7554. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  7555. /** When valid, this field contains the fixed tx rate for the beacon */
  7556. /** and probe response frames send by the GO or SoftAP */
  7557. A_UINT32 bcn_tx_rate;
  7558. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  7559. A_UINT32 bcn_txPower;
  7560. /** number of p2p NOA descriptor(s) from scan entry */
  7561. A_UINT32 num_noa_descriptors;
  7562. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  7563. During CAC, Our HW shouldn't ack ditected frames */
  7564. A_UINT32 disable_hw_ack;
  7565. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  7566. /** The DBS policy manager indicates the preferred number of transmit streams. */
  7567. A_UINT32 preferred_tx_streams;
  7568. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  7569. /** the DBS policy manager indicates the preferred number of receive streams. */
  7570. A_UINT32 preferred_rx_streams;
  7571. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  7572. A_UINT32 cac_duration_ms; /* in milliseconds */
  7573. A_UINT32 regdomain;
  7574. /* The TLVs follows this structure:
  7575. * wmi_channel chan; <-- WMI channel
  7576. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  7577. */
  7578. } wmi_vdev_start_request_cmd_fixed_param;
  7579. typedef struct {
  7580. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  7581. /** unique id identifying the VDEV, generated by the caller */
  7582. A_UINT32 vdev_id;
  7583. } wmi_vdev_delete_cmd_fixed_param;
  7584. typedef struct {
  7585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  7586. /** unique id identifying the VDEV, generated by the caller */
  7587. A_UINT32 vdev_id;
  7588. /** aid (assoc id) received in association response for STA VDEV */
  7589. A_UINT32 vdev_assoc_id;
  7590. /** bssid of the BSS the VDEV is joining */
  7591. wmi_mac_addr vdev_bssid;
  7592. /** bssid of transmitted AP (mbssid case) */
  7593. wmi_mac_addr trans_bssid;
  7594. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  7595. A_UINT32 profile_idx;
  7596. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  7597. A_UINT32 profile_num;
  7598. } wmi_vdev_up_cmd_fixed_param;
  7599. typedef struct {
  7600. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  7601. /** unique id identifying the VDEV, generated by the caller */
  7602. A_UINT32 vdev_id;
  7603. } wmi_vdev_stop_cmd_fixed_param;
  7604. typedef struct {
  7605. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  7606. /** unique id identifying the VDEV, generated by the caller */
  7607. A_UINT32 vdev_id;
  7608. } wmi_vdev_down_cmd_fixed_param;
  7609. typedef struct {
  7610. /** unique id identifying the VDEV, generated by the caller */
  7611. A_UINT32 vdev_id;
  7612. } wmi_vdev_standby_response_cmd;
  7613. typedef struct {
  7614. /** unique id identifying the VDEV, generated by the caller */
  7615. A_UINT32 vdev_id;
  7616. } wmi_vdev_resume_response_cmd;
  7617. typedef struct {
  7618. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  7619. /** unique id identifying the VDEV, generated by the caller */
  7620. A_UINT32 vdev_id;
  7621. /** parameter id */
  7622. A_UINT32 param_id;
  7623. /** parameter value */
  7624. A_UINT32 param_value;
  7625. } wmi_vdev_set_param_cmd_fixed_param;
  7626. typedef struct {
  7627. A_UINT32 key_seq_counter_l;
  7628. A_UINT32 key_seq_counter_h;
  7629. } wmi_key_seq_counter;
  7630. #define WMI_CIPHER_NONE 0x0 /* clear key */
  7631. #define WMI_CIPHER_WEP 0x1
  7632. #define WMI_CIPHER_TKIP 0x2
  7633. #define WMI_CIPHER_AES_OCB 0x3
  7634. #define WMI_CIPHER_AES_CCM 0x4
  7635. #define WMI_CIPHER_WAPI 0x5
  7636. #define WMI_CIPHER_CKIP 0x6
  7637. #define WMI_CIPHER_AES_CMAC 0x7
  7638. #define WMI_CIPHER_ANY 0x8
  7639. #define WMI_CIPHER_AES_GCM 0x9
  7640. #define WMI_CIPHER_AES_GMAC 0xa
  7641. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  7642. typedef struct {
  7643. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  7644. /** unique id identifying the VDEV, generated by the caller */
  7645. A_UINT32 vdev_id;
  7646. /** MAC address used for installing */
  7647. wmi_mac_addr peer_macaddr;
  7648. /** key index */
  7649. A_UINT32 key_ix;
  7650. /** key flags */
  7651. A_UINT32 key_flags;
  7652. /** key cipher, defined above */
  7653. A_UINT32 key_cipher;
  7654. /** key rsc counter */
  7655. wmi_key_seq_counter key_rsc_counter;
  7656. /** global key rsc counter */
  7657. wmi_key_seq_counter key_global_rsc_counter;
  7658. /** global key tsc counter */
  7659. wmi_key_seq_counter key_tsc_counter;
  7660. /** WAPI key rsc counter */
  7661. A_UINT8 wpi_key_rsc_counter[16];
  7662. /** WAPI key tsc counter */
  7663. A_UINT8 wpi_key_tsc_counter[16];
  7664. /** key length */
  7665. A_UINT32 key_len;
  7666. /** key tx mic length */
  7667. A_UINT32 key_txmic_len;
  7668. /** key rx mic length */
  7669. A_UINT32 key_rxmic_len;
  7670. /** specifies if the group_key_ix is valid, filled by the sender */
  7671. A_UINT32 is_group_key_ix_valid;
  7672. /** Multi group key ID */
  7673. A_UINT32 group_key_ix;
  7674. /*
  7675. * Following this struct are this TLV.
  7676. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  7677. */
  7678. } wmi_vdev_install_key_cmd_fixed_param;
  7679. /** Preamble types to be used with VDEV fixed rate configuration */
  7680. typedef enum {
  7681. WMI_RATE_PREAMBLE_OFDM,
  7682. WMI_RATE_PREAMBLE_CCK,
  7683. WMI_RATE_PREAMBLE_HT,
  7684. WMI_RATE_PREAMBLE_VHT,
  7685. WMI_RATE_PREAMBLE_HE,
  7686. } WMI_RATE_PREAMBLE;
  7687. /** Value to disable fixed rate setting */
  7688. #define WMI_FIXED_RATE_NONE (0xff)
  7689. #define WMI_GI_400_NS 1
  7690. #define WMI_GI_800_NS 0
  7691. #define WMI_GI_1600_NS 2
  7692. #define WMI_GI_3200_NS 3
  7693. /** OCE(Optimized Connectivity_Experience) Feature flags */
  7694. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  7695. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  7696. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  7697. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  7698. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  7699. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  7700. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  7701. /** the definition of different VDEV parameters */
  7702. typedef enum {
  7703. /** RTS Threshold */
  7704. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  7705. /** Fragmentation threshold */
  7706. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  7707. /** beacon interval in TUs */
  7708. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  7709. /** Listen interval in TUs */
  7710. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  7711. /** muticast rate in Mbps */
  7712. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  7713. /** management frame rate in Mbps */
  7714. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  7715. /** slot time (long vs short) */
  7716. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  7717. /** preamble (long vs short) */
  7718. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  7719. /** SWBA time (time before tbtt in msec) */
  7720. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  7721. /** time period for updating VDEV stats */
  7722. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  7723. /** age out time in msec for frames queued for station in power save*/
  7724. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  7725. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  7726. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  7727. /** DTIM period (specified in units of num beacon intervals) */
  7728. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  7729. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  7730. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  7731. /** enable/dsiable WDS for this VDEV */
  7732. WMI_VDEV_PARAM_WDS, /* 0xf */
  7733. /** ATIM Window */
  7734. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  7735. /** BMISS max */
  7736. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  7737. /** BMISS first time */
  7738. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  7739. /** BMISS final time */
  7740. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  7741. /** WMM enables/disabled */
  7742. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  7743. /** Channel width */
  7744. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  7745. /** Channel Offset */
  7746. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  7747. /** Disable HT Protection */
  7748. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  7749. /** Quick STA Kickout */
  7750. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  7751. /** Rate to be used with Management frames */
  7752. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  7753. /** Protection Mode */
  7754. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  7755. /** Fixed rate setting
  7756. * The top nibble is used to select which format to use for encoding
  7757. * the rate specification: 0xVXXXXXXX
  7758. * If V == 0b0000: format is same as before: 0x000000RR
  7759. * If V == 0b0001: format is: 0x1000RRRR.
  7760. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  7761. * The host shall use the new V1 format (and set V = 0x1) if the target
  7762. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  7763. * system is configured with Nss > 4 (either at compile time within the
  7764. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  7765. * by the target).
  7766. */
  7767. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  7768. /**
  7769. * 11AX: GI =
  7770. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  7771. * 11N: SGI=WMI_GI_400_NS
  7772. */
  7773. WMI_VDEV_PARAM_SGI, /* 0x1c */
  7774. /** Enable LDPC */
  7775. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  7776. /** Enable Tx STBC */
  7777. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  7778. /** Enable Rx STBC */
  7779. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  7780. /** Intra BSS forwarding */
  7781. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  7782. /** Setting Default xmit key for Vdev */
  7783. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  7784. /** NSS width */
  7785. WMI_VDEV_PARAM_NSS, /* 0x22 */
  7786. /** Set the custom rate for the broadcast data frames */
  7787. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  7788. /** Set the custom rate (rate-code) for multicast data frames */
  7789. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  7790. /** Tx multicast packet indicate Enable/Disable */
  7791. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  7792. /** Tx DHCP packet indicate Enable/Disable */
  7793. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  7794. /** Enable host inspection of Tx unicast packet to unknown destination */
  7795. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  7796. /* The minimum amount of time AP begins to consider STA inactive */
  7797. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  7798. /* An associated STA is considered inactive when there is no recent TX/RX
  7799. * activity and no downlink frames are buffered for it. Once a STA exceeds
  7800. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  7801. * a keep alive to verify the STA is still associated. If the STA does ACK
  7802. * the data-null, or if the data-null is buffered and the STA does not
  7803. * retrieve it, the STA will be considered unresponsive (see
  7804. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  7805. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  7806. /* An associated STA is considered unresponsive if there is no recent
  7807. * TX/RX activity and downlink frames are buffered for it. Once a STA
  7808. * exceeds the maximum unresponsive time, the AP will send a
  7809. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  7810. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  7811. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  7812. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  7813. /** Enable/Disable RTS-CTS */
  7814. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  7815. /* Enable TXBFee/er */
  7816. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  7817. /**Set packet power save */
  7818. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  7819. /**Drops un-encrypted packets if any received in an encryted connection
  7820. * otherwise forwards to host
  7821. */
  7822. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  7823. /*
  7824. * Set TX encap type.
  7825. *
  7826. * enum wmi_pkt_type is to be used as the parameter
  7827. * specifying the encap type.
  7828. */
  7829. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  7830. /*
  7831. * Try to detect stations that woke-up and exited power save but did not
  7832. * successfully transmit data-null with PM=0 to AP. When this happens,
  7833. * STA and AP power save state are out-of-sync. Use buffered but
  7834. * undelivered MSDU to the STA as a hint that the STA is really awake
  7835. * and expecting normal ASAP delivery, rather than retrieving BU with
  7836. * PS-Poll, U-APSD trigger, etc.
  7837. *
  7838. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  7839. */
  7840. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  7841. /* Enable/Disable early rx dynamic adjust feature.
  7842. * Early-rx dynamic adjust is a advance power save feature.
  7843. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  7844. * timing discrepancies in the system.
  7845. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  7846. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  7847. * properly to minimum the power consume.*/
  7848. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  7849. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  7850. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  7851. * which can be set by user through WMI command.
  7852. */
  7853. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  7854. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  7855. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  7856. /* set slop_step */
  7857. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  7858. /* set init slop */
  7859. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  7860. /* pause adjust enable/disable */
  7861. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  7862. /* Set channel pwr limit value of the vdev the minimal value of all
  7863. * vdevs operating on this channel will be set as channel tx power
  7864. * limit, which is used to configure ratearray
  7865. */
  7866. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  7867. /* set the count of snr value for calculation in snr monitor */
  7868. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  7869. /** Roaming offload */
  7870. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  7871. /** Enable Leader request RX functionality for RMC */
  7872. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  7873. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  7874. * by himself. If the beacon lost time exceed this threshold, the peer is
  7875. * thought to be gone. */
  7876. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  7877. /** max rate in kpbs, transmit rate can't go beyond it */
  7878. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  7879. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  7880. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  7881. /* set Tx failure count threshold for the vdev */
  7882. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  7883. /* set ebt resync timeout value, in the unit of TU */
  7884. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  7885. /* Enable Aggregation State Trigger Event */
  7886. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  7887. /* This parameter indicates whether IBSS station can enter into power save
  7888. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  7889. * awake all the time and should never set PM=1 in its transmitted frames.
  7890. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  7891. * is non-zero. */
  7892. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  7893. /* This parameter indicates if this station can enter into power collapse
  7894. * for the remaining beacon interval after the ATIM window.
  7895. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  7896. * is set to TRUE. */
  7897. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  7898. /* This parameter indicates whether IBSS station exit power save mode and
  7899. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  7900. * whenever there is a TX/RX activity. */
  7901. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  7902. /* If Awake on TX/RX activity is enabled, this parameter indicates
  7903. * the data inactivity time in number of beacon intervals after which
  7904. * IBSS station reenters power save by sending Null frame with PM=1. */
  7905. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  7906. /* Inactivity time in msec after which TX Service Period (SP) is
  7907. * terminated by sending a Qos Null frame with EOSP.
  7908. * If value is 0, TX SP is terminated with the last buffered packet itself
  7909. * instead of waiting for the inactivity timeout. */
  7910. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  7911. /** DTIM policy */
  7912. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  7913. /* When IBSS network is initialized, PS-supporting device
  7914. * does not enter protocol sleep state during first
  7915. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  7916. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  7917. /* Enable/Disable 1 RX chain usage during the ATIM window */
  7918. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  7919. /* RX Leak window is the time driver waits before shutting down
  7920. * the radio or switching the channel and after receiving an ACK
  7921. * for a data frame with PM bit set) */
  7922. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  7923. /** Averaging factor(16 bit value) is used in the calculations to
  7924. * perform averaging of different link level statistics like average
  7925. * beacon spread or average number of frames leaked */
  7926. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  7927. /** disconnect threshold, once the consecutive error for specific peer
  7928. * exceed this threhold, FW will send kickout event to host */
  7929. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  7930. /** The rate_code of RTS_CTS changed by host. Now FW can support
  7931. * more non-HT rates rather than 1Mbps or 6Mbps */
  7932. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  7933. /** This parameter indicates whether using a long duration RTS-CTS
  7934. * protection when a SAP goes off channel in MCC mode */
  7935. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  7936. /** This parameter indicates whether using a broadcast probe response
  7937. * to increase the detectability of SAP in MCC mode */
  7938. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  7939. /** This parameter indicates the power backoff in percentage
  7940. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  7941. * Host passes 0, 1, 2, 3, 4 to Firmware
  7942. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  7943. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  7944. */
  7945. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  7946. /** TX power backoff in dB: tx power -= param value
  7947. * Host passes values(DB) to Halphy, Halphy reduces the power table
  7948. * by the values. Safety check will happen in Halphy.
  7949. */
  7950. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  7951. /** Multicast to Unicast conversion setting */
  7952. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  7953. /** Total number of HW retries */
  7954. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  7955. /** Max tx percentage for cabq */
  7956. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  7957. /** MFPTEST settings */
  7958. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  7959. /** RTS Fixed rate setting */
  7960. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  7961. /** VHT SGI MASK */
  7962. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  7963. /** VHT80 Auto Rate MASK */
  7964. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  7965. /** set Proxy STA features for this vap */
  7966. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  7967. /** set virtual cell mode - enable/disable */
  7968. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  7969. /** Set receive packet type */
  7970. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  7971. /** Set ratemask with specific Bandwidth and NSS */
  7972. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  7973. /** Set SENSOR Support */
  7974. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  7975. /** Set beacon rate */
  7976. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  7977. /** Enable CTS to self for DTIM beacon */
  7978. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  7979. /** Disable station kickout at Vap level */
  7980. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  7981. /* VDEV capabilities */
  7982. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  7983. /**
  7984. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  7985. * The host must ensure that either no other vdevs share the TSF with
  7986. * this vdev, or else that it is acceptable to apply this TSF adjustment
  7987. * to all vdevs sharing the TSF.
  7988. */
  7989. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  7990. /** Disable/Enable AMPDU of vdev per AC:
  7991. * bit | AC
  7992. * --------
  7993. * 0 | VO
  7994. * 1 | VI
  7995. * 2 | BE
  7996. * 3 | BK
  7997. * A value of 0 in a given bit disables A-MPDU aggregation for
  7998. * that AC; a value of 1 enables A-MPDU aggregation
  7999. */
  8000. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  8001. /**
  8002. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  8003. * Used mainly for mesh-vap.
  8004. * The parameter value delivered with the RX_FILTER vdev param contains
  8005. * a bit-or mask of wmi_vdev_param_filter enum values.
  8006. */
  8007. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  8008. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  8009. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  8010. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8011. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  8012. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  8013. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  8014. /** disable dynamic bw RTS **/
  8015. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  8016. /** per ssid (vdev) based ATF strict/fair scheduling policy
  8017. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  8018. */
  8019. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  8020. /** Enable or disable Dual carrier modulation
  8021. * valid values: 0-Disable DCM, 1-Enable DCM.
  8022. */
  8023. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  8024. /** Enable or disable Extended range
  8025. * valid values: 0-Disable ER, 1-Enable ER.
  8026. */
  8027. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  8028. /* enable or disable BCAST probe response feature */
  8029. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  8030. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  8031. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  8032. /* enable or disable NOA for P2P GO */
  8033. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  8034. /** Per band user management frame fix rate setting
  8035. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  8036. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  8037. *
  8038. * BIT 23: 11ax (1) or legacy (0) rate code
  8039. * BITS [22..12]: rate code for 5G
  8040. *
  8041. * BIT 11: 11ax (1) or legacy (0) rate code
  8042. * BITS [10..0]: rate code for 2G
  8043. */
  8044. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  8045. /* This should be called before WMI_VDEV_PARAM_TXBF */
  8046. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  8047. /** This parameter indicates whether VDEV is SMPS intolerant.
  8048. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  8049. * dynamically change the RX NSS.
  8050. *
  8051. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  8052. */
  8053. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  8054. /** specify probe request Tx delay for scans triggered on this VDEV */
  8055. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  8056. /** specify the time gap between each set of probe request transmissions.
  8057. * The number of probe requests in each set depends on the ssid_list and
  8058. * bssid_list in the scan request.
  8059. * This parameter will be applied only for scans triggered on this VDEV.
  8060. */
  8061. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  8062. /** specify the HE LTF setting that should be used for fixed rate
  8063. * transmissions.
  8064. *
  8065. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  8066. * or WMI_HE_LTF_4X.
  8067. */
  8068. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  8069. /** VDEV parameter to configure the number of TX chains to use for
  8070. * a/b/g rates.
  8071. * bit 0~15 : 11b mode TX chain number.
  8072. * bit 16~31 : 11ag mode TX chain number.
  8073. *
  8074. * valid values:
  8075. * Should not exceed the maximum number of supported TX Chains
  8076. * 0 - Used to reset the vote. Acts as Don't Care
  8077. */
  8078. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  8079. /**
  8080. * Enable or disable the multi group key feature on this VDEV.
  8081. * used for NAN APP and VLAN Tagging
  8082. */
  8083. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  8084. /*
  8085. * Specify the total number of multi group key on this VDEV.
  8086. */
  8087. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  8088. /** VDEV parameter to enable or disable various OCE features */
  8089. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  8090. /*
  8091. * Set/Clear 3 least-significant bits to
  8092. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  8093. *
  8094. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  8095. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  8096. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  8097. * bits 31:3 -> Reserved bits. should be set to zero.
  8098. */
  8099. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  8100. /** VDEV parameter to config modulated DTIM count */
  8101. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  8102. /**
  8103. * VDEV parameter to config max listen interval,
  8104. * when modulated DTIM is enabled.
  8105. * Units are 100TU.
  8106. */
  8107. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  8108. /** VDEV parameter to config dynamic DTIM count */
  8109. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  8110. /** VDEV parameter to enable or disable RTT responder role
  8111. * valid values: 0-Disable responder role 1-Enable responder role
  8112. */
  8113. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  8114. /** Parameter to configure BA mode.
  8115. * Valid values: 0- Auto mode,
  8116. * 1- Manual mode(addba req not sent).
  8117. * 2- buffer size 64
  8118. * 3- buffer size 256
  8119. */
  8120. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  8121. /**
  8122. * VDEV parameter to force to set modulate DTIM count as listen interval,
  8123. * no matter whether WoW is enabled
  8124. * Default: Disabled.
  8125. * Valid values: 0- Disabled,
  8126. * 1- Enabled.
  8127. */
  8128. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  8129. /** specify the setting that are valid for auto rate transmissions.
  8130. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  8131. * used for auto rate.
  8132. * BIT0 = 1 (WMI_HE_LTF_1X)
  8133. * BIT1 = 1 (WMI_HE_LTF_2X)
  8134. * BIT2 = 1 (WMI_HE_LTF_4X)
  8135. * BIT3-7 = Reserved bits.
  8136. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  8137. * used for auto rate.
  8138. * BIT8 = 1 (400 NS)
  8139. * BIT9 = 1 (800 NS)
  8140. * BIT10 = 1 (1600 NS)
  8141. * BIT11 = 1 (3200 NS)
  8142. * BIT12-15 = Reserved bits.
  8143. * bits 31:16: Reserved bits. should be set to zero.
  8144. */
  8145. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  8146. /** VDEV parameter to enable or disable RTT initiator mac address
  8147. * randomization.
  8148. * Default: Disabled.
  8149. * valid values: 0-Disable random mac 1-Enable random mac
  8150. */
  8151. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  8152. /**
  8153. * For each AC, configure how many tx retries to send without RTS
  8154. * before enabling RTS
  8155. * bits 0:7 :BE
  8156. * bits 8:15 :BK
  8157. * bits 16:23 :VI
  8158. * bits 24:31 :VO
  8159. * A value of 0 in specific AC means default configuration for that AC.
  8160. */
  8161. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  8162. /**
  8163. * Parameter to enable/disable AMSDU aggregation size auto-selection logic.
  8164. * We have logic where AMSDU aggregation size is dynamically decided
  8165. * based on MCS. That logic is enabled by default.
  8166. * For certain tests, we need a method to disable this optimization,
  8167. * and base AMSDU size only on the peer's capability rather than our logic.
  8168. * A value of 0 means disable internal optimization,
  8169. * 1 means enable internal optimzation.
  8170. */
  8171. WMI_VDEV_PARAM_AMSDU_AGGREGATION_SIZE_OPTIMIZATION, /* 0x83 */
  8172. /**
  8173. * In RAW mode, FW will not know whether the encryption is enabled
  8174. * on this vdev or not.
  8175. * Because of this, FW will not program the right info into the
  8176. * RawNwifi TLV resulting in the connection failure in RAW mode.
  8177. * So to program the right info, FW should know whether the security
  8178. * is enabled on this VDEV.
  8179. * Host will send this VDEV param command (With Value = 1) in case of
  8180. * RAW secure mode.
  8181. */
  8182. WMI_VDEV_PARAM_RAW_IS_ENCRYPTED, /* 0x84 */
  8183. /**
  8184. * Dynamically enable/disable green tx (GTX) on supported rates.
  8185. * Host will set this param to 1 for enabling GTX & 0 for disabling it.
  8186. * Note: If GTX was already running (since the global GTX control
  8187. * resides with default BDF setting) & host wants to disable GTX,
  8188. * the VDEV does not exercise any more TPC changes on the GTX supported
  8189. * rates & goes to a default GTX SM where all PPDU's sent on default TPC.
  8190. * Whenever, host wants to reenable GTX, the enable command resumes the
  8191. * GTX functionality & TPC convergence to lower power levels can be
  8192. * attained as long as PER on GTX supported rates is within the pre-defined
  8193. * PER margin configured through the BDF.
  8194. */
  8195. WMI_VDEV_PARAM_GTX_ENABLE, /* 0x85 */
  8196. /*
  8197. * Enable/Disable multicast buffer.
  8198. * A FLAG to enable & disable buffering of multicast frames at AP
  8199. * when stations are in Power Save mode.
  8200. * Once AP disables buffering of multicast frame,
  8201. * clients which goes into Power save mode will not receive these frames.
  8202. * by default MCAST buffering will be enabled.
  8203. * (CABQ = Content After Beacon Queue = multicast queue)
  8204. * Host will send this VDEV param command,
  8205. * With Value = 1 means fw will disable the MCAST buffering
  8206. * With Value = 0 means fw will enable the MCAST buffering.
  8207. */
  8208. WMI_VDEV_PARAM_DISABLE_CABQ, /* 0x86 */
  8209. /**
  8210. * For SU and MU sounding
  8211. * switch between su ac/ax sounding and mu ac/ax sounding
  8212. * switch between triggered/ non-triggered on ax sounding enabled.
  8213. * each bit toggles the corresponding modes by enabling/disabling
  8214. *
  8215. * Bit 1 doesn't carry any operation for now and may change later,
  8216. * so reserved.
  8217. *
  8218. *-----------------------
  8219. * bit(0) | mode
  8220. *-----------------------
  8221. * 0 | AC
  8222. * 1 | AX
  8223. *-----------------------
  8224. *
  8225. * bit(1) | Reserved
  8226. *
  8227. *-----------------------
  8228. * bit(2) | mode
  8229. *-----------------------
  8230. * 0 | SU
  8231. * 1 | MU
  8232. *-----------------------
  8233. * bit(3) | mode
  8234. *-----------------------
  8235. * 0 | non -triggered
  8236. * 1 | triggered
  8237. */
  8238. WMI_VDEV_PARAM_SET_HE_SOUNDING_MODE, /* 0x87 */
  8239. /** Fixed rate setting used in UL Trigger
  8240. * The top nibble is used to select which format to use for encoding
  8241. * the rate specification: 0xVXXXXXXX, V must be 1 for the UL
  8242. * format.
  8243. * If V == 0b0001: format is: 0x1000RRRR.
  8244. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8245. *
  8246. * This parameter controls the UL OFDMA and UL MU-MIMO vdev fixed rate.
  8247. */
  8248. WMI_VDEV_PARAM_UL_FIXED_RATE, /* 0x88 */
  8249. /**
  8250. * Uplink MU-MIMO & OFDMA GI configuration used in UL Trigger
  8251. * 11AX: GI =
  8252. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  8253. * 11N: SGI=WMI_GI_400_NS
  8254. */
  8255. WMI_VDEV_PARAM_UL_GI, /* 0x89 */
  8256. /** Enable/Disable LDPC in UL Trigger */
  8257. WMI_VDEV_PARAM_UL_LDPC, /* 0x8A */
  8258. /** Max NSS allowed in UL Trigger */
  8259. WMI_VDEV_PARAM_UL_NSS, /* 0x8B */
  8260. /** Enable/Disable STBC in UL Trigger */
  8261. WMI_VDEV_PARAM_UL_STBC, /* 0x8C */
  8262. /** specify the HE LTF setting that should be used for fixed rate
  8263. * uplink transmissions.
  8264. *
  8265. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  8266. * or WMI_HE_LTF_4X.
  8267. */
  8268. WMI_VDEV_PARAM_UL_HE_LTF, /* 0x8D */
  8269. /** Uplink OFDMA PPDU bandwidth (0: 20MHz, 1: 40MHz, 2: 80Mhz, 3: 160MHz)*/
  8270. WMI_VDEV_PARAM_UL_PPDU_BW, /* 0x8E */
  8271. /** Enable/Disable FW handling MU EDCA change from AP (1: En, 0:Dis) */
  8272. WMI_VDEV_PARAM_MU_EDCA_FW_UPDATE_EN, /* 0x8F */
  8273. /** Update dot11ObssNbruToleranceTime in fw. Param value: seconds */
  8274. WMI_VDEV_PARAM_UPDATE_OBSS_RU_TOLERANCE_TIME, /* 0x90 */
  8275. /** Parameter used when MTU size is sent by the host
  8276. * In particular, this configuration message is used for cases where the
  8277. * encapsulation header results in a larger max frame size than the
  8278. * typical 802.3 + SNAP/LLC frame.
  8279. */
  8280. WMI_VDEV_PARAM_MAX_MTU_SIZE, /* 0x91 */
  8281. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  8282. * The below vdev param types are used for prototyping, and are
  8283. * prone to change.
  8284. */
  8285. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  8286. /* 11AX SPECIFIC defines */
  8287. /* USE this for BSS color change */
  8288. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  8289. /*
  8290. * Enable / disable trigger access for a AP vdev's peers.
  8291. * For a STA mode vdev this will enable/disable triggered access
  8292. * and enable/disable Multi User mode of operation.
  8293. * A value of 0 in a given bit disables corresponding mode.
  8294. * bit | hemu mode
  8295. * ---------------
  8296. * 0 | HE SUBFEE
  8297. * 1 | HE SUBFER
  8298. * 2 | HE MUBFEE
  8299. * 3 | HE MUBFER
  8300. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  8301. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  8302. * | trigger receive & UL response
  8303. * 6 | UL MUMIMO
  8304. */
  8305. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  8306. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  8307. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  8308. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  8309. } WMI_VDEV_PARAM;
  8310. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  8311. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  8312. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  8313. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  8314. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  8315. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  8316. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  8317. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  8318. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  8319. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  8320. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  8321. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  8322. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  8323. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  8324. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  8325. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  8326. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  8327. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  8328. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  8329. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  8330. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  8331. #define WMI_VDEV_HE_AX_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 0, 1)
  8332. #define WMI_VDEV_HE_MU_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 2, 1)
  8333. #define WMI_VDEV_HE_AX_TRIG_SOUNDING_IS_ENABLED(mode) WMI_GET_BITS(mode, 3, 1)
  8334. /* vdev capabilities bit mask */
  8335. #define WMI_VDEV_BEACON_SUPPORT 0x1
  8336. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  8337. #define WMI_VDEV_VOW_ENABLED 0x4
  8338. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  8339. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  8340. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  8341. /* Per VAP rate dropdown masks */
  8342. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  8343. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  8344. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  8345. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  8346. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  8347. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  8348. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  8349. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  8350. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  8351. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  8352. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  8353. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  8354. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  8355. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  8356. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  8357. /* TXBF capabilities masks */
  8358. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  8359. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  8360. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  8361. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  8362. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  8363. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  8364. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  8365. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  8366. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  8367. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  8368. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  8369. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  8370. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  8371. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  8372. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  8373. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  8374. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  8375. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  8376. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  8377. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  8378. #define WMI_TXBF_CONF_STS_CAP_S 4
  8379. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  8380. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  8381. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  8382. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  8383. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  8384. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  8385. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  8386. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  8387. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  8388. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  8389. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  8390. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  8391. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  8392. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  8393. /* commands for 11ax TXBF capabilities */
  8394. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  8395. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  8396. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  8397. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  8398. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  8399. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  8400. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  8401. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  8402. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  8403. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  8404. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  8405. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  8406. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  8407. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  8408. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  8409. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  8410. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  8411. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  8412. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  8413. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  8414. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  8415. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  8416. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  8417. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  8418. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  8419. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  8420. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  8421. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  8422. /* TXBF capabilities */
  8423. typedef struct {
  8424. A_UINT32 txbf_cap;
  8425. } wmi_vdev_txbf_cap;
  8426. /* vdev rx filters (for mesh) */
  8427. typedef enum {
  8428. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  8429. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  8430. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  8431. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  8432. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  8433. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  8434. } wmi_vdev_param_filter;
  8435. /* Length of ATIM Window in TU */
  8436. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  8437. enum wmi_pkt_type {
  8438. WMI_PKT_TYPE_RAW = 0,
  8439. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  8440. WMI_PKT_TYPE_ETHERNET = 2,
  8441. };
  8442. /*******************************************************************
  8443. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  8444. * Do not use it!
  8445. *******************************************************************/
  8446. typedef struct {
  8447. A_UINT8 sutxbfee : 1,
  8448. mutxbfee : 1,
  8449. sutxbfer : 1,
  8450. mutxbfer : 1,
  8451. txb_sts_cap : 3,
  8452. implicit_bf : 1;
  8453. } wmi_vdev_txbf_en;
  8454. /** Upto 8 bits are available for Roaming module to be sent along with
  8455. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  8456. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  8457. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  8458. /* Enable Roaming module in FW to do scan based on Final BMISS */
  8459. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  8460. /** slot time long */
  8461. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  8462. /** slot time short */
  8463. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  8464. /** preablbe long */
  8465. #define WMI_VDEV_PREAMBLE_LONG 0x1
  8466. /** preablbe short */
  8467. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  8468. /** the definition of different START/RESTART Event response */
  8469. typedef enum {
  8470. /* Event respose of START CMD */
  8471. WMI_VDEV_START_RESP_EVENT = 0,
  8472. /* Event respose of RESTART CMD */
  8473. WMI_VDEV_RESTART_RESP_EVENT,
  8474. } WMI_START_EVENT_PARAM;
  8475. typedef struct {
  8476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  8477. /** unique id identifying the VDEV, generated by the caller */
  8478. A_UINT32 vdev_id;
  8479. /** requestor id that requested the VDEV start request */
  8480. A_UINT32 requestor_id;
  8481. /* Respose of Event type START/RESTART */
  8482. WMI_START_EVENT_PARAM resp_type;
  8483. /** status of the response */
  8484. A_UINT32 status;
  8485. /** Vdev chain mask */
  8486. A_UINT32 chain_mask;
  8487. /** Vdev mimo power save mode */
  8488. A_UINT32 smps_mode;
  8489. union {
  8490. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8491. /** pdev_id for identifying the MAC
  8492. * See macros starting with WMI_PDEV_ID_ for values.
  8493. */
  8494. A_UINT32 pdev_id;
  8495. };
  8496. /** Configured Transmit Streams **/
  8497. A_UINT32 cfgd_tx_streams;
  8498. /** Configured Receive Streams **/
  8499. A_UINT32 cfgd_rx_streams;
  8500. } wmi_vdev_start_response_event_fixed_param;
  8501. typedef struct {
  8502. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  8503. /** unique id identifying the VDEV, generated by the caller */
  8504. A_UINT32 vdev_id;
  8505. } wmi_vdev_stopped_event_fixed_param;
  8506. typedef struct {
  8507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  8508. /** unique id identifying the VDEV, generated by the caller */
  8509. A_UINT32 vdev_id;
  8510. } wmi_vdev_delete_resp_event_fixed_param;
  8511. /** common structure used for simple events (stopped, resume_req, standby response) */
  8512. typedef struct {
  8513. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  8514. /** unique id identifying the VDEV, generated by the caller */
  8515. A_UINT32 vdev_id;
  8516. } wmi_vdev_simple_event_fixed_param;
  8517. /** VDEV start response status codes */
  8518. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  8519. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  8520. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  8521. #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */
  8522. /** Beacon processing related command and event structures */
  8523. typedef struct {
  8524. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  8525. /** unique id identifying the VDEV, generated by the caller */
  8526. A_UINT32 vdev_id;
  8527. /** xmit rate */
  8528. A_UINT32 tx_rate;
  8529. /** xmit power */
  8530. A_UINT32 txPower;
  8531. /** beacon buffer length in bytes */
  8532. A_UINT32 buf_len;
  8533. /* This TLV is followed by array of bytes:
  8534. * A_UINT8 bufp[]; <-- beacon frame buffer
  8535. */
  8536. } wmi_bcn_tx_hdr;
  8537. /* Beacon filter */
  8538. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  8539. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  8540. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  8541. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  8542. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  8543. typedef struct {
  8544. /** Filter ID */
  8545. A_UINT32 bcn_filter_id;
  8546. /** Filter type - wmi_bcn_filter */
  8547. A_UINT32 bcn_filter;
  8548. /** Buffer len */
  8549. A_UINT32 bcn_filter_len;
  8550. /** Filter info (threshold, BSSID, RSSI) */
  8551. A_UINT8 *bcn_filter_buf;
  8552. } wmi_bcn_filter_rx_cmd;
  8553. /** Capabilities and IEs to be passed to firmware */
  8554. typedef struct {
  8555. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  8556. /** Capabilities */
  8557. A_UINT32 caps;
  8558. /** ERP info */
  8559. A_UINT32 erp;
  8560. /** Advanced capabilities */
  8561. /** HT capabilities */
  8562. /** HT Info */
  8563. /** ibss_dfs */
  8564. /** wpa Info */
  8565. /** rsn Info */
  8566. /** rrm info */
  8567. /** ath_ext */
  8568. /** app IE */
  8569. } wmi_bcn_prb_info;
  8570. typedef struct {
  8571. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  8572. /** unique id identifying the VDEV, generated by the caller */
  8573. A_UINT32 vdev_id;
  8574. /** TIM IE offset from the beginning of the template. */
  8575. A_UINT32 tim_ie_offset;
  8576. /** beacon buffer length. data is in TLV data[] */
  8577. A_UINT32 buf_len;
  8578. /** CSA IE switch count offset from the beginning of data[]
  8579. * Value 0 indicates CSA IE is not present in beacon template.
  8580. */
  8581. A_UINT32 csa_switch_count_offset; /* units = bytes */
  8582. /** Extended CSA IE switch count offset from the beginning of data[]
  8583. * Value 0 indicates CSA IE is not present in beacon template.
  8584. */
  8585. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  8586. /** Specify when to send the CSA switch count status from FW to host.
  8587. * See WMI_CSA_EVENT_BMAP* below for more information.
  8588. * E.g. if CSA switch count event is needed to be sent when the switch count
  8589. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  8590. */
  8591. A_UINT32 csa_event_bitmap;
  8592. /** offset (in octets/bytes) of MBSSID IE in beacon frame */
  8593. A_UINT32 mbssid_ie_offset;
  8594. /** offset (in octets/bytes) of ESP IE in beacon frame */
  8595. A_UINT32 esp_ie_offset;
  8596. /** CSC IE color switch count offset from the beginning of data[]
  8597. * Value 0 indicates CSC IE is not present in beacon template.
  8598. */
  8599. A_UINT32 csc_switch_count_offset; /* units = bytes */
  8600. /** Specify when to send the CSC switch count status from FW to host.
  8601. * See WMI_CSC_EVENT_BMAP* below for more information.
  8602. * E.g. if CSA switch count event is needed to be sent when the switch count
  8603. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  8604. */
  8605. A_UINT32 csc_event_bitmap;
  8606. /*
  8607. * The TLVs follows:
  8608. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  8609. * A_UINT8 data[]; <-- Variable length data
  8610. */
  8611. } wmi_bcn_tmpl_cmd_fixed_param;
  8612. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  8613. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  8614. Same can also be achieved by setting bitmap to 0X80000001 */
  8615. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  8616. #define WMI_CSC_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSC switch count event */
  8617. #define WMI_CSC_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  8618. Same can also be achieved by setting bitmap to 0X80000001 */
  8619. #define WMI_CSC_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSC switch count event for every update to switch count */
  8620. typedef struct {
  8621. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  8622. /** unique id identifying the VDEV, generated by the caller */
  8623. A_UINT32 vdev_id;
  8624. /** beacon buffer length. data is in TLV data[] */
  8625. A_UINT32 buf_len;
  8626. /*
  8627. * The TLVs follows:
  8628. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  8629. * A_UINT8 data[]; <-- Variable length data
  8630. */
  8631. } wmi_prb_tmpl_cmd_fixed_param;
  8632. typedef struct {
  8633. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  8634. A_UINT32 tlv_header;
  8635. /** unique id identifying the VDEV */
  8636. A_UINT32 vdev_id;
  8637. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  8638. A_UINT32 tx_status;
  8639. } wmi_offload_bcn_tx_status_event_fixed_param;
  8640. enum wmi_sta_ps_mode {
  8641. /** enable power save for the given STA VDEV */
  8642. WMI_STA_PS_MODE_DISABLED = 0,
  8643. /** disable power save for a given STA VDEV */
  8644. WMI_STA_PS_MODE_ENABLED = 1,
  8645. };
  8646. typedef struct {
  8647. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  8648. /** unique id identifying the VDEV, generated by the caller */
  8649. A_UINT32 vdev_id;
  8650. /** Power save mode
  8651. *
  8652. * (see enum wmi_sta_ps_mode)
  8653. */
  8654. A_UINT32 sta_ps_mode;
  8655. } wmi_sta_powersave_mode_cmd_fixed_param;
  8656. enum wmi_csa_offload_en {
  8657. WMI_CSA_OFFLOAD_DISABLE = 0,
  8658. WMI_CSA_OFFLOAD_ENABLE = 1,
  8659. };
  8660. typedef struct {
  8661. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  8662. A_UINT32 vdev_id;
  8663. A_UINT32 csa_offload_enable;
  8664. } wmi_csa_offload_enable_cmd_fixed_param;
  8665. typedef struct {
  8666. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  8667. A_UINT32 vdev_id;
  8668. /*
  8669. * The TLVs follows:
  8670. * wmi_channel chan;
  8671. */
  8672. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  8673. /**
  8674. * This parameter controls the policy for retrieving frames from AP while the
  8675. * STA is in sleep state.
  8676. *
  8677. * Only takes affect if the sta_ps_mode is enabled
  8678. */
  8679. enum wmi_sta_ps_param_rx_wake_policy {
  8680. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  8681. * the Power save SM(state machine) will come out of sleep by either
  8682. * sending null frame (or) a data frame (with PS==0) in response to TIM
  8683. * bit set in the received beacon frame from AP.
  8684. */
  8685. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  8686. /* Here the power save state machine will not wakeup in response to TIM
  8687. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  8688. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  8689. * access categories are delivery-enabled, the station will send a UAPSD
  8690. * trigger frame, otherwise it will send a PS-Poll.
  8691. */
  8692. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  8693. };
  8694. /** Number of tx frames/beacon that cause the power save SM to wake up.
  8695. *
  8696. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  8697. * meaning, It will cause the SM to never wake up. This is useful if you want
  8698. * to keep the system to sleep all the time for some kind of test mode . host
  8699. * can change this parameter any time. It will affect at the next tx frame.
  8700. */
  8701. enum wmi_sta_ps_param_tx_wake_threshold {
  8702. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  8703. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  8704. /* Values greater than one indicate that many TX attempts per beacon
  8705. * interval before the STA will wake up
  8706. */
  8707. };
  8708. /**
  8709. * The maximum number of PS-Poll frames the FW will send in response to
  8710. * traffic advertised in TIM before waking up (by sending a null frame with PS
  8711. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  8712. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  8713. * parameter is used when the RX wake policy is
  8714. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  8715. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  8716. */
  8717. enum wmi_sta_ps_param_pspoll_count {
  8718. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  8719. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  8720. * will send before waking up.
  8721. */
  8722. };
  8723. /*
  8724. * This will include the delivery and trigger enabled state for every AC.
  8725. * This is the negotiated state with AP. The host MLME needs to set this based
  8726. * on AP capability and the state Set in the association request by the
  8727. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  8728. */
  8729. #define WMI_UAPSD_AC_TYPE_DELI 0
  8730. #define WMI_UAPSD_AC_TYPE_TRIG 1
  8731. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  8732. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  8733. (1 << (ac<<1)) : \
  8734. (1 << ((ac<<1)+1)))
  8735. enum wmi_sta_ps_param_uapsd {
  8736. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  8737. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  8738. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  8739. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  8740. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  8741. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  8742. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  8743. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  8744. };
  8745. enum wmi_sta_powersave_param {
  8746. /**
  8747. * Controls how frames are retrievd from AP while STA is sleeping
  8748. *
  8749. * (see enum wmi_sta_ps_param_rx_wake_policy)
  8750. */
  8751. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  8752. /**
  8753. * The STA will go active after this many TX
  8754. *
  8755. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  8756. */
  8757. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  8758. /**
  8759. * Number of PS-Poll to send before STA wakes up
  8760. *
  8761. * (see enum wmi_sta_ps_param_pspoll_count)
  8762. *
  8763. */
  8764. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  8765. /**
  8766. * TX/RX inactivity time in msec before going to sleep.
  8767. *
  8768. * The power save SM will monitor tx/rx activity on the VDEV, if no
  8769. * activity for the specified msec of the parameter the Power save SM will
  8770. * go to sleep.
  8771. */
  8772. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  8773. /**
  8774. * Set uapsd configuration.
  8775. *
  8776. * (see enum wmi_sta_ps_param_uapsd)
  8777. */
  8778. WMI_STA_PS_PARAM_UAPSD = 4,
  8779. /**
  8780. * Number of PS-Poll to send before STA wakes up in QPower Mode
  8781. */
  8782. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  8783. /**
  8784. * Enable QPower
  8785. */
  8786. WMI_STA_PS_ENABLE_QPOWER = 6,
  8787. /**
  8788. * Number of TX frames before the entering the Active state
  8789. */
  8790. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  8791. /**
  8792. * QPower SPEC PSPOLL interval
  8793. */
  8794. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  8795. /**
  8796. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  8797. * no-data bit set
  8798. */
  8799. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  8800. /**
  8801. * Max value of ITO reset when there is no tx-rx
  8802. * after AP has set the TIM bit
  8803. */
  8804. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  8805. };
  8806. typedef struct {
  8807. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  8808. /** unique id identifying the VDEV, generated by the caller */
  8809. A_UINT32 vdev_id;
  8810. /** station power save parameter (see enum wmi_sta_powersave_param) */
  8811. A_UINT32 param;
  8812. A_UINT32 value;
  8813. } wmi_sta_powersave_param_cmd_fixed_param;
  8814. /** No MIMO power save */
  8815. #define WMI_STA_MIMO_PS_MODE_DISABLE
  8816. /** mimo powersave mode static*/
  8817. #define WMI_STA_MIMO_PS_MODE_STATIC
  8818. /** mimo powersave mode dynamic */
  8819. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  8820. typedef struct {
  8821. /** unique id identifying the VDEV, generated by the caller */
  8822. A_UINT32 vdev_id;
  8823. /** mimo powersave mode as defined above */
  8824. A_UINT32 mimo_pwrsave_mode;
  8825. } wmi_sta_mimo_ps_mode_cmd;
  8826. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  8827. enum wmi_ap_ps_param_uapsd {
  8828. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  8829. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  8830. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  8831. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  8832. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  8833. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  8834. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  8835. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  8836. };
  8837. /** U-APSD maximum service period of peer station */
  8838. enum wmi_ap_ps_peer_param_max_sp {
  8839. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  8840. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  8841. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  8842. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  8843. /* keep last! */
  8844. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  8845. };
  8846. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  8847. enum wmi_ap_ps_param_sifs_resp_frmtype {
  8848. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  8849. WMI_SIFS_RESP_UAPSD = (1 << 1),
  8850. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  8851. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  8852. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  8853. };
  8854. /**
  8855. * AP power save parameter
  8856. * Set a power save specific parameter for a peer station
  8857. */
  8858. enum wmi_ap_ps_peer_param {
  8859. /** Set uapsd configuration for a given peer.
  8860. *
  8861. * This will include the delivery and trigger enabled state for every AC.
  8862. * The host MLME needs to set this based on AP capability and stations
  8863. * request Set in the association request received from the station.
  8864. *
  8865. * Lower 8 bits of the value specify the UAPSD configuration.
  8866. *
  8867. * (see enum wmi_ap_ps_param_uapsd)
  8868. * The default value is 0.
  8869. */
  8870. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  8871. /**
  8872. * Set the service period for a UAPSD capable station
  8873. *
  8874. * The service period from wme ie in the (re)assoc request frame.
  8875. *
  8876. * (see enum wmi_ap_ps_peer_param_max_sp)
  8877. */
  8878. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  8879. /** Time in seconds for aging out buffered frames for STA in power save */
  8880. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  8881. /**
  8882. * Specify frame types that are considered SIFS RESP trigger frame
  8883. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  8884. */
  8885. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  8886. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  8887. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  8888. /** Specifies the WNM sleep state of a STA */
  8889. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  8890. };
  8891. typedef struct {
  8892. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  8893. /** unique id identifying the VDEV, generated by the caller */
  8894. A_UINT32 vdev_id;
  8895. /** peer MAC address */
  8896. wmi_mac_addr peer_macaddr;
  8897. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  8898. A_UINT32 param;
  8899. /** AP powersave param value (see defines) */
  8900. A_UINT32 value;
  8901. } wmi_ap_ps_peer_cmd_fixed_param;
  8902. /** Configure peer station 11v U-APSD coexistance
  8903. *
  8904. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  8905. * sent down to FW along with this command.
  8906. *
  8907. * The semantics of these fields are described in the following text extracted
  8908. * from 802.11v.
  8909. *
  8910. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  8911. * U-APSD Coexistence element, the AP should not transmit frames to the
  8912. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  8913. * begins when the AP receives the U-APSD trigger frame and ends after
  8914. * the transmission period specified by the result of the following
  8915. * calculation:
  8916. *
  8917. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  8918. *
  8919. * Where T is the time the U-APSD trigger frame was received at the AP
  8920. * Interval is the UAPSD Coexistence element Duration/Interval field
  8921. * value (see 7.3.2.91) or upon the successful transmission of a frame
  8922. * with EOSP bit set to 1, whichever is earlier.
  8923. *
  8924. *
  8925. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  8926. * Coexistence element, the AP should not transmit frames to the non-AP
  8927. * STA outside of the U-APSD Coexistence Service Period, which begins
  8928. * when the AP receives a U-APSD trigger frame and ends after the
  8929. * transmission period specified by the result of the following
  8930. * calculation: End of transmission period = T + Duration
  8931. */
  8932. typedef struct {
  8933. /** unique id identifying the VDEV, generated by the caller */
  8934. A_UINT32 vdev_id;
  8935. /** peer MAC address */
  8936. wmi_mac_addr peer_macaddr;
  8937. /** Enable U-APSD coexistence support for this peer
  8938. *
  8939. * 0 -> disabled (default)
  8940. * 1 -> enabled
  8941. */
  8942. A_UINT32 enabled;
  8943. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  8944. A_UINT32 duration_interval;
  8945. /** Upper 32 bits of 64-bit TSF offset */
  8946. A_UINT32 tsf_offset_high;
  8947. /** Lower 32 bits of 64-bit TSF offset */
  8948. A_UINT32 tsf_offset_low;
  8949. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  8950. typedef enum {
  8951. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  8952. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  8953. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  8954. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  8955. } wmi_ap_ps_egap_flag_type;
  8956. /**
  8957. * configure ehanced green ap parameters
  8958. */
  8959. typedef struct {
  8960. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8961. /** Enable enhanced green ap
  8962. * 0 -> disabled
  8963. * 1 -> enabled
  8964. */
  8965. A_UINT32 enable;
  8966. /** The param indicates a duration that all STAs connected
  8967. * to S-AP have no traffic.
  8968. */
  8969. A_UINT32 inactivity_time; /* in unit of milliseconds */
  8970. /** The param indicates a duration that all STAs connected
  8971. * to S-AP have no traffic, after all STAs have entered powersave.
  8972. */
  8973. A_UINT32 wait_time; /* in unit of milliseconds */
  8974. /** The param is used to turn on/off some functions within E-GAP.
  8975. */
  8976. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  8977. } wmi_ap_ps_egap_param_cmd_fixed_param;
  8978. typedef enum {
  8979. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  8980. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  8981. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  8982. WMI_AP_PS_EGAP_STATUS_MAX = 15
  8983. } wmi_ap_ps_egap_status_type;
  8984. /**
  8985. * send ehanced green ap status to host
  8986. */
  8987. typedef struct
  8988. {
  8989. /** TLV tag and len; tag equals
  8990. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  8991. A_UINT32 tlv_header;
  8992. union {
  8993. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8994. /** pdev_id for identifying the MAC
  8995. * See macros starting with WMI_PDEV_ID_ for values.
  8996. */
  8997. A_UINT32 pdev_id;
  8998. };
  8999. /** The param indicates the current tx chainmask with the mac id. */
  9000. A_UINT32 tx_chainmask;
  9001. /** The param indicates the current rx chainmask with the mac id. */
  9002. A_UINT32 rx_chainmask;
  9003. } wmi_ap_ps_egap_info_chainmask_list;
  9004. typedef struct {
  9005. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  9006. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  9007. A_UINT32 status;
  9008. /* This TLV is followed by
  9009. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  9010. */
  9011. } wmi_ap_ps_egap_info_event_fixed_param;
  9012. /* 128 clients = 4 words */
  9013. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  9014. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  9015. typedef struct {
  9016. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9017. /** TIM bitmap len (in bytes) */
  9018. A_UINT32 tim_len;
  9019. /** TIM Partial Virtual Bitmap */
  9020. A_UINT32 tim_mcast;
  9021. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  9022. A_UINT32 tim_changed;
  9023. A_UINT32 tim_num_ps_pending;
  9024. /** Use the vdev_id only if vdev_id_valid is set */
  9025. A_UINT32 vdev_id_valid;
  9026. /** unique id identifying the VDEV */
  9027. A_UINT32 vdev_id;
  9028. } wmi_tim_info;
  9029. typedef struct {
  9030. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  9031. /** TIM Partial Virtual Bitmap */
  9032. A_UINT32 tim_mcast;
  9033. A_UINT32 tim_changed;
  9034. A_UINT32 tim_num_ps_pending;
  9035. /** Use the vdev_id only if vdev_id_valid is set */
  9036. A_UINT32 vdev_id_valid;
  9037. /** unique id identifying the VDEV */
  9038. A_UINT32 vdev_id;
  9039. /** TIM bitmap len (in bytes) */
  9040. A_UINT32 tim_len;
  9041. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  9042. } wmi_tim_info_v2;
  9043. typedef struct {
  9044. /** Flag to enable quiet period IE support */
  9045. A_UINT32 is_enabled;
  9046. /** Quiet start */
  9047. A_UINT32 tbttcount;
  9048. /** Beacon intervals between quiets*/
  9049. A_UINT32 period;
  9050. /** TUs of each quiet*/
  9051. A_UINT32 duration;
  9052. /** TUs of from TBTT of quiet start*/
  9053. A_UINT32 offset;
  9054. } wmi_quiet_info;
  9055. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  9056. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  9057. typedef struct {
  9058. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  9059. /** Bit 0: Flag to indicate an update in NOA schedule
  9060. * Bits 7-1: Reserved
  9061. * Bits 15-8: Index (identifies the instance of NOA sub element)
  9062. * Bit 16: Opp PS state of the AP
  9063. * Bits 23-17: Ctwindow in TUs
  9064. * Bits 31-24: Number of NOA descriptors
  9065. */
  9066. A_UINT32 noa_attributes;
  9067. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  9068. /** Use the vdev_id only if vdev_id_valid is set */
  9069. A_UINT32 vdev_id_valid;
  9070. /** unique id identifying the VDEV */
  9071. A_UINT32 vdev_id;
  9072. } wmi_p2p_noa_info;
  9073. typedef struct {
  9074. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_quiet_offload_info */
  9075. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  9076. A_UINT8 tbttcount; /* quiet start */
  9077. A_UINT8 period; /* beacon intervals between quiets */
  9078. A_UINT16 duration; /* TUs of each quiet */
  9079. A_UINT16 offset; /* TUs of from TBTT of quiet start */
  9080. } wmi_quiet_offload_info;
  9081. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  9082. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  9083. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  9084. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  9085. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  9086. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9087. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  9088. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  9089. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  9090. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  9091. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  9092. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  9093. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9094. WMI_UNIFIED_NOA_ATTR_INDEX);
  9095. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  9096. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  9097. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  9098. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  9099. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  9100. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  9101. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  9102. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  9103. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  9104. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  9105. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  9106. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  9107. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  9108. WMI_UNIFIED_NOA_ATTR_CTWIN);
  9109. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  9110. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  9111. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  9112. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  9113. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  9114. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  9115. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  9116. typedef struct {
  9117. /** TIM info */
  9118. wmi_tim_info tim_info;
  9119. /** P2P NOA info */
  9120. wmi_p2p_noa_info p2p_noa_info;
  9121. /* TBD: More info elements to be added later */
  9122. } wmi_bcn_info;
  9123. typedef struct {
  9124. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  9125. /** bitmap identifying the VDEVs, generated by the caller */
  9126. A_UINT32 vdev_map;
  9127. /** how many vdev's info is included in this message
  9128. * If this field is zero, then the number of vdevs is specified by
  9129. * the number of bits set in the vdev_map bitmap.
  9130. */
  9131. A_UINT32 num_vdevs;
  9132. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  9133. * wmi_tim_info tim_info[];
  9134. * wmi_p2p_noa_info p2p_noa_info[];
  9135. * wmi_quiet_offload_info quiet_offload_info[0/1];
  9136. *
  9137. */
  9138. } wmi_host_swba_event_fixed_param;
  9139. #define WMI_MAX_AP_VDEV 16
  9140. typedef struct {
  9141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  9142. /** vdev_id identifying the VDEV for which FILS should be generated */
  9143. A_UINT32 vdev_id;
  9144. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  9145. A_UINT32 fils_tt;
  9146. /** next TBTT time (in TU) for this vdev */
  9147. A_UINT32 tbtt;
  9148. } wmi_host_swfda_event_fixed_param;
  9149. typedef struct {
  9150. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  9151. /** bimtap of VDEVs that has tbtt offset updated */
  9152. A_UINT32 vdev_map;
  9153. /* The TLVs for tbttoffset_list will follow this TLV.
  9154. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  9155. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  9156. */
  9157. } wmi_tbtt_offset_event_fixed_param;
  9158. typedef struct {
  9159. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  9160. /** unique id identifying the VDEV */
  9161. A_UINT32 vdev_id;
  9162. /** tbttoffset in TUs */
  9163. A_UINT32 tbttoffset;
  9164. } wmi_tbtt_offset_info;
  9165. /** Use this event if number of vdevs > 32 */
  9166. typedef struct {
  9167. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  9168. A_UINT32 num_vdevs;
  9169. /*
  9170. * The TLVs for tbttoffset will follow this TLV.
  9171. * Of size num_vdevs * wmi_tbtt_offset_info
  9172. */
  9173. } wmi_tbtt_offset_ext_event_fixed_param;
  9174. /* Peer Specific commands and events */
  9175. typedef struct {
  9176. A_UINT32 percentage; /* in unit of 12.5% */
  9177. A_UINT32 min_delta; /* in unit of Mbps */
  9178. } rate_delta_t;
  9179. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  9180. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  9181. #define MAX_NUM_OF_RATE_THRESH 4
  9182. typedef struct {
  9183. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  9184. Any of these two conditions or both of them can be set. */
  9185. rate_delta_t rate_delta;
  9186. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  9187. If the threshold count is less than 4, set zero to
  9188. the one following the last threshold */
  9189. } report_cond_per_phy_t;
  9190. enum peer_rate_report_cond_phy_type {
  9191. PEER_RATE_REPORT_COND_11B = 0,
  9192. PEER_RATE_REPORT_COND_11A_G,
  9193. PEER_RATE_REPORT_COND_11N,
  9194. PEER_RATE_REPORT_COND_11AC,
  9195. PEER_RATE_REPORT_COND_MAX_NUM
  9196. };
  9197. typedef struct {
  9198. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  9199. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  9200. A_UINT32 report_backoff_time; /* in unit of msecond */
  9201. A_UINT32 report_timer_period; /* in unit of msecond */
  9202. /* In the following field, the array index means the phy type,
  9203. * please see enum peer_rate_report_cond_phy_type for detail */
  9204. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  9205. } wmi_peer_set_rate_report_condition_fixed_param;
  9206. /* Peer Type:
  9207. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  9208. * on address and vdev opmode. This is largely here to allow host to indicate that
  9209. * peer is explicitly a TDLS peer
  9210. */
  9211. enum wmi_peer_type {
  9212. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  9213. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  9214. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  9215. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  9216. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  9217. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  9218. /* Reserved from 128 - 255 for target internal use.*/
  9219. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  9220. };
  9221. typedef struct {
  9222. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  9223. /** unique id identifying the VDEV, generated by the caller */
  9224. A_UINT32 vdev_id;
  9225. /** peer MAC address */
  9226. wmi_mac_addr peer_macaddr;
  9227. /** peer type: see enum values above */
  9228. A_UINT32 peer_type;
  9229. } wmi_peer_create_cmd_fixed_param;
  9230. typedef struct {
  9231. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  9232. /** unique id identifying the VDEV, generated by the caller */
  9233. A_UINT32 vdev_id;
  9234. /** peer MAC address */
  9235. wmi_mac_addr peer_macaddr;
  9236. } wmi_peer_delete_cmd_fixed_param;
  9237. typedef struct {
  9238. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */
  9239. A_UINT32 tlv_header;
  9240. /*
  9241. * Following this struct is the TLV:
  9242. * A_UINT32 peer_ids[]; <-- variable-length array of peer_ids
  9243. * that have been unmapped by the host
  9244. */
  9245. } wmi_peer_unmap_response_cmd_fixed_param;
  9246. typedef struct {
  9247. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  9248. /** unique id identifying the VDEV, generated by the caller */
  9249. A_UINT32 vdev_id;
  9250. /** peer MAC address */
  9251. wmi_mac_addr peer_macaddr;
  9252. /**
  9253. * maximum block ack window size to use during a rx block ack negotiation,
  9254. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  9255. */
  9256. A_UINT32 rx_block_ack_win_limit;
  9257. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  9258. typedef struct {
  9259. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  9260. /** unique id identifying the VDEV, generated by the caller */
  9261. A_UINT32 vdev_id;
  9262. /** peer MAC address */
  9263. wmi_mac_addr peer_macaddr;
  9264. /** tid bitmap identifying the tids to flush */
  9265. A_UINT32 peer_tid_bitmap;
  9266. } wmi_peer_flush_tids_cmd_fixed_param;
  9267. typedef struct {
  9268. /** rate mode . 0: disable fixed rate (auto rate)
  9269. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  9270. * 2: ht20 11n rate specified as mcs index
  9271. * 3: ht40 11n rate specified as mcs index
  9272. */
  9273. A_UINT32 rate_mode;
  9274. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  9275. * and series 3 is stored at byte 3 (MSB) */
  9276. A_UINT32 rate_series;
  9277. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  9278. * and retry count for rate 3 is stored at byte 3 (MSB) */
  9279. A_UINT32 rate_retries;
  9280. } wmi_fixed_rate;
  9281. typedef struct {
  9282. /** unique id identifying the VDEV, generated by the caller */
  9283. A_UINT32 vdev_id;
  9284. /** peer MAC address */
  9285. wmi_mac_addr peer_macaddr;
  9286. /** fixed rate */
  9287. wmi_fixed_rate peer_fixed_rate;
  9288. } wmi_peer_fixed_rate_cmd;
  9289. #define WMI_MGMT_TID 17
  9290. typedef struct {
  9291. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  9292. /** unique id identifying the VDEV, generated by the caller */
  9293. A_UINT32 vdev_id;
  9294. /** peer MAC address */
  9295. wmi_mac_addr peer_macaddr;
  9296. } wmi_addba_clear_resp_cmd_fixed_param;
  9297. typedef struct {
  9298. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  9299. /** unique id identifying the VDEV, generated by the caller */
  9300. A_UINT32 vdev_id;
  9301. /** peer MAC address */
  9302. wmi_mac_addr peer_macaddr;
  9303. /** Tid number */
  9304. A_UINT32 tid;
  9305. /** Buffer/Window size*/
  9306. A_UINT32 buffersize;
  9307. } wmi_addba_send_cmd_fixed_param;
  9308. typedef struct {
  9309. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  9310. /** unique id identifying the VDEV, generated by the caller */
  9311. A_UINT32 vdev_id;
  9312. /** peer MAC address */
  9313. wmi_mac_addr peer_macaddr;
  9314. /** Tid number */
  9315. A_UINT32 tid;
  9316. /** Is Initiator */
  9317. A_UINT32 initiator;
  9318. /** Reason code */
  9319. A_UINT32 reasoncode;
  9320. } wmi_delba_send_cmd_fixed_param;
  9321. typedef struct {
  9322. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  9323. /** unique id identifying the vdev, generated by the caller */
  9324. A_UINT32 vdev_id;
  9325. /** peer mac address */
  9326. wmi_mac_addr peer_macaddr;
  9327. /** Tid number */
  9328. A_UINT32 tid;
  9329. /** status code */
  9330. A_UINT32 statuscode;
  9331. } wmi_addba_setresponse_cmd_fixed_param;
  9332. typedef struct {
  9333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  9334. /** unique id identifying the vdev, generated by the caller */
  9335. A_UINT32 vdev_id;
  9336. /** peer mac address */
  9337. wmi_mac_addr peer_macaddr;
  9338. /** Tid number */
  9339. A_UINT32 tid;
  9340. } wmi_send_singleamsdu_cmd_fixed_param;
  9341. /* Type of Station DTIM Power Save method */
  9342. enum {
  9343. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  9344. * also the same value as the listen interval. For this method, the
  9345. * station will wake up based on the listen interval. If this
  9346. * listen interval is not equal to DTIM, then the station may
  9347. * miss certain DTIM beacons. If this value is 1, then the
  9348. * station will wake up for every beacon.
  9349. */
  9350. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  9351. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  9352. * When this value is 1, then the station will wake at every DTIM beacon.
  9353. * If this value is >1, then the station will skip certain DTIM beacons.
  9354. * This value is the multiple of DTIM intervals that the station will
  9355. * wake up to receive the DTIM beacons.
  9356. */
  9357. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  9358. };
  9359. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  9360. typedef struct {
  9361. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  9362. /** unique id identifying the VDEV, generated by the caller */
  9363. A_UINT32 vdev_id;
  9364. /** Station DTIM Power Save method as defined above */
  9365. A_UINT32 dtim_pwrsave_method;
  9366. /** DTIM PS value. Contents depends on the method */
  9367. A_UINT32 value;
  9368. /** Modulated DTIM value */
  9369. A_UINT32 MaxLIModulatedDTIM;
  9370. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  9371. /*
  9372. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  9373. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  9374. * If there is no uplink/download for the specified service interval (field service_interval),
  9375. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  9376. * specified in the UP (field user_priority).
  9377. * Firmware also monitors the responses for these QOS-NULL triggers.
  9378. * If the peer does not have any delivery frames, it will respond with
  9379. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  9380. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  9381. * are unused and should be set to 0.
  9382. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  9383. * certain host-based implementations that don't want this firmware offload.
  9384. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  9385. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  9386. * and rest of the AC default to 300 ms.
  9387. *
  9388. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  9389. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  9390. * the more advanced monitoring method.
  9391. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  9392. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  9393. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  9394. * will save more power by waking up less and sending less trigger frames.
  9395. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  9396. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  9397. * should be 0.
  9398. */
  9399. typedef struct {
  9400. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  9401. /** WMM Access category from 0 to 3 */
  9402. A_UINT32 wmm_ac;
  9403. /** User priority to use in trigger frames. It is the TID
  9404. * value. This field needs to be specified and may not be
  9405. * equivalent to AC since some implementation may use the TSPEC
  9406. * to enable UAPSD and negotiate a particular user priority. */
  9407. A_UINT32 user_priority;
  9408. /** service interval in ms */
  9409. A_UINT32 service_interval;
  9410. /** Suspend interval in ms */
  9411. A_UINT32 suspend_interval;
  9412. /** delay interval in ms */
  9413. A_UINT32 delay_interval;
  9414. } wmi_sta_uapsd_auto_trig_param;
  9415. typedef struct {
  9416. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  9417. /** unique id identifying the VDEV, generated by the caller */
  9418. A_UINT32 vdev_id;
  9419. /** peer mac address */
  9420. wmi_mac_addr peer_macaddr;
  9421. /** Number of AC to specify */
  9422. A_UINT32 num_ac;
  9423. /*
  9424. * Following this struc is the TLV:
  9425. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  9426. */
  9427. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  9428. /** mimo powersave state */
  9429. #define WMI_PEER_MIMO_PS_STATE 0x1
  9430. /** enable/disable AMPDU . initial value (enabled) */
  9431. #define WMI_PEER_AMPDU 0x2
  9432. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  9433. #define WMI_PEER_AUTHORIZE 0x3
  9434. /** peer channel bandwidth */
  9435. #define WMI_PEER_CHWIDTH 0x4
  9436. /** peer NSS */
  9437. #define WMI_PEER_NSS 0x5
  9438. /** USE 4 ADDR */
  9439. #define WMI_PEER_USE_4ADDR 0x6
  9440. /* set group membership status */
  9441. #define WMI_PEER_MEMBERSHIP 0x7
  9442. #define WMI_PEER_USERPOS 0x8
  9443. /*
  9444. * A critical high-level protocol is being used with this peer. Target
  9445. * should take appropriate measures (if possible) to ensure more
  9446. * reliable link with minimal latency. This *may* include modifying the
  9447. * station power save policy, enabling more RX chains, increased
  9448. * priority of channel scheduling, etc.
  9449. *
  9450. * NOTE: This parameter should only be considered a hint as specific
  9451. * behavior will depend on many factors including current network load
  9452. * and vdev/peer configuration.
  9453. *
  9454. * For STA VDEV this peer corresponds to the AP's BSS peer.
  9455. * For AP VDEV this peer corresponds to the remote peer STA.
  9456. */
  9457. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  9458. /* set Tx failure count threshold for the peer - Currently unused */
  9459. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  9460. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  9461. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  9462. /* Set peer advertised IBSS atim window length */
  9463. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  9464. /** peer phy mode */
  9465. #define WMI_PEER_PHYMODE 0xD
  9466. /** Use FIXED Pwr */
  9467. #define WMI_PEER_USE_FIXED_PWR 0xE
  9468. /** Set peer fixed rate
  9469. * The top nibble is used to select which format to use for encoding
  9470. * the rate specification: 0xVXXXXXXX
  9471. * If V == 0b0000: format is same as before: 0x000000RR
  9472. * If V == 0b0001: format is: 0x1000RRRR.
  9473. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  9474. * The host shall use the new V1 format (and set V = 0x1) if the target
  9475. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  9476. * system is configured with Nss > 4 (either at compile time within the
  9477. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  9478. * by the target).
  9479. */
  9480. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  9481. /** Whitelist peer TIDs */
  9482. #define WMI_PEER_SET_MU_WHITELIST 0x10
  9483. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  9484. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  9485. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  9486. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  9487. /**
  9488. * default ring routing for peer data packets,
  9489. * param_value = bit 0 for hash based routing enabled or not
  9490. * (value 1 is enabled, value 0 is disabled)
  9491. * bits 1:5 are for ring 32 (i.e. ring id value
  9492. * selected from 0 to 31 values)
  9493. * bit 8 for peer based ring selection enabled or not
  9494. * (value 1 is enabled, value 0 is disabled
  9495. * bits 9-15 are valid when bit 8 is set to 1)
  9496. * bit 9 is for ring selection enabled for filter-pass
  9497. * unicast or not (value 1 is enabled, value 0 is disabled)
  9498. * bit 10 is for ring selection enabled for filter-pass
  9499. * mcast or not (value 1 is enabled, value 0 is disabled)
  9500. * bit 11 is for ring selection enabled for filter-pass
  9501. * BAR or not (value 1 is enabled, value 0 is disabled)
  9502. * bit 12-13 is for source ring selection value
  9503. * (value 0 for wbm2rxdma buf ring,
  9504. * value 1 for fw2rxdma buf ring,
  9505. * value 2 for sw2rxdma buf ring,
  9506. * value 3 for no buf ring)
  9507. * bit 14-15 is for destination ring selection value
  9508. * (value 0 for wbm release ring,
  9509. * value 1 for rxdma2fw ring,
  9510. * value 2 for rxdma2sw ring,
  9511. * value 3 for rxdma2reo ring)
  9512. */
  9513. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  9514. /* peer NSS for VHT160 - Extended NSS support */
  9515. #define WMI_PEER_NSS_VHT160 0x14
  9516. /* peer NSS for VHT160 - Extended NSS support */
  9517. #define WMI_PEER_NSS_VHT80_80 0x15
  9518. /* Peer SU TXBF sounding interval */
  9519. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  9520. /* Peer MU TXBF sounding interval */
  9521. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  9522. /* Peer TXBF sounding enable or disable */
  9523. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  9524. /* Per peer 11ax OFDMA enable or disable */
  9525. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  9526. /* Per peer 11ax/11ac MU enable or disable */
  9527. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  9528. /** Set peer fixed rate used in UL Trigger
  9529. * The top nibble is used to select which format to use for encoding
  9530. * the rate specification: 0xVXXXXXXX, V must be 1 for this parameter.
  9531. * If V == 0b0001: format is: 0x1000RRRR.
  9532. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  9533. *
  9534. * This parameter controls the UL OFDMA and UL MU-MIMO peer fixed rate.
  9535. */
  9536. #define WMI_PEER_PARAM_UL_FIXED_RATE 0x1b
  9537. /** send specific OMI to peer via QoS-null frame
  9538. * param_value = follow 11ax spec definition
  9539. * bit0:VHT(1), bit1:HE(1), bit2-31:A-Control
  9540. */
  9541. #define WMI_PEER_PARAM_XMIT_OMI 0x1c
  9542. #define WMI_PEER_RARAM_XMIT_OMI WMI_PEER_PARAM_XMIT_OMI /* alias due to prior typo */
  9543. /* Disable burst and assist */
  9544. #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d
  9545. /* Enable 11r FT Roaming */
  9546. #define WMI_PEER_PARAM_ENABLE_FT 0x1e
  9547. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  9548. #define WMI_PEER_MIMO_PS_NONE 0x0
  9549. #define WMI_PEER_MIMO_PS_STATIC 0x1
  9550. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  9551. typedef struct {
  9552. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  9553. /** unique id identifying the VDEV, generated by the caller */
  9554. A_UINT32 vdev_id;
  9555. /** peer MAC address */
  9556. wmi_mac_addr peer_macaddr;
  9557. /** parameter id */
  9558. A_UINT32 param_id;
  9559. /** parametr value */
  9560. A_UINT32 param_value;
  9561. } wmi_peer_set_param_cmd_fixed_param;
  9562. typedef union {
  9563. /*
  9564. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  9565. * by the target or a little-endian host.
  9566. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  9567. * macros on the A_UINT32 "value" field.
  9568. */
  9569. struct {
  9570. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  9571. A_UINT16 tx_rate; /* see per-mode specs below */
  9572. };
  9573. A_UINT32 value; /* for use by big-endian host */
  9574. } wmi_peer_max_min_tx_rate;
  9575. /*
  9576. * Any access to the mode/tx_rate in an big endian system should use
  9577. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  9578. */
  9579. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  9580. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  9581. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  9582. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  9583. /* CCK max/min tx Rate description
  9584. * tx_rate = 0: 1 Mbps
  9585. * tx_rate = 1: 2 Mbps
  9586. * tx_rate = 2: 5.5 Mbps
  9587. * tx_rate = 3: 11 Mbps
  9588. * tx_rate = else: invalid
  9589. */
  9590. enum {
  9591. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  9592. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  9593. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  9594. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  9595. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  9596. };
  9597. /* OFDM max/min tx Rate description
  9598. * tx_rate = 0: 6 Mbps
  9599. * tx_rate = 1: 9 Mbps
  9600. * tx_rate = 2: 12 Mbps
  9601. * tx_rate = 3: 18 Mbps
  9602. * tx_rate = 4: 24 Mbps
  9603. * tx_rate = 5: 32 Mbps
  9604. * tx_rate = 6: 48 Mbps
  9605. * tx_rate = 7: 54 Mbps
  9606. * tx_rate = else: invalid
  9607. */
  9608. enum {
  9609. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  9610. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  9611. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  9612. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  9613. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  9614. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  9615. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  9616. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  9617. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  9618. };
  9619. /* HT max/min tx rate description
  9620. * tx_rate = 0~7 : MCS Rate 0~7
  9621. * tx_rate=else : invalid.
  9622. */
  9623. #define WMI_MAX_HT_TX_MCS 0x07
  9624. /* VHT max/min tx rate description
  9625. * tx_rate = 0~9 : MCS Rate 0~9
  9626. * tx_rate=else : invalid.
  9627. */
  9628. #define WMI_MAX_VHT_TX_MCS 0x09
  9629. #define MAX_SUPPORTED_RATES 128
  9630. typedef struct {
  9631. /** total number of rates */
  9632. A_UINT32 num_rates;
  9633. /**
  9634. * rates (each 8bit value) packed into a 32 bit word.
  9635. * the rates are filled from least significant byte to most
  9636. * significant byte.
  9637. */
  9638. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  9639. } wmi_rate_set;
  9640. /* NOTE: It would bea good idea to represent the Tx MCS
  9641. * info in one word and Rx in another word. This is split
  9642. * into multiple words for convenience
  9643. */
  9644. typedef struct {
  9645. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  9646. A_UINT32 rx_max_rate; /* Max Rx data rate */
  9647. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  9648. A_UINT32 tx_max_rate; /* Max Tx data rate */
  9649. /*
  9650. * bit [15:0] indicates MCS 0 to 9
  9651. * bit [23:16] indicates MCS 10 & 11
  9652. * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16]
  9653. */
  9654. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  9655. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  9656. } wmi_vht_rate_set;
  9657. /* NOTE: It would bea good idea to represent the Tx MCS
  9658. * info in one word and Rx in another word. This is split
  9659. * into multiple words for convenience
  9660. * 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
  9661. */
  9662. typedef struct {
  9663. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  9664. /* HE Supported MCS Set field Rx
  9665. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  9666. * value 0 - MCS 0-7 enabled for this NSS
  9667. * value 1 - MCS 0-9 enabled for this NSS
  9668. * value 2 - MCS 0-11 enabled for this NSS
  9669. * value 3 - NSS disabled
  9670. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  9671. */
  9672. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  9673. /* HE Supported MCS Set field Tx
  9674. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  9675. * value 0 - MCS 0-7 enabled for this NSS
  9676. * value 1 - MCS 0-9 enabled for this NSS
  9677. * value 2 - MCS 0-11 enabled for this NSS
  9678. * value 3 - NSS disabled
  9679. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  9680. */
  9681. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  9682. } wmi_he_rate_set;
  9683. /*
  9684. * IMPORTANT: Make sure the bit definitions here are consistent
  9685. * with the ni_flags definitions in wlan_peer.h
  9686. */
  9687. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  9688. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  9689. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  9690. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  9691. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  9692. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  9693. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  9694. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  9695. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  9696. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  9697. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  9698. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  9699. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  9700. #define WMI_PEER_TWT_REQ 0x00400000 /* TWT Requester Support bit in Extended Capabilities element */
  9701. #define WMI_PEER_TWT_RESP 0x00800000 /* TWT Responder Support bit in Extended Capabilities element */
  9702. #define WMI_PEER_MULTI_BSSID 0x01000000 /* Multiple BSSID Support bit in Extended Capabilities element */
  9703. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  9704. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  9705. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  9706. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  9707. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  9708. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  9709. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  9710. /**
  9711. * Peer rate capabilities.
  9712. *
  9713. * This is of interest to the ratecontrol
  9714. * module which resides in the firmware. The bit definitions are
  9715. * consistent with that defined in if_athrate.c.
  9716. *
  9717. * @todo
  9718. * Move this to a common header file later so there is no need to
  9719. * duplicate the definitions or maintain consistency.
  9720. */
  9721. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  9722. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  9723. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  9724. #define WMI_RC_HT_FLAG 0x08 /* HT */
  9725. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  9726. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  9727. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  9728. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  9729. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  9730. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  9731. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  9732. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  9733. typedef struct {
  9734. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  9735. /** peer MAC address */
  9736. wmi_mac_addr peer_macaddr;
  9737. /** VDEV id */
  9738. A_UINT32 vdev_id;
  9739. /** assoc = 1 reassoc = 0 */
  9740. A_UINT32 peer_new_assoc;
  9741. /** peer associd (16 bits) */
  9742. A_UINT32 peer_associd;
  9743. /** peer station flags: see definition above */
  9744. A_UINT32 peer_flags;
  9745. /** negotiated capabilities (lower 16 bits)*/
  9746. A_UINT32 peer_caps;
  9747. /** Listen interval */
  9748. A_UINT32 peer_listen_intval;
  9749. /** HT capabilties of the peer */
  9750. A_UINT32 peer_ht_caps;
  9751. /** maximum rx A-MPDU length */
  9752. A_UINT32 peer_max_mpdu;
  9753. /** mpdu density of the peer in usec(0 to 16) */
  9754. A_UINT32 peer_mpdu_density;
  9755. /** peer rate capabilties see flags above */
  9756. A_UINT32 peer_rate_caps;
  9757. /** num spatial streams */
  9758. A_UINT32 peer_nss;
  9759. /** VHT capabilties of the peer */
  9760. A_UINT32 peer_vht_caps;
  9761. /** phy mode */
  9762. A_UINT32 peer_phymode;
  9763. /** HT Operation Element of the peer. Five bytes packed in 2
  9764. * INT32 array and filled from lsb to msb.
  9765. * Note that the size of array peer_ht_info[] cannotbe changed
  9766. * without breaking WMI Compatibility. */
  9767. A_UINT32 peer_ht_info[2];
  9768. /** total number of negotiated legacy rate set. Also the sizeof
  9769. * peer_legacy_rates[] */
  9770. A_UINT32 num_peer_legacy_rates;
  9771. /** total number of negotiated ht rate set. Also the sizeof
  9772. * peer_ht_rates[] */
  9773. A_UINT32 num_peer_ht_rates;
  9774. /**
  9775. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  9776. * in VHT160 / VHT80+80 Mode.
  9777. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  9778. * handshake with the Max Rx NSS differing for different bandwidths
  9779. * instead of a single max Rx NSS Value.
  9780. * Some QCA chipsets have to advertise a different max Rx NSS value for
  9781. * 160 MHz and 80MHz.
  9782. *
  9783. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  9784. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  9785. * Extended NSS support
  9786. * bit[30:6]: Reserved
  9787. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  9788. */
  9789. A_UINT32 peer_bw_rxnss_override;
  9790. /* 802.11ax capabilities */
  9791. wmi_ppe_threshold peer_ppet;
  9792. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  9793. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  9794. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  9795. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  9796. /* 2nd DWORD of 11ax MAC Capabilities */
  9797. A_UINT32 peer_he_cap_info_ext;
  9798. /*
  9799. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  9800. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  9801. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  9802. * bit[31:3] : Reserved
  9803. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  9804. */
  9805. A_UINT32 peer_he_cap_info_internal;
  9806. /* Following this struct are the TLV's:
  9807. * A_UINT8 peer_legacy_rates[];
  9808. * A_UINT8 peer_ht_rates[];
  9809. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  9810. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  9811. */
  9812. } wmi_peer_assoc_complete_cmd_fixed_param;
  9813. /* WDS Entry Flags */
  9814. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  9815. typedef struct {
  9816. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  9817. /** peer MAC address */
  9818. wmi_mac_addr peer_macaddr;
  9819. /** wds MAC addr */
  9820. wmi_mac_addr wds_macaddr;
  9821. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  9822. A_UINT32 flags;
  9823. A_UINT32 vdev_id;
  9824. } wmi_peer_add_wds_entry_cmd_fixed_param;
  9825. #define WMI_CHAN_InFO_START_RESP 0
  9826. #define WMI_CHAN_InFO_END_RESP 1
  9827. typedef struct {
  9828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  9829. /** wds MAC addr */
  9830. wmi_mac_addr wds_macaddr;
  9831. A_UINT32 vdev_id;
  9832. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  9833. typedef struct {
  9834. /** peer MAC address */
  9835. wmi_mac_addr peer_macaddr;
  9836. } wmi_peer_q_empty_callback_event;
  9837. /*
  9838. * Command to update an already existing WDS entry. Different address setting
  9839. * combinations are possible.
  9840. *
  9841. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  9842. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  9843. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  9844. * Null wds and peer -> Flags will be updated for all WDS entries.
  9845. */
  9846. typedef struct {
  9847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  9848. /** peer MAC address */
  9849. wmi_mac_addr peer_macaddr;
  9850. /** wds MAC addr */
  9851. wmi_mac_addr wds_macaddr;
  9852. /* Flags associated with WDS entry */
  9853. A_UINT32 flags;
  9854. A_UINT32 vdev_id;
  9855. } wmi_peer_update_wds_entry_cmd_fixed_param;
  9856. /**
  9857. * Channel info WMI event
  9858. */
  9859. typedef struct {
  9860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  9861. /** Error code */
  9862. A_UINT32 err_code;
  9863. /** Channel freq */
  9864. A_UINT32 freq;
  9865. /** Read flags */
  9866. A_UINT32 cmd_flags;
  9867. /** Noise Floor value */
  9868. A_UINT32 noise_floor;
  9869. /** rx clear count */
  9870. A_UINT32 rx_clear_count;
  9871. /** cycle count */
  9872. A_UINT32 cycle_count;
  9873. /** channel tx power per range in 0.5dBm steps */
  9874. A_UINT32 chan_tx_pwr_range;
  9875. /** channel tx power per throughput */
  9876. A_UINT32 chan_tx_pwr_tp;
  9877. /** rx frame count (cumulative) */
  9878. A_UINT32 rx_frame_count;
  9879. /** BSS rx cycle count */
  9880. A_UINT32 my_bss_rx_cycle_count;
  9881. /** b-mode data rx time (units are microseconds) */
  9882. A_UINT32 rx_11b_mode_data_duration;
  9883. /** tx frame count */
  9884. A_UINT32 tx_frame_cnt;
  9885. /** mac clock */
  9886. A_UINT32 mac_clk_mhz;
  9887. /** unique id identifying the VDEV */
  9888. A_UINT32 vdev_id;
  9889. } wmi_chan_info_event_fixed_param;
  9890. /**
  9891. * Non wlan interference event
  9892. */
  9893. typedef struct {
  9894. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  9895. A_UINT32 channel; /* either number or freq in mhz*/
  9896. } wlan_dcs_cw_int;
  9897. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  9898. /**
  9899. * wlan_dcs_im_tgt_stats
  9900. *
  9901. */
  9902. typedef struct _wlan_dcs_im_tgt_stats {
  9903. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  9904. /** current running TSF from the TSF-1 */
  9905. A_UINT32 reg_tsf32;
  9906. /** Known last frame rssi, in case of multiple stations, if
  9907. * and at different ranges, this would not gaurantee that
  9908. * this is the least rssi.
  9909. */
  9910. A_UINT32 last_ack_rssi;
  9911. /** Sum of all the failed durations in the last one second interval.
  9912. */
  9913. A_UINT32 tx_waste_time;
  9914. /** count how many times the hal_rxerr_phy is marked, in this
  9915. * time period
  9916. */
  9917. A_UINT32 rx_time;
  9918. A_UINT32 phyerr_cnt;
  9919. /**
  9920. * WLAN IM stats from target to host
  9921. *
  9922. * Below statistics are sent from target to host periodically.
  9923. * These are collected at target as long as target is running
  9924. * and target chip is not in sleep.
  9925. *
  9926. */
  9927. /** listen time from ANI */
  9928. A_INT32 listen_time;
  9929. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  9930. A_UINT32 reg_tx_frame_cnt;
  9931. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  9932. A_UINT32 reg_rx_frame_cnt;
  9933. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  9934. A_UINT32 reg_rxclr_cnt;
  9935. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  9936. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  9937. /** extenstion channel rx clear count */
  9938. A_UINT32 reg_rxclr_ext_cnt;
  9939. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  9940. A_UINT32 reg_ofdm_phyerr_cnt;
  9941. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  9942. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  9943. /** Channel noise floor (units are dBm) */
  9944. A_INT32 chan_nf;
  9945. /** BSS rx cycle count */
  9946. A_UINT32 my_bss_rx_cycle_count;
  9947. } wlan_dcs_im_tgt_stats_t;
  9948. /**
  9949. * wmi_dcs_interference_event_t
  9950. *
  9951. * Right now this is event and stats together. Partly this is
  9952. * because cw interference is handled in target now. This
  9953. * can be done at host itself, if we can carry the NF alone
  9954. * as a stats event. In future this would be done and this
  9955. * event would carry only stats.
  9956. */
  9957. typedef struct {
  9958. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  9959. /**
  9960. * Type of the event present, either the cw interference event, or the wlan_im stats
  9961. */
  9962. A_UINT32 interference_type; /* type of interference, wlan or cw */
  9963. /** pdev_id for identifying the MAC
  9964. * See macros starting with WMI_PDEV_ID_ for values.
  9965. */
  9966. A_UINT32 pdev_id;
  9967. /*
  9968. * Following this struct are these TLVs. Note that they are both array of structures
  9969. * but can have at most one element. Which TLV is empty or has one element depends
  9970. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  9971. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  9972. *
  9973. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  9974. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  9975. */
  9976. } wmi_dcs_interference_event_fixed_param;
  9977. enum wmi_peer_mcast_group_action {
  9978. wmi_peer_mcast_group_action_add = 0,
  9979. wmi_peer_mcast_group_action_del = 1
  9980. };
  9981. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  9982. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  9983. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  9984. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  9985. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  9986. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  9987. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  9988. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  9989. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  9990. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  9991. /* multicast group membership commands */
  9992. /* TODO: Converting this will be tricky since it uses an union.
  9993. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  9994. typedef struct {
  9995. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  9996. A_UINT32 flags;
  9997. wmi_mac_addr ucast_mac_addr;
  9998. /* in network byte order */
  9999. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  10000. A_UINT8 mcast_ip_addr[16];
  10001. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  10002. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  10003. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  10004. A_UINT32 num_filter_addr;
  10005. /* this array should contain the src IPs that are to be filtered during find
  10006. The array should be packed.
  10007. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  10008. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  10009. A_UINT8 vdev_id; /* vdev of this mcast group */
  10010. } wmi_peer_mcast_group_cmd_fixed_param;
  10011. /** Offload Scan and Roaming related commands */
  10012. /** The FW performs 2 different kinds of offload scans independent
  10013. * of host. One is Roam scan which is primarily performed on a
  10014. * station VDEV after association to look for a better AP that
  10015. * the station VDEV can roam to. The second scan is connect scan
  10016. * which is mainly performed when the station is not associated
  10017. * and to look for a matching AP profile from a list of
  10018. * configured profiles. */
  10019. /* flags for roam_scan_mode_cmd
  10020. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  10021. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  10022. /**
  10023. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  10024. * the roam scan mode is one of the periodic, rssi change, both, none.
  10025. * None : Disable Roam scan. No Roam scan at all.
  10026. * Periodic : Scan periodically with a configurable period.
  10027. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  10028. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  10029. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  10030. *
  10031. */
  10032. typedef struct {
  10033. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  10034. A_UINT32 roam_scan_mode;
  10035. A_UINT32 vdev_id;
  10036. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  10037. /*
  10038. * Minimum duration allowed between two consecutive roam scans.
  10039. * Roam scan is not allowed, if duration between two consecutive
  10040. * roam scans is less than this time.
  10041. */
  10042. A_UINT32 min_delay_btw_scans; /* In msec */
  10043. /*
  10044. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  10045. * positions) showing for which roam_trigger_reasons the
  10046. * min_delay_btw_scans constraint should be applied.
  10047. * 0x0 means there is no time restrictions between successive roam scans.
  10048. */
  10049. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  10050. } wmi_roam_scan_mode_fixed_param;
  10051. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  10052. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  10053. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  10054. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  10055. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  10056. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  10057. typedef struct {
  10058. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  10059. A_UINT32 vdev_id;
  10060. A_UINT32 command_arg;
  10061. } wmi_roam_scan_cmd_fixed_param;
  10062. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  10063. /**
  10064. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  10065. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  10066. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  10067. */
  10068. typedef struct {
  10069. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  10070. /** unique id identifying the VDEV, generated by the caller */
  10071. A_UINT32 vdev_id;
  10072. /** roam scan rssi threshold */
  10073. A_UINT32 roam_scan_rssi_thresh;
  10074. /** When using Hw generated beacon RSSI interrupts */
  10075. A_UINT32 roam_rssi_thresh_diff;
  10076. /** 5G scan max count */
  10077. A_UINT32 hirssi_scan_max_count;
  10078. /** 5G scan rssi change threshold value */
  10079. A_UINT32 hirssi_scan_delta;
  10080. /** 5G scan upper bound */
  10081. A_UINT32 hirssi_upper_bound;
  10082. /** roam scan rssi threshold for 5G band.
  10083. * offset from roam_scan_rssi_thres, in dB units
  10084. */
  10085. A_INT32 rssi_thresh_offset_5g;
  10086. /* The TLVs will follow.
  10087. * wmi_roam_scan_extended_threshold_param extended_param;
  10088. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  10089. * wmi_roam_dense_thres_param dense_param;
  10090. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  10091. */
  10092. } wmi_roam_scan_rssi_threshold_fixed_param;
  10093. /**
  10094. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  10095. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  10096. */
  10097. /**
  10098. * btm_config.flags
  10099. * BIT 0 : Enable/Disable the BTM offload.
  10100. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  10101. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  10102. * BIT 6 : Enable/Disable solicited BTM
  10103. * BIT 7 : Roam BTM candidates based on the roam score instead of BTM preferred value
  10104. * BIT 8 : BTM query preference over 11k neighbor report request
  10105. * BIT 9-31 : Reserved
  10106. */
  10107. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  10108. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  10109. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  10110. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  10111. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  10112. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  10113. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  10114. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  10115. #define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val)
  10116. #define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1)
  10117. #define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val)
  10118. #define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1)
  10119. /** 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 */
  10120. #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 */
  10121. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  10122. /** reserved upto 3 */
  10123. /** 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 */
  10124. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  10125. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  10126. /** reserved upto 7 */
  10127. typedef struct {
  10128. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  10129. A_UINT32 tlv_header;
  10130. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  10131. A_UINT32 vdev_id;
  10132. /** BTM configuration control flags */
  10133. A_UINT32 flags;
  10134. /* BTM query timeout, unit: milliseconds
  10135. * valid value range: 1-10000,
  10136. * default value: 100 will be set if invalid value is given
  10137. */
  10138. A_UINT32 solicited_timeout_ms;
  10139. /* Maximum attempt of solicited BTM
  10140. * If continuous failure reach to this value, solicited BTM to current
  10141. * ESS will be disabled.
  10142. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  10143. * Default value: 3 will be set if invalid value is given
  10144. */
  10145. A_UINT32 max_attempt_cnt;
  10146. /* Time to stick to current AP after BTM, unit: seconds
  10147. * valid value range: 0 -(2^16-1).
  10148. * Either 0 or (2^16)-1 means stick to AP forever.
  10149. * Default value: 300 will be set if invalid value is given
  10150. */
  10151. A_UINT32 stick_time_seconds;
  10152. /* Disassoc time threshold in milli seconds
  10153. * This time threshold allows the target to judge whether the STA
  10154. * should can move to another AP immediately, or if the STA has time
  10155. * to calculate roaming candidates.
  10156. * If the disassoc_timer_threshold value is 0x0, the field should be
  10157. * disregarded.
  10158. */
  10159. A_UINT32 disassoc_timer_threshold;
  10160. } wmi_btm_config_fixed_param;
  10161. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  10162. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  10163. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  10164. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  10165. typedef struct {
  10166. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  10167. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  10168. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  10169. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  10170. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  10171. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  10172. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  10173. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  10174. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  10175. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  10176. } wmi_roam_scan_extended_threshold_param;
  10177. /**
  10178. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  10179. * Applicable when the scan mode is Periodic or both.
  10180. */
  10181. typedef struct {
  10182. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  10183. /** unique id identifying the VDEV, generated by the caller */
  10184. A_UINT32 vdev_id;
  10185. /** roam scan period value */
  10186. A_UINT32 roam_scan_period;
  10187. /** Aging for Roam scans */
  10188. A_UINT32 roam_scan_age;
  10189. } wmi_roam_scan_period_fixed_param;
  10190. /**
  10191. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  10192. * Rssi change threshold used when mode is Rssi change (or) Both.
  10193. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  10194. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  10195. */
  10196. typedef struct {
  10197. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  10198. /** unique id identifying the VDEV, generated by the caller */
  10199. A_UINT32 vdev_id;
  10200. /** roam scan rssi change threshold value */
  10201. A_UINT32 roam_scan_rssi_change_thresh;
  10202. /** When using Hw generated beacon RSSI interrupts */
  10203. A_UINT32 bcn_rssi_weight;
  10204. /** Minimum delay between two 5G scans */
  10205. A_UINT32 hirssi_delay_btw_scans;
  10206. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  10207. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  10208. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  10209. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  10210. /**
  10211. * TLV for roaming channel list
  10212. */
  10213. typedef struct {
  10214. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  10215. /** unique id identifying the VDEV, generated by the caller */
  10216. A_UINT32 vdev_id;
  10217. /** WMI_CHAN_LIST_TAG */
  10218. A_UINT32 chan_list_type;
  10219. /** # if channels to scan */
  10220. A_UINT32 num_chan;
  10221. /**
  10222. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  10223. * structure. The TLV's are:
  10224. * A_UINT32 channel_list[];
  10225. **/
  10226. } wmi_roam_chan_list_fixed_param;
  10227. /** Authentication modes */
  10228. enum {
  10229. WMI_AUTH_NONE, /* no upper level auth */
  10230. WMI_AUTH_OPEN, /* open */
  10231. WMI_AUTH_SHARED, /* shared-key */
  10232. WMI_AUTH_8021X, /* 802.1x */
  10233. WMI_AUTH_AUTO, /* Auto */
  10234. WMI_AUTH_WPA, /* WPA */
  10235. WMI_AUTH_RSNA, /* WPA2/RSNA */
  10236. WMI_AUTH_CCKM, /* CCKM */
  10237. WMI_AUTH_WAPI, /* WAPI */
  10238. WMI_AUTH_AUTO_PSK,
  10239. WMI_AUTH_WPA_PSK,
  10240. WMI_AUTH_RSNA_PSK,
  10241. WMI_AUTH_WAPI_PSK,
  10242. WMI_AUTH_FT_RSNA, /* 11r FT */
  10243. WMI_AUTH_FT_RSNA_PSK,
  10244. WMI_AUTH_RSNA_PSK_SHA256,
  10245. WMI_AUTH_RSNA_8021X_SHA256,
  10246. WMI_AUTH_CCKM_WPA,
  10247. WMI_AUTH_CCKM_RSNA,
  10248. WMI_AUTH_RSNA_FILS_SHA256,
  10249. WMI_AUTH_RSNA_FILS_SHA384,
  10250. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  10251. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  10252. };
  10253. typedef enum {
  10254. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  10255. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  10256. WMI_SCAN_CLIENT_ROAM, /* 3 */
  10257. WMI_SCAN_CLIENT_P2P, /* 4 */
  10258. WMI_SCAN_CLIENT_LPI, /* 5 */
  10259. WMI_SCAN_CLIENT_NAN, /* 6 */
  10260. WMI_SCAN_CLIENT_ANQP, /* 7 */
  10261. WMI_SCAN_CLIENT_OBSS, /* 8 */
  10262. WMI_SCAN_CLIENT_PLM, /* 9 */
  10263. WMI_SCAN_CLIENT_HOST, /* 10 */
  10264. } WMI_SCAN_CLIENT_ID;
  10265. typedef struct {
  10266. /** authentication mode (defined above) */
  10267. A_UINT32 rsn_authmode;
  10268. /** unicast cipher set */
  10269. A_UINT32 rsn_ucastcipherset;
  10270. /** mcast/group cipher set */
  10271. A_UINT32 rsn_mcastcipherset;
  10272. /** mcast/group management frames cipher set */
  10273. A_UINT32 rsn_mcastmgmtcipherset;
  10274. } wmi_rsn_params;
  10275. /** looking for a wps enabled AP */
  10276. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  10277. /** looking for a secure AP */
  10278. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  10279. /** looking for a PMF enabled AP */
  10280. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  10281. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  10282. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  10283. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  10284. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  10285. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  10286. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  10287. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  10288. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  10289. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  10290. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  10291. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  10292. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  10293. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  10294. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  10295. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  10296. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  10297. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  10298. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  10299. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  10300. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  10301. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  10302. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  10303. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  10304. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  10305. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  10306. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  10307. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  10308. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  10309. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  10310. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  10311. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  10312. /* 2 and 3 are reserved */
  10313. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  10314. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  10315. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  10316. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  10317. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  10318. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  10319. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  10320. /**
  10321. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  10322. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  10323. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  10324. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  10325. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  10326. good_bucket_size : bucket size of slot in good zone. Units in dB.
  10327. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  10328. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  10329. */
  10330. /**
  10331. The graph below explains how RSSI scoring percentage is calculated
  10332. as the RSSI improves. In the graph, the derived parameters good_buckets
  10333. and bad_buckets are used. These derived parameters are related to the
  10334. specified parameters as follows:
  10335. good_buckets =
  10336. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  10337. bad_buckets =
  10338. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  10339. | (x0,y0) (x0 = best_rssi, y0 = 100)
  10340. p 100 |-------o
  10341. e | |<--------- (100 - good_rssi_pct)/good_buckets
  10342. r | |___ ,---- good_bucket_size
  10343. c | | |
  10344. e | |_V_
  10345. n | |
  10346. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  10347. 80 | |
  10348. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  10349. | |_____
  10350. | | ,-- bad_bucket_size
  10351. | | |
  10352. | |__v__
  10353. | |
  10354. | |
  10355. 40 | o------------
  10356. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  10357. +------o------------o-----------o------------->
  10358. -50 -70 -80 rssi dBm
  10359. | excellent | good | bad | poor
  10360. | zone | zone | zone | zone
  10361. V V V
  10362. BEST_THRES GOOD_THRES BAD_THRES
  10363. */
  10364. typedef struct {
  10365. A_INT32 best_rssi_threshold;
  10366. A_INT32 good_rssi_threshold;
  10367. A_INT32 bad_rssi_threshold;
  10368. A_UINT32 good_rssi_pcnt;
  10369. A_UINT32 bad_rssi_pcnt;
  10370. A_UINT32 good_bucket_size;
  10371. A_UINT32 bad_bucket_size;
  10372. A_INT32 rssi_pref_5g_rssi_thresh;
  10373. } wmi_roam_cnd_rssi_scoring;
  10374. /**
  10375. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the value respectively.
  10376. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  10377. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  10378. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  10379. BITS 24-31 :- It contains scoring percentage of 1600MHz BW
  10380. The value of each index must be 0-100
  10381. */
  10382. typedef struct {
  10383. A_UINT32 score_pcnt;
  10384. } wmi_roam_cnd_bw_scoring;
  10385. /**
  10386. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  10387. BITS 0-7 :- It contains scoring percentage of 2G
  10388. BITS 8-15 :- It contains scoring percentage of 5G
  10389. BITS 16-23 :- reserved
  10390. BITS 24-31 :- reserved
  10391. The value of each index must be 0-100
  10392. */
  10393. typedef struct {
  10394. A_UINT32 score_pcnt;
  10395. } wmi_roam_cnd_band_scoring;
  10396. /**
  10397. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  10398. BITS 0-7 :- It contains scoring percentage of 1x1
  10399. BITS 8-15 :- It contains scoring percentage of 2x2
  10400. BITS 16-23 :- It contains scoring percentage of 3x3
  10401. BITS 24-31 :- It contains scoring percentage of 4x4
  10402. The value of each index must be 0-100
  10403. */
  10404. typedef struct {
  10405. A_UINT32 score_pcnt;
  10406. } wmi_roam_cnd_nss_scoring;
  10407. /**
  10408. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  10409. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  10410. BITS 8-15 :- SLOT_1
  10411. BITS 16-23 :- SLOT_2
  10412. BITS 24-31 :- SLOT_3
  10413. BITS 32- ...
  10414. num_slot will equally divide 100. e.g, if num_slot = 4
  10415. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  10416. */
  10417. typedef struct {
  10418. A_UINT32 num_slot; /* max 15 */
  10419. A_UINT32 score_pcnt3_to_0;
  10420. A_UINT32 score_pcnt7_to_4;
  10421. A_UINT32 score_pcnt11_to_8;
  10422. A_UINT32 score_pcnt15_to_12;
  10423. } wmi_roam_cnd_esp_qbss_scoring;
  10424. /**
  10425. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  10426. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  10427. BITS 8-15 :- SLOT_1
  10428. BITS 16-23 :- SLOT_2
  10429. BITS 24-31 :- SLOT_3
  10430. BITS 32- ...
  10431. num_slot will equally divide 100. e.g, if num_slot = 4
  10432. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  10433. */
  10434. typedef struct {
  10435. A_UINT32 num_slot; /* max 15 */
  10436. A_UINT32 score_pcnt3_to_0;
  10437. A_UINT32 score_pcnt7_to_4;
  10438. A_UINT32 score_pcnt11_to_8;
  10439. A_UINT32 score_pcnt15_to_12;
  10440. } wmi_roam_cnd_oce_wan_scoring;
  10441. /**
  10442. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  10443. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  10444. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  10445. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  10446. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  10447. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  10448. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  10449. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  10450. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  10451. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  10452. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  10453. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  10454. rssi_scoring :- RSSI scoring information.
  10455. bw_scoring :- channel BW scoring percentage information.
  10456. band_scoring : - band scording percentage information.
  10457. nss_scoring :- NSS scoring percentage information.
  10458. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  10459. oce_wan_scoring : OCE WAN metrics percentage information
  10460. roam_score_delta_pcnt :- consider scanned AP as roam eligible candidate only if scanned AP score is at least roam_score_delta % better than connected AP score
  10461. roam_score_delta_mask :- roam trigger bitmap for which roam_score_delta needs to apply. The WMI_ROAM_TRIGGER_REASON_ID enum values identify which bit within the mask is used for which roam trigger cause.
  10462. */
  10463. typedef struct {
  10464. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  10465. A_UINT32 disable_bitmap;
  10466. A_INT32 rssi_weightage_pcnt;
  10467. A_INT32 ht_weightage_pcnt;
  10468. A_INT32 vht_weightage_pcnt;
  10469. A_INT32 he_weightage_pcnt;
  10470. A_INT32 bw_weightage_pcnt;
  10471. A_INT32 band_weightage_pcnt;
  10472. A_INT32 nss_weightage_pcnt;
  10473. A_INT32 esp_qbss_weightage_pcnt;
  10474. A_INT32 beamforming_weightage_pcnt;
  10475. A_INT32 pcl_weightage_pcnt;
  10476. A_INT32 oce_wan_weightage_pcnt;
  10477. wmi_roam_cnd_rssi_scoring rssi_scoring;
  10478. wmi_roam_cnd_bw_scoring bw_scoring;
  10479. wmi_roam_cnd_band_scoring band_scoring;
  10480. wmi_roam_cnd_nss_scoring nss_scoring;
  10481. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  10482. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  10483. A_UINT32 roam_score_delta_pcnt;
  10484. A_UINT32 roam_score_delta_mask;
  10485. } wmi_roam_cnd_scoring_param;
  10486. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  10487. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  10488. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  10489. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  10490. */
  10491. typedef struct {
  10492. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  10493. /** flags as defined above */
  10494. A_UINT32 flags;
  10495. /**
  10496. * rssi threshold value in dB: the value of the candidate AP should
  10497. * higher by this threshold than the rssi of the currrently associated AP.
  10498. */
  10499. A_UINT32 rssi_threshold;
  10500. /**
  10501. * ssid vlaue to be matched.
  10502. */
  10503. wmi_ssid ssid;
  10504. /**
  10505. * security params to be matched.
  10506. */
  10507. /** authentication mode (defined above) */
  10508. A_UINT32 rsn_authmode;
  10509. /** unicast cipher set */
  10510. A_UINT32 rsn_ucastcipherset;
  10511. /** mcast/group cipher set */
  10512. A_UINT32 rsn_mcastcipherset;
  10513. /** mcast/group management frames cipher set */
  10514. A_UINT32 rsn_mcastmgmtcipherset;
  10515. /**
  10516. * rssi_abs_threshold value: the value of the candidate AP should
  10517. * higher than this absolute RSSI threshold.
  10518. * Zero means no absolute minimum RSSI is required.
  10519. * units are the offset from the noise floor in dB.
  10520. */
  10521. A_UINT32 rssi_abs_thresh;
  10522. /**
  10523. * bg_rssi_threshold value in dB: For background scan the value of
  10524. * the candidate AP should be higher by this threshold than the rssi
  10525. * of the currrently associated AP.
  10526. */
  10527. A_UINT32 bg_rssi_threshold;
  10528. } wmi_ap_profile;
  10529. /** Support early stop roaming scanning when finding a strong candidate AP
  10530. * A 'strong' candidate is
  10531. * 1) Is eligible candidate
  10532. * (all conditions are met in existing candidate selection).
  10533. * 2) Its rssi is better than earlystop threshold.
  10534. * Earlystop threshold will be relaxed as each channel is scanned.
  10535. */
  10536. typedef struct {
  10537. A_UINT32 tlv_header;
  10538. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  10539. A_UINT32 roam_earlystop_thres_min;
  10540. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  10541. A_UINT32 roam_earlystop_thres_max;
  10542. } wmi_roam_earlystop_rssi_thres_param;
  10543. typedef struct {
  10544. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  10545. A_UINT32 tlv_header;
  10546. /** rssi threshold offset under trffic and dense env */
  10547. A_UINT32 roam_dense_rssi_thres_offset;
  10548. /** minimum number of APs to determine dense env */
  10549. A_UINT32 roam_dense_min_aps;
  10550. /** initial dense status detected by host at the time of initial connection */
  10551. A_UINT32 roam_dense_status;
  10552. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  10553. A_UINT32 roam_dense_traffic_thres;
  10554. } wmi_roam_dense_thres_param;
  10555. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  10556. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  10557. * Bit 1-31: Reserved
  10558. */
  10559. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  10560. typedef struct {
  10561. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  10562. A_UINT32 tlv_header;
  10563. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  10564. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  10565. /** 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 */
  10566. A_UINT32 roam_bg_scan_client_bitmap;
  10567. /** roam scan rssi threshold for 2G band.
  10568. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  10569. */
  10570. A_INT32 bad_rssi_thresh_offset_2g;
  10571. /* flags for background roaming */
  10572. A_UINT32 flags;
  10573. } wmi_roam_bg_scan_roaming_param;
  10574. /** Beacon filter wmi command info */
  10575. #define BCN_FLT_MAX_SUPPORTED_IES 256
  10576. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  10577. typedef struct bss_bcn_stats {
  10578. A_UINT32 vdev_id;
  10579. A_UINT32 bss_bcnsdropped;
  10580. A_UINT32 bss_bcnsdelivered;
  10581. } wmi_bss_bcn_stats_t;
  10582. typedef struct bcn_filter_stats {
  10583. A_UINT32 bcns_dropped;
  10584. A_UINT32 bcns_delivered;
  10585. A_UINT32 activefilters;
  10586. wmi_bss_bcn_stats_t bss_stats;
  10587. } wmi_bcnfilter_stats_t;
  10588. typedef struct wmi_add_bcn_filter_cmd {
  10589. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  10590. A_UINT32 vdev_id;
  10591. /*
  10592. * Following this structure is the TLV:
  10593. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  10594. */
  10595. } wmi_add_bcn_filter_cmd_fixed_param;
  10596. typedef struct wmi_rmv_bcn_filter_cmd {
  10597. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  10598. A_UINT32 vdev_id;
  10599. } wmi_rmv_bcn_filter_cmd_fixed_param;
  10600. #define WMI_BCN_SEND_DTIM_ZERO 1
  10601. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  10602. typedef struct wmi_bcn_send_from_host {
  10603. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  10604. A_UINT32 vdev_id;
  10605. A_UINT32 data_len;
  10606. union {
  10607. A_UINT32 frag_ptr; /* Physical address of the frame */
  10608. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  10609. };
  10610. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  10611. A_UINT32 dtim_flag; /* to control CABQ traffic */
  10612. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  10613. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  10614. } wmi_bcn_send_from_host_cmd_fixed_param;
  10615. /* cmd to support bcn snd for all vaps at once */
  10616. typedef struct wmi_pdev_send_bcn {
  10617. A_UINT32 num_vdevs;
  10618. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  10619. } wmi_pdev_send_bcn_cmd_t;
  10620. typedef struct wmi_fd_send_from_host {
  10621. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  10622. A_UINT32 vdev_id;
  10623. A_UINT32 data_len;
  10624. union {
  10625. A_UINT32 frag_ptr; /* Physical address of the frame */
  10626. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  10627. };
  10628. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  10629. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  10630. } wmi_fd_send_from_host_cmd_fixed_param;
  10631. /*
  10632. * WMI command structure for FILS feature enable/disable
  10633. */
  10634. typedef struct {
  10635. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  10636. /* VDEV identifier */
  10637. A_UINT32 vdev_id;
  10638. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames with this period (in TU), 0 - disable FD frames */
  10639. } wmi_enable_fils_cmd_fixed_param;
  10640. /*
  10641. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  10642. */
  10643. typedef struct {
  10644. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  10645. /** id of AP criteria */
  10646. A_UINT32 id;
  10647. /** unique id identifying the VDEV, generated by the caller */
  10648. A_UINT32 vdev_id;
  10649. /*
  10650. * Following this structure is the TLV:
  10651. * wmi_ap_profile ap_profile; <-- AP profile info
  10652. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  10653. */
  10654. } wmi_roam_ap_profile_fixed_param;
  10655. /**
  10656. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  10657. */
  10658. typedef struct {
  10659. /** id of AP criteria */
  10660. A_UINT32 id;
  10661. /** unique id identifying the VDEV, generated by the caller */
  10662. A_UINT32 vdev_id;
  10663. /** AP profile info */
  10664. wmi_ap_profile ap_profile;
  10665. } wmi_ofl_scan_add_ap_profile;
  10666. /**
  10667. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  10668. */
  10669. typedef struct {
  10670. /** id of AP criteria */
  10671. A_UINT32 id;
  10672. /** unique id identifying the VDEV, generated by the caller */
  10673. A_UINT32 vdev_id;
  10674. } wmi_ofl_scan_remove_ap_profile;
  10675. /**
  10676. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  10677. * 0 will disable ofload scan and a very low value will perform a continous
  10678. * scan.
  10679. */
  10680. typedef struct {
  10681. /** offload scan period value, used for scans used when not connected */
  10682. A_UINT32 ofl_scan_period;
  10683. } wmi_ofl_scan_period;
  10684. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  10685. #define ROAM_OFFLOAD_PMK_BYTES (32)
  10686. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  10687. #define ROAM_OFFLOAD_KRK_BYTES (16)
  10688. #define ROAM_OFFLOAD_BTK_BYTES (32)
  10689. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  10690. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  10691. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  10692. typedef struct {
  10693. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  10694. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  10695. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  10696. A_UINT32 select_5g_margin;
  10697. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  10698. A_UINT32 capability;
  10699. A_UINT32 ht_caps_info;
  10700. A_UINT32 ampdu_param;
  10701. A_UINT32 ht_ext_cap;
  10702. A_UINT32 ht_txbf;
  10703. A_UINT32 asel_cap;
  10704. A_UINT32 qos_enabled;
  10705. A_UINT32 qos_caps;
  10706. A_UINT32 wmm_caps;
  10707. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  10708. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  10709. A_UINT32 max_mlme_sw_retries; /* maximum number of software retries for preauth and reassoc req */
  10710. A_UINT32 no_ack_timeout; /* In msec. duration to wait before another SW retry made if no ack seen for previous frame */
  10711. A_UINT32 roam_candidate_validity_time; /* In msec. validity duration of each entry in roam cache. If the value is 0x0, this field should be disregarded. */
  10712. } wmi_roam_offload_tlv_param;
  10713. /* flags for 11i offload */
  10714. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  10715. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  10716. /* from bit 2 to bit 31 are reserved */
  10717. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  10718. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  10719. } while (0)
  10720. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  10721. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  10722. } while (0)
  10723. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  10724. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  10725. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  10726. do { \
  10727. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  10728. } while (0)
  10729. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  10730. do { \
  10731. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  10732. } while (0)
  10733. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  10734. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  10735. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  10736. typedef struct {
  10737. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  10738. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  10739. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  10740. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  10741. } wmi_roam_11i_offload_tlv_param;
  10742. /* This TLV will be filled only in case of 11R*/
  10743. typedef struct {
  10744. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  10745. A_UINT32 mdie_present;
  10746. A_UINT32 mdid;
  10747. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  10748. A_UINT32 r0kh_id_len;
  10749. 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 */
  10750. A_UINT32 psk_msk_len; /**length of psk_msk*/
  10751. } wmi_roam_11r_offload_tlv_param;
  10752. /* This TLV will be filled only in case of ESE */
  10753. typedef struct {
  10754. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  10755. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  10756. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  10757. } wmi_roam_ese_offload_tlv_param;
  10758. typedef struct {
  10759. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_with_timeout_tlv_param */
  10760. A_UINT32 tlv_header;
  10761. /** Blaclisted AP mac address */
  10762. wmi_mac_addr bssid;
  10763. /** How much time in milli seconds to keep AP in blacklist */
  10764. A_UINT32 timeout;
  10765. } wmi_roam_blacklist_with_timeout_tlv_param;
  10766. /** WMI_ROAM_BLACKLIST_EVENT: generated whenever STA needs to move AP to blacklist for a particluar time
  10767. * Ex: AP which sends BTM request with disassoc imminent is set should be
  10768. * moved to blacklist until disassociation timer expires
  10769. */
  10770. typedef struct {
  10771. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param */
  10772. A_UINT32 vdev_id;
  10773. /* This TLV is followed by further TLVs:
  10774. * wmi_roam_blacklist_with_timeout_tlv_param blacklist_with_timeout[]
  10775. */
  10776. } wmi_roam_blacklist_event_fixed_param;
  10777. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  10778. * generated when ever a better AP is found in the recent roam scan (or)
  10779. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  10780. * from the current AP.
  10781. */
  10782. typedef struct {
  10783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  10784. /** unique id identifying the VDEV, generated by the caller */
  10785. A_UINT32 vdev_id;
  10786. /** reason for roam event */
  10787. A_UINT32 reason;
  10788. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  10789. A_UINT32 rssi;
  10790. /** roam notification */
  10791. A_UINT32 notif;
  10792. /** roam notification param
  10793. * Refer to WMI_ROAM_NOTIF_ defs to interpret the notif_params value.
  10794. */
  10795. A_UINT32 notif_params;
  10796. } wmi_roam_event_fixed_param;
  10797. /* roam_reason: bits 0-3 */
  10798. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  10799. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  10800. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  10801. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  10802. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  10803. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  10804. SSID and Security profile in
  10805. WMI_ROAM_AP_PROFILE, found during scan
  10806. triggered upon FINAL_BMISS **/
  10807. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  10808. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  10809. * Result code of WMI_ROAM_INVOKE_CMDID.
  10810. * Any roaming failure before reassociation will be indicated to host
  10811. * with this reason.
  10812. * Any roaming failure after reassociation will be indicated to host with
  10813. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  10814. */
  10815. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  10816. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  10817. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  10818. /* reserved up through 0xF */
  10819. /* subnet status: bits 4-5 */
  10820. typedef enum
  10821. {
  10822. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  10823. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  10824. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  10825. } wmi_roam_subnet_change_status;
  10826. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  10827. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  10828. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  10829. do { \
  10830. (roam_reason) |= \
  10831. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  10832. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  10833. } while (0)
  10834. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  10835. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  10836. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  10837. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  10838. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  10839. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  10840. do { \
  10841. (roam_reason) |= \
  10842. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  10843. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  10844. } while (0)
  10845. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  10846. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  10847. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  10848. /* roaming notification */
  10849. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  10850. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  10851. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  10852. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  10853. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  10854. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  10855. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  10856. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  10857. #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */
  10858. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  10859. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  10860. */
  10861. typedef struct
  10862. {
  10863. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  10864. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  10865. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  10866. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  10867. } wmi_ric_request_fixed_param;
  10868. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  10869. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  10870. */
  10871. typedef struct{
  10872. A_UINT32 tlv_header;
  10873. A_UINT32 ts_info; /** bits value of TS Info field.*/
  10874. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  10875. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  10876. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  10877. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  10878. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  10879. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  10880. A_UINT32 svc_start_time; /**The Service Start Time field*/
  10881. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  10882. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  10883. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  10884. A_UINT32 max_burst_size; /**The Burst Size field*/
  10885. A_UINT32 delay_bound; /**The Delay Bound field*/
  10886. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  10887. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  10888. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  10889. } wmi_ric_tspec;
  10890. /* flags for roam_invoke_cmd */
  10891. /* add this channel into roam cache channel list after this command is finished */
  10892. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  10893. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  10894. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  10895. /* during host-invoked roaming, don't send null data frame to AP */
  10896. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  10897. /* from bit 3 to bit 31 are reserved */
  10898. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  10899. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  10900. } while (0)
  10901. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  10902. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  10903. } while (0)
  10904. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  10905. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  10906. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  10907. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  10908. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  10909. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  10910. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  10911. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  10912. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  10913. *
  10914. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  10915. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  10916. This command can be used to add specific channel into roam cached channel list by following
  10917. <roam_scan_ch_mode> = 0
  10918. <roam_ap_sel_mode> = 0
  10919. <roam_delay> = 0
  10920. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  10921. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  10922. <channel_no> = channel list to be added
  10923. */
  10924. typedef struct {
  10925. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  10926. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  10927. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  10928. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  10929. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  10930. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  10931. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  10932. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  10933. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  10934. /**
  10935. * TLV (tag length value) parameters follows roam_invoke_req
  10936. * The TLV's are:
  10937. * A_UINT32 channel_list[];
  10938. * wmi_mac_addr bssid_list[];
  10939. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  10940. * A_UINT8 bcn_prb_frm[];
  10941. */
  10942. } wmi_roam_invoke_cmd_fixed_param;
  10943. /* Definition for op_bitmap */
  10944. enum {
  10945. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  10946. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  10947. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  10948. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  10949. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  10950. };
  10951. /** lca_enable_source_bitmap */
  10952. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  10953. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  10954. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  10955. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  10956. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  10957. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  10958. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  10959. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  10960. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  10961. typedef struct {
  10962. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rejection_list_config_param */
  10963. A_UINT32 tlv_header;
  10964. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  10965. wmi_mac_addr bssid;
  10966. /** Disallowed AP for certain duration, in units of milliseconds */
  10967. A_UINT32 remaining_disallow_duration;
  10968. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  10969. A_INT32 requested_rssi;
  10970. } wmi_roam_rejection_list_config_param;
  10971. typedef wmi_roam_rejection_list_config_param wmi_roam_rssi_rejection_oce_config_param; /* retain old struct name as an alias for the new name */
  10972. typedef struct {
  10973. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  10974. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  10975. A_UINT32 flags; /** flags for filter */
  10976. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  10977. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  10978. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  10979. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  10980. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  10981. /**
  10982. * TLV (tag length value) parameters follows roam_filter_list_cmd
  10983. * The TLV's are:
  10984. * wmi_mac_addr bssid_black_list[];
  10985. * wmi_ssid ssid_white_list[];
  10986. * wmi_mac_addr bssid_preferred_list[];
  10987. * A_UINT32 bssid_preferred_factor[];
  10988. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  10989. * wmi_roam_rejection_list_config_param rssi_rejection_list[]
  10990. */
  10991. } wmi_roam_filter_fixed_param;
  10992. typedef struct {
  10993. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  10994. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  10995. 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 */
  10996. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  10997. 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) */
  10998. } wmi_roam_lca_disallow_config_tlv_param;
  10999. typedef struct {
  11000. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  11001. } WMI_IPV4_ADDR;
  11002. typedef struct _WMI_IPV6_ADDR {
  11003. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  11004. } WMI_IPV6_ADDR;
  11005. /* flags for subnet change detection */
  11006. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  11007. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  11008. /* bit 2 to bit 31 are reserved */
  11009. /* set IPv4 enabled/disabled flag and get the flag */
  11010. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  11011. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11012. } while (0)
  11013. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  11014. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  11015. } while (0)
  11016. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  11017. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  11018. /* set IPv6 enabled flag, disabled and get the flag */
  11019. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  11020. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11021. } while (0)
  11022. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  11023. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  11024. } while (0)
  11025. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  11026. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  11027. /**
  11028. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  11029. * to FW. FW uses these parameters for subnet change detection.
  11030. */
  11031. typedef struct {
  11032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  11033. /** unique id identifying the VDEV, generated by the caller */
  11034. A_UINT32 vdev_id;
  11035. /** IPv4/IPv6 enabled/disabled */
  11036. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  11037. A_UINT32 flag;
  11038. /** Gateway MAC address */
  11039. wmi_mac_addr inet_gw_mac_addr;
  11040. /** IP addresses */
  11041. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  11042. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  11043. /** Number of software retries for ARP/Neighbor solicitation request */
  11044. A_UINT32 max_retries;
  11045. /** timeout in milliseconds for each ARP request*/
  11046. A_UINT32 timeout;
  11047. /** number of skipped aps **/
  11048. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  11049. /**
  11050. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  11051. * structure. The TLV's are:
  11052. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  11053. **/
  11054. } wmi_roam_subnet_change_config_fixed_param;
  11055. /** WMI_PROFILE_MATCH_EVENT: offload scan
  11056. * generated when ever atleast one of the matching profiles is found
  11057. * in recent NLO scan. no data is carried with the event.
  11058. */
  11059. /** P2P specific commands */
  11060. /**
  11061. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  11062. * FW to generate P2P IE tobe carried in probe response frames.
  11063. * FW will respond to probe requests while in listen state.
  11064. */
  11065. typedef struct {
  11066. /* number of secondary device types,supported */
  11067. A_UINT32 num_secondary_dev_types;
  11068. /**
  11069. * followed by 8 bytes of primary device id and
  11070. * num_secondary_dev_types * 8 bytes of secondary device
  11071. * id.
  11072. */
  11073. } wmi_p2p_dev_set_device_info;
  11074. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  11075. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  11076. * the operating channel of the VDEV.
  11077. */
  11078. typedef struct {
  11079. /* 1:enable disoverability, 0:disable discoverability */
  11080. A_UINT32 enable_discoverability;
  11081. } wmi_p2p_set_discoverability;
  11082. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  11083. * beacons generated by FW. used in FW beacon mode.
  11084. * the FW will add this IE to beacon in addition to the beacon
  11085. * template set by WMI_BCN_TMPL_CMDID command.
  11086. */
  11087. typedef struct {
  11088. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  11089. /** unique id identifying the VDEV, generated by the caller */
  11090. A_UINT32 vdev_id;
  11091. /* ie length */
  11092. A_UINT32 ie_buf_len;
  11093. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  11094. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  11095. */
  11096. } wmi_p2p_go_set_beacon_ie_fixed_param;
  11097. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  11098. * probe response generated by FW. used in FW beacon mode.
  11099. * the FW will add this IE to probe response in addition to the probe response
  11100. * template set by WMI_PRB_TMPL_CMDID command.
  11101. */
  11102. typedef struct {
  11103. /** unique id identifying the VDEV, generated by the caller */
  11104. A_UINT32 vdev_id;
  11105. /* ie length */
  11106. A_UINT32 ie_buf_len;
  11107. /*followed by byte stream of ie data of length ie_buf_len */
  11108. } wmi_p2p_go_set_probe_resp_ie;
  11109. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  11110. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  11111. * and action frames received by the P2P Client.
  11112. * Note: This command is currently used only for Apple P2P implementation.
  11113. */
  11114. typedef struct {
  11115. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  11116. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  11117. A_UINT32 p2p_ie_oui_type;
  11118. /** OS specific NoA Attribute ID */
  11119. A_UINT32 p2p_noa_attribute;
  11120. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  11121. /*----P2P disc offload definition ----*/
  11122. typedef struct {
  11123. A_UINT32 pattern_type;
  11124. /**
  11125. * TLV (tag length value) paramerters follow the pattern structure.
  11126. * TLV can contain bssid list, ssid list and
  11127. * ie. the TLV tags are defined above;
  11128. */
  11129. } wmi_p2p_disc_offload_pattern_cmd;
  11130. typedef struct {
  11131. /* unique id identifying the VDEV, generated by the caller */
  11132. A_UINT32 vdev_id;
  11133. /* mgmt type of the ie*/
  11134. A_UINT32 mgmt_type;
  11135. /* ie length */
  11136. A_UINT32 ie_buf_len;
  11137. /*followed by byte stream of ie data of length ie_buf_len */
  11138. } wmi_p2p_disc_offload_appie_cmd;
  11139. typedef struct {
  11140. /* enable/disable p2p find offload*/
  11141. A_UINT32 enable;
  11142. /* unique id identifying the VDEV, generated by the caller */
  11143. A_UINT32 vdev_id;
  11144. /* p2p find type */
  11145. A_UINT32 disc_type;
  11146. /* p2p find perodic */
  11147. A_UINT32 perodic;
  11148. /* p2p find listen channel */
  11149. A_UINT32 listen_channel;
  11150. /* p2p find full channel number */
  11151. A_UINT32 num_scan_chans;
  11152. /**
  11153. * TLV (tag length value) paramerters follow the pattern structure.
  11154. * TLV contain channel list
  11155. */
  11156. } wmi_p2p_disc_offload_config_cmd;
  11157. /*----P2P OppPS definition ----*/
  11158. typedef struct {
  11159. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  11160. A_UINT32 tlv_header;
  11161. /* unique id identifying the VDEV, generated by the caller */
  11162. A_UINT32 vdev_id;
  11163. /* OppPS attributes */
  11164. /** Bit 0: Indicate enable/disable of OppPS
  11165. * Bits 7-1: Ctwindow in TUs
  11166. * Bits 31-8: Reserved
  11167. */
  11168. A_UINT32 oppps_attr;
  11169. } wmi_p2p_set_oppps_cmd_fixed_param;
  11170. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  11171. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  11172. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  11173. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  11174. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  11175. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  11176. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  11177. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  11178. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  11179. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  11180. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  11181. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  11182. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  11183. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  11184. typedef enum p2p_lo_start_ctrl_flags_e {
  11185. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  11186. } p2p_lo_start_ctrl_flags;
  11187. #define P2P_LO_PER_DEV_TYPE_LEN 8
  11188. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  11189. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  11190. #define P2P_LO_PROB_RESP_MAX_LEN 512
  11191. typedef struct {
  11192. A_UINT32 tlv_header;
  11193. A_UINT32 vdev_id;
  11194. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  11195. A_UINT32 channel; /* MHz */
  11196. A_UINT32 period; /* ms */
  11197. A_UINT32 interval; /* ms, interval should be larger than period */
  11198. A_UINT32 count; /* 0 means forever */
  11199. /*
  11200. * device_types_len specifies the number of bytes in the
  11201. * device_types_data[] byte-array TLV that follows this TLV.
  11202. * The data in device_types_data[] is in 8-byte elements, so
  11203. * device_types_len will be a multiple of 8.
  11204. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  11205. */
  11206. A_UINT32 device_types_len;
  11207. /*
  11208. * prob_resp_len specifies the number of bytes in the
  11209. * prob_resp_data[] byte-array TLV that follows this TLV.
  11210. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  11211. */
  11212. A_UINT32 prob_resp_len;
  11213. /*
  11214. * Two other TLVs follow this TLV:
  11215. * A_UINT8 device_types_data[device_types_len];
  11216. * A_UINT8 prob_resp_data[prob_resp_len];
  11217. * The information in device_types_data[] and prob_resp_data[]
  11218. * needs to be provided to the target in over-the-air byte order.
  11219. * On a big-endian host, if device_types_data and prob_resp_data
  11220. * are initially in the correct over-the-air byte order,
  11221. * the automatic byteswap for endianness-correction during WMI
  11222. * message download will mess up the byte order.
  11223. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  11224. * within each quad-byte segment of device_types_data[] and
  11225. * prob_resp_data[], so that the automatic byte-swap applied during
  11226. * WMI download from a big-endian host to the little-endian target
  11227. * will restore device_types_data and prob_resp_data into the
  11228. * correct byte ordering.
  11229. */
  11230. } wmi_p2p_lo_start_cmd_fixed_param;
  11231. typedef struct {
  11232. A_UINT32 tlv_header;
  11233. A_UINT32 vdev_id;
  11234. } wmi_p2p_lo_stop_cmd_fixed_param;
  11235. typedef enum p2p_lo_stopped_reason_e {
  11236. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  11237. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  11238. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  11239. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  11240. } p2p_lo_stopped_reason;
  11241. typedef struct {
  11242. A_UINT32 tlv_header;
  11243. A_UINT32 vdev_id;
  11244. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  11245. } wmi_p2p_lo_stopped_event_fixed_param;
  11246. typedef enum {
  11247. WMI_MNT_FILTER_CONFIG_MANAGER,
  11248. WMI_MNT_FILTER_CONFIG_CONTROL,
  11249. WMI_MNT_FILTER_CONFIG_DATA,
  11250. WMI_MNT_FILTER_CONFIG_ALL,
  11251. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  11252. } WMI_MNT_FILTER_CONFIG_TYPE;
  11253. typedef struct {
  11254. A_UINT32 tlv_header;
  11255. A_UINT32 vdev_id;
  11256. A_UINT32 clear_or_set;
  11257. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  11258. } wmi_mnt_filter_cmd_fixed_param;
  11259. typedef struct {
  11260. A_UINT32 time32; /* upper 32 bits of time stamp */
  11261. A_UINT32 time0; /* lower 32 bits of time stamp */
  11262. } A_TIME64;
  11263. typedef enum wmi_peer_sta_kickout_reason {
  11264. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  11265. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  11266. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  11267. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  11268. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  11269. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  11270. } PEER_KICKOUT_REASON;
  11271. typedef struct {
  11272. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  11273. /** peer mac address */
  11274. wmi_mac_addr peer_macaddr;
  11275. /** Reason code, defined as above */
  11276. A_UINT32 reason;
  11277. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  11278. A_UINT32 rssi;
  11279. } wmi_peer_sta_kickout_event_fixed_param;
  11280. #define WMI_WLAN_PROFILE_MAX_HIST 3
  11281. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  11282. typedef struct _wmi_wlan_profile_t {
  11283. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  11284. A_UINT32 id;
  11285. A_UINT32 cnt;
  11286. A_UINT32 tot;
  11287. A_UINT32 min;
  11288. A_UINT32 max;
  11289. A_UINT32 hist_intvl;
  11290. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  11291. } wmi_wlan_profile_t;
  11292. typedef struct _wmi_wlan_profile_ctx_t {
  11293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  11294. A_UINT32 tot; /* time in us */
  11295. A_UINT32 tx_msdu_cnt;
  11296. A_UINT32 tx_mpdu_cnt;
  11297. A_UINT32 tx_ppdu_cnt;
  11298. A_UINT32 rx_msdu_cnt;
  11299. A_UINT32 rx_mpdu_cnt;
  11300. A_UINT32 bin_count;
  11301. } wmi_wlan_profile_ctx_t;
  11302. typedef struct {
  11303. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  11304. A_UINT32 enable;
  11305. } wmi_wlan_profile_trigger_cmd_fixed_param;
  11306. typedef struct {
  11307. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  11308. A_UINT32 value;
  11309. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  11310. typedef struct {
  11311. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  11312. A_UINT32 profile_id;
  11313. A_UINT32 value;
  11314. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  11315. typedef struct {
  11316. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  11317. A_UINT32 profile_id;
  11318. A_UINT32 enable;
  11319. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  11320. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  11321. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  11322. when comparing wifi header.*/
  11323. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  11324. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  11325. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  11326. #define WOW_DEFAULT_BITMASK_SIZE 146
  11327. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  11328. #define WOW_MAX_BITMAP_FILTERS 32
  11329. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  11330. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  11331. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  11332. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  11333. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  11334. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  11335. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  11336. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  11337. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  11338. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  11339. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  11340. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  11341. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  11342. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  11343. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  11344. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  11345. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  11346. typedef enum pattern_type_e {
  11347. WOW_PATTERN_MIN = 0,
  11348. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  11349. WOW_IPV4_SYNC_PATTERN,
  11350. WOW_IPV6_SYNC_PATTERN,
  11351. WOW_WILD_CARD_PATTERN,
  11352. WOW_TIMER_PATTERN,
  11353. WOW_MAGIC_PATTERN,
  11354. WOW_IPV6_RA_PATTERN,
  11355. WOW_IOAC_PKT_PATTERN,
  11356. WOW_IOAC_TMR_PATTERN,
  11357. WOW_IOAC_SOCK_PATTERN,
  11358. WOW_PATTERN_MAX
  11359. } WOW_PATTERN_TYPE;
  11360. typedef enum event_type_e {
  11361. WOW_BMISS_EVENT = 0,
  11362. WOW_BETTER_AP_EVENT,
  11363. WOW_DEAUTH_RECVD_EVENT,
  11364. WOW_MAGIC_PKT_RECVD_EVENT,
  11365. WOW_GTK_ERR_EVENT,
  11366. WOW_FOURWAY_HSHAKE_EVENT,
  11367. WOW_EAPOL_RECVD_EVENT,
  11368. WOW_NLO_DETECTED_EVENT,
  11369. WOW_DISASSOC_RECVD_EVENT,
  11370. WOW_PATTERN_MATCH_EVENT,
  11371. WOW_CSA_IE_EVENT,
  11372. WOW_PROBE_REQ_WPS_IE_EVENT,
  11373. WOW_AUTH_REQ_EVENT,
  11374. WOW_ASSOC_REQ_EVENT,
  11375. WOW_HTT_EVENT,
  11376. WOW_RA_MATCH_EVENT,
  11377. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  11378. WOW_IOAC_MAGIC_EVENT,
  11379. WOW_IOAC_SHORT_EVENT,
  11380. WOW_IOAC_EXTEND_EVENT,
  11381. WOW_IOAC_TIMER_EVENT,
  11382. WOW_DFS_PHYERR_RADAR_EVENT,
  11383. WOW_BEACON_EVENT,
  11384. WOW_CLIENT_KICKOUT_EVENT,
  11385. WOW_NAN_EVENT,
  11386. WOW_EXTSCAN_EVENT,
  11387. WOW_IOAC_REV_KA_FAIL_EVENT,
  11388. WOW_IOAC_SOCK_EVENT,
  11389. WOW_NLO_SCAN_COMPLETE_EVENT,
  11390. WOW_NAN_DATA_EVENT,
  11391. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  11392. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  11393. WOW_TDLS_CONN_TRACKER_EVENT,
  11394. WOW_CRITICAL_LOG_EVENT,
  11395. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  11396. WOW_11D_SCAN_EVENT,
  11397. WOW_SAP_OBSS_DETECTION_EVENT,
  11398. WOW_BSS_COLOR_COLLISION_DETECT_EVENT,
  11399. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,
  11400. } WOW_WAKE_EVENT_TYPE;
  11401. typedef enum wake_reason_e {
  11402. WOW_REASON_UNSPECIFIED = -1,
  11403. WOW_REASON_NLOD = 0,
  11404. WOW_REASON_AP_ASSOC_LOST,
  11405. WOW_REASON_LOW_RSSI,
  11406. WOW_REASON_DEAUTH_RECVD,
  11407. WOW_REASON_DISASSOC_RECVD,
  11408. WOW_REASON_GTK_HS_ERR,
  11409. WOW_REASON_EAP_REQ,
  11410. WOW_REASON_FOURWAY_HS_RECV,
  11411. WOW_REASON_TIMER_INTR_RECV,
  11412. WOW_REASON_PATTERN_MATCH_FOUND,
  11413. WOW_REASON_RECV_MAGIC_PATTERN,
  11414. WOW_REASON_P2P_DISC,
  11415. WOW_REASON_WLAN_HB,
  11416. WOW_REASON_CSA_EVENT,
  11417. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  11418. WOW_REASON_AUTH_REQ_RECV,
  11419. WOW_REASON_ASSOC_REQ_RECV,
  11420. WOW_REASON_HTT_EVENT,
  11421. WOW_REASON_RA_MATCH,
  11422. WOW_REASON_HOST_AUTO_SHUTDOWN,
  11423. WOW_REASON_IOAC_MAGIC_EVENT,
  11424. WOW_REASON_IOAC_SHORT_EVENT,
  11425. WOW_REASON_IOAC_EXTEND_EVENT,
  11426. WOW_REASON_IOAC_TIMER_EVENT,
  11427. WOW_REASON_ROAM_HO,
  11428. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  11429. WOW_REASON_BEACON_RECV,
  11430. WOW_REASON_CLIENT_KICKOUT_EVENT,
  11431. WOW_REASON_NAN_EVENT,
  11432. WOW_REASON_EXTSCAN,
  11433. WOW_REASON_RSSI_BREACH_EVENT,
  11434. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  11435. WOW_REASON_IOAC_SOCK_EVENT,
  11436. WOW_REASON_NLO_SCAN_COMPLETE,
  11437. WOW_REASON_PACKET_FILTER_MATCH,
  11438. WOW_REASON_ASSOC_RES_RECV,
  11439. WOW_REASON_REASSOC_REQ_RECV,
  11440. WOW_REASON_REASSOC_RES_RECV,
  11441. WOW_REASON_ACTION_FRAME_RECV,
  11442. WOW_REASON_BPF_ALLOW,
  11443. WOW_REASON_NAN_DATA,
  11444. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  11445. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  11446. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  11447. WOW_REASON_CRITICAL_LOG,
  11448. WOW_REASON_P2P_LISTEN_OFFLOAD,
  11449. WOW_REASON_NAN_EVENT_WAKE_HOST,
  11450. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  11451. WOW_REASON_11D_SCAN,
  11452. WOW_REASON_THERMAL_CHANGE,
  11453. WOW_REASON_OIC_PING_OFFLOAD,
  11454. WOW_REASON_WLAN_DHCP_RENEW,
  11455. WOW_REASON_SAP_OBSS_DETECTION,
  11456. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  11457. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  11458. WOW_REASON_WLAN_MD, /* motion detected */
  11459. WOW_REASON_WLAN_BL, /* baselining done */
  11460. WOW_REASON_DEBUG_TEST = 0xFF,
  11461. } WOW_WAKE_REASON_TYPE;
  11462. typedef enum {
  11463. WOW_IFACE_PAUSE_ENABLED,
  11464. WOW_IFACE_PAUSE_DISABLED
  11465. } WOW_IFACE_STATUS;
  11466. enum {
  11467. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  11468. /* WMI_WOW_FLAG_SEND_PM_PME
  11469. * Some platforms have issues if the PM_PME message is sent after WoW,
  11470. * so don't send PM_PME after WoW unless the host uses this flag
  11471. * to request it.
  11472. */
  11473. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  11474. /* Flag to indicate unit test */
  11475. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  11476. /* Force HTC wakeup */
  11477. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  11478. /* Enable L1SS sleep for PCIE DRV case */
  11479. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  11480. };
  11481. typedef struct {
  11482. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  11483. A_UINT32 enable;
  11484. A_UINT32 pause_iface_config;
  11485. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  11486. } wmi_wow_enable_cmd_fixed_param;
  11487. typedef struct {
  11488. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  11489. /** Reserved for future use */
  11490. A_UINT32 reserved0;
  11491. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  11492. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  11493. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  11494. typedef struct {
  11495. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  11496. A_UINT32 vdev_id;
  11497. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  11498. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  11499. typedef struct bitmap_pattern_s {
  11500. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  11501. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  11502. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  11503. A_UINT32 pattern_offset;
  11504. A_UINT32 pattern_len;
  11505. A_UINT32 bitmask_len;
  11506. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  11507. } WOW_BITMAP_PATTERN_T;
  11508. typedef struct ipv4_sync_s {
  11509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  11510. A_UINT32 ipv4_src_addr;
  11511. A_UINT32 ipv4_dst_addr;
  11512. A_UINT32 tcp_src_prt;
  11513. A_UINT32 tcp_dst_prt;
  11514. } WOW_IPV4_SYNC_PATTERN_T;
  11515. typedef struct ipv6_sync_s {
  11516. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  11517. A_UINT32 ipv6_src_addr[4];
  11518. A_UINT32 ipv6_dst_addr[4];
  11519. A_UINT32 tcp_src_prt;
  11520. A_UINT32 tcp_dst_prt;
  11521. } WOW_IPV6_SYNC_PATTERN_T;
  11522. typedef struct WOW_MAGIC_PATTERN_CMD
  11523. {
  11524. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  11525. wmi_mac_addr macaddr;
  11526. } WOW_MAGIC_PATTERN_CMD;
  11527. typedef enum wow_ioac_pattern_type {
  11528. WOW_IOAC_MAGIC_PATTERN = 1,
  11529. WOW_IOAC_SHORT_PATTERN,
  11530. WOW_IOAC_EXTEND_PATTERN,
  11531. } WOW_IOAC_PATTERN_TYPE;
  11532. typedef struct ioac_sock_pattern_s {
  11533. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  11534. A_UINT32 id;
  11535. A_UINT32 local_ipv4;
  11536. A_UINT32 remote_ipv4;
  11537. A_UINT32 local_port;
  11538. A_UINT32 remote_port;
  11539. A_UINT32 pattern_len; /* units = bytes */
  11540. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  11541. WMI_IPV6_ADDR local_ipv6;
  11542. WMI_IPV6_ADDR remote_ipv6;
  11543. A_UINT32 ack_nak_len;
  11544. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  11545. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  11546. } WOW_IOAC_SOCK_PATTERN_T;
  11547. typedef struct ioac_pkt_pattern_s {
  11548. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  11549. A_UINT32 pattern_type;
  11550. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  11551. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  11552. A_UINT32 pattern_len;
  11553. A_UINT32 random_len;
  11554. } WOW_IOAC_PKT_PATTERN_T;
  11555. typedef struct ioac_tmr_pattern_s {
  11556. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  11557. A_UINT32 wake_in_s;
  11558. A_UINT32 vdev_id;
  11559. } WOW_IOAC_TMR_PATTERN_T;
  11560. typedef struct {
  11561. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  11562. A_UINT32 nID;
  11563. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  11564. typedef struct {
  11565. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  11566. A_UINT32 nID;
  11567. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  11568. typedef struct ioac_keepalive_s {
  11569. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  11570. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  11571. A_UINT32 keepalive_pkt_len;
  11572. A_UINT32 period_in_ms;
  11573. A_UINT32 vdev_id;
  11574. A_UINT32 max_loss_cnt;
  11575. A_UINT32 local_ipv4;
  11576. A_UINT32 remote_ipv4;
  11577. A_UINT32 local_port;
  11578. A_UINT32 remote_port;
  11579. A_UINT32 recv_period_in_ms;
  11580. A_UINT32 rev_ka_size;
  11581. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  11582. WMI_IPV6_ADDR local_ipv6;
  11583. WMI_IPV6_ADDR remote_ipv6;
  11584. } WMI_WOW_IOAC_KEEPALIVE_T;
  11585. typedef struct {
  11586. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  11587. A_UINT32 vdev_id;
  11588. A_UINT32 pattern_type;
  11589. /*
  11590. * Following this struct are these TLVs. Note that they are all array of structures
  11591. * but can have at most one element. Which TLV is empty or has one element depends
  11592. * on the field pattern_type. This is to emulate an union.
  11593. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  11594. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  11595. */
  11596. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  11597. typedef struct {
  11598. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  11599. A_UINT32 vdev_id;
  11600. A_UINT32 pattern_type;
  11601. A_UINT32 pattern_id;
  11602. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  11603. typedef struct {
  11604. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  11605. A_UINT32 vdev_id;
  11606. A_UINT32 pattern_id;
  11607. A_UINT32 pattern_type;
  11608. /*
  11609. * Following this struct are these TLVs. Note that they are all array of structures
  11610. * but can have at most one element. Which TLV is empty or has one element depends
  11611. * on the field pattern_type. This is to emulate an union.
  11612. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  11613. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  11614. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  11615. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  11616. * A_UINT32 pattern_info_timeout[];
  11617. * A_UINT32 ra_ratelimit_interval;
  11618. */
  11619. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  11620. typedef struct {
  11621. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  11622. A_UINT32 vdev_id;
  11623. A_UINT32 pattern_id;
  11624. A_UINT32 pattern_type;
  11625. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  11626. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  11627. typedef struct {
  11628. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  11629. A_UINT32 vdev_id;
  11630. A_UINT32 is_add;
  11631. union {
  11632. A_UINT32 event_bitmap;
  11633. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  11634. };
  11635. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  11636. /*
  11637. * This structure is used to set the pattern to check UDP packet in WOW mode.
  11638. * If match, construct a tx frame in a local buffer to send through the peer
  11639. * AP to the entity in the IP network that sent the UDP packet to this STA.
  11640. */
  11641. typedef struct {
  11642. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  11643. A_UINT32 vdev_id;
  11644. A_UINT32 enable; /* 1: enable, 0: disable*/
  11645. /* dest_port -
  11646. * bits 7:0 contain the LSB of the UDP dest port,
  11647. * bits 15:8 contain the MSB of the UDP dest port
  11648. */
  11649. A_UINT32 dest_port;
  11650. A_UINT32 pattern_len; /* length in byte of pattern[] */
  11651. A_UINT32 response_len; /* length in byte of response[] */
  11652. /* Following this struct are the TLV's:
  11653. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  11654. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  11655. */
  11656. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  11657. /*
  11658. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  11659. */
  11660. typedef struct {
  11661. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  11662. A_UINT32 enable; /* 1: enable, 0: disable */
  11663. A_UINT32 pin; /* pin for host wakeup */
  11664. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  11665. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  11666. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  11667. A_UINT32 init_state; /* Sense of the GPIO pin used for host wakeups.
  11668. * If init_state is 0, a low --> high transition
  11669. * causes a host wakeup interrupt.
  11670. * If init_state is 1, a high --> low transition
  11671. * causes a host wakeup interrrupt.
  11672. */
  11673. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  11674. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  11675. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  11676. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  11677. typedef enum {
  11678. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  11679. WOW_ACTION_WAKEUP_OPERATION_SET,
  11680. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  11681. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  11682. } WOW_ACTION_WAKEUP_OPERATION;
  11683. typedef struct {
  11684. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  11685. A_UINT32 vdev_id;
  11686. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  11687. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  11688. /* This fixed_param TLV is followed by these additional TLV's
  11689. * action_bitmaps_per_category -
  11690. * Each element is a 32-bit bitmap indicating which subcategories
  11691. * for that particular action category are considered for WoW wakeup
  11692. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  11693. * subcategory's bit is 1).
  11694. *
  11695. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  11696. */
  11697. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  11698. typedef struct wow_event_info_s {
  11699. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  11700. A_UINT32 vdev_id;
  11701. A_UINT32 flag; /*This is current reserved.*/
  11702. A_INT32 wake_reason;
  11703. A_UINT32 data_len;
  11704. } WOW_EVENT_INFO_fixed_param;
  11705. typedef struct wow_initial_wakeup_event_s {
  11706. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  11707. A_UINT32 vdev_id;
  11708. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  11709. typedef enum {
  11710. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  11711. WOW_EVENT_INFO_TYPE_BITMAP,
  11712. WOW_EVENT_INFO_TYPE_GTKIGTK,
  11713. } WOW_EVENT_INFO_TYPE;
  11714. typedef struct wow_event_info_section_s {
  11715. A_UINT32 data_type;
  11716. A_UINT32 data_len;
  11717. } WOW_EVENT_INFO_SECTION;
  11718. typedef struct wow_event_info_section_packet_s {
  11719. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  11720. } WOW_EVENT_INFO_SECTION_PACKET;
  11721. typedef struct wow_event_info_section_bitmap_s {
  11722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  11723. A_UINT32 flag; /*This is current reserved.*/
  11724. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  11725. A_UINT32 org_len; /*The length of the orginal packet.*/
  11726. } WOW_EVENT_INFO_SECTION_BITMAP;
  11727. /**
  11728. * This command is sent from WLAN host driver to firmware to
  11729. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  11730. * PCIe link and DDR being active.
  11731. *
  11732. *
  11733. * Entering D0-WOW Mode (based on kernel suspend request):
  11734. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  11735. * target: Take action (e.g. dbglog suspend)
  11736. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  11737. *
  11738. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  11739. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  11740. * target: Take action (e.g. dbglog resume)
  11741. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  11742. *
  11743. * This command is applicable only on the PCIE LL systems
  11744. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  11745. * Decision to enter D0-WOW or WOW is based on active interfaces
  11746. *
  11747. */
  11748. typedef struct {
  11749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  11750. A_UINT32 enable; /* 1 = enable, 0 = disable */
  11751. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  11752. typedef enum extend_wow_type_e {
  11753. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  11754. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  11755. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  11756. EXTWOW_TYPE_APP_PULSETEST,
  11757. EXTWOW_DISABLED = 255,
  11758. } EXTWOW_TYPE;
  11759. typedef struct {
  11760. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  11761. A_UINT32 vdev_id;
  11762. A_UINT32 type;
  11763. A_UINT32 wakeup_pin_num;
  11764. A_UINT32 swol_pulsetest_type;
  11765. A_UINT32 swol_pulsetest_application;
  11766. } wmi_extwow_enable_cmd_fixed_param;
  11767. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  11768. #define SWOL_INDOOR_KEY_LEN 16
  11769. typedef struct {
  11770. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  11771. A_UINT32 vdev_id;
  11772. wmi_mac_addr wakee_mac;
  11773. A_UINT8 ident[8];
  11774. A_UINT8 passwd[16];
  11775. A_UINT32 ident_len;
  11776. A_UINT32 passwd_len;
  11777. /* indoor check parameters */
  11778. /* key for mac addresses specified in swol_indoor_key_mac
  11779. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  11780. * segment of this array, so the bytes will return to their original
  11781. * order when the entire WMI message contents are byte-swapped to
  11782. * convert from big-endian to little-endian format.
  11783. */
  11784. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  11785. /* key length for specified mac address index
  11786. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  11787. * segment of this array, so the bytes will return to their original
  11788. * order when the entire WMI message contents are byte-swapped to
  11789. * convert from big-endian to little-endian format.
  11790. */
  11791. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11792. /* mac address array allowed to wakeup host*/
  11793. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11794. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  11795. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  11796. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  11797. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  11798. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  11799. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  11800. A_UINT32 swol_indoor_exception_app;
  11801. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  11802. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  11803. typedef struct {
  11804. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  11805. A_UINT32 vdev_id;
  11806. A_UINT8 rc4_key[16];
  11807. A_UINT32 rc4_key_len;
  11808. /** ip header parameter */
  11809. A_UINT32 ip_id; /* NC id */
  11810. A_UINT32 ip_device_ip; /* NC IP address */
  11811. A_UINT32 ip_server_ip; /* Push server IP address */
  11812. /** tcp header parameter */
  11813. A_UINT16 tcp_src_port; /* NC TCP port */
  11814. A_UINT16 tcp_dst_port; /* Push server TCP port */
  11815. A_UINT32 tcp_seq;
  11816. A_UINT32 tcp_ack_seq;
  11817. A_UINT32 keepalive_init; /* Initial ping interval */
  11818. A_UINT32 keepalive_min; /* Minimum ping interval */
  11819. A_UINT32 keepalive_max; /* Maximum ping interval */
  11820. A_UINT32 keepalive_inc; /* Increment of ping interval */
  11821. wmi_mac_addr gateway_mac;
  11822. A_UINT32 tcp_tx_timeout_val;
  11823. A_UINT32 tcp_rx_timeout_val;
  11824. /** add extra parameter for backward-compatible */
  11825. /*
  11826. * For all byte arrays, natural order is used. E.g.
  11827. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  11828. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  11829. */
  11830. /* used to encrypt transmit packet such as keep-alive */
  11831. A_UINT8 rc4_write_sandbox[256];
  11832. A_UINT32 rc4_write_x;
  11833. A_UINT32 rc4_write_y;
  11834. /* used to decrypt received packet such as wow data */
  11835. A_UINT8 rc4_read_sandbox[256];
  11836. A_UINT32 rc4_read_x;
  11837. A_UINT32 rc4_read_y;
  11838. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  11839. A_UINT8 ssl_write_seq[8];
  11840. A_UINT8 ssl_sha1_write_key[64];
  11841. A_UINT32 ssl_sha1_write_key_len;
  11842. /* used to calculate HAMC hash for receive packet such as wow data */
  11843. A_UINT8 ssl_read_seq[8];
  11844. A_UINT8 ssl_sha1_read_key[64];
  11845. A_UINT32 ssl_sha1_read_key_len;
  11846. /* optional element for specifying TCP options data to include in
  11847. * transmit packets such as keep-alive
  11848. */
  11849. A_UINT32 tcp_options_len;
  11850. A_UINT8 tcp_options[40];
  11851. A_UINT32 async_id; /* keep-alive request id */
  11852. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  11853. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  11854. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  11855. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  11856. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  11857. typedef enum {
  11858. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  11859. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  11860. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  11861. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  11862. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  11863. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  11864. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  11865. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  11866. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  11867. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  11868. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  11869. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  11870. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  11871. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  11872. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  11873. PKT_PWR_SAVE_ENABLE = 0x80000000,
  11874. } WMI_PKT_PWR_SAVE_TYPE;
  11875. typedef struct {
  11876. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  11877. A_UINT32 num_data; /** length in byte of data[]. */
  11878. /** pdev_id for identifying the MAC
  11879. * See macros starting with WMI_PDEV_ID_ for values.
  11880. */
  11881. A_UINT32 pdev_id;
  11882. /* This structure is used to send Factory Test Mode [FTM] command
  11883. * from host to firmware for integrated chips which are binary blobs.
  11884. * Following this structure is the TLV:
  11885. * A_UINT8 data[]; <-- length in byte given by field num_data.
  11886. */
  11887. } wmi_ftm_intg_cmd_fixed_param;
  11888. typedef struct {
  11889. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  11890. A_UINT32 num_data; /** length in byte of data[]. */
  11891. /* This structure is used to receive Factory Test Mode [FTM] event
  11892. * from firmware to host for integrated chips which are binary blobs.
  11893. * Following this structure is the TLV:
  11894. * A_UINT8 data[]; <-- length in byte given by field num_data.
  11895. */
  11896. } wmi_ftm_intg_event_fixed_param;
  11897. #define WMI_MAX_NS_OFFLOADS 2
  11898. #define WMI_MAX_ARP_OFFLOADS 2
  11899. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  11900. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  11901. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  11902. typedef struct {
  11903. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  11904. A_UINT32 flags; /* flags */
  11905. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  11906. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  11907. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  11908. } WMI_ARP_OFFLOAD_TUPLE;
  11909. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  11910. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  11911. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  11912. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  11913. #define WMI_NSOFF_MAX_TARGET_IPS 2
  11914. typedef struct {
  11915. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  11916. A_UINT32 flags; /* flags */
  11917. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  11918. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  11919. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  11920. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  11921. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  11922. } WMI_NS_OFFLOAD_TUPLE;
  11923. typedef struct {
  11924. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  11925. A_UINT32 flags;
  11926. A_UINT32 vdev_id;
  11927. A_UINT32 num_ns_ext_tuples;
  11928. /* Following this structure are the TLVs:
  11929. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  11930. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  11931. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  11932. */
  11933. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  11934. typedef struct {
  11935. A_UINT32 tlv_header;
  11936. A_UINT32 vdev_id;
  11937. A_UINT32 pattern_id;
  11938. A_UINT32 timeout;
  11939. A_UINT32 length;
  11940. /*Following this would be the pattern
  11941. A_UINT8 pattern[] of length specifed by length
  11942. field in the structure.*/
  11943. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  11944. typedef struct {
  11945. A_UINT32 tlv_header;
  11946. A_UINT32 vdev_id;
  11947. A_UINT32 pattern_id;
  11948. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  11949. typedef struct {
  11950. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  11951. /** unique id identifying the VDEV, generated by the caller */
  11952. A_UINT32 vdev_id;
  11953. /** peer MAC address */
  11954. wmi_mac_addr peer_macaddr;
  11955. /** Tid number */
  11956. A_UINT32 tid;
  11957. /** Initiator (1) or Responder (0) for this aggregation */
  11958. A_UINT32 initiator;
  11959. /** size of the negotiated window */
  11960. A_UINT32 window_size;
  11961. /** starting sequence number (only valid for initiator) */
  11962. A_UINT32 ssn;
  11963. /** timeout field represents the time to wait for Block Ack in
  11964. * initiator case and the time to wait for BAR in responder
  11965. * case. 0 represents no timeout. */
  11966. A_UINT32 timeout;
  11967. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  11968. A_UINT32 policy;
  11969. } wmi_peer_tid_addba_cmd_fixed_param;
  11970. typedef struct {
  11971. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  11972. /** unique id identifying the VDEV, generated by the caller */
  11973. A_UINT32 vdev_id;
  11974. /** peer MAC address */
  11975. wmi_mac_addr peer_macaddr;
  11976. /** Tid number */
  11977. A_UINT32 tid;
  11978. /** Initiator (1) or Responder (0) for this aggregation */
  11979. A_UINT32 initiator;
  11980. } wmi_peer_tid_delba_cmd_fixed_param;
  11981. typedef struct {
  11982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  11983. /** unique id identifying the VDEV, generated by the caller */
  11984. A_UINT32 vdev_id;
  11985. /** peer MAC address */
  11986. wmi_mac_addr peer_macaddr;
  11987. /** Tid number */
  11988. A_UINT32 tid;
  11989. /** Event status */
  11990. A_UINT32 status;
  11991. } wmi_tx_addba_complete_event_fixed_param;
  11992. typedef struct {
  11993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  11994. /** unique id identifying the VDEV, generated by the caller */
  11995. A_UINT32 vdev_id;
  11996. /** peer MAC address */
  11997. wmi_mac_addr peer_macaddr;
  11998. /** Tid number */
  11999. A_UINT32 tid;
  12000. /** Event status */
  12001. A_UINT32 status;
  12002. } wmi_tx_delba_complete_event_fixed_param;
  12003. /*
  12004. * Structure to request sequence numbers for a given
  12005. * peer station on different TIDs. The TIDs are
  12006. * indicated in the tidBitMap, tid 0 would
  12007. * be represented by LSB bit 0. tid 1 would be
  12008. * represented by LSB bit 1 etc.
  12009. * The target will retrieve the current sequence
  12010. * numbers for the peer on all the TIDs requested
  12011. * and send back a response in a WMI event.
  12012. */
  12013. typedef struct
  12014. {
  12015. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12016. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  12017. wmi_mac_addr peer_macaddr;
  12018. A_UINT32 tidBitmap;
  12019. } wmi_ba_req_ssn;
  12020. typedef struct {
  12021. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12022. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  12023. /** unique id identifying the VDEV, generated by the caller */
  12024. A_UINT32 vdev_id;
  12025. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  12026. A_UINT32 num_ba_req_ssn;
  12027. /* Following this struc are the TLV's:
  12028. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  12029. */
  12030. } wmi_ba_req_ssn_cmd_fixed_param;
  12031. /*
  12032. * Max transmit categories
  12033. *
  12034. * Note: In future if we need to increase WMI_MAX_TC definition
  12035. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  12036. */
  12037. #define WMI_MAX_TC 8
  12038. /*
  12039. * Structure to send response sequence numbers
  12040. * for a give peer and tidmap.
  12041. */
  12042. typedef struct
  12043. {
  12044. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12045. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  12046. wmi_mac_addr peer_macaddr;
  12047. /* A boolean to indicate if ssn is present */
  12048. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  12049. /* The ssn from target, valid only if
  12050. * ssn_present_for_tid[tidn] equals 1
  12051. */
  12052. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  12053. } wmi_ba_event_ssn;
  12054. typedef struct {
  12055. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  12056. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  12057. /** unique id identifying the VDEV, generated by the caller */
  12058. A_UINT32 vdev_id;
  12059. /** Event status, success or failure of the overall operation */
  12060. A_UINT32 status;
  12061. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  12062. A_UINT32 num_ba_event_ssn;
  12063. /* Following this struc are the TLV's:
  12064. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  12065. */
  12066. } wmi_ba_rsp_ssn_event_fixed_param;
  12067. enum wmi_aggr_state_req_type {
  12068. WMI_DISABLE_AGGREGATION,
  12069. WMI_ENABLE_AGGREGATION
  12070. };
  12071. /*
  12072. * This event is generated by the COEX module
  12073. * when esco call is begins the coex module in fw genrated this event to host to
  12074. * disable the RX aggregation and after completion of the esco call fw will indicate to
  12075. * enable back the Rx aggregation .
  12076. */
  12077. typedef struct {
  12078. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  12079. /** unique id identifying the VDEV, generated by the caller */
  12080. A_UINT32 vdev_id;
  12081. /** req_type contains values from enum
  12082. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  12083. A_UINT32 req_type;
  12084. } wmi_aggr_state_trig_event_fixed_param;
  12085. typedef struct {
  12086. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  12087. /** unique id identifying the VDEV, generated by the caller */
  12088. A_UINT32 vdev_id;
  12089. /** MAC address used for installing */
  12090. wmi_mac_addr peer_macaddr;
  12091. /** key index */
  12092. A_UINT32 key_ix;
  12093. /** key flags */
  12094. A_UINT32 key_flags;
  12095. /** Event status */
  12096. A_UINT32 status;
  12097. } wmi_vdev_install_key_complete_event_fixed_param;
  12098. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  12099. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  12100. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  12101. WMI_NLO_AUTH_ALGO_WPA = 3,
  12102. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  12103. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  12104. WMI_NLO_AUTH_ALGO_RSNA = 6,
  12105. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  12106. } WMI_NLO_AUTH_ALGORITHM;
  12107. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  12108. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  12109. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  12110. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  12111. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  12112. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  12113. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  12114. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  12115. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  12116. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  12117. } WMI_NLO_CIPHER_ALGORITHM;
  12118. /* SSID broadcast type passed in NLO params */
  12119. typedef enum _WMI_NLO_SSID_BcastNwType
  12120. {
  12121. WMI_NLO_BCAST_UNKNOWN = 0,
  12122. WMI_NLO_BCAST_NORMAL = 1,
  12123. WMI_NLO_BCAST_HIDDEN = 2,
  12124. } WMI_NLO_SSID_BcastNwType;
  12125. #define WMI_NLO_MAX_SSIDS 16
  12126. #define WMI_NLO_MAX_CHAN 48
  12127. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  12128. #define WMI_NLO_CONFIG_START (0x1 << 1)
  12129. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  12130. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  12131. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  12132. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  12133. /* This bit is used to indicate if EPNO Profile is enabled */
  12134. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  12135. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  12136. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  12137. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  12138. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  12139. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  12140. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  12141. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  12142. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  12143. /* Whether PNO event shall be triggered if the network is found on A band */
  12144. #define WMI_ENLO_FLAG_A_BAND 2
  12145. /* Whether PNO event shall be triggered if the network is found on G band */
  12146. #define WMI_ENLO_FLAG_G_BAND 4
  12147. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  12148. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  12149. /* Code for matching the beacon AUTH IE - additional codes TBD */
  12150. /* open */
  12151. #define WMI_ENLO_AUTH_CODE_OPEN 1
  12152. /* WPA_PSK or WPA2PSK */
  12153. #define WMI_ENLO_AUTH_CODE_PSK 2
  12154. /* any EAPOL */
  12155. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  12156. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  12157. typedef struct wmi_nlo_ssid_param
  12158. {
  12159. A_UINT32 valid;
  12160. wmi_ssid ssid;
  12161. } wmi_nlo_ssid_param;
  12162. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  12163. typedef struct wmi_nlo_enc_param
  12164. {
  12165. A_UINT32 valid;
  12166. A_UINT32 enc_type;
  12167. } wmi_nlo_enc_param;
  12168. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  12169. typedef struct wmi_nlo_auth_param
  12170. {
  12171. A_UINT32 valid;
  12172. A_UINT32 auth_type;
  12173. } wmi_nlo_auth_param;
  12174. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  12175. typedef struct wmi_nlo_bcast_nw_param
  12176. {
  12177. A_UINT32 valid;
  12178. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  12179. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  12180. A_UINT32 bcast_nw_type;
  12181. } wmi_nlo_bcast_nw_param;
  12182. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  12183. typedef struct wmi_nlo_rssi_param
  12184. {
  12185. A_UINT32 valid;
  12186. A_INT32 rssi;
  12187. } wmi_nlo_rssi_param;
  12188. typedef struct nlo_configured_parameters {
  12189. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  12190. wmi_nlo_ssid_param ssid;
  12191. wmi_nlo_enc_param enc_type;
  12192. wmi_nlo_auth_param auth_type;
  12193. wmi_nlo_rssi_param rssi_cond;
  12194. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  12195. } nlo_configured_parameters;
  12196. /* Support channel prediction for PNO scan after scanning top_k_num channels
  12197. * if stationary_threshold is met.
  12198. */
  12199. typedef struct nlo_channel_prediction_cfg {
  12200. A_UINT32 tlv_header;
  12201. /* Enable or disable this feature. */
  12202. A_UINT32 enable;
  12203. /* Top K channels will be scanned before deciding whether to further scan
  12204. * or stop. Minimum value is 3 and maximum is 5. */
  12205. A_UINT32 top_k_num;
  12206. /* Preconfigured stationary threshold.
  12207. * Lesser value means more conservative. Bigger value means more aggressive.
  12208. * Maximum is 100 and mininum is 0. */
  12209. A_UINT32 stationary_threshold;
  12210. /* Periodic full channel scan in milliseconds unit.
  12211. * After full_scan_period_ms since last full scan, channel prediction
  12212. * scan is suppressed and will do full scan.
  12213. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  12214. * full scan at all (not recommended).
  12215. */
  12216. A_UINT32 full_scan_period_ms;
  12217. } nlo_channel_prediction_cfg;
  12218. typedef struct enlo_candidate_score_params_t {
  12219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  12220. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  12221. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  12222. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  12223. /* current_connection_bonus:
  12224. * only report when there is a network's score this much higher
  12225. * than the current connection
  12226. */
  12227. A_UINT32 current_connection_bonus;
  12228. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  12229. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  12230. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  12231. } enlo_candidate_score_params;
  12232. typedef struct connected_nlo_bss_band_rssi_pref_t {
  12233. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  12234. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  12235. A_UINT32 band;
  12236. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  12237. A_INT32 rssi_pref;
  12238. } connected_nlo_bss_band_rssi_pref;
  12239. typedef struct connected_nlo_rssi_params_t {
  12240. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  12241. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  12242. * the current connected BSS.
  12243. */
  12244. A_INT32 relative_rssi;
  12245. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  12246. A_INT32 relative_rssi_5g_pref;
  12247. } connected_nlo_rssi_params;
  12248. typedef struct wmi_nlo_config {
  12249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  12250. A_UINT32 flags;
  12251. A_UINT32 vdev_id;
  12252. A_UINT32 fast_scan_max_cycles;
  12253. A_UINT32 active_dwell_time;
  12254. A_UINT32 passive_dwell_time; /* PDT in msecs */
  12255. A_UINT32 probe_bundle_size;
  12256. A_UINT32 rest_time; /* ART = IRT */
  12257. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  12258. A_UINT32 scan_backoff_multiplier; /* SBM */
  12259. A_UINT32 fast_scan_period; /* SCBM */
  12260. A_UINT32 slow_scan_period; /* specific to windows */
  12261. A_UINT32 no_of_ssids;
  12262. A_UINT32 num_of_channels;
  12263. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  12264. /** MAC Address to use in Probe Req as SA **/
  12265. wmi_mac_addr mac_addr;
  12266. /** Mask on which MAC has to be randomized **/
  12267. wmi_mac_addr mac_mask;
  12268. /** IE bitmap to use in Probe Req **/
  12269. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  12270. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  12271. A_UINT32 num_vendor_oui;
  12272. /** Number of connected NLO band preferences **/
  12273. A_UINT32 num_cnlo_band_pref;
  12274. /* The TLVs will follow.
  12275. * nlo_configured_parameters nlo_list[];
  12276. * A_UINT32 channel_list[num_of_channels];
  12277. * nlo_channel_prediction_cfg ch_prediction_cfg;
  12278. * enlo_candidate_score_params candidate_score_params;
  12279. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  12280. * connected_nlo_rssi_params cnlo_rssi_params;
  12281. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  12282. */
  12283. } wmi_nlo_config_cmd_fixed_param;
  12284. typedef struct wmi_nlo_event
  12285. {
  12286. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  12287. A_UINT32 vdev_id;
  12288. } wmi_nlo_event;
  12289. /* WMI_PASSPOINT_CONFIG_SET
  12290. * Sets a list for passpoint networks for PNO purposes;
  12291. * it should be matched against any passpoint networks found
  12292. * during regular PNO scan.
  12293. */
  12294. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  12295. /* WMI_PASSPOINT_CONFIG_RESET
  12296. * Reset passpoint network list -
  12297. * no Passpoint networks should be matched after this.
  12298. */
  12299. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  12300. #define PASSPOINT_REALM_LEN 256
  12301. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  12302. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  12303. #define PASSPOINT_PLMN_ID_LEN 3
  12304. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  12305. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  12306. /*
  12307. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  12308. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  12309. * array will end on a 4-byte boundary.
  12310. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  12311. */
  12312. A_COMPILE_TIME_ASSERT(
  12313. check_passpoint_realm_size,
  12314. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  12315. /*
  12316. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  12317. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  12318. * roaming_consortium_ids array below will end on a 4-byte boundary.
  12319. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  12320. */
  12321. A_COMPILE_TIME_ASSERT(
  12322. check_passpoint_roaming_consortium_ids_size,
  12323. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  12324. /* wildcard ID to allow an action (reset) to apply to all networks */
  12325. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  12326. typedef struct wmi_passpoint_config {
  12327. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  12328. /* (network) id
  12329. * identifier of the matched network, report this in event
  12330. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  12331. * that indicates the action should be applied to all networks.
  12332. * Currently, the only action that is applied to all networks is "reset".
  12333. * If a non-wildcard ID is specified, that particular network is configured.
  12334. * If a wildcard ID is specified, all networks are reset.
  12335. */
  12336. A_UINT32 id;
  12337. A_UINT32 req_id;
  12338. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  12339. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  12340. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  12341. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  12342. } wmi_passpoint_config_cmd_fixed_param;
  12343. typedef struct {
  12344. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  12345. A_UINT32 id; /* identifier of the matched network */
  12346. A_UINT32 vdev_id;
  12347. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  12348. wmi_ssid ssid;
  12349. wmi_mac_addr bssid; /* bssid of the network */
  12350. A_UINT32 channel_mhz; /* channel frequency in MHz */
  12351. A_UINT32 rssi; /* rssi value */
  12352. A_UINT32 rtt; /* timestamp in nanoseconds*/
  12353. A_UINT32 rtt_sd; /* standard deviation in rtt */
  12354. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  12355. A_UINT32 capability; /* capabilities advertised in the beacon */
  12356. A_UINT32 ie_length; /* size of the ie_data blob */
  12357. A_UINT32 anqp_length; /* length of ANQP blob */
  12358. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  12359. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  12360. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  12361. * 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.
  12362. */
  12363. } wmi_passpoint_event_hdr;
  12364. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  12365. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  12366. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  12367. /** Disable GTK offload */
  12368. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  12369. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  12370. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  12371. enum wmi_chatter_mode {
  12372. /* Chatter enter/exit happens
  12373. * automatically based on preset
  12374. * params
  12375. */
  12376. WMI_CHATTER_MODE_AUTO,
  12377. /* Chatter enter is triggered
  12378. * manually by the user
  12379. */
  12380. WMI_CHATTER_MODE_MANUAL_ENTER,
  12381. /* Chatter exit is triggered
  12382. * manually by the user
  12383. */
  12384. WMI_CHATTER_MODE_MANUAL_EXIT,
  12385. /* Placeholder max value, always last*/
  12386. WMI_CHATTER_MODE_MAX
  12387. };
  12388. enum wmi_chatter_query_type {
  12389. /*query coalescing filter match counter*/
  12390. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  12391. WMI_CHATTER_QUERY_MAX
  12392. };
  12393. typedef struct {
  12394. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  12395. A_UINT32 chatter_mode;
  12396. } wmi_chatter_set_mode_cmd_fixed_param;
  12397. /** maximum number of filter supported*/
  12398. #define CHATTER_MAX_COALESCING_RULES 11
  12399. /** maximum number of field tests per filter*/
  12400. #define CHATTER_MAX_FIELD_TEST 5
  12401. /** maximum field length in number of DWORDS*/
  12402. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  12403. /** field test kinds*/
  12404. #define CHATTER_COALESCING_TEST_EQUAL 1
  12405. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  12406. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  12407. /** packet type*/
  12408. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  12409. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  12410. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  12411. /** coalescing field test*/
  12412. typedef struct _chatter_pkt_coalescing_hdr_test {
  12413. /** offset from start of mac header, for windows native wifi host driver
  12414. * should assume standard 802.11 frame format without QoS info and address4
  12415. * FW would account for any non-stand fields for final offset value.
  12416. */
  12417. A_UINT32 offset;
  12418. A_UINT32 length; /* length of test field*/
  12419. A_UINT32 test; /*equal, not equal or masked equal*/
  12420. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  12421. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  12422. } chatter_pkt_coalescing_hdr_test;
  12423. /** packet coalescing filter*/
  12424. typedef struct _chatter_pkt_coalescing_filter {
  12425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  12426. A_UINT32 filter_id; /*unique id assigned by OS*/
  12427. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  12428. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  12429. A_UINT32 num_of_test_field; /*number of field test in table*/
  12430. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  12431. } chatter_pkt_coalescing_filter;
  12432. /** packet coalescing filter add command*/
  12433. typedef struct {
  12434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  12435. A_UINT32 num_of_filters;
  12436. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  12437. chatter_pkt_coalescing_filter rx_filter[1];*/
  12438. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  12439. /** packet coalescing filter delete command*/
  12440. typedef struct {
  12441. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  12442. A_UINT32 filter_id; /*filter id which will be deleted*/
  12443. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  12444. /** packet coalescing query command*/
  12445. typedef struct {
  12446. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  12447. A_UINT32 type; /*type of query*/
  12448. } wmi_chatter_coalescing_query_cmd_fixed_param;
  12449. /** chatter query reply event*/
  12450. typedef struct {
  12451. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  12452. A_UINT32 type; /*query type*/
  12453. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  12454. } wmi_chatter_query_reply_event_fixed_param;
  12455. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  12456. * cannot be changed without breaking WMI compatibility. */
  12457. #define GTK_OFFLOAD_KEK_BYTES 16
  12458. #define GTK_OFFLOAD_KCK_BYTES 16
  12459. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  12460. #define GTK_REPLAY_COUNTER_BYTES 8
  12461. #define WMI_MAX_KEY_LEN 32
  12462. #define IGTK_PN_SIZE 6
  12463. typedef struct {
  12464. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  12465. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12466. A_UINT32 flags; /* status flags */
  12467. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  12468. /*
  12469. * As with all WMI messages, this message uses little-endian byte
  12470. * ordering within each A_UINT32 field.
  12471. * If a big-endian host is using automatic swapping of the bytes within
  12472. * each 4-byte A_UINT32 to automatically correct the endianness of the
  12473. * A_UINT32 fields as the message is uploaded from target --> host, the
  12474. * big-endian host will have to undo the automatic byte swapping for the
  12475. * below A_UINT8 fields, to restore them to their original order.
  12476. */
  12477. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  12478. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  12479. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  12480. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  12481. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  12482. A_UINT8 gtk_keyIndex; /* GTK key index */
  12483. A_UINT8 gtk_keyLength; /* GTK key length */
  12484. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  12485. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  12486. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  12487. typedef struct {
  12488. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  12489. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12490. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  12491. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  12492. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  12493. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  12494. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  12495. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  12496. typedef struct {
  12497. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  12498. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12499. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  12500. A_UINT32 kek_len;
  12501. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  12502. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  12503. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  12504. } wmi_gtk_offload_fils_tlv_param;
  12505. typedef struct {
  12506. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  12507. A_UINT32 vdev_id;
  12508. A_UINT32 sa_query_retry_interval; /* in msec */
  12509. A_UINT32 sa_query_max_retry_count;
  12510. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  12511. typedef enum {
  12512. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  12513. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  12514. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  12515. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  12516. } WMI_STA_KEEPALIVE_METHOD;
  12517. typedef struct {
  12518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  12519. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  12520. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  12521. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  12522. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  12523. typedef struct {
  12524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  12525. A_UINT32 vdev_id;
  12526. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  12527. A_UINT32 method; /* keep alive method */
  12528. A_UINT32 interval; /* time interval in seconds */
  12529. /*
  12530. * NOTE: following this structure is the TLV for ARP Resonse:
  12531. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  12532. */
  12533. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  12534. typedef struct {
  12535. A_UINT32 tlv_header;
  12536. A_UINT32 vdev_id;
  12537. A_UINT32 action;
  12538. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  12539. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  12540. typedef struct {
  12541. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  12542. A_UINT32 vdev_id;
  12543. A_UINT32 keepaliveInterval; /* seconds */
  12544. A_UINT32 keepaliveMethod;
  12545. } wmi_vdev_set_keepalive_cmd_fixed_param;
  12546. typedef struct {
  12547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  12548. A_UINT32 vdev_id;
  12549. } wmi_vdev_get_keepalive_cmd_fixed_param;
  12550. typedef struct {
  12551. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  12552. A_UINT32 vdev_id;
  12553. A_UINT32 keepaliveInterval; /* seconds */
  12554. A_UINT32 keepaliveMethod; /* seconds */
  12555. } wmi_vdev_get_keepalive_event_fixed_param;
  12556. typedef enum {
  12557. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  12558. WMI_START_ARP_STATS_COLLECTION,
  12559. } WMI_ARP_STATS_ACTION;
  12560. typedef enum {
  12561. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  12562. } WMI_ARP_STATS_RX_PKT_TYPE;
  12563. typedef enum {
  12564. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  12565. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  12566. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  12567. typedef enum {
  12568. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  12569. WMI_CONNECTION_STATUS_SUCCESS,
  12570. } WMI_ARP_STATS_CONNECTION_STATUS;
  12571. /* ARP stats set (configure) req */
  12572. typedef struct {
  12573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  12574. A_UINT32 vdev_id;
  12575. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  12576. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  12577. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  12578. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  12579. /* ARP stats get req */
  12580. typedef struct {
  12581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  12582. A_UINT32 vdev_id;
  12583. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  12584. /* per vdev based ARP stats */
  12585. typedef struct {
  12586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  12587. A_UINT32 vdev_id;
  12588. A_UINT32 arp_req_enqueue;
  12589. A_UINT32 arp_req_tx_success;
  12590. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  12591. A_UINT32 arp_rsp_recvd;
  12592. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  12593. A_UINT32 dad_detected; /* duplicate address detection */
  12594. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  12595. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  12596. } wmi_vdev_get_arp_stats_event_fixed_param;
  12597. typedef struct {
  12598. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  12599. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  12600. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  12601. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  12602. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  12603. } wmi_vdev_set_connectivity_check_stats;
  12604. /* per vdev dns/icmp/tcp based stats*/
  12605. typedef struct {
  12606. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  12607. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  12608. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  12609. } wmi_vdev_get_connectivity_check_stats;
  12610. typedef struct {
  12611. A_UINT32 tlv_header;
  12612. A_UINT32 vdev_id;
  12613. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  12614. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  12615. A_UINT32 action;
  12616. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  12617. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  12618. typedef struct {
  12619. A_UINT32 tlv_header;
  12620. A_UINT32 vdev_id;
  12621. A_UINT32 mcc_tbttmode;
  12622. wmi_mac_addr mcc_bssid;
  12623. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  12624. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  12625. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  12626. typedef enum
  12627. {
  12628. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  12629. 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 */
  12630. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  12631. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  12632. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  12633. /* WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1
  12634. * Connect in 1x1 only and Use only one chain for both Tx and Rx
  12635. * to avoid IOT issues due to change in number of Tx and Rx chains
  12636. */
  12637. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1_NUM_TX_RX_CHAINS_1 = 5,
  12638. /* Disable burst and assist, and restrict A-MPDU size to 32 */
  12639. WMI_VENDOR_OUI_ACTION_DISABLE_AGGRESSIVE_TX = 6,
  12640. /* Add any action before this line */
  12641. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  12642. } wmi_vendor_oui_action_id;
  12643. typedef struct {
  12644. A_UINT32 tlv_header;
  12645. /** vendor OUI actions */
  12646. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  12647. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  12648. ** For first command, this value will be used for allocating memory in FW accordingly */
  12649. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  12650. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  12651. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  12652. */
  12653. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  12654. ** first byte contains the index i of structure vendor_oui_ext[]
  12655. ** for which data is coming and length of the data is extracted as
  12656. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  12657. ** N th OUI and (N+1) th OUI.
  12658. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  12659. ** data[0] will hold the index value 0, data[1] through data[17]
  12660. ** will hold the OUI data for this first OUI, data[18] will hold
  12661. ** the index value 1, and the OUI data for the second OUI will
  12662. ** begin at data[19].
  12663. */
  12664. } wmi_pdev_config_vendor_oui_action_fixed_param;
  12665. typedef struct {
  12666. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  12667. /** pdev_id for identifying the MAC
  12668. * See macros starting with WMI_PDEV_ID_ for values.
  12669. */
  12670. A_UINT32 pdev_id;
  12671. /** AC number */
  12672. A_UINT32 ac; /* refer to wmi_traffic_ac */
  12673. /**
  12674. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  12675. * for the specified AC.
  12676. */
  12677. A_UINT32 ac_tx_queue_optimize_enable;
  12678. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  12679. typedef struct {
  12680. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  12681. /** pdev_id for identifying the MAC
  12682. * See macros starting with WMI_PDEV_ID_ for values.
  12683. */
  12684. A_UINT32 pdev_id;
  12685. /** Enable/disable rx filter promiscuous */
  12686. A_UINT32 rx_filter_promiscuous_enable;
  12687. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  12688. typedef enum {
  12689. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  12690. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  12691. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  12692. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  12693. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  12694. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  12695. } wmi_beacon_info_presence_items;
  12696. typedef struct _wmi_vendor_oui_ext {
  12697. A_UINT32 tlv_header;
  12698. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  12699. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  12700. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  12701. 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 */
  12702. A_UINT32 mac_address_length; /* MAC address length in bytes
  12703. ** (This value will always be 6,
  12704. ** but is explicitly specified for sake
  12705. ** of uniformity and completeness).
  12706. */
  12707. A_UINT32 capability_data_length; /* length of capability in bytes */
  12708. } wmi_vendor_oui_ext;
  12709. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  12710. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  12711. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  12712. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  12713. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  12714. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  12715. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  12716. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  12717. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  12718. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  12719. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  12720. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  12721. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  12722. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  12723. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  12724. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  12725. typedef struct {
  12726. A_UINT32 tlv_header;
  12727. A_UINT32 vdev_id; /* home vdev id */
  12728. A_UINT32 meas_token; /* from measure request frame */
  12729. A_UINT32 dialog_token;
  12730. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  12731. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  12732. A_UINT32 burst_cycle; /* times cycle through within one burst */
  12733. A_UINT32 tx_power; /* for path frame */
  12734. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  12735. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  12736. A_UINT32 num_chans;
  12737. } wmi_vdev_plmreq_start_cmd_fixed_param;
  12738. typedef struct {
  12739. A_UINT32 tlv_header;
  12740. A_UINT32 vdev_id;
  12741. A_UINT32 meas_token; /* same value from req*/
  12742. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  12743. typedef struct {
  12744. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  12745. A_UINT32 tlv_header;
  12746. /* unique id identifying the VDEV, generated by the caller */
  12747. A_UINT32 vdev_id;
  12748. /* enable/disable NoA */
  12749. A_UINT32 enable;
  12750. /** number of NoA desc. In the TLV noa_descriptor[] */
  12751. A_UINT32 num_noa;
  12752. /**
  12753. * TLV (tag length value) paramerters follow the pattern structure.
  12754. * TLV contain NoA desc with num of num_noa
  12755. */
  12756. } wmi_p2p_set_noa_cmd_fixed_param;
  12757. typedef struct {
  12758. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  12759. A_UINT32 tlv_header;
  12760. /* unique id identifying the VDEV, generated by the caller */
  12761. A_UINT32 vdev_id;
  12762. /* Identify the wlan module */
  12763. A_UINT32 module_id;
  12764. /* Num of test arguments passed */
  12765. A_UINT32 num_args;
  12766. /* unique id identifying the unit test cmd, generated by the caller */
  12767. A_UINT32 diag_token;
  12768. /**
  12769. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  12770. * structure. The TLV's are:
  12771. * A_UINT32 args[];
  12772. **/
  12773. } wmi_unit_test_cmd_fixed_param;
  12774. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  12775. * after it received WMI_ROAM_SYNCH_EVENTID.
  12776. */
  12777. typedef struct {
  12778. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  12779. /** unique id identifying the VDEV, generated by the caller */
  12780. A_UINT32 vdev_id;
  12781. } wmi_roam_synch_complete_fixed_param;
  12782. typedef enum {
  12783. RECOVERY_SIM_ASSERT = 0x01,
  12784. RECOVERY_SIM_NO_DETECT = 0x02,
  12785. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  12786. RECOVERY_SIM_EMPTY_POINT = 0x04,
  12787. RECOVERY_SIM_STACK_OV = 0x05,
  12788. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  12789. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  12790. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  12791. } RECOVERY_SIM_TYPE;
  12792. /* WMI_FORCE_FW_HANG_CMDID */
  12793. typedef struct {
  12794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  12795. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  12796. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  12797. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  12798. typedef enum {
  12799. WMI_MCAST_FILTER_SET = 1,
  12800. WMI_MCAST_FILTER_DELETE
  12801. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  12802. typedef struct {
  12803. A_UINT32 tlv_header;
  12804. A_UINT32 vdev_id;
  12805. A_UINT32 index;
  12806. A_UINT32 action;
  12807. wmi_mac_addr mcastbdcastaddr;
  12808. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  12809. typedef enum {
  12810. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  12811. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  12812. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  12813. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  12814. } WMI_MULTIPLE_MCAST_FILTER_OP;
  12815. typedef struct {
  12816. A_UINT32 tlv_header;
  12817. A_UINT32 vdev_id;
  12818. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  12819. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  12820. /**
  12821. * TLV (tag length value) parameters follow the
  12822. * structure. The TLV's are:
  12823. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  12824. */
  12825. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  12826. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  12827. typedef enum {
  12828. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  12829. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  12830. } WMI_TIME_STAMP_SYNC_MODE;
  12831. typedef struct {
  12832. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  12833. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  12834. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  12835. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  12836. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  12837. /* GPIO Command and Event data structures */
  12838. /* WMI_GPIO_CONFIG_CMDID */
  12839. enum {
  12840. WMI_GPIO_PULL_NONE,
  12841. WMI_GPIO_PULL_UP,
  12842. WMI_GPIO_PULL_DOWN,
  12843. };
  12844. enum {
  12845. WMI_GPIO_INTTYPE_DISABLE,
  12846. WMI_GPIO_INTTYPE_RISING_EDGE,
  12847. WMI_GPIO_INTTYPE_FALLING_EDGE,
  12848. WMI_GPIO_INTTYPE_BOTH_EDGE,
  12849. WMI_GPIO_INTTYPE_LEVEL_LOW,
  12850. WMI_GPIO_INTTYPE_LEVEL_HIGH
  12851. };
  12852. typedef struct {
  12853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  12854. A_UINT32 gpio_num; /* GPIO number to be setup */
  12855. A_UINT32 input; /* 0 - Output/ 1 - Input */
  12856. A_UINT32 pull_type; /* Pull type defined above */
  12857. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  12858. /* mux_config_val - configure pin MUX
  12859. * A value of 0x0 for this field means to use the default MUX configuration.
  12860. * Valid non-zero values are as follows:
  12861. * Rome:
  12862. * 0x4 - use the pin as GPIO (rather than UART)
  12863. */
  12864. A_UINT32 mux_config_val;
  12865. } wmi_gpio_config_cmd_fixed_param;
  12866. /* WMI_GPIO_OUTPUT_CMDID */
  12867. typedef struct {
  12868. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  12869. A_UINT32 gpio_num; /* GPIO number to be setup */
  12870. A_UINT32 set; /* Set the GPIO pin*/
  12871. } wmi_gpio_output_cmd_fixed_param;
  12872. /* WMI_GPIO_INPUT_EVENTID */
  12873. typedef struct {
  12874. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  12875. A_UINT32 gpio_num; /* GPIO number which changed state */
  12876. } wmi_gpio_input_event_fixed_param;
  12877. /* WMI_P2P_DISC_EVENTID */
  12878. enum {
  12879. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  12880. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  12881. };
  12882. enum {
  12883. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  12884. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  12885. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  12886. };
  12887. enum {
  12888. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  12889. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  12890. };
  12891. typedef struct {
  12892. A_UINT32 vdev_id;
  12893. A_UINT32 reason; /* P2P DISC wake up reason*/
  12894. } wmi_p2p_disc_event;
  12895. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  12896. typedef enum {
  12897. WMI_FAKE_TXBFER_SEND_NDPA,
  12898. WMI_FAKE_TXBFER_SEND_MU,
  12899. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  12900. WMI_FAKE_TXBFER_NDPA_NCIDX,
  12901. WMI_FAKE_TXBFER_NDPA_POLL,
  12902. WMI_FAKE_TXBFER_NDPA_BW,
  12903. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  12904. WMI_FAKE_TXBFER_NDPA_RATE,
  12905. WMI_FAKE_TXBFER_NDP_BW,
  12906. WMI_FAKE_TXBFER_NDP_NSS,
  12907. WMI_TXBFEE_ENABLE_UPLOAD_H,
  12908. WMI_TXBFEE_ENABLE_CAPTURE_H,
  12909. WMI_TXBFEE_SET_CBF_TBL,
  12910. WMI_TXBFEE_CBF_TBL_LSIG,
  12911. WMI_TXBFEE_CBF_TBL_SIGA1,
  12912. WMI_TXBFEE_CBF_TBL_SIGA2,
  12913. WMI_TXBFEE_CBF_TBL_SIGB,
  12914. WMI_TXBFEE_CBF_TBL_PAD,
  12915. WMI_TXBFEE_CBF_TBL_DUR,
  12916. WMI_TXBFEE_SU_NCIDX,
  12917. WMI_TXBFEE_CBIDX,
  12918. WMI_TXBFEE_NGIDX,
  12919. } WMI_TXBF_PARAM_ID;
  12920. typedef struct {
  12921. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  12922. /** parameter id */
  12923. A_UINT32 param_id;
  12924. /** parameter value */
  12925. A_UINT32 param_value;
  12926. } wmi_txbf_cmd_fixed_param;
  12927. typedef struct {
  12928. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  12929. A_UINT32 h_length;
  12930. A_UINT32 cv_length;
  12931. /* This TLV is followed by array of bytes:
  12932. * A_UINT8 bufp[]; <-- h_cv info buffer
  12933. */
  12934. } wmi_upload_h_hdr;
  12935. typedef struct {
  12936. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  12937. A_UINT32 svd_num;
  12938. A_UINT32 tone_num;
  12939. A_UINT32 reserved;
  12940. } wmi_capture_h_event_hdr;
  12941. typedef struct {
  12942. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  12943. A_UINT32 start_freq; /* start frequency, not channel center freq */
  12944. A_UINT32 end_freq; /* end frequency */
  12945. } wmi_avoid_freq_range_desc;
  12946. typedef struct {
  12947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  12948. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  12949. A_UINT32 num_freq_ranges;
  12950. /* The TLVs will follow.
  12951. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  12952. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  12953. */
  12954. } wmi_avoid_freq_ranges_event_fixed_param;
  12955. enum {
  12956. WMI_SAR2_SUCCESS = 0,
  12957. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  12958. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  12959. WMI_SAR2_STATE_ERROR = 4,
  12960. WMI_SAR2_BDF_NO_TABLE = 8,
  12961. };
  12962. typedef struct {
  12963. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  12964. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  12965. } wmi_sar2_result_event_fixed_param;
  12966. typedef struct {
  12967. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  12968. /** Reserved for future use */
  12969. A_UINT32 reserved0;
  12970. A_UINT32 vdev_id;
  12971. } wmi_gtk_rekey_fail_event_fixed_param;
  12972. typedef enum WLAN_COEX_EVENT {
  12973. WLAN_COEX_EVENT_BT_NONE = 0,
  12974. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  12975. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  12976. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  12977. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  12978. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  12979. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  12980. }WLAN_COEX_EVENT;
  12981. typedef struct {
  12982. A_UINT32 tlv_header;
  12983. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  12984. } wmi_coex_bt_activity_event_fixed_param;
  12985. enum wmm_ac_downgrade_policy {
  12986. WMM_AC_DOWNGRADE_DEPRIO,
  12987. WMM_AC_DOWNGRADE_DROP,
  12988. WMM_AC_DOWNGRADE_INVALID,
  12989. };
  12990. /* WMM EDCA Params type */
  12991. #define WMM_PARAM_TYPE_LEGACY 0
  12992. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  12993. #define WMM_PARAM_TYPE_11AX_EDCA 1
  12994. typedef struct {
  12995. A_UINT32 tlv_header;
  12996. A_UINT32 cwmin;
  12997. A_UINT32 cwmax;
  12998. A_UINT32 aifs;
  12999. union {
  13000. A_UINT32 txoplimit;
  13001. A_UINT32 mu_edca_timer;
  13002. };
  13003. A_UINT32 acm;
  13004. A_UINT32 no_ack;
  13005. } wmi_wmm_vparams;
  13006. typedef struct {
  13007. A_UINT32 tlv_header;
  13008. A_UINT32 vdev_id;
  13009. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  13010. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  13011. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  13012. typedef struct {
  13013. A_UINT32 tlv_header;
  13014. A_UINT32 vdev_id;
  13015. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  13016. A_UINT32 userGtxMask; /* host request for GTX mask */
  13017. A_UINT32 gtxPERThreshold; /* default: 10% */
  13018. A_UINT32 gtxPERMargin; /* default: 2% */
  13019. A_UINT32 gtxTPCstep; /* default: 1 */
  13020. A_UINT32 gtxTPCMin; /* default: 5 */
  13021. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  13022. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  13023. typedef struct
  13024. {
  13025. A_UINT32 tlv_header;
  13026. A_UINT32 vdev_id;
  13027. A_UINT32 ac;
  13028. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  13029. A_UINT32 downgrade_type;
  13030. } wmi_vdev_wmm_addts_cmd_fixed_param;
  13031. typedef struct
  13032. {
  13033. A_UINT32 tlv_header;
  13034. A_UINT32 vdev_id;
  13035. A_UINT32 ac;
  13036. } wmi_vdev_wmm_delts_cmd_fixed_param;
  13037. /* DEPRECATED */
  13038. typedef struct {
  13039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  13040. /** Reserved for future use */
  13041. A_UINT32 reserved0;
  13042. } wmi_pdev_dfs_enable_cmd_fixed_param;
  13043. /* DEPRECATED */
  13044. typedef struct {
  13045. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  13046. /** pdev_id for identifying the MAC
  13047. * See macros starting with WMI_PDEV_ID_ for values.
  13048. */
  13049. A_UINT32 pdev_id;
  13050. } wmi_pdev_dfs_disable_cmd_fixed_param;
  13051. typedef struct {
  13052. /** TLV tag and len; tag equals
  13053. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  13054. */
  13055. A_UINT32 tlv_header;
  13056. /** pdev_id for identifying the MAC
  13057. * See macros starting with WMI_PDEV_ID_ for values.
  13058. */
  13059. A_UINT32 pdev_id;
  13060. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  13061. typedef struct {
  13062. /** TLV tag and len; tag equals
  13063. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  13064. */
  13065. A_UINT32 tlv_header;
  13066. /** pdev_id for identifying the MAC
  13067. * See macros starting with WMI_PDEV_ID_ for values.
  13068. */
  13069. A_UINT32 pdev_id;
  13070. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  13071. typedef struct {
  13072. A_UINT32 tlv_header;
  13073. A_UINT32 pdev_id;
  13074. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  13075. typedef struct {
  13076. A_UINT32 tlv_header;
  13077. A_UINT32 pdev_id;
  13078. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  13079. typedef enum {
  13080. QUICK_OCAC = 0,
  13081. EXTENSIVE_OCAC,
  13082. } WMI_ADFS_OCAC_MODE;
  13083. typedef struct {
  13084. A_UINT32 tlv_header;
  13085. A_UINT32 vdev_id;
  13086. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  13087. A_UINT32 min_duration_ms; /* in milliseconds */
  13088. A_UINT32 max_duration_ms; /* in milliseconds */
  13089. A_UINT32 chan_freq; /* in MHz */
  13090. A_UINT32 chan_width; /* in MHz */
  13091. A_UINT32 center_freq; /* in MHz */
  13092. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  13093. typedef struct {
  13094. A_UINT32 tlv_header;
  13095. A_UINT32 vdev_id;
  13096. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  13097. typedef enum {
  13098. IN_SERVICE_MODE = 0,
  13099. OCAC_MODE,
  13100. } WMI_DFS_RADAR_DETECTION_MODE;
  13101. typedef struct {
  13102. A_UINT32 tlv_header;
  13103. A_UINT32 pdev_id;
  13104. /* In-service mode or O-CAC mode */
  13105. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  13106. A_UINT32 chan_freq; /* in MHz */
  13107. A_UINT32 chan_width; /* in MHz */
  13108. A_UINT32 detector_id;
  13109. A_UINT32 segment_id;
  13110. A_UINT32 timestamp;
  13111. A_UINT32 is_chirp;
  13112. A_INT32 freq_offset; /* in MHz */
  13113. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  13114. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  13115. typedef enum {
  13116. OCAC_COMPLETE = 0,
  13117. OCAC_ABORT,
  13118. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  13119. typedef struct {
  13120. A_UINT32 tlv_header;
  13121. A_UINT32 vdev_id;
  13122. A_UINT32 chan_freq; /* in MHz */
  13123. A_UINT32 chan_width; /* in MHz */
  13124. A_UINT32 center_freq; /* in MHz */
  13125. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  13126. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  13127. typedef struct {
  13128. A_UINT32 tlv_header;
  13129. A_UINT32 vdev_id;
  13130. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  13131. /** TDLS COMMANDS */
  13132. /* WMI_TDLS_SET_STATE_CMDID */
  13133. /* TDLS State */
  13134. enum wmi_tdls_state {
  13135. /** TDLS disable */
  13136. WMI_TDLS_DISABLE,
  13137. /** TDLS enabled - no firmware connection tracking/notifications */
  13138. WMI_TDLS_ENABLE_PASSIVE,
  13139. /** TDLS enabled - with firmware connection tracking/notifications */
  13140. WMI_TDLS_ENABLE_ACTIVE,
  13141. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  13142. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  13143. /** TDLS enabled - TDLS connection tracking is done in host */
  13144. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  13145. };
  13146. /* TDLS Options */
  13147. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  13148. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  13149. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  13150. typedef struct {
  13151. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  13152. A_UINT32 tlv_header;
  13153. /** unique id identifying the VDEV */
  13154. A_UINT32 vdev_id;
  13155. /** Enable/Disable TDLS (wmi_tdls_state) */
  13156. A_UINT32 state;
  13157. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  13158. A_UINT32 notification_interval_ms;
  13159. /** number of packets OVER which notify/suggest TDLS Discovery:
  13160. * if current tx pps counter / notification interval >= threshold
  13161. * then a notification will be sent to host to advise TDLS Discovery */
  13162. A_UINT32 tx_discovery_threshold;
  13163. /** number of packets UNDER which notify/suggest TDLS Teardown:
  13164. * if current tx pps counter / notification interval < threshold
  13165. * then a notification will be sent to host to advise TDLS Tear down */
  13166. A_UINT32 tx_teardown_threshold;
  13167. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  13168. A_INT32 rssi_teardown_threshold;
  13169. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  13170. A_INT32 rssi_delta;
  13171. /** TDLS Option Control
  13172. * Off-Channel, Buffer STA, (later)Sleep STA support */
  13173. A_UINT32 tdls_options;
  13174. /* Buffering time in number of beacon intervals */
  13175. A_UINT32 tdls_peer_traffic_ind_window;
  13176. /* Wait time for PTR frame */
  13177. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  13178. /* Self PUAPSD mask */
  13179. A_UINT32 tdls_puapsd_mask;
  13180. /* Inactivity timeout */
  13181. A_UINT32 tdls_puapsd_inactivity_time_ms;
  13182. /* Max of rx frame during SP */
  13183. A_UINT32 tdls_puapsd_rx_frame_threshold;
  13184. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  13185. A_UINT32 teardown_notification_ms;
  13186. /** STA kickout threshold for TDLS peer */
  13187. A_UINT32 tdls_peer_kickout_threshold;
  13188. /* TDLS discovery WAKE timeout in ms.
  13189. * DUT will wake until this timeout to receive TDLS discovery response
  13190. * from peer.
  13191. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  13192. * what wake timeout value to use.
  13193. */
  13194. A_UINT32 tdls_discovery_wake_timeout;
  13195. } wmi_tdls_set_state_cmd_fixed_param;
  13196. /* WMI_TDLS_PEER_UPDATE_CMDID */
  13197. enum wmi_tdls_peer_state {
  13198. /** tx peer TDLS link setup now starting, traffic to DA should be
  13199. * paused (except TDLS frames) until state is moved to CONNECTED (or
  13200. * TEARDOWN on setup failure) */
  13201. WMI_TDLS_PEER_STATE_PEERING,
  13202. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  13203. WMI_TDLS_PEER_STATE_CONNECTED,
  13204. /** tx peer TDLS link tear down started (link paused, any frames
  13205. * queued for DA will be requeued back through the AP)*/
  13206. WMI_TDLS_PEER_STATE_TEARDOWN,
  13207. /** Add peer mac into connection table */
  13208. WMI_TDLS_PEER_ADD_MAC_ADDR,
  13209. /** Remove peer mac from connection table */
  13210. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  13211. };
  13212. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  13213. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  13214. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  13215. typedef struct {
  13216. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  13217. A_UINT32 tlv_header;
  13218. /* Peer's QoS Info - for U-APSD */
  13219. /* AC FLAGS - accessed through macros below */
  13220. /* Ack, SP, More Data Ack - accessed through macros below */
  13221. A_UINT32 peer_qos;
  13222. /*TDLS Peer's U-APSD Buffer STA Support*/
  13223. A_UINT32 buff_sta_support;
  13224. /*TDLS off channel related params */
  13225. A_UINT32 off_chan_support;
  13226. A_UINT32 peer_curr_operclass;
  13227. A_UINT32 self_curr_operclass;
  13228. /* Number of channels available for off channel operation */
  13229. A_UINT32 peer_chan_len;
  13230. A_UINT32 peer_operclass_len;
  13231. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  13232. /* Is peer initiator or responder of TDLS setup request */
  13233. A_UINT32 is_peer_responder;
  13234. /* Preferred off channel number as configured by user */
  13235. A_UINT32 pref_offchan_num;
  13236. /* Preferred off channel bandwidth as configured by user */
  13237. A_UINT32 pref_offchan_bw;
  13238. /** Followed by the variable length TLV peer_chan_list:
  13239. * wmi_channel peer_chan_list[].
  13240. * Array size would be peer_chan_len.
  13241. * This array is intersected channels which is supported by both peer
  13242. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  13243. * FW shall compute BW for an offchan based on peer's ht/vht cap
  13244. * received in peer_assoc cmd during change STA operation
  13245. */
  13246. } wmi_tdls_peer_capabilities;
  13247. #define WMI_TDLS_QOS_VO_FLAG 0
  13248. #define WMI_TDLS_QOS_VI_FLAG 1
  13249. #define WMI_TDLS_QOS_BK_FLAG 2
  13250. #define WMI_TDLS_QOS_BE_FLAG 3
  13251. #define WMI_TDLS_QOS_ACK_FLAG 4
  13252. #define WMI_TDLS_QOS_SP_FLAG 5
  13253. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  13254. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  13255. (ppeer_caps)->peer_qos |= (1 << flag); \
  13256. } while (0)
  13257. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  13258. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  13259. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  13260. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  13261. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  13262. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  13263. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  13264. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  13265. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  13266. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  13267. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  13268. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  13269. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  13270. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  13271. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  13272. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  13273. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  13274. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  13275. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  13276. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  13277. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  13278. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  13279. /* SP has 2 bits */
  13280. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  13281. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  13282. } while (0)
  13283. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  13284. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  13285. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  13286. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  13287. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  13288. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  13289. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  13290. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  13291. } while (0)
  13292. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  13293. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  13294. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  13295. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  13296. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  13297. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  13298. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  13299. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  13300. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  13301. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  13302. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  13303. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  13304. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  13305. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  13306. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  13307. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  13308. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  13309. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  13310. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  13311. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  13312. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  13313. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  13314. /* SP has 2 bits */
  13315. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  13316. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  13317. } while (0)
  13318. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  13319. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  13320. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  13321. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  13322. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  13323. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  13324. typedef struct {
  13325. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  13326. A_UINT32 tlv_header;
  13327. /** unique id identifying the VDEV */
  13328. A_UINT32 vdev_id;
  13329. /** peer MAC address */
  13330. wmi_mac_addr peer_macaddr;
  13331. /** new TDLS state for peer (wmi_tdls_peer_state) */
  13332. A_UINT32 peer_state;
  13333. /* The TLV for wmi_tdls_peer_capabilities will follow.
  13334. * wmi_tdls_peer_capabilities peer_caps;
  13335. */
  13336. /** Followed by the variable length TLV chan_info:
  13337. * wmi_channel chan_info[] */
  13338. } wmi_tdls_peer_update_cmd_fixed_param;
  13339. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  13340. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  13341. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  13342. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  13343. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  13344. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  13345. enum wmi_tdls_offchan_mode {
  13346. WMI_TDLS_ENABLE_OFFCHANNEL,
  13347. WMI_TDLS_DISABLE_OFFCHANNEL
  13348. };
  13349. typedef struct {
  13350. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  13351. A_UINT32 tlv_header;
  13352. /** unique id identifying the VDEV */
  13353. A_UINT32 vdev_id;
  13354. /** Enable/Disable TDLS offchannel */
  13355. A_UINT32 offchan_mode;
  13356. /** peer MAC address */
  13357. wmi_mac_addr peer_macaddr;
  13358. /* Is peer initiator or responder of TDLS setup request */
  13359. A_UINT32 is_peer_responder;
  13360. /* off channel number*/
  13361. A_UINT32 offchan_num;
  13362. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  13363. A_UINT32 offchan_bw_bitmap;
  13364. /* operating class for offchan */
  13365. A_UINT32 offchan_oper_class;
  13366. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  13367. /** TDLS EVENTS */
  13368. enum wmi_tdls_peer_notification {
  13369. /** tdls discovery recommended for peer (based
  13370. * on tx bytes per second > tx_discover threshold) */
  13371. WMI_TDLS_SHOULD_DISCOVER,
  13372. /** tdls link tear down recommended for peer
  13373. * due to tx bytes per second below tx_teardown_threshold
  13374. * NB: this notification sent once */
  13375. WMI_TDLS_SHOULD_TEARDOWN,
  13376. /** tx peer TDLS link tear down complete */
  13377. WMI_TDLS_PEER_DISCONNECTED,
  13378. /** TDLS/BT role change notification for connection tracker */
  13379. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  13380. };
  13381. enum wmi_tdls_peer_reason {
  13382. /** tdls teardown recommended due to low transmits */
  13383. WMI_TDLS_TEARDOWN_REASON_TX,
  13384. /** tdls link tear down recommended due to poor RSSI */
  13385. WMI_TDLS_TEARDOWN_REASON_RSSI,
  13386. /** tdls link tear down recommended due to offchannel scan */
  13387. WMI_TDLS_TEARDOWN_REASON_SCAN,
  13388. /** tdls peer disconnected due to peer deletion */
  13389. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  13390. /** tdls peer disconnected due to PTR timeout */
  13391. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  13392. /** tdls peer disconnected due wrong PTR format */
  13393. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  13394. /** tdls peer not responding */
  13395. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  13396. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  13397. WMI_TDLS_ENTER_BUF_STA,
  13398. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  13399. WMI_TDLS_EXIT_BUF_STA,
  13400. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  13401. WMI_TDLS_ENTER_BT_BUSY_MODE,
  13402. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  13403. WMI_TDLS_EXIT_BT_BUSY_MODE,
  13404. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  13405. WMI_TDLS_SCAN_STARTED_EVENT,
  13406. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  13407. WMI_TDLS_SCAN_COMPLETED_EVENT,
  13408. };
  13409. /* WMI_TDLS_PEER_EVENTID */
  13410. typedef struct {
  13411. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  13412. A_UINT32 tlv_header;
  13413. /** peer MAC address */
  13414. wmi_mac_addr peer_macaddr;
  13415. /** TDLS peer status (wmi_tdls_peer_notification)*/
  13416. A_UINT32 peer_status;
  13417. /** TDLS peer reason (wmi_tdls_peer_reason) */
  13418. A_UINT32 peer_reason;
  13419. /** unique id identifying the VDEV */
  13420. A_UINT32 vdev_id;
  13421. } wmi_tdls_peer_event_fixed_param;
  13422. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  13423. don't use this for any new implementations */
  13424. typedef struct {
  13425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  13426. /** unique id identifying the VDEV, generated by the caller */
  13427. A_UINT32 vdev_id;
  13428. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  13429. A_UINT32 new_bcn_intvl;
  13430. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  13431. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  13432. typedef struct {
  13433. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  13434. A_UINT32 tlv_header;
  13435. /** 1: enable fw based adaptive ocs,
  13436. * 0: disable fw based adaptive ocs
  13437. */
  13438. A_UINT32 enable;
  13439. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  13440. union {
  13441. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13442. /** pdev_id for identifying the MAC
  13443. * See macros starting with WMI_PDEV_ID_ for values.
  13444. */
  13445. A_UINT32 pdev_id;
  13446. };
  13447. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  13448. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  13449. typedef struct {
  13450. /* Frequency of the channel for which the quota is set */
  13451. A_UINT32 chan_mhz;
  13452. /* Requested channel time quota expressed as percentage */
  13453. A_UINT32 channel_time_quota;
  13454. } wmi_resmgr_chan_time_quota;
  13455. typedef struct {
  13456. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  13457. A_UINT32 tlv_header;
  13458. /** number of channel time quota command structures
  13459. * (wmi_resmgr_chan_time_quota) 1 or 2
  13460. */
  13461. A_UINT32 num_chans;
  13462. /* This TLV is followed by another TLV of array of bytes
  13463. * A_UINT8 data[];
  13464. * This data array contains
  13465. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  13466. */
  13467. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  13468. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  13469. typedef struct {
  13470. /* Frequency of the channel for which the latency is set */
  13471. A_UINT32 chan_mhz;
  13472. /* Requested channel latency in milliseconds */
  13473. A_UINT32 latency;
  13474. } wmi_resmgr_chan_latency;
  13475. typedef struct {
  13476. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  13477. A_UINT32 tlv_header;
  13478. /** number of channel latency command structures
  13479. * (wmi_resmgr_chan_latency) 1 or 2
  13480. */
  13481. A_UINT32 num_chans;
  13482. /* This TLV is followed by another TLV of array of bytes
  13483. * A_UINT8 data[];
  13484. * This data array contains
  13485. * num_chans * size of(struct wmi_resmgr_chan_latency)
  13486. */
  13487. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  13488. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  13489. /** STA SMPS Forced Mode */
  13490. typedef enum {
  13491. WMI_SMPS_FORCED_MODE_NONE = 0,
  13492. WMI_SMPS_FORCED_MODE_DISABLED,
  13493. WMI_SMPS_FORCED_MODE_STATIC,
  13494. WMI_SMPS_FORCED_MODE_DYNAMIC
  13495. } wmi_sta_smps_forced_mode;
  13496. typedef struct {
  13497. /** TLV tag and len; tag equals
  13498. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  13499. A_UINT32 tlv_header;
  13500. /** Unique id identifying the VDEV */
  13501. A_UINT32 vdev_id;
  13502. /** The mode of SMPS that is to be forced in the FW. */
  13503. A_UINT32 forced_mode;
  13504. } wmi_sta_smps_force_mode_cmd_fixed_param;
  13505. /** wlan HB commands */
  13506. #define WMI_WLAN_HB_ITEM_UDP 0x1
  13507. #define WMI_WLAN_HB_ITEM_TCP 0x2
  13508. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  13509. must be a multiple of 4 bytes */
  13510. typedef struct {
  13511. /** TLV tag and len; tag equals
  13512. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  13513. A_UINT32 tlv_header; /** TLV header*/
  13514. A_UINT32 vdev_id; /** Vdev ID */
  13515. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  13516. A_UINT32 item; /** 1: UDP, 2: TCP */
  13517. A_UINT32 session; /** Session ID from HOST */
  13518. } wmi_hb_set_enable_cmd_fixed_param;
  13519. typedef struct {
  13520. /** TLV tag and len; tag equals
  13521. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  13522. A_UINT32 tlv_header; /** TLV header*/
  13523. A_UINT32 vdev_id; /** Vdev ID */
  13524. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  13525. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  13526. A_UINT32 seq; /** TCP Sequence no */
  13527. A_UINT32 src_port; /** Source port */
  13528. A_UINT32 dst_port; /** Destination port */
  13529. A_UINT32 interval; /** Keep alive interval */
  13530. A_UINT32 timeout; /** Timeout if keep alive fails */
  13531. A_UINT32 session; /** Session ID from HOST */
  13532. wmi_mac_addr gateway_mac; /** Server Mac Address */
  13533. } wmi_hb_set_tcp_params_cmd_fixed_param;
  13534. typedef struct {
  13535. /** TLV tag and len; tag equals
  13536. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  13537. A_UINT32 tlv_header;
  13538. A_UINT32 vdev_id;
  13539. A_UINT32 length;
  13540. A_UINT32 offset;
  13541. A_UINT32 session;
  13542. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  13543. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  13544. typedef struct {
  13545. /** TLV tag and len; tag equals
  13546. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  13547. A_UINT32 tlv_header;
  13548. A_UINT32 vdev_id;
  13549. A_UINT32 srv_ip;
  13550. A_UINT32 dev_ip;
  13551. A_UINT32 src_port;
  13552. A_UINT32 dst_port;
  13553. A_UINT32 interval;
  13554. A_UINT32 timeout;
  13555. A_UINT32 session;
  13556. wmi_mac_addr gateway_mac;
  13557. } wmi_hb_set_udp_params_cmd_fixed_param;
  13558. typedef struct {
  13559. /** TLV tag and len; tag equals
  13560. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  13561. A_UINT32 tlv_header;
  13562. A_UINT32 vdev_id;
  13563. A_UINT32 length;
  13564. A_UINT32 offset;
  13565. A_UINT32 session;
  13566. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  13567. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  13568. /** wlan HB events */
  13569. typedef enum {
  13570. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  13571. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  13572. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  13573. } WMI_HB_WAKEUP_REASON;
  13574. typedef struct {
  13575. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  13576. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13577. A_UINT32 session; /** Session ID from HOST */
  13578. A_UINT32 reason; /** wakeup reason */
  13579. } wmi_hb_ind_event_fixed_param;
  13580. typedef struct {
  13581. /** TLV tag and len; tag equals
  13582. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  13583. A_UINT32 tlv_header; /** TLV Header */
  13584. A_UINT32 vdev_id; /** Vdev ID */
  13585. A_UINT32 session; /** Session number from the HOST */
  13586. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  13587. A_UINT32 dev_ip; /** IPv4 address of the device */
  13588. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  13589. A_UINT32 src_port; /** Source port */
  13590. A_UINT32 dst_port; /** Destination port */
  13591. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  13592. 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 */
  13593. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  13594. retries[15:0]: Number of TCP level retries of OIC ping request */
  13595. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  13596. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  13597. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  13598. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  13599. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  13600. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  13601. TLS version [15:00] */
  13602. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  13603. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  13604. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  13605. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  13606. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  13607. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  13608. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  13609. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  13610. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  13611. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  13612. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  13613. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  13614. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  13615. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  13616. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  13617. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  13618. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  13619. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  13620. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  13621. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  13622. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  13623. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  13624. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  13625. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  13626. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  13627. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  13628. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  13629. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  13630. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  13631. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  13632. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13633. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13634. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13635. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  13636. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  13637. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13638. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13639. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13640. } wmi_oic_ping_offload_params_cmd_fixed_param;
  13641. typedef struct {
  13642. /** TLV tag and len; tag equals
  13643. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  13644. A_UINT32 tlv_header; /** TLV Header*/
  13645. A_UINT32 vdev_id; /** Interface number */
  13646. A_UINT32 session; /** Session ID*/
  13647. A_UINT32 enable; /** 1: Enable , 0: Disable */
  13648. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  13649. /** wlan OIC events */
  13650. typedef enum {
  13651. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  13652. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  13653. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  13654. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  13655. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  13656. } WMI_OIC_WAKEUP_REASON;
  13657. typedef struct {
  13658. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  13659. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13660. A_UINT32 session; /** Session ID from driver */
  13661. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  13662. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  13663. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  13664. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  13665. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  13666. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  13667. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  13668. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  13669. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13670. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13671. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13672. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  13673. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  13674. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  13675. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  13676. } wmi_oic_ping_handoff_event;
  13677. typedef struct {
  13678. /** TLV tag and len; tag equals
  13679. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  13680. A_UINT32 tlv_header; /** TLV Header*/
  13681. A_UINT32 vdev_id; /** Vdev ID */
  13682. A_UINT32 enable; /** 1: Enable 0: Disable*/
  13683. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  13684. A_UINT32 client_ip; /** Device IP address (IPv4) */
  13685. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  13686. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  13687. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  13688. /** WLAN DHCP Lease Renew Events */
  13689. typedef enum {
  13690. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  13691. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  13692. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  13693. } WMI_DHCP_RENEW_WAKEUP_REASON;
  13694. typedef struct {
  13695. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  13696. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  13697. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  13698. } wmi_dhcp_lease_renew_event;
  13699. /** WMI_STA_SMPS_PARAM_CMDID */
  13700. typedef enum {
  13701. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  13702. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  13703. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  13704. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  13705. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  13706. /** RSSI threshold to disable SMPS modes */
  13707. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  13708. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  13709. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  13710. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  13711. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  13712. /** Enable/Disable DTIM 1chRx feature */
  13713. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  13714. } wmi_sta_smps_param;
  13715. typedef struct {
  13716. /** TLV tag and len; tag equals
  13717. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  13718. A_UINT32 tlv_header;
  13719. /** Unique id identifying the VDEV */
  13720. A_UINT32 vdev_id;
  13721. /** SMPS parameter (see wmi_sta_smps_param) */
  13722. A_UINT32 param;
  13723. /** Value of SMPS parameter */
  13724. A_UINT32 value;
  13725. } wmi_sta_smps_param_cmd_fixed_param;
  13726. typedef struct {
  13727. /** TLV tag and len; tag equals
  13728. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  13729. A_UINT32 tlv_header;
  13730. /* TX stats */
  13731. A_UINT32 txBytesPushed;
  13732. A_UINT32 txPacketsPushed;
  13733. /* RX stats */
  13734. A_UINT32 rxBytesRcvd;
  13735. A_UINT32 rxPacketsRcvd;
  13736. A_UINT32 rxTimeTotal;
  13737. /** peer MAC address */
  13738. wmi_mac_addr peer_macaddr;
  13739. } wmi_mcc_sched_sta_traffic_stats;
  13740. typedef struct {
  13741. /** TLV tag and len; tag equals
  13742. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  13743. A_UINT32 tlv_header;
  13744. /** Duration over which the host stats were collected */
  13745. A_UINT32 duration;
  13746. /** Number of stations filled in following stats array */
  13747. A_UINT32 num_sta;
  13748. /* Following this struct are the TLVs:
  13749. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  13750. */
  13751. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  13752. typedef struct
  13753. {
  13754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  13755. /* unique id identifying the VDEV, generated by the caller */
  13756. A_UINT32 vdev_id;
  13757. /*Batch scan enable command parameters*/
  13758. A_UINT32 scanInterval;
  13759. A_UINT32 numScan2Batch;
  13760. A_UINT32 bestNetworks;
  13761. A_UINT32 rfBand;
  13762. A_UINT32 rtt;
  13763. } wmi_batch_scan_enable_cmd_fixed_param;
  13764. typedef struct
  13765. {
  13766. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  13767. A_UINT32 supportedMscan;
  13768. } wmi_batch_scan_enabled_event_fixed_param;
  13769. typedef struct
  13770. {
  13771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  13772. /* unique id identifying the VDEV, generated by the caller */
  13773. A_UINT32 vdev_id;
  13774. A_UINT32 param;
  13775. } wmi_batch_scan_disable_cmd_fixed_param;
  13776. typedef struct
  13777. {
  13778. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  13779. /** unique id identifying the VDEV, generated by the caller */
  13780. A_UINT32 vdev_id;
  13781. A_UINT32 param;
  13782. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  13783. typedef struct
  13784. {
  13785. A_UINT32 tlv_header;
  13786. wmi_mac_addr bssid; /* BSSID */
  13787. wmi_ssid ssid; /* SSID */
  13788. A_UINT32 ch; /* Channel */
  13789. A_UINT32 rssi; /* RSSI or Level */
  13790. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  13791. A_UINT32 timestamp;
  13792. } wmi_batch_scan_result_network_info;
  13793. typedef struct
  13794. {
  13795. A_UINT32 tlv_header;
  13796. A_UINT32 scanId; /* Scan List ID. */
  13797. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  13798. A_UINT32 numNetworksInScanList;
  13799. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  13800. } wmi_batch_scan_result_scan_list;
  13801. #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. */
  13802. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  13803. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  13804. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  13805. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  13806. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  13807. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  13808. #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. */
  13809. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  13810. #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. */
  13811. /*
  13812. * TEMPORARY alias of incorrect old name the correct name.
  13813. * This alias will be removed once all references to the old name have been fixed.
  13814. */
  13815. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  13816. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  13817. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  13818. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  13819. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  13820. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  13821. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  13822. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  13823. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  13824. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  13825. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  13826. #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. */
  13827. #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 */
  13828. #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 */
  13829. #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. */
  13830. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  13831. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  13832. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  13833. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  13834. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  13835. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  13836. typedef struct {
  13837. A_UINT32 tlv_header;
  13838. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  13839. A_UINT32 enable;
  13840. /**LPI snooping mode*/
  13841. A_UINT32 snooping_mode;
  13842. /** LPI interested IEs in snooping context */
  13843. A_UINT32 ie_bitmap;
  13844. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  13845. typedef struct {
  13846. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  13847. /** Scan ID */
  13848. A_UINT32 scan_id;
  13849. /** Scan requestor ID */
  13850. A_UINT32 scan_req_id;
  13851. /** VDEV id(interface) that is requesting scan */
  13852. A_UINT32 vdev_id;
  13853. /** LPI interested IEs in scan context */
  13854. A_UINT32 ie_bitmap;
  13855. /** Scan Priority, input to scan scheduler */
  13856. A_UINT32 scan_priority;
  13857. /** dwell time in msec on active channels */
  13858. A_UINT32 dwell_time_active;
  13859. /** dwell time in msec on passive channels */
  13860. A_UINT32 dwell_time_passive;
  13861. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  13862. A_UINT32 min_rest_time;
  13863. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  13864. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  13865. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  13866. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  13867. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  13868. * irrespective of activity. activity is determined by the idle_time parameter.
  13869. */
  13870. A_UINT32 max_rest_time;
  13871. /** time before sending next set of probe requests.
  13872. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  13873. * The number of probe requests specified depends on the ssid_list and bssid_list
  13874. */
  13875. A_UINT32 repeat_probe_time;
  13876. /** time in msec between 2 consequetive probe requests with in a set. */
  13877. A_UINT32 probe_spacing_time;
  13878. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  13879. A_UINT32 idle_time;
  13880. /** maximum time in msec allowed for scan */
  13881. A_UINT32 max_scan_time;
  13882. /** delay in msec before sending first probe request after switching to a channel */
  13883. A_UINT32 probe_delay;
  13884. /** Scan control flags */
  13885. A_UINT32 scan_ctrl_flags;
  13886. /** Burst duration time in msec*/
  13887. A_UINT32 burst_duration;
  13888. /** # if channels to scan. In the TLV channel_list[] */
  13889. A_UINT32 num_chan;
  13890. /** number of bssids. In the TLV bssid_list[] */
  13891. A_UINT32 num_bssid;
  13892. /** number of ssid. In the TLV ssid_list[] */
  13893. A_UINT32 num_ssids;
  13894. /** number of bytes in ie data. In the TLV ie_data[] */
  13895. A_UINT32 ie_len;
  13896. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  13897. A_UINT32 scan_ctrl_flags_ext;
  13898. /**
  13899. * TLV (tag length value) parameters follow the scan_cmd
  13900. * structure. The TLV's are:
  13901. * A_UINT32 channel_list[];
  13902. * wmi_ssid ssid_list[];
  13903. * wmi_mac_addr bssid_list[];
  13904. * A_UINT8 ie_data[];
  13905. */
  13906. } wmi_lpi_start_scan_cmd_fixed_param;
  13907. typedef struct {
  13908. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  13909. /** Scan requestor ID */
  13910. A_UINT32 scan_req_id;
  13911. /** Scan ID */
  13912. A_UINT32 scan_id;
  13913. /**
  13914. * Req Type
  13915. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  13916. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  13917. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  13918. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  13919. */
  13920. A_UINT32 req_type;
  13921. /**
  13922. * vDev ID
  13923. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  13924. */
  13925. A_UINT32 vdev_id;
  13926. } wmi_lpi_stop_scan_cmd_fixed_param;
  13927. typedef enum {
  13928. WMI_LPI_DEVICE_TYPE_AP = 1,
  13929. WMI_LPI_DEVICE_TYPE_P2P = 2,
  13930. WMI_LPI_DEVICE_TYPE_NAN = 3,
  13931. } wmi_lpi_device_type;
  13932. typedef struct
  13933. {
  13934. A_UINT32 tlv_header;
  13935. /** Scan requestor ID */
  13936. A_UINT32 scan_req_id;
  13937. A_UINT32 ie_bitmap;
  13938. A_UINT32 data_len;
  13939. } wmi_lpi_result_event_fixed_param;
  13940. typedef enum {
  13941. /** User scan Request completed */
  13942. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  13943. /** User Request was never serviced */
  13944. WMI_LPI_STATUS_DROPPED_REQ = 1,
  13945. /** Illegal channel Req */
  13946. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  13947. /** Illegal Operation Req */
  13948. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  13949. /** Request Aborted */
  13950. WMI_LPI_STATUS_REQ_ABORTED = 4,
  13951. /** Request Timed Out */
  13952. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  13953. /** Medium Busy, already there
  13954. * is a scan is going on */
  13955. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  13956. /** Extscan is the scan client whose scan complete event is triggered */
  13957. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  13958. } wmi_lpi_staus;
  13959. typedef struct
  13960. {
  13961. A_UINT32 tlv_header;
  13962. wmi_lpi_staus status;
  13963. /** Scan requestor ID */
  13964. A_UINT32 scan_req_id;
  13965. } wmi_lpi_status_event_fixed_param;
  13966. typedef struct
  13967. {
  13968. A_UINT32 tlv_header;
  13969. wmi_mac_addr bssid;
  13970. wmi_ssid ssid;
  13971. A_UINT32 freq;
  13972. A_UINT32 rssi;
  13973. A_UINT32 vdev_id;
  13974. } wmi_lpi_handoff_event_fixed_param;
  13975. typedef struct
  13976. {
  13977. A_UINT32 tlv_header;
  13978. A_UINT32 timestamp; /*timestamp of batch scan event*/
  13979. A_UINT32 numScanLists; /*number of scan in this event*/
  13980. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  13981. } wmi_batch_scan_result_event_fixed_param;
  13982. typedef struct {
  13983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  13984. A_UINT32 vdev_id;
  13985. /* This TLV is followed by p2p_noa_info for vdev :
  13986. * wmi_p2p_noa_info p2p_noa_info;
  13987. */
  13988. } wmi_p2p_noa_event_fixed_param;
  13989. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  13990. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  13991. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  13992. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  13993. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  13994. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  13995. typedef struct {
  13996. /** TLV tag and len; tag equals
  13997. * */
  13998. A_UINT32 tlv_header;
  13999. /** gpip pin number */
  14000. A_UINT32 gpio_pin_num;
  14001. /** gpio interupt type */
  14002. A_UINT32 int_type;
  14003. /** RF radio status */
  14004. A_UINT32 radio_state;
  14005. } wmi_rfkill_mode_param;
  14006. typedef enum {
  14007. WMI_SET_LED_SYS_POWEROFF,
  14008. WMI_SET_LED_SYS_S3_SUSPEND,
  14009. WMI_SET_LED_SYS_S4_S5,
  14010. WMI_SET_LED_SYS_DRIVER_DISABLE,
  14011. WMI_SET_LED_SYS_WAKEUP,
  14012. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  14013. WMI_SET_LED_SYS_POWERON,
  14014. } wmi_led_sys_state_param;
  14015. typedef enum {
  14016. WMI_CONFIG_LED_TO_VDD = 0,
  14017. WMI_CONFIG_LED_TO_GND = 1,
  14018. } wmi_config_led_connect_type;
  14019. typedef enum {
  14020. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  14021. WMI_CONFIG_LED_WITH_BT = 1,
  14022. } wmi_config_led_with_bt_flag;
  14023. typedef enum {
  14024. WMI_CONFIG_LED_DISABLE = 0,
  14025. WMI_CONFIG_LED_ENABLE = 1,
  14026. } wmi_config_led_enable_flag;
  14027. typedef enum {
  14028. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  14029. WMI_CONFIG_LED_HIGH_OFF = 1,
  14030. WMI_CONFIG_LED_HIGH_ON = 2,
  14031. } wmi_config_led_on_flag;
  14032. typedef enum {
  14033. WMI_CONFIG_LED_UNSPECIFIED = 0,
  14034. WMI_CONFIG_LED_ON = 1,
  14035. WMI_CONFIG_LED_OFF = 2,
  14036. WMI_CONFIG_LED_DIM = 3,
  14037. WMI_CONFIG_LED_BLINK = 4,
  14038. WMI_CONFIG_LED_TXRX = 5,
  14039. } wmi_config_led_operation_type;
  14040. typedef struct {
  14041. /** TLV tag and len; tag equals
  14042. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  14043. A_UINT32 tlv_header;
  14044. /* Set GPIO pin */
  14045. A_UINT32 led_gpio_pin;
  14046. /* Set connect type defined in wmi_config_led_connect_type */
  14047. A_UINT32 connect_type;
  14048. /* Set flag defined in wmi_config_led_with_bt_flag*/
  14049. A_UINT32 with_bt;
  14050. /* Set LED enablement defined in wmi_config_led_enable_flag */
  14051. A_UINT32 led_enable;
  14052. /** pdev_id for identifying the MAC
  14053. * See macros starting with WMI_PDEV_ID_ for values.
  14054. */
  14055. A_UINT32 pdev_id;
  14056. /* see wmi_config_led_operation_type enum */
  14057. A_UINT32 led_operation_type;
  14058. /* see wmi_config_led_on_flag enum */
  14059. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  14060. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  14061. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  14062. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  14063. } wmi_pdev_set_led_config_cmd_fixed_param;
  14064. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  14065. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  14066. /** WMI_PEER_INFO_REQ_CMDID
  14067. * Request FW to provide peer info */
  14068. typedef struct {
  14069. /** TLV tag and len; tag equals
  14070. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  14071. A_UINT32 tlv_header;
  14072. /** In order to get the peer info for a single peer, host shall
  14073. * issue the peer_mac_address of that peer. For getting the
  14074. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  14075. * address. The firmware will return the peer info for all the
  14076. * peers on the specified vdev_id */
  14077. wmi_mac_addr peer_mac_address;
  14078. /** vdev id */
  14079. A_UINT32 vdev_id;
  14080. } wmi_peer_info_req_cmd_fixed_param;
  14081. typedef struct {
  14082. /** TLV tag and len; tag equals
  14083. * WMITLV_TAG_STRUC_wmi_peer_info */
  14084. A_UINT32 tlv_header;
  14085. /** mac addr of the peer */
  14086. wmi_mac_addr peer_mac_address;
  14087. /** data_rate of the peer */
  14088. A_UINT32 data_rate;
  14089. /** rssi of the peer */
  14090. A_UINT32 rssi;
  14091. /** tx fail count */
  14092. A_UINT32 tx_fail_cnt;
  14093. } wmi_peer_info;
  14094. /** FW response with the peer info */
  14095. typedef struct {
  14096. /** TLV tag and len; tag equals
  14097. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  14098. A_UINT32 tlv_header;
  14099. /** number of peers in peer_info */
  14100. A_UINT32 num_peers;
  14101. /* Set to 1 only if vdev_id field is valid */
  14102. A_UINT32 valid_vdev_id;
  14103. /* VDEV to which the peer belongs to */
  14104. A_UINT32 vdev_id;
  14105. /* This TLV is followed by another TLV of array of structs
  14106. * wmi_peer_info peer_info[];
  14107. */
  14108. } wmi_peer_info_event_fixed_param;
  14109. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  14110. * Request FW to provide peer info */
  14111. typedef struct {
  14112. /** TLV tag and len; tag equals
  14113. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  14114. A_UINT32 tlv_header;
  14115. /** In order to get the peer antdiv info for a single peer, host shall
  14116. * issue the peer_mac_address of that peer. For getting the
  14117. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  14118. * address. The firmware will return the peer info for all the
  14119. * peers on the specified vdev_id */
  14120. wmi_mac_addr peer_mac_address;
  14121. /** vdev id */
  14122. A_UINT32 vdev_id;
  14123. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  14124. /** FW response with the peer antdiv info */
  14125. typedef struct {
  14126. /** TLV tag and len; tag equals
  14127. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  14128. A_UINT32 tlv_header;
  14129. /** number of peers in peer_info */
  14130. A_UINT32 num_peers;
  14131. /* VDEV to which the peer belongs to */
  14132. A_UINT32 vdev_id;
  14133. /* This TLV is followed by another TLV of array of structs
  14134. * wmi_peer_antdiv_info peer_antdiv_info[];
  14135. */
  14136. } wmi_peer_antdiv_info_event_fixed_param;
  14137. typedef struct {
  14138. /** TLV tag and len; tag equals
  14139. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  14140. A_UINT32 tlv_header;
  14141. /** mac addr of the peer */
  14142. wmi_mac_addr peer_mac_address;
  14143. /** per chain rssi of the peer, for up to 8 chains.
  14144. * Each chain's entry reports the RSSI for different bandwidths:
  14145. * bits 7:0 -> primary 20 MHz
  14146. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  14147. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  14148. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  14149. * Each of these 8-bit RSSI reports is in dB units, with respect to
  14150. * the noise floor.
  14151. * 0x80 means invalid.
  14152. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  14153. * All unused chain_rssi indices shall be set to 0x80808080.
  14154. */
  14155. A_INT32 chain_rssi[8];
  14156. } wmi_peer_antdiv_info;
  14157. typedef struct {
  14158. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  14159. /** tid_number */
  14160. A_UINT32 tid_num;
  14161. /** msduq_mask to set the value
  14162. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  14163. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  14164. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  14165. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  14166. * rest of bits are reserved and set to 0.
  14167. */
  14168. A_UINT32 msduq_update_mask;
  14169. /** Qdepth threshold value
  14170. * If number of msdus in a queue excess over qdepth_thresh_value value
  14171. * while queuing msdu's then we drop new msdus.
  14172. * (Though dropping older (stale) data rather than newer data might be
  14173. * preferable, the dropping is performed by MAC HW, and theres no option
  14174. * to configure the HW to do head dropping rather than tail dropping.)
  14175. */
  14176. A_UINT32 qdepth_thresh_value;
  14177. } wmi_msduq_qdepth_thresh_update;
  14178. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  14179. * Request FW to update msduq qdepth threshold per TID per peer */
  14180. typedef struct {
  14181. /** TLV tag and len; tag equals
  14182. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  14183. */
  14184. A_UINT32 tlv_header;
  14185. /** pdev id
  14186. * The pdev_id can be determined from the vdev_id, but the pdev_id
  14187. * is explicitly provided so it can be used for sanity checking.
  14188. */
  14189. A_UINT32 pdev_id;
  14190. /** vdev id */
  14191. A_UINT32 vdev_id;
  14192. /**
  14193. * To set the peer msduq qdepth threshold update for a single peer,
  14194. * the host shall send mac address for which peer need to be updated.
  14195. */
  14196. wmi_mac_addr peer_mac_address;
  14197. /** number of payload update tlvs */
  14198. A_UINT32 num_of_msduq_updates;
  14199. /** Followed by the variable length TLV msduq_qdepth_updates:
  14200. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  14201. */
  14202. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  14203. /**
  14204. * ACK policy to be followed for the TID
  14205. */
  14206. typedef enum {
  14207. /** Used when the host does not want to configure the ACK policy */
  14208. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  14209. /** Allow ACK for the TID */
  14210. WMI_PEER_TID_CONFIG_ACK,
  14211. /** Do not expect ACK for the TID */
  14212. WMI_PEER_TID_CONFIG_NOACK,
  14213. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  14214. /**
  14215. * Aggregation control policy for the TID
  14216. */
  14217. typedef enum {
  14218. /** Used when the host does not want to configure the aggregation policy */
  14219. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  14220. /** Enable aggregation for the TID */
  14221. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  14222. /** Disable aggregation for the TID */
  14223. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  14224. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  14225. /**
  14226. * Rate control policy for the TID
  14227. */
  14228. typedef enum {
  14229. /** Used when the host does not want to configure the rate control policy */
  14230. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  14231. /** Auto rate control */
  14232. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  14233. /** Fixed rate control */
  14234. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  14235. /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */
  14236. WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
  14237. /**
  14238. * Set the highest rate cap allowed for this TID.
  14239. * Rate cap is specified in rate code format,
  14240. * i.e. NSS and MCS combined as shown below:
  14241. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  14242. * b'3-b'0 indicate the MCS
  14243. */
  14244. WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
  14245. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  14246. /**
  14247. * SW retry threshold for the TID
  14248. */
  14249. typedef enum {
  14250. /** Used when the host does not want to configure the SW retry threshold */
  14251. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  14252. WMI_PEER_TID_SW_RETRY_MIN = 1,
  14253. WMI_PEER_TID_SW_RETRY_MAX = 30,
  14254. /** No SW retry for the TID */
  14255. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  14256. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  14257. /*
  14258. * values for tid_config_supported_bitmap field,
  14259. * in wmi_peer_tid_configurations_cmd structure.
  14260. */
  14261. typedef enum {
  14262. /* Used to indicate that disable_rts_cts field is valid */
  14263. WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001,
  14264. } WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP;
  14265. /**
  14266. * Command format for the TID configuration
  14267. */
  14268. typedef struct {
  14269. /** TLV tag and len; tag equals
  14270. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  14271. */
  14272. A_UINT32 tlv_header;
  14273. /** vdev id */
  14274. A_UINT32 vdev_id;
  14275. /** peer MAC address */
  14276. wmi_mac_addr peer_mac_address;
  14277. /** TID number, generated by the caller.
  14278. * Valid range for QoS TID : 0-15
  14279. * Valid range for non QOS/Mgmt TID: 16-19
  14280. * Any other TID number is invalid.
  14281. */
  14282. A_UINT32 tid_num;
  14283. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  14284. A_UINT32 ack_policy;
  14285. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  14286. A_UINT32 aggr_control;
  14287. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  14288. A_UINT32 rate_control;
  14289. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  14290. * This is applicable only when rate_control is
  14291. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  14292. */
  14293. A_UINT32 rcode_rcflags;
  14294. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  14295. * This SW retry threshold limits the total number of retransmits of
  14296. * nacked or unacked MPDUs, but it is up to the FW to decide what
  14297. * tx rate to use during each retransmission.
  14298. */
  14299. A_UINT32 sw_retry_threshold;
  14300. /*--- Start of extended structure ---*/
  14301. /* Bitmap to indicate which fields in the extended structure are valid.
  14302. * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP
  14303. */
  14304. A_UINT32 tid_config_supported_bitmap;
  14305. /* Knob to enable/disable RTS/CTS per TID */
  14306. A_UINT32 disable_rts_cts;
  14307. } wmi_peer_tid_configurations_cmd_fixed_param;
  14308. /* The below enable/disable macros are used for both per peer CFR capture
  14309. * control (as in wmi_peer_cfr_capture_cmd) and control of the entire periodic
  14310. * CFR capture feature (as in WMI_PDEV_PARAM_PER_PEER_PERIODIC_CFR_ENABLE)
  14311. */
  14312. #define WMI_PEER_CFR_CAPTURE_ENABLE 1
  14313. #define WMI_PEER_CFR_CAPTURE_DISABLE 0
  14314. #define WMI_PEER_CFR_ONE_SHOT_REQUEST 0
  14315. #define WMI_PEER_CFR_PERIODICITY_MIN 10 /* 10ms */
  14316. #define WMI_PEER_CFR_PERIODICITY_MAX 10*60*1000 /* 10 minutes */
  14317. /* Bandwidth of peer CFR captures */
  14318. typedef enum {
  14319. WMI_PEER_CFR_CAPTURE_BW_20MHZ = 0,
  14320. WMI_PEER_CFR_CAPTURE_BW_40MHZ = 1,
  14321. WMI_PEER_CFR_CAPTURE_BW_80MHZ = 2,
  14322. WMI_PEER_CFR_CAPTURE_BW_160MHZ = 3,
  14323. WMI_PEER_CFR_CAPTURE_BW_80_80MHZ = 4,
  14324. WMI_PEER_CFR_CAPTURE_BW_MAX,
  14325. } WMI_PEER_CFR_CAPTURE_BW;
  14326. /* Peer CFR capture method */
  14327. typedef enum {
  14328. /* Send null frame on the requested bw and capture CFR on ACK */
  14329. WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0,
  14330. /* New methods to be added here */
  14331. WMI_PEER_CFR_CAPTURE_METHOD_MAX,
  14332. } WMI_PEER_CFR_CAPTURE_METHOD;
  14333. /*
  14334. * Peer command structure to configure the CFR capture
  14335. */
  14336. typedef struct {
  14337. /** TLV tag and len; tag equals
  14338. * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param
  14339. */
  14340. A_UINT32 tlv_header;
  14341. /* WMI_PEER_CFR_CAPTURE_ENABLE: Enable CFR capture for the peer
  14342. * WMI_PEER_CFR_CAPTURE_DISABLE: Disable CFR capture for the peer
  14343. */
  14344. A_UINT32 request;
  14345. /* Peer MAC address. In AP mode, this is the address of the connected peer
  14346. * for which CFR capture is needed. In case of STA mode, this is the address
  14347. * of the AP to which the STA is connected
  14348. */
  14349. wmi_mac_addr mac_addr;
  14350. /* vdev id */
  14351. A_UINT32 vdev_id;
  14352. /* Periodicity of measurement in ms.
  14353. * WMI_PEER_CFR_ONE_SHOT_REQUEST: One-shot request i.e., Only one CFR
  14354. * capture for the request and no periodic CFR captures.
  14355. * The min value is WMI_PEER_CFR_PERIODICITY_MIN
  14356. * The max value is WMI_PEER_CFR_PERIODICITY_MAX
  14357. */
  14358. A_UINT32 periodicity;
  14359. /* BW of measurement - of type WMI_PEER_CFR_CAPTURE_BW */
  14360. A_UINT32 bandwidth;
  14361. /* Method used to capture CFR - of type WMI_PEER_CFR_CAPTURE_METHOD */
  14362. A_UINT32 capture_method;
  14363. } wmi_peer_cfr_capture_cmd_fixed_param;
  14364. typedef enum {
  14365. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  14366. WMI_PEER_IND_OMN, /* operating mode notification */
  14367. WMI_PEER_IND_OMI, /* operating mode indication */
  14368. } WMI_PEER_OPER_MODE_IND;
  14369. typedef struct {
  14370. /** TLV tag and len; tag equals
  14371. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  14372. A_UINT32 tlv_header;
  14373. /** mac addr of the peer */
  14374. wmi_mac_addr peer_mac_address;
  14375. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  14376. A_UINT32 ind_type;
  14377. /** new_rxnss valid for all peer_operating mode ind. */
  14378. A_UINT32 new_rxnss;
  14379. /** new_bw valid for peer_operating mode ind. OMN/OMI
  14380. * value of this bw is as per 11ax/ac standard:
  14381. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  14382. */
  14383. A_UINT32 new_bw;
  14384. /** new_txnss valid for peer_operating mode ind. OMI */
  14385. A_UINT32 new_txnss;
  14386. /** new_disablemu: disable mu mode
  14387. * valid for peer_operating mode ind. OMI
  14388. */
  14389. A_UINT32 new_disablemu;
  14390. } wmi_peer_oper_mode_change_event_fixed_param;
  14391. /** FW response when tx failure count has reached threshold
  14392. * for a peer */
  14393. typedef struct {
  14394. /** TLV tag and len; tag equals
  14395. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  14396. A_UINT32 tlv_header;
  14397. /** vdev id*/
  14398. A_UINT32 vdev_id;
  14399. /** mac address */
  14400. wmi_mac_addr peer_mac_address;
  14401. /** tx failure count - will eventually be removed and not used */
  14402. A_UINT32 tx_fail_cnt;
  14403. /** seq number of the nth tx_fail_event */
  14404. A_UINT32 seq_no;
  14405. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  14406. enum wmi_rmc_mode {
  14407. /** Disable RMC */
  14408. WMI_RMC_MODE_DISABLED = 0,
  14409. /** Enable RMC */
  14410. WMI_RMC_MODE_ENABLED = 1,
  14411. };
  14412. /** Enable RMC transmitter functionality. Upon
  14413. * receiving this, the FW shall mutlicast frames with
  14414. * reliablity. This is a vendor
  14415. * proprietary feature. */
  14416. typedef struct {
  14417. /** TLV tag and len; tag equals
  14418. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  14419. A_UINT32 tlv_header;
  14420. /** vdev id*/
  14421. A_UINT32 vdev_id;
  14422. /** enable_rmc contains values from enum wmi_rmc_mode;
  14423. * Default value: 0 (disabled) */
  14424. A_UINT32 enable_rmc;
  14425. } wmi_rmc_set_mode_cmd_fixed_param;
  14426. /** Configure transmission periodicity of action frames in a
  14427. * RMC network for the multicast transmitter */
  14428. typedef struct {
  14429. /** TLV tag and len; tag equals
  14430. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  14431. A_UINT32 tlv_header;
  14432. /** vdev id */
  14433. A_UINT32 vdev_id;
  14434. /** time period in milliseconds. Default: 300 ms.
  14435. An action frame indicating the current leader is transmitted by the
  14436. RMC transmitter once every 'periodity_msec' */
  14437. A_UINT32 periodicity_msec;
  14438. } wmi_rmc_set_action_period_cmd_fixed_param;
  14439. /** Optimise Leader selection process in RMC functionality. For
  14440. * Enhancement/Debug purposes only */
  14441. typedef struct {
  14442. /** TLV tag and len; tag equals
  14443. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  14444. A_UINT32 tlv_header;
  14445. /** vdev id */
  14446. A_UINT32 vdev_id;
  14447. /** flags ::
  14448. * 0x0001 - Enable beacon averaging
  14449. * 0x0002 - Force leader selection
  14450. * 0x0004 - Enable Timer based leader switch
  14451. * 0x0008 - Use qos/NULL based for multicast reliability */
  14452. A_UINT32 flags;
  14453. /** control leader change timeperiod (in seconds) */
  14454. A_UINT32 peridocity_leader_switch;
  14455. /** control activity timeout value for data rx (in seconds) */
  14456. A_UINT32 data_activity_timeout;
  14457. /** mac address of leader */
  14458. wmi_mac_addr forced_leader_mac_addr;
  14459. } wmi_rmc_config_cmd_fixed_param;
  14460. /** MHF is generally implemented in
  14461. * the kernel. To decrease system power consumption, the
  14462. * driver can enable offloading this to the chipset. In
  14463. * order for the offload, the firmware needs the routing table.
  14464. * The host shall plumb the routing table into FW. The firmware
  14465. * shall perform an IP address lookup and forward the packet to
  14466. * the next hop using next hop's mac address. This is a vendor
  14467. * proprietary feature. */
  14468. enum wmi_mhf_ofl_mode {
  14469. /** Disable MHF offload */
  14470. WMI_MHF_OFL_MODE_DISABLED = 0,
  14471. /** Enable MHF offload */
  14472. WMI_MHF_OFL_MODE_ENABLED = 1,
  14473. };
  14474. typedef struct {
  14475. /** TLV tag and len; tag equals
  14476. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  14477. A_UINT32 tlv_header;
  14478. /** vdev id*/
  14479. A_UINT32 vdev_id;
  14480. /** enable_mhf_ofl contains values from enum
  14481. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  14482. A_UINT32 enable_mhf_ofl;
  14483. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  14484. enum wmi_mhf_ofl_table_action {
  14485. /** Create MHF offload table in FW */
  14486. WMI_MHF_OFL_TBL_CREATE = 0,
  14487. /** Append to existing MHF offload table */
  14488. WMI_MHF_OFL_TBL_APPEND = 1,
  14489. /** Flush entire MHF offload table in FW */
  14490. WMI_MHF_OFL_TBL_FLUSH = 2,
  14491. };
  14492. typedef struct {
  14493. /** TLV tag and len; tag equals
  14494. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  14495. A_UINT32 tlv_header;
  14496. /** vdev id*/
  14497. A_UINT32 vdev_id;
  14498. /** action corresponds to values from enum
  14499. * wmi_mhf_ofl_table_action */
  14500. A_UINT32 action;
  14501. /** number of entries in the table */
  14502. A_UINT32 num_entries;
  14503. /** Followed by the variable length TLV
  14504. * wmi_mhf_offload_routing_table_entry entries[] */
  14505. } wmi_mhf_offload_plumb_routing_table_cmd;
  14506. typedef struct {
  14507. /** TLV tag and len; tag equals
  14508. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  14509. A_UINT32 tlv_header;
  14510. /** Destination node's IP address */
  14511. WMI_IPV4_ADDR dest_ipv4_addr;
  14512. /** Next hop node's MAC address */
  14513. wmi_mac_addr next_hop_mac_addr;
  14514. } wmi_mhf_offload_routing_table_entry;
  14515. enum {
  14516. WMI_DFS_RADAR_PULSE_FLAG_MASK_PSIDX_DIFF_VALID = 0x00000001,
  14517. };
  14518. typedef struct {
  14519. /** tlv tag and len, tag equals
  14520. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  14521. A_UINT32 tlv_header;
  14522. /** full 64 tsf timestamp get from MAC tsf timer indicates
  14523. * the time that the radar event uploading to host, split
  14524. * it to high 32 bit and lower 32 bit in fulltsf_high and
  14525. * full_tsf_low
  14526. */
  14527. A_UINT32 upload_fullts_low;
  14528. A_UINT32 upload_fullts_high;
  14529. /** timestamp indicates the time when DFS pulse is detected
  14530. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  14531. */
  14532. A_UINT32 pulse_detect_ts;
  14533. /** the duaration of the pulse in us */
  14534. A_UINT32 pulse_duration;
  14535. /** the center frequency of the radar pulse detected, KHz */
  14536. A_UINT32 pulse_center_freq;
  14537. /** bandwidth of current DFS channel, MHz */
  14538. A_UINT32 ch_bandwidth;
  14539. /** center channel frequency1 of current DFS channel, MHz */
  14540. A_UINT16 ch_center_freq1;
  14541. /** center channel frequency2 of current DFS channel, MHz,
  14542. * reserved for 160 BW mode
  14543. */
  14544. A_UINT16 ch_center_freq2;
  14545. /** flag to indicate if this pulse is chirp */
  14546. A_UINT8 pulse_is_chirp;
  14547. /** RSSI recorded in the ppdu */
  14548. A_UINT8 rssi;
  14549. /** extened RSSI info */
  14550. A_UINT8 rssi_ext;
  14551. union {
  14552. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  14553. /** pdev_id for identifying the MAC
  14554. * See macros starting with WMI_PDEV_ID_ for values.
  14555. */
  14556. A_UINT8 pdev_id;
  14557. };
  14558. /** index of peak magnitude bin (signed) */
  14559. A_INT32 peak_sidx;
  14560. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  14561. A_INT32 pulse_delta_peak;
  14562. /** Max pulse chirp velocity variance in delta bins */
  14563. A_INT32 pulse_delta_diff;
  14564. /** the difference in the FFT peak index between short FFT and the first long FFT
  14565. * psidx_diff = (first_long_fft_psidx - 4*first_short_fft_psidx),
  14566. */
  14567. A_INT32 psidx_diff;
  14568. /** pulse_flags: see WMI_DFS_RADAR_PULSE_FLAG_MASK enum values
  14569. * 0x0001 - set if psidx_diff is valid
  14570. */
  14571. A_UINT32 pulse_flags;
  14572. } wmi_dfs_radar_event_fixed_param;
  14573. enum {
  14574. /* DEFAULT - target chooses what action to take, based on its thermal
  14575. * management policy
  14576. * Targets which throttle tx (and potentially rx) based on thermal
  14577. * management thresholds specified by the host will shut down tx
  14578. * if the temperature exceeds upper_thresh_degreeC.
  14579. * Targets which simply inform the host about threshold breaches will
  14580. * send a notification message to the host if the temperature exceeds
  14581. * upper_thresh_degreeC.
  14582. * Conversely, if the temperature was above upper_thresh_degreeC but
  14583. * then drops to below lower_threshold_degreeC, the target will either
  14584. * resume tx, or notify the host.
  14585. */
  14586. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  14587. /* HALT_TRAFFIC -
  14588. * If the temperature rises above upper_thresh_degreeC, the target will
  14589. * halt tx.
  14590. * If the temperature falls back below lower_thresh_degreeC, the target
  14591. * will resume tx.
  14592. */
  14593. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  14594. /* NOTIFY_HOST - the target will notify the host if the temperature
  14595. * either rises above upper_thresh_degreeC or falls below
  14596. * lower_thresh_degreeC.
  14597. */
  14598. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  14599. };
  14600. typedef struct {
  14601. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  14602. /*Thermal thresholds*/
  14603. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  14604. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  14605. /*Enable/Disable Thermal Monitoring for Mitigation*/
  14606. A_UINT32 enable;
  14607. /* action: what the target should do when a thermal upper/lower threshold
  14608. * is crossed.
  14609. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  14610. */
  14611. A_UINT32 action;
  14612. A_UINT32 threshold_warning_degreeC;
  14613. A_UINT32 sample_rate_ms;
  14614. } wmi_thermal_mgmt_cmd_fixed_param;
  14615. typedef struct {
  14616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  14617. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  14618. } wmi_thermal_mgmt_event_fixed_param;
  14619. /**
  14620. * This command is sent from WLAN host driver to firmware to
  14621. * request firmware to configure auto shutdown timer in fw
  14622. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  14623. */
  14624. typedef struct {
  14625. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  14626. A_UINT32 timer_value; /** timer value; 0=disable */
  14627. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  14628. enum wmi_host_auto_shutdown_reason {
  14629. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  14630. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  14631. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  14632. };
  14633. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  14634. typedef struct{
  14635. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  14636. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  14637. } wmi_host_auto_shutdown_event_fixed_param;
  14638. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  14639. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  14640. * This command is only used by some customer for verification test. It is not for end-user.
  14641. *
  14642. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  14643. *
  14644. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  14645. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  14646. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  14647. * <channel, ack_offset> pair is unique.
  14648. *
  14649. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  14650. * called basic_config_info by bitmap
  14651. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  14652. *
  14653. * '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
  14654. * is ignored.
  14655. * disable will remove preious conditions from FW.
  14656. * conditions from the later command will over write conditions stored from a previous command.
  14657. *
  14658. */
  14659. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  14660. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  14661. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  14662. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  14663. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  14664. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  14665. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  14666. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  14667. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  14668. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  14669. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  14670. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  14671. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  14672. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  14673. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  14674. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  14675. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  14676. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  14677. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  14678. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  14679. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  14680. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  14681. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  14682. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  14683. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  14684. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  14685. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  14686. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  14687. /** Bit map definition for basic_config_info starts */
  14688. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  14689. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  14690. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  14691. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  14692. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  14693. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  14694. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  14695. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  14696. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  14697. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  14698. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  14699. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  14700. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  14701. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  14702. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  14703. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  14704. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  14705. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  14706. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  14707. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  14708. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  14709. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  14710. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  14711. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  14712. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  14713. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  14714. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  14715. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  14716. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  14717. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  14718. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  14719. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  14720. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  14721. /*
  14722. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  14723. * is temporarily maintained as an alias for the correct name
  14724. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14725. */
  14726. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  14727. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  14728. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14729. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  14730. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  14731. /*
  14732. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  14733. * is temporarily maintained as an alias for the correct name
  14734. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  14735. */
  14736. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  14737. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  14738. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  14739. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  14740. /** Bit map definition for basic_config_info ends */
  14741. typedef struct{
  14742. A_UINT32 tlv_header;
  14743. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  14744. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  14745. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  14746. * 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
  14747. * 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
  14748. * 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
  14749. * Bit16 : band condition b'0: 2G, b'1: 5G
  14750. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  14751. * 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
  14752. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  14753. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  14754. * Bit23 ~ Bit31: reserved
  14755. */
  14756. A_UINT32 basic_config_info;
  14757. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  14758. * it depends on Bit14 of basic_config_info
  14759. * Total 24 channels for 5G
  14760. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  14761. * Total 14 channels for 2G
  14762. * 1 ~ 14
  14763. */
  14764. A_UINT32 channel;
  14765. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  14766. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  14767. * Legacy rates , 11b, 11g, 11A
  14768. * 11n one stream (ht20, ht40) 8+8
  14769. * 11n two streams (ht20, ht40) 8+8
  14770. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  14771. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  14772. */
  14773. A_UINT32 rate0;
  14774. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  14775. * 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
  14776. */
  14777. /** 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
  14778. */
  14779. A_UINT32 rate1;
  14780. } wmi_tpc_chainmask_config;
  14781. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  14782. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  14783. typedef struct{
  14784. A_UINT32 tlv_header;
  14785. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  14786. A_UINT32 num_tpc_chainmask_configs;
  14787. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  14788. } wmi_tpc_chainmask_config_cmd_fixed_param;
  14789. typedef struct {
  14790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  14791. A_UINT32 pdev_id;
  14792. /**
  14793. * Bits 31:0: base address of ring [31:0]
  14794. */
  14795. A_UINT32 base_addr_lo;
  14796. /**
  14797. * Bits 3:0: base address of ring [35:32]
  14798. * Bits 31:4: reserved
  14799. */
  14800. A_UINT32 base_addr_hi;
  14801. /**
  14802. * Bits 31:0: address of head index [31:0]
  14803. */
  14804. A_UINT32 head_idx_addr_lo;
  14805. /**
  14806. * Bits 3:0: address of head index [35:32]
  14807. * Bits 31:4: reserved
  14808. */
  14809. A_UINT32 head_idx_addr_hi;
  14810. /**
  14811. * Bits 31:0: address of tail index [31:0]
  14812. */
  14813. A_UINT32 tail_idx_addr_lo;
  14814. /**
  14815. * Bits 3:0: address of tail index [35:32]
  14816. * Bits 31:4: reserved
  14817. */
  14818. A_UINT32 tail_idx_addr_hi;
  14819. A_UINT32 num_ptr; /** Number of pointers in the ring */
  14820. } wmi_oem_dma_ring_cfg_req_fixed_param;
  14821. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  14822. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  14823. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  14824. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  14825. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  14826. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  14827. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  14828. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  14829. typedef struct {
  14830. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  14831. A_UINT32 pdev_id;
  14832. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  14833. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  14834. typedef struct {
  14835. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  14836. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  14837. /**
  14838. * Bits 31:0: address of data [31:0]
  14839. */
  14840. A_UINT32 addr_lo;
  14841. /**
  14842. * Bits 3:0: address of data [35:32]
  14843. * Bits 11:4: reserved
  14844. * Bits 31:12: opaque host context data [19:0]
  14845. */
  14846. A_UINT32 addr_hi;
  14847. A_UINT32 len; /** Length of data in bytes */
  14848. } wmi_oem_indirect_data;
  14849. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  14850. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  14851. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  14852. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  14853. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  14854. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  14855. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  14856. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  14857. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  14858. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  14859. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  14860. #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)
  14861. typedef struct {
  14862. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  14863. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  14864. } wmi_oem_dma_buf_release_fixed_param;
  14865. typedef struct {
  14866. /**
  14867. * Bits 31:0: address of data [31:0]
  14868. */
  14869. A_UINT32 addr_lo;
  14870. /**
  14871. * Bits 3:0: address of data [35:32]
  14872. * Bits 11:4: reserved
  14873. * Bits 31:12: host context data [19:0]
  14874. */
  14875. A_UINT32 addr_hi;
  14876. } wmi_oem_dma_buf_release_entry;
  14877. typedef struct {
  14878. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  14879. A_UINT32 data_len; /** length in byte of data[]. */
  14880. /* This structure is used to send REQ binary blobs
  14881. * from application/service to firmware where Host drv is pass through .
  14882. * Following this structure is the TLV:
  14883. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14884. */
  14885. } wmi_nan_cmd_param;
  14886. typedef struct {
  14887. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_host_config_param */
  14888. A_UINT32 nan_2g_disc_disable:1; /** This bit when set to 1 indicate NAN 2G discovery should be disabled */
  14889. A_UINT32 nan_5g_disc_disable:1; /** This bit when set to 1 indicate NAN 5G discovery should be disabled */
  14890. A_UINT32 reserved:30;
  14891. } wmi_nan_host_config_param_PROTOTYPE;
  14892. #define wmi_nan_host_config_param wmi_nan_host_config_param_PROTOTYPE
  14893. typedef struct {
  14894. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  14895. A_UINT32 data_len; /** length in byte of data[]. */
  14896. /* This structure is used to send REQ binary blobs
  14897. * from firmware to application/service where Host drv is pass through .
  14898. * Following this structure is the TLV:
  14899. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14900. */
  14901. } wmi_nan_event_hdr;
  14902. typedef struct {
  14903. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */
  14904. A_UINT32 mac_id; /* MAC ID associated with NAN primary discovery channel; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
  14905. A_UINT32 status:1; /** This bit when set to 0 indicates status is successful; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */
  14906. A_UINT32 reserved:31;
  14907. } wmi_nan_event_info_PROTOTYPE;
  14908. #define wmi_nan_event_info wmi_nan_event_info_PROTOTYPE
  14909. /**
  14910. * Event to indicate NAN discovery interface created
  14911. */
  14912. typedef struct {
  14913. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  14914. A_UINT32 tlv_header;
  14915. /** Unique id identifying the VDEV */
  14916. A_UINT32 vdev_id;
  14917. /** NAN interface MAC address */
  14918. wmi_mac_addr nan_interface_macaddr;
  14919. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  14920. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  14921. /**
  14922. * Event to indicate NAN discovery interface deleted
  14923. */
  14924. typedef struct {
  14925. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  14926. A_UINT32 tlv_header;
  14927. /** Unique id identifying the VDEV */
  14928. A_UINT32 vdev_id;
  14929. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  14930. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  14931. /**
  14932. * Event to indicate NAN device started new cluster
  14933. */
  14934. typedef struct {
  14935. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  14936. A_UINT32 tlv_header;
  14937. /** Unique id identifying the VDEV */
  14938. A_UINT32 vdev_id;
  14939. /** NAN Cluster ID */
  14940. A_UINT32 nan_cluster_id;
  14941. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  14942. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  14943. /**
  14944. * Event to indicate NAN device joined to cluster
  14945. */
  14946. typedef struct {
  14947. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  14948. A_UINT32 tlv_header;
  14949. /** Unique id identifying the VDEV */
  14950. A_UINT32 vdev_id;
  14951. /** NAN Cluster ID */
  14952. A_UINT32 nan_cluster_id;
  14953. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  14954. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  14955. /** NAN DATA CMD's */
  14956. /**
  14957. * NAN Data get capabilities req
  14958. */
  14959. typedef struct {
  14960. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  14961. A_UINT32 tlv_header;
  14962. /** unique id generated in upper layer for the transaction */
  14963. A_UINT32 transaction_id;
  14964. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  14965. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  14966. /**
  14967. * NDP Response code
  14968. */
  14969. typedef enum {
  14970. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  14971. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  14972. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  14973. } wmi_ndp_rsp_code_PROTOTYPE;
  14974. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  14975. /**
  14976. * NDP Channel configuration type
  14977. */
  14978. typedef enum {
  14979. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  14980. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  14981. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  14982. } wmi_ndp_channel_cfg_PROTOTYPE;
  14983. /*
  14984. * The WMI_NDP_IPV6_INTF_ADDR_LEN macro cannot be changed without breaking
  14985. * WMI compatibility.
  14986. */
  14987. #define WMI_NDP_IPV6_INTF_ADDR_LEN 16
  14988. typedef struct {
  14989. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_transport_ip_param */
  14990. /* Presence of ipv6_intf_addr */
  14991. A_UINT32 ipv6_addr_present;
  14992. /* Presence of transport Port */
  14993. A_UINT32 trans_port_present;
  14994. /* Presence of transport Protocol */
  14995. A_UINT32 trans_proto_present;
  14996. /* ipv6 Interface address */
  14997. A_UINT8 ipv6_intf_addr[WMI_NDP_IPV6_INTF_ADDR_LEN];
  14998. /* Transport Port */
  14999. A_UINT32 transport_port;
  15000. /* Transport Protocol */
  15001. A_UINT32 transport_protocol;
  15002. } wmi_ndp_transport_ip_param;
  15003. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  15004. typedef struct {
  15005. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_channel_info */
  15006. A_UINT32 mac_id; /* mac_id associated with ndp channel at same index */
  15007. } wmi_ndp_channel_info_PROTOTYPE;
  15008. #define wmi_ndp_channel_info wmi_ndp_channel_info_PROTOTYPE
  15009. typedef struct {
  15010. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_event_param */
  15011. A_UINT32 vdev_id; /* NDI VDEV ID */
  15012. A_UINT32 ndp_termination_in_progress:1; /** This bit when set to 1 indicates to termination of all NDPs associated with NDI vdev ID is started */
  15013. A_UINT32 reserved:31;
  15014. } wmi_ndp_event_param_PROTOTYPE;
  15015. #define wmi_ndp_event_param wmi_ndp_event_param_PROTOTYPE
  15016. /**
  15017. * NDP Initiator requesting a data session
  15018. */
  15019. typedef struct {
  15020. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  15021. A_UINT32 tlv_header;
  15022. /** Unique id identifying the VDEV */
  15023. A_UINT32 vdev_id;
  15024. /** unique id generated in upper layer for the transaction */
  15025. A_UINT32 transaction_id;
  15026. /** Unique Instance Id identifying the Responder's service */
  15027. A_UINT32 service_instance_id;
  15028. /** Discovery MAC addr of the publisher/peer */
  15029. wmi_mac_addr peer_discovery_mac_addr;
  15030. /** Actual number of bytes in TLV ndp_cfg */
  15031. A_UINT32 ndp_cfg_len;
  15032. /** Actual number of bytes in TLV ndp_app_info */
  15033. A_UINT32 ndp_app_info_len;
  15034. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  15035. A_UINT32 ndp_channel_cfg;
  15036. /** NAN Cipher Suite Shared Key */
  15037. A_UINT32 nan_csid;
  15038. /** Actual number of bytes in TLV ndp_pmk */
  15039. A_UINT32 nan_pmk_len;
  15040. /** Actual number of bytes in TLV ndp_passphrase */
  15041. A_UINT32 nan_passphrase_len;
  15042. /** Actual number of bytes in TLV nan_servicename */
  15043. A_UINT32 nan_servicename_len;
  15044. /**
  15045. * TLV (tag length value) parameters follow the ndp_initiator_req
  15046. * structure. The TLV's are:
  15047. * wmi_channel channel;
  15048. * A_UINT8 ndp_cfg[];
  15049. * A_UINT8 ndp_app_info[];
  15050. * A_UINT8 ndp_pmk[];
  15051. * A_INT8 ndp_passphrase[];
  15052. * A_INT8 nan_servicename[];
  15053. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  15054. */
  15055. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  15056. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  15057. /**
  15058. * Initiate a data response on the responder side
  15059. * for data request indication from the peer
  15060. */
  15061. typedef struct {
  15062. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  15063. A_UINT32 tlv_header;
  15064. /** Unique id identifying the VDEV */
  15065. A_UINT32 vdev_id;
  15066. /** unique id generated in upper layer for the transaction */
  15067. A_UINT32 transaction_id;
  15068. /**
  15069. * Unique token Id generated on the initiator/responder
  15070. * side used for a NDP session between two NAN devices
  15071. */
  15072. A_UINT32 ndp_instance_id;
  15073. /** Response Code defined in wmi_ndp_rsp_code */
  15074. A_UINT32 rsp_code;
  15075. /** Number of bytes in TLV ndp_cfg */
  15076. A_UINT32 ndp_cfg_len;
  15077. /** Number of bytes in TLV ndp_app_info */
  15078. A_UINT32 ndp_app_info_len;
  15079. /** NAN Cipher Suite Shared Key */
  15080. A_UINT32 nan_csid;
  15081. /** Actual number of bytes in TLV ndp_pmk */
  15082. A_UINT32 nan_pmk_len;
  15083. /** Actual number of bytes in TLV ndp_passphrase */
  15084. A_UINT32 nan_passphrase_len;
  15085. /** Actual number of bytes in TLV nan_servicename */
  15086. A_UINT32 nan_servicename_len;
  15087. /**
  15088. * TLV (tag length value) parameters follow the ndp_responder_req
  15089. * structure. The TLV's are:
  15090. * A_UINT8 ndp_cfg[];
  15091. * A_UINT8 ndp_app_info[];
  15092. * A_UINT8 ndp_pmk[];
  15093. * A_INT8 ndp_passphrase[];
  15094. * A_INT8 nan_servicename[];
  15095. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  15096. */
  15097. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  15098. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  15099. /**
  15100. * NDP end type
  15101. */
  15102. typedef enum {
  15103. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  15104. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  15105. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  15106. } wmi_ndp_end_type_PROTOTYPE;
  15107. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  15108. /**
  15109. * NDP end reason code
  15110. */
  15111. typedef enum {
  15112. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  15113. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  15114. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  15115. } wmi_ndp_end_reason_code_PROTOTYPE;
  15116. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  15117. /**
  15118. * NDP end request
  15119. */
  15120. typedef struct {
  15121. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  15122. A_UINT32 tlv_header;
  15123. /** NDP instance id */
  15124. A_UINT32 ndp_instance_id;
  15125. } wmi_ndp_end_req_PROTOTYPE;
  15126. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  15127. typedef struct {
  15128. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_cmd_param */
  15129. A_UINT32 vdev_id; /* NDI VDEV ID */
  15130. A_UINT32 ndp_disable:1; /** This bit when set to 1 indicates to terminate all NDPs associated with NDI vdev ID */
  15131. A_UINT32 reserved:31;
  15132. } wmi_ndp_cmd_param_PROTOTYPE;
  15133. #define wmi_ndp_cmd_param wmi_ndp_cmd_param_PROTOTYPE
  15134. /**
  15135. * NDP End request
  15136. */
  15137. typedef struct {
  15138. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  15139. A_UINT32 tlv_header;
  15140. /** unique id generated in upper layer for the transaction */
  15141. A_UINT32 transaction_id;
  15142. /**
  15143. * TLV (tag length value) parameters follow the ndp_end_req
  15144. * structure. The TLV's are:
  15145. * wmi_ndp_end_req ndp_end_req_list[];
  15146. */
  15147. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  15148. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  15149. /* NAN DATA RSP EVENTS */
  15150. /**
  15151. * Event to indicate NAN Data Interface capabilities cmd
  15152. */
  15153. typedef struct {
  15154. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  15155. A_UINT32 tlv_header;
  15156. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  15157. A_UINT32 transaction_id;
  15158. /** Max ndi interface support */
  15159. A_UINT32 max_ndi_interfaces;
  15160. /** Max ndp sessions can support */
  15161. A_UINT32 max_ndp_sessions;
  15162. /** Max number of peer's per ndi */
  15163. A_UINT32 max_peers_per_ndi;
  15164. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  15165. A_UINT32 nan_data_supported_bands;
  15166. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  15167. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  15168. /**
  15169. * NDP command response code
  15170. */
  15171. typedef enum {
  15172. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  15173. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  15174. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  15175. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  15176. /**
  15177. * Event response for wmi_ndp_initiator_req
  15178. */
  15179. typedef struct {
  15180. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  15181. A_UINT32 tlv_header;
  15182. /** Unique id identifying the VDEV */
  15183. A_UINT32 vdev_id;
  15184. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  15185. A_UINT32 transaction_id;
  15186. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  15187. A_UINT32 rsp_status;
  15188. A_UINT32 reason_code;
  15189. /**
  15190. * Unique token Id generated on the initiator/responder
  15191. * side used for a NDP session between two NAN devices
  15192. */
  15193. A_UINT32 ndp_instance_id;
  15194. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  15195. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  15196. /**
  15197. * Event response for wmi_ndp_responder_req cmd
  15198. */
  15199. typedef struct {
  15200. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  15201. A_UINT32 tlv_header;
  15202. /** Unique id identifying the VDEV */
  15203. A_UINT32 vdev_id;
  15204. /** Copy of transaction_id received in wmi_ndp_responder_req */
  15205. A_UINT32 transaction_id;
  15206. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  15207. A_UINT32 rsp_status;
  15208. A_UINT32 reason_code;
  15209. /**
  15210. * Unique token Id generated on the initiator/responder
  15211. * side used for a NDP session between two NAN devices
  15212. */
  15213. A_UINT32 ndp_instance_id;
  15214. /** NDI mac address of the peer */
  15215. wmi_mac_addr peer_ndi_mac_addr;
  15216. /** Host can create peer if this entry is TRUE */
  15217. A_UINT32 create_peer;
  15218. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  15219. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  15220. /**
  15221. * Active ndp instance id
  15222. */
  15223. typedef struct {
  15224. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  15225. A_UINT32 tlv_header;
  15226. /** NDP instance id */
  15227. A_UINT32 ndp_instance_id;
  15228. } wmi_active_ndp_instance_id_PROTOTYPE;
  15229. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  15230. /**
  15231. * NDP end response per ndi
  15232. */
  15233. typedef struct {
  15234. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  15235. A_UINT32 tlv_header;
  15236. /** Unique id identifying the VDEV */
  15237. A_UINT32 vdev_id;
  15238. /** Peer MAC addr */
  15239. wmi_mac_addr peer_mac_addr;
  15240. /** Number of active ndps on this ndi */
  15241. A_UINT32 num_active_ndps_on_ndi;
  15242. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  15243. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  15244. /**
  15245. * Event response for wmi_ndp_end_req cmd
  15246. */
  15247. typedef struct {
  15248. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  15249. A_UINT32 tlv_header;
  15250. /** Copy of transaction_id received in wmi_ndp_end_req */
  15251. A_UINT32 transaction_id;
  15252. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  15253. A_UINT32 rsp_status;
  15254. A_UINT32 reason_code;
  15255. /**
  15256. * TLV (tag length value) parameters follow the ndp_end_rsp
  15257. * structure. The TLV's are:
  15258. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  15259. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  15260. */
  15261. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  15262. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  15263. /** NAN DATA EVENTS */
  15264. /**
  15265. * NDP self role
  15266. */
  15267. typedef enum {
  15268. WMI_NDP_INITIATOR_ROLE,
  15269. WMI_NDP_RESPONDER_ROLE,
  15270. } wmi_ndp_self_role_PROTOTYPE;
  15271. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  15272. /**
  15273. * NDP accept policy
  15274. */
  15275. typedef enum {
  15276. WMI_NDP_ACCEPT_POLICY_NONE,
  15277. WMI_NDP_ACCEPT_POLICY_ALL,
  15278. } wmi_ndp_accept_policy_PROTOTYPE;
  15279. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  15280. /**
  15281. * Event indication received on the responder side when a NDP Initiator request/
  15282. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  15283. *
  15284. * Event indication received on the initiator side when a
  15285. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  15286. */
  15287. typedef struct {
  15288. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  15289. A_UINT32 tlv_header;
  15290. /** Unique id identifying the VDEV */
  15291. A_UINT32 vdev_id;
  15292. /** Self NDP Role defined in wmi_ndp_self_role */
  15293. A_UINT32 self_ndp_role;
  15294. /** Accept policy defined in wmi_ndp_accept_policy */
  15295. A_UINT32 accept_policy;
  15296. /** Unique Instance Id corresponding to a service/session. */
  15297. A_UINT32 service_instance_id;
  15298. /** Discovery MAC addr of the peer/initiator */
  15299. wmi_mac_addr peer_discovery_mac_addr;
  15300. /** NDI mac address of the peer */
  15301. wmi_mac_addr peer_ndi_mac_addr;
  15302. /**
  15303. * Unique token Id generated on the initiator/responder
  15304. * side used for a NDP session between two NAN devices
  15305. */
  15306. A_UINT32 ndp_instance_id;
  15307. /** Number of bytes in TLV wmi_ndp_cfg */
  15308. A_UINT32 ndp_cfg_len;
  15309. /** Number of bytes in TLV wmi_ndp_app_info */
  15310. A_UINT32 ndp_app_info_len;
  15311. /** Peer NAN Cipher Suite Shared Key */
  15312. A_UINT32 nan_csid;
  15313. /** Actual number of bytes in TLV nan_scid */
  15314. A_UINT32 nan_scid_len;
  15315. /** Self NDI mac address */
  15316. wmi_mac_addr self_ndi_mac_addr;
  15317. /**
  15318. * TLV (tag length value) parameters follow the ndp_indication
  15319. * structure. The TLV's are:
  15320. * A_UINT8 ndp_cfg[];
  15321. * A_UINT8 ndp_app_info[];
  15322. * A_UINT8 nan_scid[];
  15323. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  15324. */
  15325. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  15326. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  15327. /**
  15328. * Event indication of data confirm is received on both
  15329. * initiator and responder side confirming a NDP session
  15330. */
  15331. typedef struct {
  15332. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  15333. A_UINT32 tlv_header;
  15334. /** Unique id identifying the VDEV */
  15335. A_UINT32 vdev_id;
  15336. /**
  15337. * Unique token Id generated on the initiator/responder
  15338. * side used for a NDP session between two NAN devices
  15339. */
  15340. A_UINT32 ndp_instance_id;
  15341. /** NDI mac address of the peer (required to derive target ipv6 address) */
  15342. wmi_mac_addr peer_ndi_mac_addr;
  15343. /** Response Code defined in wmi_ndp_rsp_code */
  15344. A_UINT32 rsp_code;
  15345. /** Number of bytes in TLV wmi_ndp_cfg */
  15346. A_UINT32 ndp_cfg_len;
  15347. /** Number of bytes in TLV wmi_ndp_app_info */
  15348. A_UINT32 ndp_app_info_len;
  15349. /** Reason Code */
  15350. A_UINT32 reason_code;
  15351. /** Number of active ndps on this peer */
  15352. A_UINT32 num_active_ndps_on_peer;
  15353. /** Number of channels on this peer */
  15354. A_UINT32 num_ndp_channels;
  15355. /**
  15356. * TLV (tag length value) parameters follow the ndp_confirm
  15357. * structure. The TLV's are:
  15358. * A_UINT8 ndp_cfg[];
  15359. * A_UINT8 ndp_app_info[];
  15360. * wmi_channel ndp_channel_list[];
  15361. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  15362. * // since Nss is associated with the channel
  15363. * wmi_ndp_transport_ip_param ndp_transport_ip_param;
  15364. */
  15365. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  15366. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  15367. /**
  15368. * Event indication received on the initiator/responder side terminating a NDP session
  15369. */
  15370. typedef struct {
  15371. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  15372. A_UINT32 tlv_header;
  15373. /** type defined in wmi_ndp_end_type */
  15374. A_UINT32 type;
  15375. /** Unique id identifying the VDEV */
  15376. A_UINT32 vdev_id;
  15377. /** reason_code defined in wmi_ndp_end_reason_code */
  15378. A_UINT32 reason_code;
  15379. /** NDP instance id */
  15380. A_UINT32 ndp_instance_id;
  15381. /** NDI MAC addr of the peer */
  15382. wmi_mac_addr peer_ndi_mac_addr;
  15383. /** Number of active ndps on this peer */
  15384. A_UINT32 num_active_ndps_on_peer;
  15385. } wmi_ndp_end_indication_PROTOTYPE;
  15386. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  15387. typedef struct
  15388. {
  15389. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  15390. /** Unique id identifying the VDEV */
  15391. A_UINT32 vdev_id;
  15392. /** peer MAC address */
  15393. wmi_mac_addr peer_macaddr;
  15394. /** Flags:
  15395. * Bit 0 -> Nss updated
  15396. * Bit 1 -> channel list updated
  15397. * Bits 2-31 -> Reserved
  15398. */
  15399. A_UINT32 flags;
  15400. /** num of channels */
  15401. A_UINT32 num_channels;
  15402. /** num of ndp instances */
  15403. A_UINT32 num_ndp_instances;
  15404. /**
  15405. * TLV (tag length value) parameters follow the ndl_schedule_update
  15406. * structure. The TLV's are:
  15407. * A_UINT32 ndp_instance_list[];
  15408. * wmi_channel ndl_channel_list[];
  15409. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  15410. * // since Nss is associate with a channel
  15411. */
  15412. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  15413. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  15414. typedef struct {
  15415. A_UINT32 tlv_header;
  15416. A_UINT32 num_data;
  15417. /* followed by WMITLV_TAG_ARRAY_BYTE */
  15418. } wmi_diag_data_container_event_fixed_param;
  15419. enum {
  15420. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  15421. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  15422. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  15423. };
  15424. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  15425. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  15426. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  15427. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  15428. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  15429. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  15430. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  15431. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  15432. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  15433. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  15434. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  15435. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  15436. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  15437. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  15438. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  15439. do { \
  15440. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  15441. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  15442. while (0)
  15443. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  15444. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  15445. /**
  15446. * This command is sent from WLAN host driver to firmware to
  15447. * notify the current modem power state. Host would receive a
  15448. * message from modem when modem is powered on. Host driver
  15449. * would then send this command to firmware. Firmware would then
  15450. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  15451. *
  15452. * This command is only applicable for APQ platform which has
  15453. * modem on the platform. If firmware doesn't support MWS Coex,
  15454. * this command can be dropped by firmware.
  15455. *
  15456. * This is a requirement from modem team that WCN can't toggle
  15457. * UART before modem is powered on.
  15458. */
  15459. typedef struct {
  15460. /** TLV tag and len; tag equals
  15461. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  15462. A_UINT32 tlv_header;
  15463. /** Modem power state parameter */
  15464. A_UINT32 modem_power_state;
  15465. } wmi_modem_power_state_cmd_param;
  15466. enum {
  15467. WMI_MODEM_STATE_OFF = 0,
  15468. WMI_MODEM_STATE_ON
  15469. };
  15470. /**
  15471. * This command is sent from WLAN host driver to firmware to
  15472. * notify the updated Specific Absorption Rate (SAR) limits.
  15473. * A critical regulation for FCC compliance, OEMs require methods to set
  15474. * limits on TX power of WLAN/WWAN.
  15475. * Host would receive instructions on what to set the limits per
  15476. * band/chain/modulation to, it would then interpret and send the limits
  15477. * to FW using this WMI message.
  15478. * Since it is possible to have too many commands to fit into one message,
  15479. * FW will keep receiving the messages, until it finds one with
  15480. * commit_limits = 1, at which point it will apply all the received
  15481. * specifications.
  15482. */
  15483. typedef struct {
  15484. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  15485. A_UINT32 tlv_header;
  15486. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  15487. * with BDF (SET_0 to 4) or WMI
  15488. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  15489. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  15490. */
  15491. A_UINT32 sar_enable;
  15492. /** number of items in sar_limits[] */
  15493. A_UINT32 num_limit_rows;
  15494. /** once received and is set to 1, FW will calculate the power limits
  15495. * and send set_power command to apply them.
  15496. * Otherwise just update local values stored in FW until a future msg
  15497. * with commit_limits=1 arrives.
  15498. */
  15499. A_UINT32 commit_limits;
  15500. /**
  15501. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  15502. * structure. The TLV's are:
  15503. * wmi_sar_limit_cmd_row sar_limits[];
  15504. */
  15505. } wmi_sar_limits_cmd_fixed_param;
  15506. enum wmi_sar_feature_state_flags {
  15507. WMI_SAR_FEATURE_OFF = 0,
  15508. WMI_SAR_FEATURE_ON_SET_0,
  15509. WMI_SAR_FEATURE_ON_SET_1,
  15510. WMI_SAR_FEATURE_ON_SET_2,
  15511. WMI_SAR_FEATURE_ON_SET_3,
  15512. WMI_SAR_FEATURE_ON_SET_4,
  15513. WMI_SAR_FEATURE_NO_CHANGE,
  15514. WMI_SAR_FEATURE_ON_USER_DEFINED,
  15515. WMI_SAR_FEATURE_ON_SAR_V2_0,
  15516. };
  15517. typedef struct {
  15518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  15519. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  15520. * new band_id values .
  15521. */
  15522. A_UINT32 band_id;
  15523. A_UINT32 chain_id;
  15524. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  15525. A_UINT32 mod_id;
  15526. /**
  15527. * To be backwards-compatible with older code use a union with
  15528. * limit_value & limit_index as alternate names / interpretations
  15529. * of the same message information element.
  15530. * The older code still uses limit_value, while the new code will
  15531. * use limit_index.
  15532. * The interpretation of the field as value or index depends on
  15533. * WMI_SAR_FEATURE_ON_*
  15534. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  15535. * still use it as value.
  15536. */
  15537. union {
  15538. /** actual power limit value, in steps of 0.5 dBm */
  15539. A_UINT32 limit_value;
  15540. A_UINT32 limit_index;
  15541. };
  15542. /** in case the OEM doesn't care about one of the qualifiers from above,
  15543. * the bit for that qualifier within the validity_bitmap can be set to 0
  15544. * so that limit is applied to all possible cases of this qualifier
  15545. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  15546. * treated as a wildcard).
  15547. * Current masks:
  15548. * WMI_SAR_BAND_ID_VALID_MASK
  15549. * WMI_SAR_CHAIN_ID_VALID_MASK
  15550. * WMI_SAR_MOD_ID_VALID_MASK
  15551. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  15552. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  15553. * WMI_SAR_MOD_OFDM cases.
  15554. */
  15555. A_UINT32 validity_bitmap;
  15556. } wmi_sar_limit_cmd_row;
  15557. enum wmi_sar_band_id_flags {
  15558. WMI_SAR_2G_ID = 0,
  15559. WMI_SAR_5G_ID
  15560. };
  15561. enum wmi_sar_mod_id_flags {
  15562. WMI_SAR_MOD_CCK = 0,
  15563. WMI_SAR_MOD_OFDM
  15564. };
  15565. /**
  15566. * This message is sent from FW to WLAN host to inform the host of the
  15567. * updated Specific Absorption Rate (SAR) limits currently in use.
  15568. */
  15569. typedef struct {
  15570. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  15571. A_UINT32 tlv_header;
  15572. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  15573. * with BDF (SET_0 to 4) or WMI
  15574. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  15575. */
  15576. A_UINT32 sar_enable;
  15577. /**
  15578. * number of items in sar_limits[].
  15579. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  15580. * Should be zero if any of the BDF sets is activated.
  15581. */
  15582. A_UINT32 num_limit_rows;
  15583. /**
  15584. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  15585. * structure. The TLV's are:
  15586. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  15587. */
  15588. } wmi_sar_get_limits_event_fixed_param;
  15589. typedef struct {
  15590. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  15591. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  15592. * new band_id values .
  15593. */
  15594. A_UINT32 band_id;
  15595. A_UINT32 chain_id;
  15596. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  15597. A_UINT32 mod_id;
  15598. /** actual power limit value, in steps of 0.5 dBm */
  15599. A_UINT32 limit_value;
  15600. } wmi_sar_get_limit_event_row;
  15601. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  15602. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  15603. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  15604. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  15605. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  15606. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  15607. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  15608. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  15609. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  15610. /**
  15611. * This command is sent from WLAN host driver to firmware to
  15612. * get current Specific Absorption Rate (SAR) limits status from firmware.
  15613. * The command does not require any parameters as of now.
  15614. */
  15615. typedef struct {
  15616. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  15617. A_UINT32 tlv_header;
  15618. /** currently no parameters are required. Reserved bit field for future use added */
  15619. /* All bits need to be set to 0 while it is a reserved field. */
  15620. A_UINT32 reserved;
  15621. } wmi_sar_get_limits_cmd_fixed_param;
  15622. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  15623. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  15624. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  15625. generated whenever firmware roamed to new AP silently and
  15626. (a) If the host is awake, FW sends the event to the host immediately .
  15627. (b) If host is in sleep then either
  15628. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  15629. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  15630. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  15631. */
  15632. typedef struct {
  15633. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  15634. A_UINT32 tlv_header;
  15635. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  15636. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  15637. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  15638. } wmi_key_material;
  15639. typedef struct {
  15640. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  15641. /** Unique id identifying the VDEV on which roaming is done by firmware */
  15642. A_UINT32 vdev_id;
  15643. /** auth_status: connected or authorized */
  15644. A_UINT32 auth_status;
  15645. /** roam_reason:
  15646. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  15647. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  15648. * bit 6 for HW mode status, set 1 to indicate host to schedule
  15649. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  15650. */
  15651. A_UINT32 roam_reason;
  15652. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  15653. A_UINT32 rssi;
  15654. /** MAC address of roamed AP */
  15655. wmi_mac_addr bssid; /* BSSID */
  15656. /** whether the frame is beacon or probe rsp */
  15657. A_UINT32 is_beacon;
  15658. /** the length of beacon/probe rsp */
  15659. A_UINT32 bcn_probe_rsp_len;
  15660. /** the length of reassoc rsp */
  15661. A_UINT32 reassoc_rsp_len;
  15662. /** the length of reassoc req */
  15663. A_UINT32 reassoc_req_len;
  15664. /**
  15665. * TLV (tag length value) parameters follows roam_synch_event
  15666. * The TLV's are:
  15667. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  15668. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  15669. * wmi_channel chan;
  15670. * wmi_key_material key;
  15671. * A_UINT32 status; subnet changed status not being used currently.
  15672. * will pass the information using roam_status.
  15673. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  15674. *
  15675. **/
  15676. } wmi_roam_synch_event_fixed_param;
  15677. /**
  15678. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  15679. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  15680. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  15681. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  15682. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  15683. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  15684. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  15685. * reassoc_rsp_len set to 0.
  15686. */
  15687. typedef struct {
  15688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  15689. /** Unique id identifying the VDEV on which roaming is done by firmware */
  15690. A_UINT32 vdev_id;
  15691. /** More frags to follow? */
  15692. A_UINT32 more_frag;
  15693. /** whether the frame is beacon or probe rsp */
  15694. A_UINT32 is_beacon;
  15695. /** the length of beacon/probe rsp */
  15696. A_UINT32 bcn_probe_rsp_len;
  15697. /** the length of reassoc rsp */
  15698. A_UINT32 reassoc_rsp_len;
  15699. /** the length of reassoc req */
  15700. A_UINT32 reassoc_req_len;
  15701. /**
  15702. * TLV (tag length value) parameters follows roam_synch_event
  15703. * The TLV's are:
  15704. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  15705. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  15706. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  15707. */
  15708. } wmi_roam_synch_frame_event_fixed_param;
  15709. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  15710. typedef struct {
  15711. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  15712. A_UINT32 tlv_header;
  15713. /** MAC address of the peer for which the estimated link speed is required. */
  15714. wmi_mac_addr peer_macaddr;
  15715. /* Set to 1 only if vdev_id field is valid */
  15716. A_UINT32 valid_vdev_id;
  15717. /* VDEV to which the peer belongs to */
  15718. A_UINT32 vdev_id;
  15719. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  15720. typedef struct {
  15721. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  15722. A_UINT32 tlv_header;
  15723. /** MAC address of the peer for which the estimated link speed is required.
  15724. */
  15725. wmi_mac_addr peer_macaddr;
  15726. /* Estimated link speed in kbps.
  15727. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  15728. */
  15729. A_UINT32 est_linkspeed_kbps;
  15730. /* Set to 1 only if vdev_id field is valid */
  15731. A_UINT32 valid_vdev_id;
  15732. /* VDEV to which the peer belongs to */
  15733. A_UINT32 vdev_id;
  15734. } wmi_peer_estimated_linkspeed_event_fixed_param;
  15735. typedef struct {
  15736. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  15737. /* vdev ID */
  15738. A_UINT32 vdev_id;
  15739. A_UINT32 data_len; /** length in byte of data[]. */
  15740. /* This structure is used to send REQ binary blobs
  15741. * from application/service to firmware where Host drv is pass through .
  15742. * Following this structure is the TLV:
  15743. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15744. */
  15745. } wmi_req_stats_ext_cmd_fixed_param;
  15746. typedef struct {
  15747. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  15748. A_UINT32 vdev_id; /** vdev ID */
  15749. A_UINT32 data_len; /** length in byte of data[]. */
  15750. /* This structure is used to send REQ binary blobs
  15751. * from firmware to application/service where Host drv is pass through .
  15752. * Following this structure is the TLV:
  15753. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15754. */
  15755. } wmi_stats_ext_event_fixed_param;
  15756. typedef struct {
  15757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  15758. /** unique id identifying the VDEV, generated by the caller */
  15759. A_UINT32 vdev_id;
  15760. /** peer MAC address */
  15761. wmi_mac_addr peer_macaddr;
  15762. } wmi_peer_delete_resp_event_fixed_param;
  15763. typedef struct {
  15764. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  15765. A_UINT32 tlv_header;
  15766. A_UINT32 vdev_id; /* vdev ID */
  15767. /* MAC address of the peer for which the estimated link speed is required.*/
  15768. wmi_mac_addr peer_macaddr;
  15769. A_UINT32 state; /* peer state */
  15770. } wmi_peer_state_event_fixed_param;
  15771. typedef struct {
  15772. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  15773. A_UINT32 tlv_header;
  15774. /* unique id identifying the VDEV, generated by the caller */
  15775. A_UINT32 vdev_id;
  15776. /* peer MAC address */
  15777. wmi_mac_addr peer_macaddr;
  15778. } wmi_peer_assoc_conf_event_fixed_param;
  15779. enum {
  15780. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  15781. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  15782. };
  15783. typedef struct {
  15784. /**
  15785. * TLV tag and len;
  15786. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  15787. */
  15788. A_UINT32 tlv_header;
  15789. A_UINT32 vdev_id;
  15790. /**
  15791. * active or passive. if active all the channels are actively scanned.
  15792. * if passive then all the channels are passively scanned
  15793. */
  15794. A_UINT32 scan_type;
  15795. /**
  15796. * FW can perform multiple scans with in a OBSS scan interval.
  15797. * For each scan,
  15798. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  15799. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  15800. * The unit for these 2 parameters is TUs.
  15801. */
  15802. A_UINT32 obss_scan_passive_dwell;
  15803. A_UINT32 obss_scan_active_dwell;
  15804. /**
  15805. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  15806. * both min and total per channel dwell time requirement
  15807. */
  15808. A_UINT32 bss_channel_width_trigger_scan_interval;
  15809. /**
  15810. * FW can perform multiple scans with in a OBSS scan interval.
  15811. * For each scan,
  15812. * the total per channel dwell time across all scans with in OBSS scan interval should be
  15813. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  15814. * for active scans and ,
  15815. * The unit for these 2 parameters is TUs.
  15816. */
  15817. A_UINT32 obss_scan_passive_total_per_channel;
  15818. A_UINT32 obss_scan_active_total_per_channel;
  15819. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  15820. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  15821. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  15822. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  15823. A_UINT32 current_operating_class; /** STA current operating class */
  15824. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  15825. A_UINT32 channel_len;
  15826. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  15827. A_UINT32 ie_len;
  15828. } wmi_obss_scan_enable_cmd_fixed_param;
  15829. typedef struct {
  15830. /**
  15831. * TLV tag and len;
  15832. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  15833. */
  15834. A_UINT32 tlv_header;
  15835. A_UINT32 vdev_id;
  15836. } wmi_obss_scan_disable_cmd_fixed_param;
  15837. typedef struct {
  15838. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  15839. A_UINT32 tlv_header;
  15840. /** unique id identifying the VDEV */
  15841. A_UINT32 vdev_id;
  15842. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  15843. A_UINT32 tx_status;
  15844. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  15845. typedef enum {
  15846. WMI_FRAME_TX_OK, /* frame tx ok */
  15847. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  15848. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  15849. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  15850. } WMI_FRAME_TX_STATUS;
  15851. /**
  15852. * This command is sent from WLAN host driver to firmware to
  15853. * request firmware to send the latest channel avoidance range
  15854. * to host.
  15855. *
  15856. * This command is only applicable for APQ platform which has
  15857. * modem on the platform. If firmware doesn't support MWS Coex,
  15858. * this command can be dropped by firmware.
  15859. *
  15860. * Host would send this command to firmware to request a channel
  15861. * avoidance information update.
  15862. */
  15863. typedef struct {
  15864. /** TLV tag and len; tag equals
  15865. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  15866. A_UINT32 tlv_header;
  15867. } wmi_chan_avoid_update_cmd_param;
  15868. /* ExtScan operation mode */
  15869. typedef enum {
  15870. WMI_EXTSCAN_MODE_NONE = 0x0000,
  15871. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  15872. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  15873. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  15874. } wmi_extscan_operation_mode;
  15875. /* Channel Mask */
  15876. typedef enum {
  15877. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  15878. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  15879. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  15880. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  15881. } wmi_channel_band_mask;
  15882. typedef enum {
  15883. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  15884. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  15885. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  15886. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  15887. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  15888. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  15889. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  15890. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  15891. WMI_EXTSCAN_EVENT_MAX = 0x8000
  15892. } wmi_extscan_event_type;
  15893. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  15894. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  15895. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  15896. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  15897. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  15898. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  15899. typedef enum {
  15900. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  15901. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  15902. } wmi_extscan_forwarding_flags;
  15903. typedef enum {
  15904. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  15905. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  15906. } wmi_extscan_configuration_flags;
  15907. typedef enum {
  15908. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  15909. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  15910. } wmi_extscan_bucket_configuration_flags;
  15911. typedef enum {
  15912. WMI_EXTSCAN_STATUS_OK = 0,
  15913. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  15914. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  15915. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  15916. } wmi_extscan_start_stop_status;
  15917. typedef struct {
  15918. /** Request ID - to identify command. Cannot be 0 */
  15919. A_UINT32 request_id;
  15920. /** Requestor ID - client requesting ExtScan */
  15921. A_UINT32 requestor_id;
  15922. /** VDEV id(interface) that is requesting scan */
  15923. A_UINT32 vdev_id;
  15924. } wmi_extscan_command_id;
  15925. typedef struct {
  15926. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15927. /** channel number */
  15928. A_UINT32 channel;
  15929. /** dwell time in msec - use defaults if 0 */
  15930. A_UINT32 min_dwell_time;
  15931. A_UINT32 max_dwell_time;
  15932. /** passive/active channel and other flags */
  15933. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  15934. } wmi_extscan_bucket_channel;
  15935. /* Scan Bucket specification */
  15936. typedef struct {
  15937. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15938. /** Bucket ID - 0-based */
  15939. A_UINT32 bucket_id;
  15940. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  15941. A_UINT32 notify_extscan_events;
  15942. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  15943. A_UINT32 forwarding_flags;
  15944. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  15945. A_UINT32 configuration_flags;
  15946. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  15947. A_UINT32 base_period_multiplier;
  15948. /** dwell time in msec on active channels - use defaults if 0 */
  15949. A_UINT32 min_dwell_time_active;
  15950. A_UINT32 max_dwell_time_active;
  15951. /** dwell time in msec on passive channels - use defaults if 0 */
  15952. A_UINT32 min_dwell_time_passive;
  15953. A_UINT32 max_dwell_time_passive;
  15954. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  15955. A_UINT32 channel_band;
  15956. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  15957. A_UINT32 num_channels;
  15958. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  15959. A_UINT32 min_period;
  15960. /** period above which exponent is not applied anymore */
  15961. A_UINT32 max_period;
  15962. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  15963. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  15964. */
  15965. A_UINT32 exp_backoff;
  15966. /** number of scans performed at a given periodicity after which exponential back off value is
  15967. * applied to current periodicity to obtain a newer one
  15968. */
  15969. A_UINT32 exp_max_step_count;
  15970. /** Followed by the variable length TLV chan_list:
  15971. * wmi_extscan_bucket_channel chan_list[] */
  15972. } wmi_extscan_bucket;
  15973. typedef struct {
  15974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  15975. /** Request ID - to identify command. Cannot be 0 */
  15976. A_UINT32 request_id;
  15977. /** Requestor ID - client requesting ExtScan */
  15978. A_UINT32 requestor_id;
  15979. /** VDEV id(interface) that is requesting scan */
  15980. A_UINT32 vdev_id;
  15981. /** table ID - to allow support for multiple simultaneous requests */
  15982. A_UINT32 table_id;
  15983. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  15984. A_UINT32 base_period;
  15985. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  15986. A_UINT32 max_iterations;
  15987. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  15988. A_UINT32 forwarding_flags;
  15989. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  15990. A_UINT32 configuration_flags;
  15991. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  15992. A_UINT32 notify_extscan_events;
  15993. /** Scan Priority, input to scan scheduler */
  15994. A_UINT32 scan_priority;
  15995. /** Maximum number of BSSIDs to cache on each scan cycle */
  15996. A_UINT32 max_bssids_per_scan_cycle;
  15997. /** Minimum RSSI value to report */
  15998. A_UINT32 min_rssi;
  15999. /** Maximum table usage in percentage */
  16000. A_UINT32 max_table_usage;
  16001. /** default dwell time in msec on active channels */
  16002. A_UINT32 min_dwell_time_active;
  16003. A_UINT32 max_dwell_time_active;
  16004. /** default dwell time in msec on passive channels */
  16005. A_UINT32 min_dwell_time_passive;
  16006. A_UINT32 max_dwell_time_passive;
  16007. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  16008. A_UINT32 min_rest_time;
  16009. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  16010. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  16011. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  16012. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  16013. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  16014. * irrespective of activity. activity is determined by the idle_time parameter.
  16015. */
  16016. A_UINT32 max_rest_time;
  16017. /** time before sending next set of probe requests.
  16018. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  16019. * The number of probe requests specified depends on the ssid_list and bssid_list
  16020. */
  16021. /** Max number of probes to be sent */
  16022. A_UINT32 n_probes;
  16023. /** time in msec between 2 sets of probe requests. */
  16024. A_UINT32 repeat_probe_time;
  16025. /** time in msec between 2 consequetive probe requests with in a set. */
  16026. A_UINT32 probe_spacing_time;
  16027. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  16028. A_UINT32 idle_time;
  16029. /** maximum time in msec allowed for scan */
  16030. A_UINT32 max_scan_time;
  16031. /** delay in msec before sending first probe request after switching to a channel */
  16032. A_UINT32 probe_delay;
  16033. /** Scan control flags */
  16034. A_UINT32 scan_ctrl_flags;
  16035. /** Burst duration time in msec*/
  16036. A_UINT32 burst_duration;
  16037. /** number of bssids in the TLV bssid_list[] */
  16038. A_UINT32 num_bssid;
  16039. /** number of ssid in the TLV ssid_list[] */
  16040. A_UINT32 num_ssids;
  16041. /** number of bytes in TLV ie_data[] */
  16042. A_UINT32 ie_len;
  16043. /** number of buckets in the TLV bucket_list[] */
  16044. A_UINT32 num_buckets;
  16045. /** in number of scans, send notifications to host after these many scans */
  16046. A_UINT32 report_threshold_num_scans;
  16047. /** number of channels in channel_list[] determined by the
  16048. sum of wmi_extscan_bucket.num_channels in array */
  16049. /**
  16050. * TLV (tag length value) parameters follow the extscan_cmd
  16051. * structure. The TLV's are:
  16052. * wmi_ssid ssid_list[];
  16053. * wmi_mac_addr bssid_list[];
  16054. * A_UINT8 ie_data[];
  16055. * wmi_extscan_bucket bucket_list[];
  16056. * wmi_extscan_bucket_channel channel_list[];
  16057. */
  16058. } wmi_extscan_start_cmd_fixed_param;
  16059. typedef struct {
  16060. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  16061. /** Request ID - to match running command. 0 matches any request */
  16062. A_UINT32 request_id;
  16063. /** Requestor ID - client requesting stop */
  16064. A_UINT32 requestor_id;
  16065. /** VDEV id(interface) that is requesting scan */
  16066. A_UINT32 vdev_id;
  16067. /** table ID - to allow support for multiple simultaneous requests */
  16068. A_UINT32 table_id;
  16069. } wmi_extscan_stop_cmd_fixed_param;
  16070. enum wmi_extscan_get_cached_results_flags {
  16071. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  16072. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  16073. };
  16074. typedef struct {
  16075. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  16076. /** request ID - used to correlate command with events */
  16077. A_UINT32 request_id;
  16078. /** Requestor ID - client that requested results */
  16079. A_UINT32 requestor_id;
  16080. /** VDEV id(interface) that is requesting scan */
  16081. A_UINT32 vdev_id;
  16082. /** table ID - to allow support for multiple simultaneous requests */
  16083. A_UINT32 table_id;
  16084. /** maximum number of results to be returned */
  16085. A_UINT32 max_results;
  16086. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  16087. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  16088. } wmi_extscan_get_cached_results_cmd_fixed_param;
  16089. typedef struct {
  16090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  16091. /** request ID - used to correlate command with events */
  16092. A_UINT32 request_id;
  16093. /** Requestor ID - client that requested results */
  16094. A_UINT32 requestor_id;
  16095. /** VDEV id(interface) that is requesting scan */
  16096. A_UINT32 vdev_id;
  16097. /** table ID - to allow support for multiple simultaneous requests */
  16098. A_UINT32 table_id;
  16099. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  16100. typedef struct {
  16101. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16102. /**bssid */
  16103. wmi_mac_addr bssid;
  16104. /**channel number */
  16105. A_UINT32 channel;
  16106. /**upper RSSI limit */
  16107. A_UINT32 upper_rssi_limit;
  16108. /**lower RSSI limit */
  16109. A_UINT32 lower_rssi_limit;
  16110. } wmi_extscan_wlan_change_bssid_param;
  16111. typedef struct {
  16112. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  16113. /** Request ID - to identify command. Cannot be 0 */
  16114. A_UINT32 request_id;
  16115. /** Requestor ID - client requesting wlan change monitoring */
  16116. A_UINT32 requestor_id;
  16117. /** VDEV id(interface) that is requesting scan */
  16118. A_UINT32 vdev_id;
  16119. /** table ID - to allow support for multiple simultaneous tables */
  16120. A_UINT32 table_id;
  16121. /** operation mode: start/stop */
  16122. A_UINT32 mode; /* wmi_extscan_operation_mode */
  16123. /** number of rssi samples to store */
  16124. A_UINT32 max_rssi_samples;
  16125. /** number of samples to use to calculate RSSI average */
  16126. A_UINT32 rssi_averaging_samples;
  16127. /** number of scans to confirm loss of contact with RSSI */
  16128. A_UINT32 lost_ap_scan_count;
  16129. /** number of out-of-range BSSIDs necessary to send event */
  16130. A_UINT32 max_out_of_range_count;
  16131. /** total number of bssid signal descriptors (in all pages) */
  16132. A_UINT32 total_entries;
  16133. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  16134. A_UINT32 first_entry_index;
  16135. /** number of bssid signal descriptors in this page */
  16136. A_UINT32 num_entries_in_page;
  16137. /* Following this structure is the TLV:
  16138. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  16139. * (number of elements given by field num_page_entries)
  16140. */
  16141. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  16142. typedef struct {
  16143. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16144. /**bssid */
  16145. wmi_mac_addr bssid;
  16146. /**RSSI min threshold for reporting */
  16147. A_UINT32 min_rssi;
  16148. /**Deprecated entry - channel number */
  16149. A_UINT32 channel;
  16150. /** RSSI max threshold for reporting */
  16151. A_UINT32 max_rssi;
  16152. } wmi_extscan_hotlist_entry;
  16153. typedef struct {
  16154. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  16155. /** Request ID - to identify command. Cannot be 0 */
  16156. A_UINT32 request_id;
  16157. /** Requestor ID - client requesting hotlist monitoring */
  16158. A_UINT32 requestor_id;
  16159. /** VDEV id(interface) that is requesting scan */
  16160. A_UINT32 vdev_id;
  16161. /** table ID - to allow support for multiple simultaneous tables */
  16162. A_UINT32 table_id;
  16163. /** operation mode: start/stop */
  16164. A_UINT32 mode; /* wmi_extscan_operation_mode */
  16165. /** total number of bssids (in all pages) */
  16166. A_UINT32 total_entries;
  16167. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  16168. A_UINT32 first_entry_index;
  16169. /** number of bssids in this page */
  16170. A_UINT32 num_entries_in_page;
  16171. /** number of consecutive scans to confirm loss of contact with AP */
  16172. A_UINT32 lost_ap_scan_count;
  16173. /* Following this structure is the TLV:
  16174. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  16175. */
  16176. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  16177. typedef struct {
  16178. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16179. /**ssid */
  16180. wmi_ssid ssid;
  16181. /**band */
  16182. A_UINT32 band;
  16183. /**RSSI threshold for reporting */
  16184. A_UINT32 min_rssi;
  16185. A_UINT32 max_rssi;
  16186. } wmi_extscan_hotlist_ssid_entry;
  16187. typedef struct {
  16188. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  16189. /** Request ID - to identify command. Cannot be 0 */
  16190. A_UINT32 request_id;
  16191. /** Requestor ID - client requesting hotlist ssid monitoring */
  16192. A_UINT32 requestor_id;
  16193. /** VDEV id(interface) that is requesting scan */
  16194. A_UINT32 vdev_id;
  16195. /** table ID - to allow support for multiple simultaneous tables */
  16196. A_UINT32 table_id;
  16197. /** operation mode: start/stop */
  16198. A_UINT32 mode; /* wmi_extscan_operation_mode */
  16199. /**total number of ssids (in all pages) */
  16200. A_UINT32 total_entries;
  16201. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  16202. A_UINT32 first_entry_index;
  16203. /**number of ssids in this page */
  16204. A_UINT32 num_entries_in_page;
  16205. /** number of consecutive scans to confirm loss of an ssid **/
  16206. A_UINT32 lost_ap_scan_count;
  16207. /* Following this structure is the TLV:
  16208. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  16209. */
  16210. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  16211. typedef struct {
  16212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16213. /** table ID - to allow support for multiple simultaneous tables */
  16214. A_UINT32 table_id;
  16215. /** size in bytes of scan cache entry */
  16216. A_UINT32 scan_cache_entry_size;
  16217. /** maximum number of scan cache entries */
  16218. A_UINT32 max_scan_cache_entries;
  16219. /** maximum number of buckets per extscan request */
  16220. A_UINT32 max_buckets;
  16221. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  16222. A_UINT32 max_bssid_per_scan;
  16223. /** table usage level at which indication must be sent to host */
  16224. A_UINT32 max_table_usage_threshold;
  16225. } wmi_extscan_cache_capabilities;
  16226. typedef struct {
  16227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16228. /** table ID - to allow support for multiple simultaneous tables */
  16229. A_UINT32 table_id;
  16230. /** size in bytes of wlan change entry */
  16231. A_UINT32 wlan_change_entry_size;
  16232. /** maximum number of entries in wlan change table */
  16233. A_UINT32 max_wlan_change_entries;
  16234. /** number of RSSI samples used for averaging RSSI */
  16235. A_UINT32 max_rssi_averaging_samples;
  16236. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  16237. A_UINT32 max_rssi_history_entries;
  16238. } wmi_extscan_wlan_change_monitor_capabilities;
  16239. typedef struct {
  16240. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16241. /** table ID - to allow support for multiple simultaneous tables */
  16242. A_UINT32 table_id;
  16243. /** size in bytes of hotlist entry */
  16244. A_UINT32 wlan_hotlist_entry_size;
  16245. /** maximum number of entries in wlan change table */
  16246. A_UINT32 max_hotlist_entries;
  16247. } wmi_extscan_hotlist_monitor_capabilities;
  16248. typedef struct {
  16249. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  16250. /** Request ID - matches request ID used to start hot list monitoring */
  16251. A_UINT32 request_id;
  16252. /** Requestor ID - client requesting stop */
  16253. A_UINT32 requestor_id;
  16254. /** number of extscan caches */
  16255. A_UINT32 num_extscan_cache_tables;
  16256. /** number of wlan change lists */
  16257. A_UINT32 num_wlan_change_monitor_tables;
  16258. /** number of hotlists */
  16259. A_UINT32 num_hotlist_monitor_tables;
  16260. /** if one sided rtt data collection is supported */
  16261. A_UINT32 rtt_one_sided_supported;
  16262. /** if 11v data collection is supported */
  16263. A_UINT32 rtt_11v_supported;
  16264. /** if 11mc data collection is supported */
  16265. A_UINT32 rtt_ftm_supported;
  16266. /** number of extscan cache capabilities (one per table) */
  16267. A_UINT32 num_extscan_cache_capabilities;
  16268. /** number of wlan change capabilities (one per table) */
  16269. A_UINT32 num_extscan_wlan_change_capabilities;
  16270. /** number of extscan hotlist capabilities (one per table) */
  16271. A_UINT32 num_extscan_hotlist_capabilities;
  16272. /* Following this structure is the TLV:
  16273. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  16274. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  16275. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  16276. */
  16277. } wmi_extscan_set_capabilities_cmd_fixed_param;
  16278. typedef struct {
  16279. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  16280. /** Request ID - matches request ID used to start hot list monitoring */
  16281. A_UINT32 request_id;
  16282. /** Requestor ID - client requesting capabilities */
  16283. A_UINT32 requestor_id;
  16284. } wmi_extscan_get_capabilities_cmd_fixed_param;
  16285. typedef struct {
  16286. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  16287. /** Request ID of the operation that was started/stopped */
  16288. A_UINT32 request_id;
  16289. /** Requestor ID of the operation that was started/stopped */
  16290. A_UINT32 requestor_id;
  16291. /** VDEV id(interface) of the operation that was started/stopped */
  16292. A_UINT32 vdev_id;
  16293. /** extscan WMI command */
  16294. A_UINT32 command;
  16295. /** operation mode: start/stop */
  16296. A_UINT32 mode; /* wmi_extscan_operation_mode */
  16297. /**success/failure */
  16298. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  16299. /** table ID - to allow support for multiple simultaneous requests */
  16300. A_UINT32 table_id;
  16301. } wmi_extscan_start_stop_event_fixed_param;
  16302. typedef struct {
  16303. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  16304. /** Request ID of the extscan operation that is currently running */
  16305. A_UINT32 request_id;
  16306. /** Requestor ID of the extscan operation that is currently running */
  16307. A_UINT32 requestor_id;
  16308. /** VDEV id(interface) of the extscan operation that is currently running */
  16309. A_UINT32 vdev_id;
  16310. /** scan event (wmi_scan_event_type) */
  16311. A_UINT32 event; /* wmi_extscan_event_type */
  16312. /** table ID - to allow support for multiple simultaneous requests */
  16313. A_UINT32 table_id;
  16314. /**number of buckets */
  16315. A_UINT32 num_buckets;
  16316. /* Following this structure is the TLV:
  16317. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  16318. */
  16319. } wmi_extscan_operation_event_fixed_param;
  16320. /* Types of extscan tables */
  16321. typedef enum {
  16322. EXTSCAN_TABLE_NONE = 0,
  16323. EXTSCAN_TABLE_BSSID = 1,
  16324. EXTSCAN_TABLE_RSSI = 2,
  16325. } wmi_extscan_table_type;
  16326. typedef struct {
  16327. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  16328. /** Request ID of the extscan operation that is currently running */
  16329. A_UINT32 request_id;
  16330. /** Requestor ID of the extscan operation that is currently running */
  16331. A_UINT32 requestor_id;
  16332. /** VDEV id(interface) of the extscan operation that is currently running */
  16333. A_UINT32 vdev_id;
  16334. /** table ID - to allow support for multiple simultaneous tables */
  16335. A_UINT32 table_id;
  16336. /**see wmi_extscan_table_type for table reporting usage */
  16337. A_UINT32 table_type;
  16338. /**number of entries in use */
  16339. A_UINT32 entries_in_use;
  16340. /**maximum number of entries in table */
  16341. A_UINT32 maximum_entries;
  16342. } wmi_extscan_table_usage_event_fixed_param;
  16343. typedef enum {
  16344. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  16345. this can be used to discard scan results */
  16346. } wmi_scan_status_flags;
  16347. typedef struct {
  16348. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16349. /** RSSI */
  16350. A_UINT32 rssi;
  16351. /** time stamp in milliseconds */
  16352. A_UINT32 tstamp;
  16353. /** Extscan cycle during which this entry was scanned */
  16354. A_UINT32 scan_cycle_id;
  16355. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  16356. A_UINT32 flags;
  16357. /** Bitmask of buckets (i.e. sets of channels) scanned */
  16358. A_UINT32 buckets_scanned;
  16359. } wmi_extscan_rssi_info;
  16360. typedef struct {
  16361. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16362. /**bssid */
  16363. wmi_mac_addr bssid;
  16364. /**ssid */
  16365. wmi_ssid ssid;
  16366. /**channel number */
  16367. A_UINT32 channel;
  16368. /* capabilities */
  16369. A_UINT32 capabilities;
  16370. /* beacon interval in TUs */
  16371. A_UINT32 beacon_interval;
  16372. /**time stamp in milliseconds - time last seen */
  16373. A_UINT32 tstamp;
  16374. /**flags - _tExtScanEntryFlags */
  16375. A_UINT32 flags;
  16376. /**RTT in ns */
  16377. A_UINT32 rtt;
  16378. /**rtt standard deviation */
  16379. A_UINT32 rtt_sd;
  16380. /* rssi information */
  16381. A_UINT32 number_rssi_samples;
  16382. /** IE length */
  16383. A_UINT32 ie_length; /* length of IE data */
  16384. } wmi_extscan_wlan_descriptor;
  16385. typedef struct {
  16386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  16387. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  16388. A_UINT32 request_id;
  16389. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  16390. A_UINT32 requestor_id;
  16391. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  16392. A_UINT32 vdev_id;
  16393. /** Request ID of the extscan operation that is currently running */
  16394. A_UINT32 extscan_request_id;
  16395. /** Requestor ID of the extscan operation that is currently running */
  16396. A_UINT32 extscan_requestor_id;
  16397. /** VDEV id(interface) of the extscan operation that is currently running */
  16398. A_UINT32 extscan_vdev_id;
  16399. /** table ID - to allow support for multiple simultaneous tables */
  16400. A_UINT32 table_id;
  16401. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  16402. A_UINT32 current_tstamp;
  16403. /**total number of bssids (in all pages) */
  16404. A_UINT32 total_entries;
  16405. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  16406. A_UINT32 first_entry_index;
  16407. /**number of bssids in this page */
  16408. A_UINT32 num_entries_in_page;
  16409. /** number of buckets scanned**/
  16410. A_UINT32 buckets_scanned;
  16411. /* Followed by the variable length TLVs
  16412. * wmi_extscan_wlan_descriptor bssid_list[]
  16413. * wmi_extscan_rssi_info rssi_list[]
  16414. * A_UINT8 ie_list[]
  16415. */
  16416. } wmi_extscan_cached_results_event_fixed_param;
  16417. typedef enum {
  16418. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  16419. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  16420. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  16421. } wmi_extscan_wlan_change_flags;
  16422. typedef struct {
  16423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  16424. /**bssid */
  16425. wmi_mac_addr bssid;
  16426. /**time stamp in milliseconds */
  16427. A_UINT32 tstamp;
  16428. /**upper RSSI limit */
  16429. A_UINT32 upper_rssi_limit;
  16430. /**lower RSSI limit */
  16431. A_UINT32 lower_rssi_limit;
  16432. /** channel */
  16433. A_UINT32 channel; /* in MHz */
  16434. /**current RSSI average */
  16435. A_UINT32 rssi_average;
  16436. /**flags - wmi_extscan_wlan_change_flags */
  16437. A_UINT32 flags;
  16438. /**legnth of RSSI history to follow (number of values) */
  16439. A_UINT32 num_rssi_samples;
  16440. } wmi_extscan_wlan_change_result_bssid;
  16441. typedef struct {
  16442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  16443. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  16444. A_UINT32 request_id;
  16445. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  16446. A_UINT32 requestor_id;
  16447. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  16448. A_UINT32 vdev_id;
  16449. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  16450. A_UINT32 config_request_id;
  16451. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  16452. A_UINT32 config_requestor_id;
  16453. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  16454. A_UINT32 config_vdev_id;
  16455. /** table ID - to allow support for multiple simultaneous tables */
  16456. A_UINT32 table_id;
  16457. /**number of entries with RSSI out of range or BSSID not detected */
  16458. A_UINT32 change_count;
  16459. /**total number of bssid signal descriptors (in all pages) */
  16460. A_UINT32 total_entries;
  16461. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  16462. A_UINT32 first_entry_index;
  16463. /**number of bssids signal descriptors in this page */
  16464. A_UINT32 num_entries_in_page;
  16465. /* Following this structure is the TLV:
  16466. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  16467. * (number of descriptors given by field num_entries_in_page)
  16468. * Following this structure is the list of RSSI values (each is an A_UINT8):
  16469. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  16470. */
  16471. } wmi_extscan_wlan_change_results_event_fixed_param;
  16472. enum _tExtScanEntryFlags
  16473. {
  16474. WMI_HOTLIST_FLAG_NONE = 0x00,
  16475. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  16476. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  16477. };
  16478. typedef struct {
  16479. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  16480. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  16481. A_UINT32 config_request_id;
  16482. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  16483. A_UINT32 config_requestor_id;
  16484. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  16485. A_UINT32 config_vdev_id;
  16486. /** table ID - to allow support for multiple simultaneous tables */
  16487. A_UINT32 table_id;
  16488. /**total number of bssids (in all pages) */
  16489. A_UINT32 total_entries;
  16490. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  16491. A_UINT32 first_entry_index;
  16492. /**number of bssids in this page */
  16493. A_UINT32 num_entries_in_page;
  16494. /* Following this structure is the TLV:
  16495. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  16496. */
  16497. } wmi_extscan_hotlist_match_event_fixed_param;
  16498. typedef struct {
  16499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  16500. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  16501. A_UINT32 config_request_id;
  16502. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  16503. A_UINT32 config_requestor_id;
  16504. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  16505. A_UINT32 config_vdev_id;
  16506. /** table ID - to allow support for multiple simultaneous tables */
  16507. A_UINT32 table_id;
  16508. /**total number of ssids (in all pages) */
  16509. A_UINT32 total_entries;
  16510. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  16511. A_UINT32 first_entry_index;
  16512. /**number of ssids in this page */
  16513. A_UINT32 num_entries_in_page;
  16514. /* Following this structure is the TLV:
  16515. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  16516. */
  16517. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  16518. typedef struct {
  16519. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  16520. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  16521. A_UINT32 request_id;
  16522. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  16523. A_UINT32 requestor_id;
  16524. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  16525. A_UINT32 vdev_id;
  16526. /** number of extscan caches */
  16527. A_UINT32 num_extscan_cache_tables;
  16528. /** number of wlan change lists */
  16529. A_UINT32 num_wlan_change_monitor_tables;
  16530. /** number of hotlists */
  16531. A_UINT32 num_hotlist_monitor_tables;
  16532. /** if one sided rtt data collection is supported */
  16533. A_UINT32 rtt_one_sided_supported;
  16534. /** if 11v data collection is supported */
  16535. A_UINT32 rtt_11v_supported;
  16536. /** if 11mc data collection is supported */
  16537. A_UINT32 rtt_ftm_supported;
  16538. /** number of extscan cache capabilities (one per table) */
  16539. A_UINT32 num_extscan_cache_capabilities;
  16540. /** number of wlan change capabilities (one per table) */
  16541. A_UINT32 num_extscan_wlan_change_capabilities;
  16542. /** number of extscan hotlist capabilities (one per table) */
  16543. A_UINT32 num_extscan_hotlist_capabilities;
  16544. /* max number of roaming ssid whitelist firmware can support */
  16545. A_UINT32 num_roam_ssid_whitelist;
  16546. /* max number of blacklist bssid firmware can support */
  16547. A_UINT32 num_roam_bssid_blacklist;
  16548. /* max number of preferred list firmware can support */
  16549. A_UINT32 num_roam_bssid_preferred_list;
  16550. /* max number of hotlist ssids firmware can support */
  16551. A_UINT32 num_extscan_hotlist_ssid;
  16552. /* max number of epno networks firmware can support */
  16553. A_UINT32 num_epno_networks;
  16554. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  16555. * supports multiple lists of each type.
  16556. *
  16557. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  16558. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  16559. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  16560. */
  16561. } wmi_extscan_capabilities_event_fixed_param;
  16562. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  16563. typedef struct{
  16564. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  16565. A_UINT32 reserved0; /* for future need */
  16566. } wmi_d0_wow_disable_ack_event_fixed_param;
  16567. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  16568. typedef struct {
  16569. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  16570. /** pdev_id for identifying the MAC
  16571. * See macros starting with WMI_PDEV_ID_ for values.
  16572. */
  16573. A_UINT32 pdev_id;
  16574. } wmi_pdev_resume_event_fixed_param;
  16575. /** value representing all modules */
  16576. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  16577. /* param definitions */
  16578. /**
  16579. * Log level for a given module. Value contains both module id and log level.
  16580. * here is the bitmap definition for value.
  16581. * module Id : 16
  16582. * Flags : reserved
  16583. * Level : 8
  16584. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  16585. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  16586. */
  16587. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  16588. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  16589. (val) |= (lvl & 0xff); \
  16590. } while (0)
  16591. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  16592. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  16593. (val) |= ((mid & 0xffff) << 16); \
  16594. } while (0)
  16595. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  16596. /**
  16597. * Enable the debug log for a given vdev. Value is vdev id
  16598. */
  16599. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  16600. /**
  16601. * Disable the debug log for a given vdev. Value is vdev id
  16602. * All the log level for a given VDEV is disabled except the ERROR log messages
  16603. */
  16604. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  16605. /**
  16606. * set vdev enable bitmap. value is the vden enable bitmap
  16607. */
  16608. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  16609. /**
  16610. * set a given log level to all the modules specified in the module bitmap.
  16611. * and set the log levle for all other modules to DBGLOG_ERR.
  16612. * value: log levelt to be set.
  16613. * module_id_bitmap : identifies the modules for which the log level should be set and
  16614. * modules for which the log level should be reset to DBGLOG_ERR.
  16615. */
  16616. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  16617. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  16618. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  16619. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  16620. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  16621. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  16622. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  16623. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  16624. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  16625. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  16626. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  16627. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  16628. typedef struct {
  16629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  16630. A_UINT32 dbg_log_param; /** param types are defined above */
  16631. A_UINT32 value;
  16632. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  16633. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  16634. */
  16635. } wmi_debug_log_config_cmd_fixed_param;
  16636. typedef struct {
  16637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  16638. A_UINT32 param; /* Reserved for future use */
  16639. /** pdev_id for identifying the MAC
  16640. * See macros starting with WMI_PDEV_ID_ for values.
  16641. */
  16642. A_UINT32 pdev_id;
  16643. } wmi_pdev_get_temperature_cmd_fixed_param;
  16644. typedef struct {
  16645. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  16646. A_INT32 value; /* temprature value in Celcius degree */
  16647. /** pdev_id for identifying the MAC
  16648. * See macros starting with WMI_PDEV_ID_ for values.
  16649. */
  16650. A_UINT32 pdev_id;
  16651. } wmi_pdev_temperature_event_fixed_param;
  16652. typedef enum {
  16653. ANTDIV_HW_CFG_STATUS,
  16654. ANTDIV_SW_CFG_STATUS,
  16655. ANTDIV_MAX_STATUS_TYPE_NUM
  16656. } ANTDIV_STATUS_TYPE;
  16657. typedef struct {
  16658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  16659. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  16660. /** pdev_id for identifying the MAC
  16661. * See macros starting with WMI_PDEV_ID_ for values.
  16662. */
  16663. A_UINT32 pdev_id;
  16664. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  16665. typedef struct {
  16666. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  16667. A_UINT32 support; /* ANT DIV feature enabled or not */
  16668. A_UINT32 chain_num; /* how many chain supported */
  16669. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  16670. /*
  16671. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  16672. * the antennas attached to that tx/rx chain.
  16673. */
  16674. A_UINT32 selectable_ant_mask[8];
  16675. /** pdev_id for identifying the MAC
  16676. * See macros starting with WMI_PDEV_ID_ for values.
  16677. */
  16678. A_UINT32 pdev_id;
  16679. } wmi_pdev_antdiv_status_event_fixed_param;
  16680. typedef struct {
  16681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  16682. A_UINT32 vdev_id;
  16683. A_UINT32 enable;
  16684. A_UINT32 srv_ipv4; /* server IP */
  16685. A_UINT32 start_lsb; /* starting address assigned to client */
  16686. A_UINT32 num_client; /* number of clients we support */
  16687. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  16688. typedef enum {
  16689. AP_RX_DATA_OFFLOAD = 0x00,
  16690. STA_RX_DATA_OFFLOAD = 0x01,
  16691. } wmi_ipa_offload_types;
  16692. /**
  16693. * This command is sent from WLAN host driver to firmware for
  16694. * enabling/disabling IPA data-path offload features.
  16695. *
  16696. *
  16697. * Enabling data path offload to IPA(based on host INI configuration), example:
  16698. * when STA interface comes up,
  16699. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  16700. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  16701. *
  16702. * Disabling data path offload to IPA, example:
  16703. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  16704. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  16705. *
  16706. *
  16707. * This command is applicable only on the PCIE LL systems
  16708. *
  16709. */
  16710. typedef struct {
  16711. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  16712. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  16713. A_UINT32 vdev_id;
  16714. A_UINT32 enable; /* 1 == enable, 0 == disable */
  16715. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  16716. typedef enum {
  16717. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  16718. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  16719. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  16720. } wmi_set_led_flashing_type;
  16721. /**
  16722. 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.
  16723. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  16724. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  16725. 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
  16726. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  16727. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  16728. Zero is reached, it is skipped and moves on to the next interval.
  16729. */
  16730. typedef struct{
  16731. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  16732. A_UINT32 pattern_id; /* pattern identifier */
  16733. A_UINT32 led_x0; /* led flashing parameter0 */
  16734. A_UINT32 led_x1; /* led flashing parameter1 */
  16735. A_UINT32 gpio_num; /* GPIO number */
  16736. } wmi_set_led_flashing_cmd_fixed_param;
  16737. /**
  16738. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  16739. * within small networks that do not include a local name server.
  16740. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  16741. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  16742. * global server.
  16743. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  16744. * by type in a specified domain using standard DNS queries.
  16745. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  16746. */
  16747. typedef struct {
  16748. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  16749. A_UINT32 vdev_id;
  16750. A_UINT32 enable;
  16751. } wmi_mdns_offload_cmd_fixed_param;
  16752. #define WMI_MAX_MDNS_FQDN_LEN 64
  16753. #define WMI_MAX_MDNS_RESP_LEN 512
  16754. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  16755. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  16756. typedef struct {
  16757. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  16758. A_UINT32 vdev_id;
  16759. /** type of fqdn, general or unique */
  16760. A_UINT32 type;
  16761. /** length of fqdn */
  16762. A_UINT32 fqdn_len;
  16763. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  16764. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  16765. */
  16766. } wmi_mdns_set_fqdn_cmd_fixed_param;
  16767. typedef struct {
  16768. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  16769. A_UINT32 vdev_id;
  16770. /** Answer Resource Record count */
  16771. A_UINT32 AR_count;
  16772. /** length of response */
  16773. A_UINT32 resp_len;
  16774. /* Following this structure is the TLV byte stream of resp data of length resp_len
  16775. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  16776. */
  16777. } wmi_mdns_set_resp_cmd_fixed_param;
  16778. typedef struct {
  16779. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  16780. A_UINT32 vdev_id;
  16781. } wmi_mdns_get_stats_cmd_fixed_param;
  16782. typedef struct {
  16783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  16784. A_UINT32 vdev_id;
  16785. /** curTimestamp in milliseconds */
  16786. A_UINT32 curTimestamp;
  16787. /** last received Query in milliseconds */
  16788. A_UINT32 lastQueryTimestamp;
  16789. /** last sent Response in milliseconds */
  16790. A_UINT32 lastResponseTimestamp;
  16791. /** stats of received queries */
  16792. A_UINT32 totalQueries;
  16793. /** stats of macth queries */
  16794. A_UINT32 totalMatches;
  16795. /** stats of responses */
  16796. A_UINT32 totalResponses;
  16797. /** indicate the current status of mDNS offload */
  16798. A_UINT32 status;
  16799. } wmi_mdns_stats_event_fixed_param;
  16800. /**
  16801. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  16802. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  16803. * request and create/remove connection even host is suspended.
  16804. * 3 major components are offloaded:
  16805. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  16806. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  16807. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  16808. * Current implementation only supports WPA2 CCMP.
  16809. */
  16810. typedef struct {
  16811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  16812. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  16813. A_UINT32 vdev_id;
  16814. /** enable/disable sap auth offload */
  16815. A_UINT32 enable;
  16816. /** sap ssid */
  16817. wmi_ssid ap_ssid;
  16818. /** authentication mode (defined above) */
  16819. A_UINT32 rsn_authmode;
  16820. /** unicast cipher set */
  16821. A_UINT32 rsn_ucastcipherset;
  16822. /** mcast/group cipher set */
  16823. A_UINT32 rsn_mcastcipherset;
  16824. /** mcast/group management frames cipher set */
  16825. A_UINT32 rsn_mcastmgmtcipherset;
  16826. /** sap channel */
  16827. A_UINT32 channel;
  16828. /** length of psk */
  16829. A_UINT32 psk_len;
  16830. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  16831. * A_UINT8 psk[];
  16832. */
  16833. } wmi_sap_ofl_enable_cmd_fixed_param;
  16834. typedef struct {
  16835. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  16836. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  16837. A_UINT32 vdev_id;
  16838. /** aid (association id) of this station */
  16839. A_UINT32 assoc_id;
  16840. /** peer station's mac addr */
  16841. wmi_mac_addr peer_macaddr;
  16842. /** length of association request frame */
  16843. A_UINT32 data_len;
  16844. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  16845. * A_UINT8 bufp[];
  16846. */
  16847. } wmi_sap_ofl_add_sta_event_fixed_param;
  16848. typedef enum {
  16849. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  16850. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  16851. } wmi_sap_ofl_del_sta_flags;
  16852. typedef struct {
  16853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  16854. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  16855. A_UINT32 vdev_id;
  16856. /** aid (association id) of this station */
  16857. A_UINT32 assoc_id;
  16858. /** peer station's mac addr */
  16859. wmi_mac_addr peer_macaddr;
  16860. /** disassociation reason */
  16861. A_UINT32 reason;
  16862. /** flags - wmi_sap_ofl_del_sta_flags */
  16863. A_UINT32 flags;
  16864. } wmi_sap_ofl_del_sta_event_fixed_param;
  16865. typedef struct {
  16866. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  16867. A_UINT32 vdev_id;
  16868. /* Number of client failure connection attempt */
  16869. A_UINT32 num_retry;
  16870. /* Time in milliseconds to record the client's failure connection attempts */
  16871. A_UINT32 retry_allow_time_ms;
  16872. /* Time in milliseconds to drop the connection request if client is blacklisted */
  16873. A_UINT32 blackout_time_ms;
  16874. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  16875. typedef struct {
  16876. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  16877. A_UINT32 data_len; /** length in byte of data[]. */
  16878. /** This structure is used to send REQ binary blobs
  16879. * from application/service to firmware where Host drv is pass through .
  16880. * Following this structure is the TLV:
  16881. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16882. */
  16883. } wmi_apfind_cmd_param;
  16884. typedef enum apfind_event_type_e {
  16885. APFIND_MATCH_EVENT = 0,
  16886. APFIND_WAKEUP_EVENT,
  16887. } APFIND_EVENT_TYPE;
  16888. typedef struct {
  16889. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  16890. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  16891. A_UINT32 data_len; /** length in byte of data[]. */
  16892. /** This structure is used to send event binary blobs
  16893. * from firmware to application/service and Host drv.
  16894. * Following this structure is the TLV:
  16895. * A_UINT8 data[]; <-- length in byte given by field data_len.
  16896. */
  16897. } wmi_apfind_event_hdr;
  16898. /* SAP obss detection offload types */
  16899. typedef enum {
  16900. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  16901. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  16902. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  16903. } WMI_SAP_OBSS_DETECTION_MODE;
  16904. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  16905. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  16906. A_UINT32 vdev_id;
  16907. A_UINT32 detect_period_ms;
  16908. /* detect whether there is 11b ap/ibss */
  16909. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  16910. /* detect whether there is 11b sta connected with other APs */
  16911. A_UINT32 b_sta_detect_mode;
  16912. /* detect whether there is 11g AP */
  16913. A_UINT32 g_ap_detect_mode;
  16914. /* detect whether there is legacy 11a traffic */
  16915. A_UINT32 a_detect_mode;
  16916. /* detect whether there is ap which is ht legacy mode */
  16917. A_UINT32 ht_legacy_detect_mode;
  16918. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  16919. A_UINT32 ht_mixed_detect_mode;
  16920. /* detect whether there is ap which has 20M only station */
  16921. A_UINT32 ht_20mhz_detect_mode;
  16922. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  16923. typedef enum {
  16924. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  16925. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  16926. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  16927. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  16928. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  16929. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  16930. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  16931. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  16932. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  16933. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  16934. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  16935. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  16936. typedef struct wmi_sap_obss_detection_info_evt_s {
  16937. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  16938. A_UINT32 vdev_id;
  16939. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  16940. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  16941. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  16942. } wmi_sap_obss_detection_info_evt_fixed_param;
  16943. /** WMI command to enable STA FW handle bss color change notification from AP */
  16944. typedef struct {
  16945. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  16946. A_UINT32 vdev_id;
  16947. A_UINT32 enable;
  16948. } wmi_bss_color_change_enable_fixed_param;
  16949. typedef enum {
  16950. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  16951. WMI_BSS_COLOR_COLLISION_DETECTION,
  16952. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  16953. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  16954. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  16955. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  16956. typedef struct {
  16957. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  16958. A_UINT32 vdev_id;
  16959. A_UINT32 flags; /* proposed for future use cases */
  16960. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  16961. A_UINT32 current_bss_color;
  16962. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  16963. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  16964. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  16965. } wmi_obss_color_collision_det_config_fixed_param;
  16966. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  16967. typedef struct {
  16968. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  16969. A_UINT32 vdev_id;
  16970. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  16971. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  16972. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  16973. } wmi_obss_color_collision_evt_fixed_param;
  16974. /**
  16975. * OCB DCC types and structures.
  16976. */
  16977. /**
  16978. * DCC types as described in ETSI TS 102 687
  16979. * Type Format stepSize referenceValue numBits
  16980. * -------------------------------------------------------------------------
  16981. * ndlType_acPrio INTEGER (0...7) 1 number 3
  16982. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  16983. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  16984. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  16985. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  16986. * ndlType_datarate INTEGER (0..7) Table 8 3
  16987. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  16988. * ndlType_numberElements INTEGER (0..63) number 6
  16989. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  16990. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  16991. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  16992. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  16993. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  16994. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  16995. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  16996. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  16997. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  16998. * ndlType_queueStatus Enumeration Table A.2 1
  16999. * ndlType_dccMechanism Bitset Table A.2 6
  17000. *
  17001. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  17002. * cannot be changed without breaking WMI compatibility.
  17003. *
  17004. * NOTE: For each of the types, one additional bit is allocated. This
  17005. * leftmost bit is used to indicate that the value is invalid. */
  17006. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  17007. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  17008. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  17009. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  17010. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  17011. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  17012. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  17013. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  17014. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  17015. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  17016. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  17017. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  17018. #define SIZE_NDLTYPE_SNR (1 + 7)
  17019. #define SIZE_NDLTYPE_TIMING (1 + 12)
  17020. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  17021. #define SIZE_NDLTYPE_RATIO (1 + 7)
  17022. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  17023. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  17024. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  17025. #define SIZE_BYTE (8)
  17026. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  17027. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  17028. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  17029. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  17030. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  17031. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  17032. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  17033. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  17034. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  17035. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  17036. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  17037. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  17038. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  17039. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  17040. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  17041. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  17042. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  17043. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  17044. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  17045. /** The MCS_COUNT macro cannot be modified without breaking
  17046. * WMI compatibility. */
  17047. #define MCS_COUNT (8)
  17048. /** Flags for ndlType_dccMechanism. */
  17049. typedef enum {
  17050. DCC_MECHANISM_TPC = 1,
  17051. DCC_MECHANISM_TRC = 2,
  17052. DCC_MECHANISM_TDC = 4,
  17053. DCC_MECHANISM_DSC = 8,
  17054. DCC_MECHANISM_TAC = 16,
  17055. DCC_MECHANISM_RESERVED = 32,
  17056. DCC_MECHANISM_ALL = 0x3f,
  17057. } wmi_dcc_ndl_type_dcc_mechanism;
  17058. /** Values for ndlType_queueStatus. */
  17059. typedef enum {
  17060. DCC_QUEUE_CLOSED = 0,
  17061. DCC_QUEUE_OPEN = 1,
  17062. } wmi_dcc_ndl_type_queue_status;
  17063. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  17064. /** Values for ndlType_datarate */
  17065. typedef enum {
  17066. DCC_DATARATE_3_MBPS = 0,
  17067. DCC_DATARATE_4_5_MBPS = 1,
  17068. DCC_DATARATE_6_MBPS = 2,
  17069. DCC_DATARATE_9_MBPS = 3,
  17070. DCC_DATARATE_12_MBPS = 4,
  17071. DCC_DATARATE_18_MBPS = 5,
  17072. DCC_DATARATE_24_MBPS = 6,
  17073. DCC_DATARATE_27_MBPS = 7,
  17074. } wmi_dcc_ndl_type_datarate;
  17075. /** Data structure for active state configuration. */
  17076. typedef struct {
  17077. /** TLV tag and len; tag equals
  17078. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  17079. A_UINT32 tlv_header;
  17080. /**
  17081. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  17082. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  17083. */
  17084. A_UINT32 state_info;
  17085. /**
  17086. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  17087. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  17088. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  17089. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  17090. */
  17091. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  17092. /**
  17093. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  17094. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  17095. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  17096. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  17097. */
  17098. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  17099. /**
  17100. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  17101. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  17102. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  17103. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  17104. */
  17105. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  17106. /**
  17107. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  17108. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  17109. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  17110. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  17111. */
  17112. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  17113. /**
  17114. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  17115. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  17116. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  17117. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  17118. */
  17119. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  17120. } wmi_dcc_ndl_active_state_config;
  17121. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  17122. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  17123. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  17124. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  17125. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  17126. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  17127. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  17128. #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)
  17129. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  17130. #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)
  17131. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  17132. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  17133. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  17134. #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)
  17135. /** Data structure for EDCA/QOS parameters. */
  17136. typedef struct
  17137. {
  17138. /** TLV tag and len; tag equals
  17139. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  17140. A_UINT32 tlv_header;
  17141. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  17142. A_UINT32 aifsn;
  17143. /** Contention Window minimum. Range: 1 - 10 */
  17144. A_UINT32 cwmin;
  17145. /** Contention Window maximum. Range: 1 - 10 */
  17146. A_UINT32 cwmax;
  17147. } wmi_qos_parameter;
  17148. /** Data structure for information specific to a channel. */
  17149. typedef struct {
  17150. /** TLV tag and len; tag equals
  17151. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  17152. A_UINT32 tlv_header;
  17153. A_UINT32 bandwidth; /* MHz units */
  17154. wmi_mac_addr mac_address;
  17155. } wmi_ocb_channel;
  17156. /** Data structure for an element of the schedule array. */
  17157. typedef struct {
  17158. /** TLV tag and len; tag equals
  17159. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  17160. A_UINT32 tlv_header;
  17161. A_UINT32 channel_freq; /* MHz units */
  17162. A_UINT32 total_duration; /* ms units */
  17163. A_UINT32 guard_interval; /* ms units */
  17164. } wmi_ocb_schedule_element;
  17165. /** Data structure for OCB configuration. */
  17166. typedef struct {
  17167. /** TLV tag and len; tag equals
  17168. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  17169. A_UINT32 tlv_header;
  17170. /** VDEV id(interface) that is being configured */
  17171. A_UINT32 vdev_id;
  17172. A_UINT32 channel_count;
  17173. A_UINT32 schedule_size;
  17174. A_UINT32 flags;
  17175. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  17176. /** This is followed by a TLV array of wmi_channel. */
  17177. /** This is followed by a TLV array of wmi_ocb_channel. */
  17178. /** This is followed by a TLV array of wmi_qos_parameter. */
  17179. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  17180. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  17181. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  17182. } wmi_ocb_set_config_cmd_fixed_param;
  17183. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  17184. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  17185. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  17186. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  17187. typedef struct {
  17188. /** TLV tag and len; tag equals
  17189. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  17190. A_UINT32 tlv_header;
  17191. /* VDEV identifier */
  17192. A_UINT32 vdev_id;
  17193. A_UINT32 status;
  17194. } wmi_ocb_set_config_resp_event_fixed_param;
  17195. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  17196. WMI compatibility. */
  17197. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  17198. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  17199. /** Data structure to set the UTC time. */
  17200. typedef struct {
  17201. /** TLV tag and len; tag equals
  17202. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  17203. A_UINT32 tlv_header;
  17204. /* VDEV identifier */
  17205. A_UINT32 vdev_id;
  17206. /** 10 bytes of the utc time. */
  17207. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  17208. /** 5 bytes of the time error. */
  17209. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  17210. } wmi_ocb_set_utc_time_cmd_fixed_param;
  17211. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  17212. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  17213. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  17214. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  17215. /** Data structure start the timing advertisement. The template for the
  17216. * timing advertisement frame follows this structure in the WMI command.
  17217. */
  17218. typedef struct {
  17219. /** TLV tag and len; tag equals
  17220. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  17221. A_UINT32 tlv_header;
  17222. /* VDEV identifier */
  17223. A_UINT32 vdev_id;
  17224. /** Number of times the TA is sent every 5 seconds. */
  17225. A_UINT32 repeat_rate;
  17226. /** The frequency on which to transmit. */
  17227. A_UINT32 channel_freq; /* MHz units */
  17228. /** The offset into the template of the timestamp. */
  17229. A_UINT32 timestamp_offset;
  17230. /** The offset into the template of the time value. */
  17231. A_UINT32 time_value_offset;
  17232. /** The length of the timing advertisement template. The
  17233. * template is in the TLV data. */
  17234. A_UINT32 timing_advert_template_length;
  17235. /** This is followed by a binary array containing the TA template. */
  17236. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  17237. /** Data structure to stop the timing advertisement. */
  17238. typedef struct {
  17239. /** TLV tag and len; tag equals
  17240. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  17241. A_UINT32 tlv_header;
  17242. /* VDEV identifier */
  17243. A_UINT32 vdev_id;
  17244. A_UINT32 channel_freq; /* MHz units */
  17245. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  17246. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  17247. typedef struct {
  17248. /** TLV tag and len; tag equals
  17249. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  17250. A_UINT32 tlv_header;
  17251. /* VDEV identifier */
  17252. A_UINT32 vdev_id;
  17253. A_UINT32 reserved;
  17254. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  17255. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  17256. typedef struct {
  17257. /** TLV tag and len; tag equals
  17258. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  17259. A_UINT32 tlv_header;
  17260. /* VDEV identifier */
  17261. A_UINT32 vdev_id;
  17262. A_UINT32 tsf_timer_high;
  17263. A_UINT32 tsf_timer_low;
  17264. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  17265. /** Data structure for DCC stats configuration per channel. */
  17266. typedef struct {
  17267. /** TLV tag and len; tag equals
  17268. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  17269. A_UINT32 tlv_header;
  17270. /** The channel for which this applies, 16 bits. */
  17271. /** The dcc_stats_bitmap, 8 bits. */
  17272. A_UINT32 chan_info;
  17273. /** Demodulation model parameters. */
  17274. /**
  17275. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  17276. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  17277. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  17278. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  17279. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  17280. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  17281. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  17282. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  17283. */
  17284. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  17285. /** Communication ranges. */
  17286. /**
  17287. * tx_power, ndlType_txPower, 1+7 bits.
  17288. * datarate, ndlType_datarate, 1+3 bits.
  17289. */
  17290. A_UINT32 tx_power_datarate;
  17291. /**
  17292. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  17293. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  17294. */
  17295. A_UINT32 carrier_sense_est_comm_range;
  17296. /** Channel load measures. */
  17297. /**
  17298. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  17299. * carrierSense, ndlType_rxPower, 1+7 bits.
  17300. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  17301. */
  17302. A_UINT32 dcc_stats;
  17303. /**
  17304. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  17305. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  17306. */
  17307. A_UINT32 packet_stats;
  17308. /**
  17309. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  17310. */
  17311. A_UINT32 channel_busy_time;
  17312. /** Transmit packet statistics. */
  17313. /**
  17314. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  17315. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  17316. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  17317. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  17318. */
  17319. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  17320. /**
  17321. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  17322. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  17323. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  17324. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  17325. */
  17326. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  17327. /**
  17328. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  17329. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  17330. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  17331. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  17332. */
  17333. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  17334. /**
  17335. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  17336. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  17337. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  17338. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  17339. */
  17340. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  17341. } wmi_dcc_ndl_stats_per_channel;
  17342. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  17343. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  17344. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  17345. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  17346. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  17347. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  17348. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  17349. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  17350. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  17351. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  17352. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  17353. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  17354. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  17355. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  17356. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  17357. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  17358. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  17359. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  17360. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  17361. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  17362. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  17363. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  17364. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  17365. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  17366. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  17367. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  17368. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  17369. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  17370. #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)
  17371. #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)
  17372. #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)
  17373. #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)
  17374. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  17375. #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)
  17376. #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)
  17377. #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)
  17378. /** Bitmap for DCC stats. */
  17379. typedef enum {
  17380. DCC_STATS_DEMODULATION_MODEL = 1,
  17381. DCC_STATS_COMMUNICATION_RANGES = 2,
  17382. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  17383. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  17384. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  17385. DCC_STATS_ALL = 0xff,
  17386. } wmi_dcc_stats_bitmap;
  17387. /** Data structure for getting the DCC stats. */
  17388. typedef struct {
  17389. /** TLV tag and len; tag equals
  17390. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  17391. A_UINT32 tlv_header;
  17392. /* VDEV identifier */
  17393. A_UINT32 vdev_id;
  17394. /** The number of channels for which stats are being requested. */
  17395. A_UINT32 num_channels;
  17396. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  17397. } wmi_dcc_get_stats_cmd_fixed_param;
  17398. typedef struct {
  17399. /** TLV tag and len; tag equals
  17400. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  17401. A_UINT32 tlv_header;
  17402. /** The channel for which this applies. */
  17403. A_UINT32 chan_freq; /* MHz units */
  17404. /** The DCC stats being requested. */
  17405. A_UINT32 dcc_stats_bitmap;
  17406. } wmi_dcc_channel_stats_request;
  17407. /** Data structure for the response with the DCC stats. */
  17408. typedef struct {
  17409. /** TLV tag and len; tag equals
  17410. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  17411. A_UINT32 tlv_header;
  17412. /* VDEV identifier */
  17413. A_UINT32 vdev_id;
  17414. /** Number of channels in the response. */
  17415. A_UINT32 num_channels;
  17416. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  17417. } wmi_dcc_get_stats_resp_event_fixed_param;
  17418. /** Data structure for clearing the DCC stats. */
  17419. typedef struct {
  17420. /** TLV tag and len; tag equals
  17421. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  17422. A_UINT32 tlv_header;
  17423. /* VDEV identifier */
  17424. A_UINT32 vdev_id;
  17425. A_UINT32 dcc_stats_bitmap;
  17426. } wmi_dcc_clear_stats_cmd_fixed_param;
  17427. /** Data structure for the pushed DCC stats */
  17428. typedef struct {
  17429. /** TLV tag and len; tag equals
  17430. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  17431. A_UINT32 tlv_header;
  17432. /* VDEV identifier */
  17433. A_UINT32 vdev_id;
  17434. /** The number of channels in the response. */
  17435. A_UINT32 num_channels;
  17436. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  17437. } wmi_dcc_stats_event_fixed_param;
  17438. /** Data structure for updating NDL per channel. */
  17439. typedef struct {
  17440. /** TLV tag and len; tag equals
  17441. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  17442. A_UINT32 tlv_header;
  17443. /**
  17444. * Channel frequency, 16 bits
  17445. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  17446. */
  17447. A_UINT32 chan_info;
  17448. /**
  17449. * NDL_minDccSampling, 10 bits.
  17450. * Maximum time interval between subsequent checks of the DCC rules.
  17451. */
  17452. A_UINT32 ndl_min_dcc_sampling;
  17453. /**
  17454. * dcc_enable, 1 bit.
  17455. * dcc_stats_enable, 1 bit.
  17456. * dcc_stats_interval, 16 bits.
  17457. */
  17458. A_UINT32 dcc_flags;
  17459. /** General DCC configuration. */
  17460. /**
  17461. * NDL_timeUp, ndlType_timing, 1+12 bits.
  17462. * NDL_timeDown, ndlType_timing, 1+12 bits.
  17463. */
  17464. A_UINT32 general_config;
  17465. /** Transmit power thresholds. */
  17466. /**
  17467. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  17468. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  17469. */
  17470. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  17471. /**
  17472. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  17473. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  17474. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  17475. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  17476. */
  17477. /* see "ETSI TS 102 687" table above for units */
  17478. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  17479. /** Packet timing thresholds. */
  17480. /**
  17481. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  17482. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  17483. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  17484. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  17485. */
  17486. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  17487. /**
  17488. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  17489. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  17490. */
  17491. A_UINT32 min_max_packet_interval;
  17492. /**
  17493. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  17494. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  17495. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  17496. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  17497. */
  17498. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  17499. /** Packet datarate thresholds. */
  17500. /**
  17501. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  17502. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  17503. */
  17504. A_UINT32 min_max_datarate;
  17505. /**
  17506. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  17507. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  17508. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  17509. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  17510. */
  17511. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  17512. /** Receive signal thresholds. */
  17513. /**
  17514. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  17515. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  17516. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  17517. */
  17518. A_UINT32 min_max_def_carrier_sense;
  17519. /** Receive model parameter. */
  17520. /**
  17521. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  17522. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  17523. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  17524. */
  17525. A_UINT32 receive_model_parameter;
  17526. /**
  17527. * NDL_minSNR, ndlType_snr, 1+7 bits.
  17528. */
  17529. A_UINT32 receive_model_parameter_2;
  17530. /** Demodulation model parameters. */
  17531. /**
  17532. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  17533. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  17534. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  17535. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  17536. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  17537. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  17538. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  17539. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  17540. */
  17541. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  17542. /** Transmit model parameters. */
  17543. /**
  17544. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  17545. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  17546. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  17547. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  17548. */
  17549. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  17550. /**
  17551. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  17552. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  17553. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  17554. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  17555. */
  17556. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  17557. /**
  17558. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  17559. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  17560. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  17561. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  17562. */
  17563. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  17564. /**
  17565. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  17566. */
  17567. A_UINT32 tm_max_channel_use;
  17568. /**
  17569. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  17570. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  17571. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  17572. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  17573. */
  17574. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  17575. /** Channel load thresholds. */
  17576. /**
  17577. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  17578. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  17579. */
  17580. A_UINT32 min_max_channel_load;
  17581. /** Transmit queue parameters. */
  17582. /**
  17583. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  17584. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  17585. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  17586. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  17587. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  17588. */
  17589. A_UINT32 transmit_queue_parameters;
  17590. /**
  17591. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  17592. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  17593. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  17594. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  17595. */
  17596. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  17597. } wmi_dcc_ndl_chan;
  17598. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  17599. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  17600. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  17601. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  17602. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  17603. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  17604. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  17605. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  17606. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  17607. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  17608. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  17609. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  17610. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  17611. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  17612. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  17613. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  17614. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  17615. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  17616. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  17617. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  17618. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  17619. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  17620. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  17621. #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)
  17622. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  17623. #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)
  17624. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  17625. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  17626. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  17627. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  17628. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  17629. #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)
  17630. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  17631. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  17632. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  17633. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  17634. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  17635. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  17636. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  17637. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  17638. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  17639. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  17640. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  17641. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  17642. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  17643. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  17644. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  17645. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  17646. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  17647. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  17648. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  17649. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  17650. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  17651. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  17652. #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)
  17653. #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)
  17654. #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)
  17655. #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)
  17656. #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)
  17657. #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)
  17658. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  17659. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  17660. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  17661. #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)
  17662. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  17663. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  17664. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  17665. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  17666. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  17667. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  17668. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  17669. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  17670. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  17671. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  17672. /** Data structure for updating the NDL. */
  17673. typedef struct {
  17674. /** TLV tag and len; tag equals
  17675. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  17676. A_UINT32 tlv_header;
  17677. /* VDEV identifier */
  17678. A_UINT32 vdev_id;
  17679. /** The number of channels in the request. */
  17680. A_UINT32 num_channel;
  17681. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  17682. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  17683. } wmi_dcc_update_ndl_cmd_fixed_param;
  17684. typedef struct {
  17685. /** TLV tag and len; tag equals
  17686. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  17687. A_UINT32 tlv_header;
  17688. /* VDEV identifier */
  17689. A_UINT32 vdev_id;
  17690. A_UINT32 status;
  17691. } wmi_dcc_update_ndl_resp_event_fixed_param;
  17692. /* Actions for TSF timestamp */
  17693. typedef enum {
  17694. TSF_TSTAMP_CAPTURE_REQ = 1,
  17695. TSF_TSTAMP_CAPTURE_RESET = 2,
  17696. TSF_TSTAMP_READ_VALUE = 3,
  17697. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  17698. } wmi_tsf_tstamp_action;
  17699. typedef struct {
  17700. /** TLV tag and len; tag equals
  17701. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  17702. A_UINT32 tlv_header;
  17703. /** unique id identifying the VDEV, generated by the caller */
  17704. A_UINT32 vdev_id;
  17705. /* action type, refer to wmi_tsf_tstamp_action */
  17706. A_UINT32 tsf_action;
  17707. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  17708. typedef struct {
  17709. /* TLV tag and len; tag equals
  17710. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  17711. A_UINT32 tlv_header;
  17712. /* VDEV identifier */
  17713. A_UINT32 vdev_id;
  17714. /* low 32bit of tsf */
  17715. A_UINT32 tsf_low;
  17716. /* high 32 bit of tsf */
  17717. A_UINT32 tsf_high;
  17718. /* low 32 bits of qtimer */
  17719. A_UINT32 qtimer_low;
  17720. /* high 32 bits of qtimer */
  17721. A_UINT32 qtimer_high;
  17722. /*
  17723. * tsf_id: TSF ID for the current vdev
  17724. * This field should be ignored unless the tsf_id_valid flag is set.
  17725. */
  17726. A_UINT32 tsf_id;
  17727. A_UINT32 tsf_id_valid;
  17728. /*
  17729. * mac_id: MAC identifier
  17730. * This field should be ignored unless the mac_id_valid flag is set.
  17731. */
  17732. A_UINT32 mac_id;
  17733. A_UINT32 mac_id_valid;
  17734. } wmi_vdev_tsf_report_event_fixed_param;
  17735. /* ie_id values:
  17736. * 0 to 255 are used for individual IEEE802.11 Information Element types
  17737. */
  17738. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  17739. /* source values: */
  17740. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  17741. /* band values: */
  17742. typedef enum {
  17743. WMI_SET_VDEV_IE_BAND_ALL = 0,
  17744. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  17745. WMI_SET_VDEV_IE_BAND_5GHZ,
  17746. } wmi_set_vdev_ie_band;
  17747. typedef struct {
  17748. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  17749. A_UINT32 tlv_header;
  17750. /** unique id identifying the VDEV, generated by the caller */
  17751. A_UINT32 vdev_id;
  17752. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  17753. A_UINT32 ie_id;
  17754. /** ie_len corresponds to num of bytes in ie_data[] */
  17755. A_UINT32 ie_len;
  17756. /** source of this command */
  17757. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  17758. /** band for this IE - se wmi_set_vdev_ie_band enum */
  17759. A_UINT32 band;
  17760. /**
  17761. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  17762. * A_UINT8 ie_data[];
  17763. *
  17764. */
  17765. } wmi_vdev_set_ie_cmd_fixed_param;
  17766. /* DISA feature related data structures */
  17767. #define MAX_MAC_HEADER_LEN 32
  17768. typedef enum {
  17769. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  17770. WMI_ENCRYPT = 1,
  17771. WMI_DECRYPT = 2,
  17772. } WMI_ENCRYPT_DECRYPT_FLAG;
  17773. typedef struct {
  17774. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  17775. /** unique id identifying the VDEV, generated by the caller */
  17776. A_UINT32 vdev_id;
  17777. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  17778. A_UINT32 key_idx;
  17779. A_UINT32 key_cipher;
  17780. A_UINT32 key_len; /* units = bytes */
  17781. A_UINT32 key_txmic_len; /* units = bytes */
  17782. A_UINT32 key_rxmic_len; /* units = bytes */
  17783. /** Key: This array needs to be provided in little-endian order */
  17784. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  17785. /** Packet number: This array needs to be provided in little-endian order.
  17786. * If the PN is less than 8 bytes, the PN data shall be placed into this
  17787. * pn[] array starting at byte 0, leaving the MSBs empty.
  17788. */
  17789. A_UINT8 pn[8];
  17790. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  17791. * This array needs to be provided in little-endian order.
  17792. */
  17793. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  17794. A_UINT32 data_len; /** Payload length, units = bytes */
  17795. /*
  17796. * Following this struct are this TLV:
  17797. * A_UINT8 data[]; <-- actual data to be encrypted,
  17798. * needs to be provided in little-endian order
  17799. */
  17800. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  17801. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  17802. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  17803. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  17804. * then on receiving the tx completion for the DISA frame this WMI event
  17805. * will be delivered to HOST with the encrypted frame.
  17806. */
  17807. typedef struct {
  17808. /** TLV tag and len; tag equals
  17809. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  17810. A_UINT32 tlv_header;
  17811. /* VDEV identifier */
  17812. A_UINT32 vdev_id;
  17813. A_INT32 status; /* 0: success, -1: Failure, */
  17814. /* 802.11 header length + encrypted payload length (units = bytes) */
  17815. A_UINT32 data_length;
  17816. /*
  17817. * Following this struct is this TLV:
  17818. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  17819. * 802.11 header + encrypted payload,
  17820. * provided in little-endian order
  17821. */
  17822. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  17823. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  17824. typedef struct {
  17825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  17826. /** Set Preferred Channel List **/
  17827. /** # of channels to scan */
  17828. A_UINT32 num_chan;
  17829. /**
  17830. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  17831. * structure. The TLV's are:
  17832. * A_UINT32 channel_list[];
  17833. **/
  17834. } wmi_soc_set_pcl_cmd_fixed_param;
  17835. /* Values for channel_weight */
  17836. typedef enum {
  17837. WMI_PCL_WEIGHT_DISALLOW = 0,
  17838. WMI_PCL_WEIGHT_LOW = 1,
  17839. WMI_PCL_WEIGHT_MEDIUM = 2,
  17840. WMI_PCL_WEIGHT_HIGH = 3,
  17841. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  17842. } wmi_pcl_chan_weight;
  17843. typedef struct {
  17844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  17845. /** Set Preferred Channel List **/
  17846. /** pdev_id for identifying the MAC
  17847. * See macros starting with WMI_PDEV_ID_ for values.
  17848. */
  17849. A_UINT32 pdev_id;
  17850. /** # of channels to scan */
  17851. A_UINT32 num_chan;
  17852. /**
  17853. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  17854. * structure. The TLV's are:
  17855. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  17856. **/
  17857. } wmi_pdev_set_pcl_cmd_fixed_param;
  17858. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  17859. typedef struct {
  17860. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  17861. /** Set Hardware Mode **/
  17862. /* Hardware Mode Index */
  17863. A_UINT32 hw_mode_index;
  17864. } wmi_soc_set_hw_mode_cmd_fixed_param;
  17865. typedef struct {
  17866. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  17867. /** pdev_id for identifying the MAC
  17868. * See macros starting with WMI_PDEV_ID_ for values.
  17869. */
  17870. A_UINT32 pdev_id;
  17871. /* start frequency in MHz */
  17872. A_UINT32 start_freq;
  17873. /* end frequency in MHz */
  17874. A_UINT32 end_freq;
  17875. } wmi_pdev_band_to_mac;
  17876. typedef struct {
  17877. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  17878. /** Set Hardware Mode **/
  17879. /** pdev_id for identifying the MAC
  17880. * See macros starting with WMI_PDEV_ID_ for values.
  17881. */
  17882. A_UINT32 pdev_id;
  17883. /* Hardware Mode Index */
  17884. A_UINT32 hw_mode_index;
  17885. /* Number of band to mac TLVs */
  17886. A_UINT32 num_band_to_mac;
  17887. /* Followed by TLVs of type
  17888. * num_band_to_mac * wmi_pdev_band_to_mac.
  17889. */
  17890. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  17891. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  17892. typedef struct {
  17893. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  17894. /** Set Dual MAC Firmware Configuration **/
  17895. /* Concurrent scan configuration bits */
  17896. A_UINT32 concurrent_scan_config_bits;
  17897. /* Firmware mode configuration bits */
  17898. A_UINT32 fw_mode_config_bits;
  17899. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  17900. typedef struct {
  17901. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  17902. /** Set Dual MAC Firmware Configuration **/
  17903. /** pdev_id for identifying the MAC
  17904. * See macros starting with WMI_PDEV_ID_ for values.
  17905. */
  17906. A_UINT32 pdev_id;
  17907. /* Concurrent scan configuration bits */
  17908. A_UINT32 concurrent_scan_config_bits;
  17909. /* Firmware mode configuration bits */
  17910. A_UINT32 fw_mode_config_bits;
  17911. } wmi_pdev_set_mac_config_cmd_fixed_param;
  17912. typedef struct { /* DEPRECATED */
  17913. A_UINT32 num_tx_chains;
  17914. A_UINT32 num_rx_chains;
  17915. A_UINT32 reserved[2];
  17916. } soc_num_tx_rx_chains;
  17917. typedef struct {
  17918. A_UINT32 num_tx_chains_2g;
  17919. A_UINT32 num_rx_chains_2g;
  17920. A_UINT32 num_tx_chains_5g;
  17921. A_UINT32 num_rx_chains_5g;
  17922. } band_num_tx_rx_chains;
  17923. typedef union { /* DEPRECATED */
  17924. soc_num_tx_rx_chains soc_txrx_chain_setting;
  17925. band_num_tx_rx_chains band_txrx_chain_setting;
  17926. } antenna_num_tx_rx_chains;
  17927. typedef enum {
  17928. ANTENNA_MODE_DISABLED = 0x0,
  17929. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  17930. /* reserved */
  17931. } antenna_mode_reason;
  17932. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  17933. typedef struct {
  17934. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  17935. /* the reason for setting antenna mode, refer antenna_mode_reason */
  17936. A_UINT32 reason;
  17937. /*
  17938. * The above reason parameter will select whether the following union
  17939. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  17940. */
  17941. antenna_num_tx_rx_chains num_txrx_chains_setting;
  17942. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  17943. typedef struct {
  17944. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  17945. /** pdev_id for identifying the MAC
  17946. * See macros starting with WMI_PDEV_ID_ for values.
  17947. */
  17948. A_UINT32 pdev_id;
  17949. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  17950. A_UINT32 num_txrx_chains;
  17951. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  17952. /** Data structure for information specific to a VDEV to MAC mapping. */
  17953. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  17954. typedef struct {
  17955. /** TLV tag and len; tag equals
  17956. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  17957. A_UINT32 tlv_header;
  17958. A_UINT32 vdev_id; /* VDEV ID */
  17959. A_UINT32 mac_id; /* MAC ID */
  17960. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  17961. /** Data structure for information specific to a VDEV to MAC mapping. */
  17962. typedef struct {
  17963. /** TLV tag and len; tag equals
  17964. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  17965. A_UINT32 tlv_header;
  17966. /** pdev_id for identifying the MAC
  17967. * See macros starting with WMI_PDEV_ID_ for values.
  17968. */
  17969. A_UINT32 pdev_id;
  17970. A_UINT32 vdev_id;
  17971. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  17972. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  17973. typedef struct {
  17974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  17975. /** Set Hardware Mode Response Event **/
  17976. /* Status of set_hw_mode command */
  17977. /*
  17978. * Values for Status:
  17979. * 0 - OK; command successful
  17980. * 1 - EINVAL; Requested invalid hw_mode
  17981. * 2 - ECANCELED; HW mode change canceled
  17982. * 3 - ENOTSUP; HW mode not supported
  17983. * 4 - EHARDWARE; HW mode change prevented by hardware
  17984. * 5 - EPENDING; HW mode change is pending
  17985. * 6 - ECOEX; HW mode change conflict with Coex
  17986. */
  17987. A_UINT32 status;
  17988. /* Configured Hardware Mode */
  17989. A_UINT32 cfgd_hw_mode_index;
  17990. /* Number of Vdev to Mac entries */
  17991. A_UINT32 num_vdev_mac_entries;
  17992. /**
  17993. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  17994. * structure. The TLV's are:
  17995. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  17996. */
  17997. } wmi_soc_set_hw_mode_response_event_fixed_param;
  17998. typedef struct {
  17999. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  18000. /** Set Hardware Mode Response Event **/
  18001. /** pdev_id for identifying the MAC
  18002. * See macros starting with WMI_PDEV_ID_ for values.
  18003. */
  18004. A_UINT32 pdev_id;
  18005. /* Status of set_hw_mode command */
  18006. /*
  18007. * Values for Status:
  18008. * 0 - OK; command successful
  18009. * 1 - EINVAL; Requested invalid hw_mode
  18010. * 2 - ECANCELED; HW mode change canceled
  18011. * 3 - ENOTSUP; HW mode not supported
  18012. * 4 - EHARDWARE; HW mode change prevented by hardware
  18013. * 5 - EPENDING; HW mode change is pending
  18014. * 6 - ECOEX; HW mode change conflict with Coex
  18015. */
  18016. A_UINT32 status;
  18017. /* Configured Hardware Mode */
  18018. A_UINT32 cfgd_hw_mode_index;
  18019. /* Number of Vdev to Mac entries */
  18020. A_UINT32 num_vdev_mac_entries;
  18021. /**
  18022. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  18023. * structure. The TLV's are:
  18024. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  18025. */
  18026. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  18027. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  18028. typedef struct {
  18029. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  18030. /** Hardware Mode Transition Event **/
  18031. /* Original or old Hardware mode */
  18032. A_UINT32 old_hw_mode_index;
  18033. /* New Hardware Mode */
  18034. A_UINT32 new_hw_mode_index;
  18035. /* Number of Vdev to Mac entries */
  18036. A_UINT32 num_vdev_mac_entries;
  18037. /**
  18038. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  18039. * structure. The TLV's are:
  18040. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  18041. */
  18042. } wmi_soc_hw_mode_transition_event_fixed_param;
  18043. typedef struct {
  18044. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  18045. /** Hardware Mode Transition Event **/
  18046. /** pdev_id for identifying the MAC
  18047. * See macros starting with WMI_PDEV_ID_ for values.
  18048. */
  18049. A_UINT32 pdev_id;
  18050. /* Original or old Hardware mode */
  18051. A_UINT32 old_hw_mode_index;
  18052. /* New Hardware Mode */
  18053. A_UINT32 new_hw_mode_index;
  18054. /* Number of Vdev to Mac entries */
  18055. A_UINT32 num_vdev_mac_entries;
  18056. /**
  18057. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  18058. * structure. The TLV's are:
  18059. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  18060. */
  18061. } wmi_pdev_hw_mode_transition_event_fixed_param;
  18062. /**
  18063. * This command is sent from WLAN host driver to firmware for
  18064. * plugging in reorder queue desc to lithium hw.
  18065. *
  18066. * Example: plug-in queue desc for TID 5
  18067. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  18068. * (vdev_id = PEER vdev id,
  18069. * peer_macaddr = PEER mac addr,
  18070. * tid = 5,
  18071. * queue_ptr_lo = queue desc addr lower 32 bits,
  18072. * queue_ptr_hi = queue desc addr higher 32 bits,
  18073. * queue_no = 16-bit number assigned by host for queue,
  18074. * stored in bits 15:0 of queue_no field)
  18075. */
  18076. typedef struct {
  18077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  18078. A_UINT32 vdev_id;
  18079. wmi_mac_addr peer_macaddr; /* peer mac address */
  18080. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  18081. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  18082. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  18083. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  18084. stored in bits 15:0 of queue_no field */
  18085. A_UINT32 ba_window_size_valid; /* Is ba_window_size valid?
  18086. * 0 = Invalid, 1 = Valid */
  18087. A_UINT32 ba_window_size; /* Valid values: 0 to 256
  18088. * Host sends the message when BA session is
  18089. * established or terminated for the TID. */
  18090. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  18091. /**
  18092. * This command is sent from WLAN host driver to firmware for
  18093. * removing one or more reorder queue desc to lithium hw.
  18094. *
  18095. * Example: remove queue desc for all TIDs
  18096. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  18097. * (vdev_id = PEER vdev id,
  18098. * peer_macaddr = PEER mac addr,
  18099. * tid = 0x1FFFF,
  18100. */
  18101. typedef struct {
  18102. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  18103. A_UINT32 vdev_id;
  18104. wmi_mac_addr peer_macaddr; /* peer mac address */
  18105. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  18106. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  18107. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  18108. typedef struct {
  18109. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  18110. /** Set Dual MAC Config Response Event **/
  18111. /* Status for set_dual_mac_config command */
  18112. /*
  18113. * Values for Status:
  18114. * 0 - OK; command successful
  18115. * 1 - EINVAL; Requested invalid hw_mode
  18116. * 3 - ENOTSUP; HW mode not supported
  18117. * 4 - EHARDWARE; HW mode change prevented by hardware
  18118. * 6 - ECOEX; HW mode change conflict with Coex
  18119. */
  18120. A_UINT32 status;
  18121. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  18122. typedef struct {
  18123. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  18124. /** Set Dual MAC Config Response Event **/
  18125. /** pdev_id for identifying the MAC
  18126. * See macros starting with WMI_PDEV_ID_ for values.
  18127. */
  18128. A_UINT32 pdev_id;
  18129. /* Status for set_dual_mac_config command */
  18130. /*
  18131. * Values for Status:
  18132. * 0 - OK; command successful
  18133. * 1 - EINVAL; Requested invalid hw_mode
  18134. * 3 - ENOTSUP; HW mode not supported
  18135. * 4 - EHARDWARE; HW mode change prevented by hardware
  18136. * 6 - ECOEX; HW mode change conflict with Coex
  18137. */
  18138. A_UINT32 status;
  18139. } wmi_pdev_set_mac_config_response_event_fixed_param;
  18140. typedef enum {
  18141. MAWC_MOTION_STATE_UNKNOWN,
  18142. MAWC_MOTION_STATE_STATIONARY,
  18143. MAWC_MOTION_STATE_WALK,
  18144. MAWC_MOTION_STATE_TRANSIT,
  18145. } MAWC_MOTION_STATE;
  18146. typedef enum {
  18147. MAWC_SENSOR_STATUS_OK,
  18148. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  18149. MAWC_SENSOR_STATUS_SHUTDOWN,
  18150. } MAWC_SENSOR_STATUS;
  18151. typedef struct {
  18152. /* TLV tag and len; tag equals
  18153. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  18154. A_UINT32 tlv_header;
  18155. /** new motion state, MAWC_MOTION_STATE */
  18156. A_UINT32 motion_state;
  18157. /** status code of sensor, MAWC_SENSOR_STATUS */
  18158. A_UINT32 sensor_status;
  18159. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  18160. /* MBO flag field definition */
  18161. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  18162. * 1 - Allow to connect to MBO AP only
  18163. * Bit 1-31 : reserved.
  18164. */
  18165. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  18166. typedef struct {
  18167. /* TLV tag and len; tag equals
  18168. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  18169. A_UINT32 tlv_header;
  18170. /** vdev id */
  18171. A_UINT32 vdev_id;
  18172. /** enable or disable MBO */
  18173. A_UINT32 enable;
  18174. /** MBO flags, refer to definition of MBO flags*/
  18175. A_UINT32 flags;
  18176. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  18177. typedef struct {
  18178. /* TLV tag and len; tag equals
  18179. * WMITLV_TAG_ARRAY_STRUC */
  18180. A_UINT32 tlv_header;
  18181. /** Current operating class number */
  18182. A_UINT32 cur_op_class;
  18183. /** Country string of current reg domain,
  18184. * the expected value should be same as country str defined
  18185. * in country IE.
  18186. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  18187. * The ordering of this array must be maintained,
  18188. * even when a big-endian host's WMI messages undergo
  18189. * automatic byte reordering for conversion to the
  18190. * little-endian ordering required by the target.
  18191. * On big-endian hosts, this array may need to be byte-swapped
  18192. * by the host, so the subsequent automatic byte-swap
  18193. * will result in the correct final byte order.
  18194. * global operating class: set country_str[0]=0
  18195. */
  18196. A_UINT8 country_str[4];
  18197. /** Supported operating class number in current regdomain */
  18198. A_UINT32 supp_op_class_num;
  18199. /* The TLVs will follow. */
  18200. /* A_UINT32 supp_op_class_list[] */
  18201. } wmi_supported_operating_class_param;
  18202. typedef struct {
  18203. /* TLV tag and len; tag equals
  18204. * WMITLV_TAG_ARRAY_STRUC */
  18205. A_UINT32 tlv_header;
  18206. /** non preferred channel attribute length */
  18207. A_UINT32 non_prefer_ch_attr_len;
  18208. /* The TLVs will follow. */
  18209. /** A_UINT8 non_prefer_ch_attr[];*/
  18210. } wmi_mbo_non_preferred_channel_report_param;
  18211. typedef struct {
  18212. /* TLV tag and len; tag equals
  18213. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  18214. A_UINT32 tlv_header;
  18215. /* enable(1) or disable(0) */
  18216. A_UINT32 enable;
  18217. } wmi_mawc_enable_sensor_event_fixed_param;
  18218. typedef struct {
  18219. /* TLV tag and len; tag equals
  18220. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  18221. A_UINT32 tlv_header;
  18222. /* Unique id identifying the VDEV */
  18223. A_UINT32 vdev_id;
  18224. /* enable(1) or disable(0) MAWC */
  18225. A_UINT32 enable;
  18226. /* ratio of skipping suppressing scan, skip one out of x */
  18227. A_UINT32 suppress_ratio;
  18228. } wmi_extscan_configure_mawc_cmd_fixed_param;
  18229. typedef struct {
  18230. /* TLV tag and len; tag equals
  18231. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  18232. A_UINT32 tlv_header;
  18233. /* Unique id identifying the VDEV */
  18234. A_UINT32 vdev_id;
  18235. /* enable(1) or disable(0) packet error rate trigger for roaming */
  18236. A_UINT32 enable;
  18237. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  18238. * If PER monitoring as a trigger for roaming is enabled,
  18239. * it is controlled by high_rate_thresh, low_rate_thresh, and
  18240. * pkt_err_rate_thresh_pct.
  18241. * PER monitoring is performed only when the time-averaged throughput
  18242. * is less than high_rate_thresh.
  18243. * During PER monitoring, the target keeps track of the PHY rate for
  18244. * each of the first N PPDUs within a time window.
  18245. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  18246. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  18247. *
  18248. * This PER monitoring as a trigger for roaming is performed
  18249. * concurrently but independently for rx and tx.
  18250. */
  18251. A_UINT32 high_rate_thresh; /* units = Kbps */
  18252. A_UINT32 low_rate_thresh; /* units = Kbps */
  18253. A_UINT32 pkt_err_rate_thresh_pct;
  18254. /*
  18255. * rest time after associating to a new AP before
  18256. * starting to monitor PER as a roaming trigger,
  18257. * (units are seconds)
  18258. */
  18259. A_UINT32 per_rest_time;
  18260. /* This is the total time for which PER monitoring will be run.
  18261. * After completion of time windows, the average PER over the window
  18262. * will be computed.
  18263. * The parameter value stores specifications for both TX and RX
  18264. * monitor times.
  18265. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  18266. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  18267. */
  18268. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  18269. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  18270. A_INT32 min_candidate_rssi; /* units = dBm */
  18271. } wmi_roam_per_config_fixed_param;
  18272. typedef struct {
  18273. /* TLV tag and len; tag equals
  18274. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  18275. A_UINT32 tlv_header;
  18276. /* Unique id identifying the VDEV */
  18277. A_UINT32 vdev_id;
  18278. /* enable(1) or disable(0) MAWC */
  18279. A_UINT32 enable;
  18280. /* ratio of exponential backoff, next = current + current*ratio/100 */
  18281. A_UINT32 exp_backoff_ratio;
  18282. /* initial scan interval(msec) */
  18283. A_UINT32 init_scan_interval;
  18284. /* max scan interval(msec) */
  18285. A_UINT32 max_scan_interval;
  18286. } wmi_nlo_configure_mawc_cmd_fixed_param;
  18287. typedef struct {
  18288. /* TLV tag and len; tag equals
  18289. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  18290. A_UINT32 tlv_header;
  18291. /* Unique id identifying the VDEV */
  18292. A_UINT32 vdev_id;
  18293. /* enable(1) or disable(0) MAWC */
  18294. A_UINT32 enable;
  18295. /* data traffic load (kBps) to register CMC */
  18296. A_UINT32 traffic_load_threshold;
  18297. /* RSSI threshold (dBm) to scan for Best AP */
  18298. A_UINT32 best_ap_rssi_threshold;
  18299. /* high RSSI threshold adjustment in Stationary to suppress scan */
  18300. A_UINT32 rssi_stationary_high_adjust;
  18301. /* low RSSI threshold adjustment in Stationary to suppress scan */
  18302. A_UINT32 rssi_stationary_low_adjust;
  18303. } wmi_roam_configure_mawc_cmd_fixed_param;
  18304. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  18305. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  18306. typedef enum {
  18307. PACKET_FILTER_TYPE_INVALID = 0,
  18308. PACKET_FILTER_TYPE_FILTER_PKT,
  18309. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  18310. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  18311. } WMI_PACKET_FILTER_FILTER_TYPE;
  18312. typedef enum {
  18313. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  18314. /* L2 header */
  18315. PACKET_FILTER_PROTO_TYPE_MAC,
  18316. PACKET_FILTER_PROTO_TYPE_SNAP,
  18317. /* L3 header (EtherType) */
  18318. PACKET_FILTER_PROTO_TYPE_IPV4,
  18319. PACKET_FILTER_PROTO_TYPE_IPV6,
  18320. /* L4 header (IP protocol) */
  18321. PACKET_FILTER_PROTO_TYPE_UDP,
  18322. PACKET_FILTER_PROTO_TYPE_TCP,
  18323. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  18324. PACKET_FILTER_PROTO_TYPE_MAX
  18325. } WMI_PACKET_FILTER_PROTO_TYPE;
  18326. typedef enum {
  18327. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  18328. PACKET_FILTER_CMP_TYPE_EQUAL,
  18329. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  18330. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  18331. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  18332. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  18333. PACKET_FILTER_CMP_TYPE_MAX
  18334. } WMI_PACKET_FILTER_CMP_TYPE;
  18335. typedef enum {
  18336. PACKET_FILTER_SET_INACTIVE = 0,
  18337. PACKET_FILTER_SET_ACTIVE
  18338. } WMI_PACKET_FILTER_ACTION;
  18339. typedef enum {
  18340. PACKET_FILTER_SET_DISABLE = 0,
  18341. PACKET_FILTER_SET_ENABLE
  18342. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  18343. typedef struct {
  18344. A_UINT32 proto_type;
  18345. A_UINT32 cmp_type;
  18346. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  18347. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  18348. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  18349. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  18350. } WMI_PACKET_FILTER_PARAMS_TYPE;
  18351. typedef struct {
  18352. A_UINT32 tlv_header;
  18353. A_UINT32 vdev_id;
  18354. A_UINT32 filter_id;
  18355. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  18356. A_UINT32 filter_type;
  18357. A_UINT32 num_params; /* how many entries in paramsData are valid */
  18358. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  18359. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  18360. /* deprecated0:
  18361. * This field simply provides filler space to retain the original message
  18362. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  18363. * from 10 to 5.
  18364. */
  18365. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  18366. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  18367. /* enable / disable all filters within the specified vdev */
  18368. typedef struct {
  18369. A_UINT32 tlv_header;
  18370. A_UINT32 vdev_id;
  18371. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  18372. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  18373. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  18374. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  18375. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  18376. WMI_SET_BITS(tcp_flag_u32, \
  18377. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  18378. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  18379. tcp_flag_values)
  18380. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  18381. WMI_GET_BITS(tcp_flag_u32, \
  18382. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  18383. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  18384. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  18385. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  18386. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  18387. WMI_SET_BITS(tcp_flag_u32, \
  18388. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  18389. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  18390. tcp_flags_mask)
  18391. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  18392. WMI_GET_BITS(tcp_flag_u32, \
  18393. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  18394. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  18395. typedef struct {
  18396. A_UINT32 tlv_header;
  18397. /**
  18398. * @brief lro_enable - indicates whether lro is enabled
  18399. * [0] LRO Enable
  18400. */
  18401. A_UINT32 lro_enable;
  18402. /**
  18403. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  18404. * values to check for
  18405. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  18406. * the values in this field after masking with TCP flags mask below,
  18407. * LRO eligible will not be set
  18408. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  18409. * provided above with the TCP flags field in the received packet
  18410. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  18411. * macros to isolate the mask field and values field that are packed
  18412. * into this u32 "word".
  18413. */
  18414. A_UINT32 tcp_flag_u32;
  18415. /**
  18416. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  18417. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  18418. * bytes 0 to 3
  18419. *
  18420. * In this and all the below toeplitz_hash fields, the bytes are
  18421. * specified in little-endian order. For example:
  18422. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  18423. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  18424. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  18425. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  18426. */
  18427. A_UINT32 toeplitz_hash_ipv4_0_3;
  18428. /**
  18429. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  18430. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  18431. * bytes 4 to 7
  18432. */
  18433. A_UINT32 toeplitz_hash_ipv4_4_7;
  18434. /**
  18435. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  18436. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  18437. * bytes 8 to 11
  18438. */
  18439. A_UINT32 toeplitz_hash_ipv4_8_11;
  18440. /**
  18441. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  18442. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  18443. * bytes 12 to 15
  18444. */
  18445. A_UINT32 toeplitz_hash_ipv4_12_15;
  18446. /**
  18447. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  18448. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  18449. * byte 16
  18450. */
  18451. A_UINT32 toeplitz_hash_ipv4_16;
  18452. /**
  18453. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18454. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18455. * bytes 0 to 3
  18456. */
  18457. A_UINT32 toeplitz_hash_ipv6_0_3;
  18458. /**
  18459. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18460. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18461. * bytes 4 to 7
  18462. */
  18463. A_UINT32 toeplitz_hash_ipv6_4_7;
  18464. /**
  18465. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18466. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18467. * bytes 8 to 11
  18468. */
  18469. A_UINT32 toeplitz_hash_ipv6_8_11;
  18470. /**
  18471. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18472. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18473. * bytes 12 to 15
  18474. */
  18475. A_UINT32 toeplitz_hash_ipv6_12_15;
  18476. /**
  18477. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18478. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18479. * bytes 16 to 19
  18480. */
  18481. A_UINT32 toeplitz_hash_ipv6_16_19;
  18482. /**
  18483. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18484. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18485. * bytes 20 to 22
  18486. */
  18487. A_UINT32 toeplitz_hash_ipv6_20_23;
  18488. /**
  18489. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18490. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18491. * bytes 24 to 27
  18492. */
  18493. A_UINT32 toeplitz_hash_ipv6_24_27;
  18494. /**
  18495. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18496. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18497. * bytes 28 to 31
  18498. */
  18499. A_UINT32 toeplitz_hash_ipv6_28_31;
  18500. /**
  18501. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18502. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18503. * bytes 32 to 35
  18504. */
  18505. A_UINT32 toeplitz_hash_ipv6_32_35;
  18506. /**
  18507. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18508. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18509. * bytes 36 to 39
  18510. */
  18511. A_UINT32 toeplitz_hash_ipv6_36_39;
  18512. /**
  18513. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  18514. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  18515. * byte 40
  18516. */
  18517. A_UINT32 toeplitz_hash_ipv6_40;
  18518. /**
  18519. * @brief pdev_id - identifies the MAC
  18520. * See macros starting with WMI_PDEV_ID_ for values.
  18521. */
  18522. A_UINT32 pdev_id;
  18523. } wmi_lro_info_cmd_fixed_param;
  18524. typedef struct {
  18525. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  18526. A_UINT32 offset; /* flash offset to write, starting from 0 */
  18527. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  18528. } wmi_transfer_data_to_flash_cmd_fixed_param;
  18529. typedef struct {
  18530. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  18531. /** Return status. 0 for success, non-zero otherwise */
  18532. A_UINT32 status;
  18533. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  18534. typedef struct {
  18535. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  18536. A_UINT32 offset; /* flash offset to read, starting from 0 */
  18537. A_UINT32 length; /* data length to read, unit: byte */
  18538. } wmi_read_data_from_flash_cmd_fixed_param;
  18539. typedef struct {
  18540. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  18541. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  18542. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  18543. A_UINT32 length; /* length of data being reported, unit: byte */
  18544. } wmi_read_data_from_flash_event_fixed_param;
  18545. typedef enum {
  18546. ENHANCED_MCAST_FILTER_DISABLED,
  18547. ENHANCED_MCAST_FILTER_ENABLED
  18548. } ENHANCED_MCAST_FILTER_CONFIG;
  18549. /*
  18550. * Command to enable/disable filtering of multicast IP with unicast mac
  18551. */
  18552. typedef struct {
  18553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  18554. /* Unique id identifying the VDEV */
  18555. A_UINT32 vdev_id;
  18556. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  18557. A_UINT32 enable;
  18558. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  18559. typedef struct {
  18560. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  18561. A_UINT32 tlv_header;
  18562. /** unique id identifying the VDEV, generated by the caller */
  18563. A_UINT32 vdev_id;
  18564. /** WISA enable / disable mode */
  18565. A_UINT32 wisa_mode;
  18566. } wmi_vdev_wisa_cmd_fixed_param;
  18567. /*
  18568. * This structure is used to report SMPS force mode set complete to host.
  18569. */
  18570. typedef struct {
  18571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  18572. /* Unique id identifying the VDEV */
  18573. A_UINT32 vdev_id;
  18574. /* Return status. 0 for success, non-zero otherwise */
  18575. A_UINT32 status;
  18576. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  18577. /*
  18578. * This structure is used to report SCPC calibrated data to host.
  18579. */
  18580. typedef struct {
  18581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  18582. /** number of BDF patches. Each patch contains offset, length and data */
  18583. A_UINT32 num_patch;
  18584. /* This TLV is followed by another TLV of array of bytes
  18585. * A_UINT8 data[];
  18586. * This data array contains, for example
  18587. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  18588. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  18589. *
  18590. */
  18591. } wmi_scpc_event_fixed_param;
  18592. typedef enum {
  18593. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  18594. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  18595. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  18596. } FW_ACTIVE_BPF_MODE;
  18597. /* bpf interface structure */
  18598. typedef struct wmi_bpf_get_capability_cmd_s {
  18599. A_UINT32 tlv_header;
  18600. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  18601. } wmi_bpf_get_capability_cmd_fixed_param;
  18602. typedef struct wmi_bpf_capability_info_evt_s {
  18603. A_UINT32 tlv_header;
  18604. A_UINT32 bpf_version; /* fw's implement version */
  18605. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  18606. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  18607. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  18608. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  18609. } wmi_bpf_capability_info_evt_fixed_param;
  18610. /* bit 0 of flags: report counters */
  18611. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  18612. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  18613. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  18614. A_UINT32 tlv_header;
  18615. A_UINT32 flags;
  18616. A_UINT32 vdev_id;
  18617. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  18618. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  18619. A_UINT32 tlv_header;
  18620. A_UINT32 vdev_id;
  18621. A_UINT32 num_filters;
  18622. A_UINT32 num_checked_pkts;
  18623. A_UINT32 num_dropped_pkts;
  18624. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  18625. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  18626. A_UINT32 tlv_header;
  18627. A_UINT32 vdev_id;
  18628. A_UINT32 filter_id;
  18629. A_UINT32 bpf_version; /* host bpf version */
  18630. A_UINT32 total_length;
  18631. A_UINT32 current_offset;
  18632. A_UINT32 current_length;
  18633. /*
  18634. * The TLV follows:
  18635. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  18636. */
  18637. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  18638. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  18639. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  18640. A_UINT32 tlv_header;
  18641. A_UINT32 vdev_id;
  18642. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  18643. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  18644. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  18645. A_UINT32 tlv_header;
  18646. A_UINT32 vdev_id;
  18647. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  18648. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  18649. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  18650. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  18651. A_UINT32 tlv_header;
  18652. A_UINT32 vdev_id;
  18653. A_UINT32 is_enabled; /* fw assume host default enables */
  18654. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  18655. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  18656. A_UINT32 tlv_header;
  18657. A_UINT32 vdev_id;
  18658. A_UINT32 bpf_version; /* bpf instruction version */
  18659. A_UINT32 program_len; /* the program length may be changed by this command */
  18660. A_UINT32 addr_offset; /* start writing addr in the working memory */
  18661. A_UINT32 length; /* the writing size of this command (byte units) */
  18662. /*
  18663. * The TLV follows:
  18664. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  18665. */
  18666. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  18667. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  18668. A_UINT32 tlv_header;
  18669. A_UINT32 vdev_id;
  18670. A_UINT32 addr_offset; /* start reading addr in the working memory */
  18671. A_UINT32 length; /* reading size from addr (byte units) */
  18672. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  18673. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  18674. A_UINT32 tlv_header;
  18675. A_UINT32 vdev_id;
  18676. A_UINT32 offset; /* read memory offset from start_addr */
  18677. A_UINT32 length; /* read memory length of this command */
  18678. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  18679. /*
  18680. * The TLV follows:
  18681. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  18682. */
  18683. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  18684. #define AES_BLOCK_LEN 16 /* in bytes */
  18685. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  18686. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  18687. #define FIPS_ENCRYPT_CMD 0
  18688. #define FIPS_DECRYPT_CMD 1
  18689. #define FIPS_ENGINE_AES_CTR 0
  18690. #define FIPS_ENGINE_AES_MIC 1
  18691. #define FIPS_ERROR_OPER_TIMEOUT 1
  18692. /* WMI_PDEV_FIPS_CMDID */
  18693. typedef struct {
  18694. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  18695. union {
  18696. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18697. /** pdev_id for identifying the MAC
  18698. * See macros starting with WMI_PDEV_ID_ for values.
  18699. */
  18700. A_UINT32 pdev_id;
  18701. };
  18702. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  18703. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  18704. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  18705. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  18706. A_UINT32 data_len; /* data length */
  18707. /*
  18708. * Following this structure is the TLV:
  18709. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  18710. */
  18711. } wmi_pdev_fips_cmd_fixed_param;
  18712. typedef struct {
  18713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  18714. union {
  18715. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18716. /** pdev_id for identifying the MAC
  18717. * See macros starting with WMI_PDEV_ID_ for values.
  18718. */
  18719. A_UINT32 pdev_id;
  18720. };
  18721. A_UINT32 enable; /* 1:enable, 0:disable */
  18722. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  18723. A_UINT32 rx_antenna; /* rx antenna */
  18724. A_UINT32 tx_default_antenna; /* tx default antenna */
  18725. /*
  18726. * Following this structure is the TLV:
  18727. * wmi_pdev_smart_ant_gpio_handle
  18728. */
  18729. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  18730. /** GPIO pins/function values to control antennas */
  18731. typedef struct {
  18732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  18733. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  18734. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  18735. /** pdev_id for identifying the MAC
  18736. * See macros starting with WMI_PDEV_ID_ for values.
  18737. */
  18738. A_UINT32 pdev_id;
  18739. } wmi_pdev_smart_ant_gpio_handle;
  18740. typedef struct {
  18741. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  18742. union {
  18743. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18744. /** pdev_id for identifying the MAC
  18745. * See macros starting with WMI_PDEV_ID_ for values.
  18746. */
  18747. A_UINT32 pdev_id;
  18748. };
  18749. A_UINT32 rx_antenna;
  18750. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  18751. typedef struct {
  18752. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  18753. /** unique id identifying the vdev, generated by the caller */
  18754. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18755. /** peer MAC address */
  18756. wmi_mac_addr peer_macaddr;
  18757. /*
  18758. * Following this structure is the TLV:
  18759. * wmi_peer_smart_ant_set_tx_antenna_series
  18760. */
  18761. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  18762. typedef struct {
  18763. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  18764. /* antenna array */
  18765. A_UINT32 antenna_series;
  18766. } wmi_peer_smart_ant_set_tx_antenna_series;
  18767. typedef struct {
  18768. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  18769. /* rate array */
  18770. A_UINT32 train_rate_series;
  18771. /* antenna array */
  18772. A_UINT32 train_antenna_series;
  18773. /* Rate flags */
  18774. /* TODO: For future use? */
  18775. A_UINT32 rc_flags;
  18776. } wmi_peer_smart_ant_set_train_antenna_param;
  18777. typedef struct {
  18778. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  18779. /** unique id identifying the VDEV, generated by the caller */
  18780. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18781. /** peer MAC address */
  18782. wmi_mac_addr peer_macaddr;
  18783. /* num packets; 0-stop training */
  18784. A_UINT32 num_pkts;
  18785. /*
  18786. * Following this structure is the TLV:
  18787. * wmi_peer_smart_ant_set_train_antenna_param
  18788. */
  18789. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  18790. typedef struct {
  18791. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  18792. /** unique id identifying the vdev, generated by the caller */
  18793. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18794. /** peer MAC address */
  18795. wmi_mac_addr peer_macaddr;
  18796. /* command id*/
  18797. A_UINT32 cmd_id;
  18798. /* number of arguments passed */
  18799. A_UINT32 args_count;
  18800. /*
  18801. * Following this structure is the TLV:
  18802. * A_UINT32 args[]; <-- argument list
  18803. */
  18804. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  18805. typedef struct {
  18806. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  18807. A_UINT32 antCtrlChain;
  18808. /** pdev_id for identifying the MAC
  18809. * See macros starting with WMI_PDEV_ID_ for values.
  18810. */
  18811. A_UINT32 pdev_id;
  18812. } wmi_pdev_set_ant_ctrl_chain;
  18813. typedef struct {
  18814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  18815. A_UINT32 mac_id; /* MAC ID */
  18816. A_UINT32 antCtrlCommon1;
  18817. A_UINT32 antCtrlCommon2;
  18818. /*
  18819. * Following this structure is the TLV:
  18820. * wmi_pdev_set_ant_ctrl_chain
  18821. */
  18822. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  18823. typedef struct {
  18824. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  18825. union {
  18826. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18827. /** pdev_id for identifying the MAC
  18828. * See macros starting with WMI_PDEV_ID_ for values.
  18829. */
  18830. A_UINT32 pdev_id;
  18831. };
  18832. /** len of CTL info */
  18833. A_UINT32 ctl_len;
  18834. /* ctl array (len adjusted to number of words).
  18835. * Following this structure is the TLV:
  18836. * A_UINT32 ctl_info[1];
  18837. */
  18838. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  18839. typedef struct {
  18840. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  18841. union {
  18842. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18843. /** pdev_id for identifying the MAC
  18844. * See macros starting with WMI_PDEV_ID_ for values.
  18845. */
  18846. A_UINT32 pdev_id;
  18847. };
  18848. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  18849. /*
  18850. * Bit 7:0 len of array gain table
  18851. * Bit 8 bypass multi chain gain or not
  18852. */
  18853. /* array gain table(s) (len adjusted to number of words).
  18854. * Following this structure is the TLV:
  18855. * A_UINT32 arraygain_tbl[1];
  18856. */
  18857. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  18858. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  18859. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  18860. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  18861. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  18862. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  18863. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  18864. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  18865. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  18866. typedef struct {
  18867. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  18868. /** parameter id */
  18869. A_UINT32 param_id;
  18870. /** parameter value */
  18871. A_UINT32 param_value;
  18872. } wmi_fwtest_set_param_cmd_fixed_param;
  18873. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  18874. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  18875. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  18876. typedef struct {
  18877. /** TLV tag and len; tag equals
  18878. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  18879. A_UINT32 tlv_header;
  18880. wmi_mac_addr peer_macaddr;
  18881. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  18882. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  18883. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  18884. A_UINT32 vdev_id;
  18885. A_UINT32 pdev_id;
  18886. } wmi_atf_peer_info;
  18887. typedef struct {
  18888. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  18889. A_UINT32 num_peers;
  18890. /*
  18891. * Following this structure is the TLV:
  18892. * struct wmi_atf_peer_info peer_info[num_peers];
  18893. */
  18894. } wmi_peer_atf_request_fixed_param;
  18895. /* Structure for Bandwidth Fairness peer information */
  18896. typedef struct {
  18897. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  18898. A_UINT32 tlv_header;
  18899. wmi_mac_addr peer_macaddr;
  18900. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  18901. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  18902. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  18903. A_UINT32 vdev_id;
  18904. A_UINT32 pdev_id;
  18905. } wmi_bwf_peer_info;
  18906. /* Structure for Bandwidth Fairness peer request */
  18907. typedef struct {
  18908. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  18909. A_UINT32 num_peers;
  18910. /*
  18911. * Following this structure is the TLV:
  18912. * struct wmi_bwf_peer_info peer_info[num_peers];
  18913. */
  18914. } wmi_peer_bwf_request_fixed_param;
  18915. /* Equal distribution of ATF air time within an VDEV. */
  18916. typedef struct {
  18917. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  18918. A_UINT32 vdev_id;
  18919. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  18920. A_UINT32 pdev_id;
  18921. } wmi_vdev_atf_request_fixed_param;
  18922. typedef struct {
  18923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  18924. /** pdev_id for identifying the MAC
  18925. * See macros starting with WMI_PDEV_ID_ for values.
  18926. */
  18927. A_UINT32 pdev_id;
  18928. /** parameter */
  18929. A_UINT32 param;
  18930. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  18931. typedef struct {
  18932. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  18933. /** pdev_id for identifying the MAC
  18934. * See macros starting with WMI_PDEV_ID_ for values.
  18935. */
  18936. A_UINT32 pdev_id;
  18937. /** parameter */
  18938. A_UINT32 param;
  18939. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  18940. typedef struct {
  18941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  18942. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18943. A_UINT32 qb_enable;
  18944. wmi_mac_addr peer_macaddr;
  18945. } WMI_QBOOST_CFG_CMD_fixed_param;
  18946. #define WMI_INST_STATS_INVALID_RSSI 0
  18947. typedef struct {
  18948. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  18949. A_UINT32 iRSSI; /* dB above the noise floor */
  18950. /* peer MAC address */
  18951. wmi_mac_addr peer_macaddr;
  18952. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18953. } wmi_inst_rssi_stats_resp_fixed_param;
  18954. typedef struct {
  18955. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  18956. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  18957. } wmi_peer_cck_ofdm_rate_info;
  18958. typedef struct {
  18959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  18960. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  18961. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  18962. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  18963. } wmi_peer_mcs_rate_info;
  18964. typedef struct {
  18965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  18966. wmi_mac_addr peer_macaddr;
  18967. A_UINT32 ratecount; /* Max Rate count for each mode */
  18968. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18969. /*
  18970. * Following this structure are the TLV:
  18971. * struct wmi_peer_cck_ofdm_rate_info;
  18972. * struct wmi_peer_mcs_rate_info;
  18973. */
  18974. } wmi_peer_ratecode_list_event_fixed_param;
  18975. typedef struct wmi_wds_addr_event {
  18976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  18977. A_UINT32 event_type[4];
  18978. wmi_mac_addr peer_mac;
  18979. wmi_mac_addr dest_mac;
  18980. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  18981. } wmi_wds_addr_event_fixed_param;
  18982. typedef struct {
  18983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  18984. wmi_mac_addr peer_macaddr;
  18985. A_UINT32 peer_ps_state;
  18986. } wmi_peer_sta_ps_statechange_event_fixed_param;
  18987. /* WMI_PDEV_FIPS_EVENTID */
  18988. typedef struct {
  18989. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  18990. union {
  18991. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  18992. /** pdev_id for identifying the MAC
  18993. * See macros starting with WMI_PDEV_ID_ for values.
  18994. */
  18995. A_UINT32 pdev_id;
  18996. };
  18997. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  18998. A_UINT32 data_len; /* Data length */
  18999. /*
  19000. * Following this structure is the TLV:
  19001. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  19002. */
  19003. } wmi_pdev_fips_event_fixed_param;
  19004. typedef struct {
  19005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  19006. union {
  19007. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19008. /** pdev_id for identifying the MAC
  19009. * See macros starting with WMI_PDEV_ID_ for values.
  19010. */
  19011. A_UINT32 pdev_id;
  19012. };
  19013. /* Noise threshold iterations with high values */
  19014. A_UINT32 noise_floor_report_iter;
  19015. /* Total noise threshold iterations */
  19016. A_UINT32 noise_floor_total_iter;
  19017. } wmi_pdev_channel_hopping_event_fixed_param;
  19018. enum {
  19019. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  19020. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  19021. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  19022. };
  19023. typedef struct {
  19024. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  19025. union {
  19026. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19027. /** pdev_id for identifying the MAC
  19028. * See macros starting with WMI_PDEV_ID_ for values.
  19029. */
  19030. A_UINT32 pdev_id;
  19031. };
  19032. A_UINT32 rate_flags;
  19033. /**
  19034. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  19035. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  19036. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  19037. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  19038. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  19039. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  19040. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  19041. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  19042. * FLAG_STBC 0x00000100 - STBC is set
  19043. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  19044. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  19045. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  19046. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  19047. * FLAG_RTSENA 0x00001000 - RTS enabled
  19048. * FLAG_CTSENA 0x00002000 - CTS enabled
  19049. * FLAG_LDPC 0x00004000 - LDPC set
  19050. * FLAG_SGI 0x00008000 - Short gaurd interval
  19051. * (0x00010000-0x00080000 unused)
  19052. *------------------
  19053. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  19054. * FLAG_SU 0x00100000 - SU Data
  19055. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  19056. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  19057. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  19058. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  19059. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  19060. *------------------
  19061. * */
  19062. A_UINT32 nss;
  19063. /**
  19064. * NSS 0x0 - 0x7
  19065. * */
  19066. A_UINT32 preamble;
  19067. /**
  19068. * PREAM_OFDM - 0x0
  19069. * PREAM_CCK - 0x1
  19070. * PREAM_HT - 0x2
  19071. * PREAM_VHT - 0x3
  19072. * PREAM_HE - 0x4
  19073. * */
  19074. A_UINT32 hw_rate;
  19075. /**
  19076. * *** HW_OFDM_RATE ***
  19077. * OFDM_48_MBPS - 0x0
  19078. * OFDM_24_MBPS - 0x1
  19079. * OFDM_12_MBPS - 0x2
  19080. * OFDM_6_MBPS - 0x3
  19081. * OFDM_54_MBPS - 0x4
  19082. * OFDM_36_MBPS - 0x5
  19083. * OFDM_18_MBPS - 0x6
  19084. * OFDM_9_MBPS - 0x7
  19085. *
  19086. * *** HW_CCK_RATE ***
  19087. * CCK_11_LONG_MBPS - 0x0
  19088. * CCK_5_5_LONG_MBPS - 0x1
  19089. * CCK_2_LONG_MBPS - 0x2
  19090. * CCK_1_LONG_MBPS - 0x3
  19091. * CCK_11_SHORT_MBPS - 0x4
  19092. * CCK_5_5_SHORT_MBPS - 0x5
  19093. * CCK_2_SHORT_MBPS - 0x6
  19094. *
  19095. * *** HW_HT / VHT_RATE ***
  19096. * MCS 0x0 - 0xb
  19097. * */
  19098. } wmi_pdev_get_tpc_cmd_fixed_param;
  19099. typedef struct {
  19100. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  19101. /** pdev_id for identifying the MAC
  19102. * See macros starting with WMI_PDEV_ID_ for values.
  19103. */
  19104. A_UINT32 pdev_id;
  19105. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  19106. typedef struct {
  19107. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_bcn_recv_stats_cmd_fixed_param */
  19108. /** VDEV identifier */
  19109. A_UINT32 vdev_id;
  19110. } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param;
  19111. /*
  19112. * wmi mws-coex command IDs
  19113. */
  19114. typedef enum {
  19115. WMI_MWS_COEX_STATE = 0x01,
  19116. WMI_MWS_COEX_DPWB_STATE,
  19117. WMI_MWS_COEX_TDM_STATE,
  19118. WMI_MWS_COEX_IDRX_STATE,
  19119. WMI_MWS_COEX_ANTENNA_SHARING_STATE,
  19120. } wmi_mws_coex_cmd_id;
  19121. typedef struct {
  19122. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */
  19123. /** VDEV identifier */
  19124. A_UINT32 vdev_id;
  19125. /** Command ID (type: wmi_mws_coex_cmd_id) */
  19126. A_UINT32 cmd_id;
  19127. } wmi_vdev_get_mws_coex_info_cmd_fixed_param;
  19128. typedef struct {
  19129. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  19130. /** pdev_id for identifying the MAC
  19131. * See macros starting with WMI_PDEV_ID_ for values.
  19132. */
  19133. A_UINT32 pdev_id;
  19134. /*
  19135. * Following this structure is the TLV:
  19136. * A_UINT32 tpc[2];
  19137. * tpc[0] - maximum power per rate
  19138. * tpc[1] - minimum power per rate
  19139. * Currently this event only provides max and min power limits
  19140. * for a single rate. In the future this event may be expanded
  19141. * to provide the information for multiple rates.
  19142. * At that time, the format of the data will be provided.
  19143. */
  19144. } wmi_pdev_tpc_event_fixed_param;
  19145. typedef struct {
  19146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  19147. union {
  19148. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  19149. /** pdev_id for identifying the MAC
  19150. * See macros starting with WMI_PDEV_ID_ for values.
  19151. */
  19152. A_UINT32 pdev_id;
  19153. };
  19154. A_UINT32 nfdBr_len;
  19155. A_UINT32 nfdBm_len;
  19156. A_UINT32 freqNum_len;
  19157. /*
  19158. * Following this structure is the TLV:
  19159. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  19160. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  19161. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  19162. */
  19163. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  19164. typedef struct {
  19165. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  19166. A_UINT32 nfdBr;
  19167. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  19168. typedef struct {
  19169. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  19170. A_UINT32 nfdBm;
  19171. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  19172. typedef struct {
  19173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  19174. A_UINT32 freqNum;
  19175. } wmi_pdev_nfcal_power_all_channels_freqNum;
  19176. typedef struct {
  19177. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  19178. A_UINT32 cck_level;
  19179. } wmi_ani_cck_event_fixed_param;
  19180. typedef enum wmi_power_debug_reg_fmt_type {
  19181. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  19182. * SOC_SYSTEM_SLEEP
  19183. * WLAN_SYSTEM_SLEEP
  19184. * RTC_SYNC_FORCE_WAKE
  19185. * MAC_DMA_ISR
  19186. * MAC_DMA_TXRX_ISR
  19187. * MAC_DMA_ISR_S1
  19188. * MAC_DMA_ISR_S2
  19189. * MAC_DMA_ISR_S3
  19190. * MAC_DMA_ISR_S4
  19191. * MAC_DMA_ISR_S5
  19192. * MAC_DMA_ISR_S6
  19193. * MAC_DMA_ISR_S7
  19194. */
  19195. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  19196. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  19197. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  19198. typedef struct {
  19199. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  19200. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  19201. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  19202. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  19203. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  19204. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  19205. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  19206. /*
  19207. * Following this structure is the TLV:
  19208. * A_UINT32 debug_registers[num_debug_registers];
  19209. */
  19210. } wmi_pdev_chip_power_stats_event_fixed_param;
  19211. typedef struct {
  19212. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param */
  19213. A_UINT32 vdev_id;
  19214. /* total_bcn_cnt
  19215. * total beacon count (tbtt instances)
  19216. * After this value reaches 255 it saturates and stays at 255.
  19217. * This field is used to determine which of the 256 bits in the
  19218. * bmiss_bitmap field are valid.
  19219. */
  19220. A_UINT32 total_bcn_cnt;
  19221. /* total_bmiss_cnt
  19222. * Total beacon miss count in last 255 beacons, max value is 255.
  19223. * This value is the number of bits set within bmiss_bitmap.
  19224. */
  19225. A_UINT32 total_bmiss_cnt;
  19226. /* bmiss_bitmap
  19227. * This bitmap indicates the status of the last 255 beacons.
  19228. * If a bit is set, that means the corresponding beacon was missed.
  19229. * Bit 0 of bmiss_bitmap[0] represents the most recent beacon.
  19230. * The total_bcn_cnt field indicates how many bits within bmiss_bitmap
  19231. * are valid.
  19232. */
  19233. A_UINT32 bmiss_bitmap[8];
  19234. } wmi_vdev_bcn_recv_stats_fixed_param;
  19235. typedef struct {
  19236. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */
  19237. A_UINT32 vdev_id;
  19238. /* LTE-WLAN coexistence scheme bitmap
  19239. * Indicates the final schemes applied for the currrent Coex scenario.
  19240. * Bit 0 - TDM policy
  19241. * Bit 1 - Forced TDM policy
  19242. * Bit 2 - Dynamic Power Back-off policy
  19243. * Bit 3 - Channel Avoidance policy
  19244. * Bit 4 - Static Power Back-off policy
  19245. */
  19246. A_UINT32 coex_scheme_bitmap;
  19247. /* Active conflict count
  19248. * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations.
  19249. */
  19250. A_UINT32 active_conflict_count;
  19251. /* Potential conflict count
  19252. * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations.
  19253. */
  19254. A_UINT32 potential_conflict_count;
  19255. /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation.
  19256. * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14.
  19257. */
  19258. A_UINT32 chavd_group0_bitmap;
  19259. /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation.
  19260. * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64.
  19261. */
  19262. A_UINT32 chavd_group1_bitmap;
  19263. /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation.
  19264. * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140.
  19265. */
  19266. A_UINT32 chavd_group2_bitmap;
  19267. /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation.
  19268. * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165.
  19269. */
  19270. A_UINT32 chavd_group3_bitmap;
  19271. } wmi_vdev_get_mws_coex_state_fixed_param;
  19272. typedef struct {
  19273. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */
  19274. A_UINT32 vdev_id;
  19275. /* Current state of the Dynamic Power Back-off state machine
  19276. * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state.
  19277. * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on
  19278. * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on
  19279. * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement.
  19280. * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off
  19281. * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off
  19282. * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off
  19283. * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state.
  19284. * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted.
  19285. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state.
  19286. * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state.
  19287. */
  19288. A_UINT32 current_dpwb_state;
  19289. /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle,
  19290. * where P(N) is the power applied during current cycle.
  19291. * ranges from 3dBm to 21 dBM
  19292. */
  19293. A_INT32 pnp1_value;
  19294. /* Indicates the duty cycle of current LTE frame.
  19295. * Duty cycle: Number of UL slots with uplink data and allocated RBs.
  19296. */
  19297. A_UINT32 lte_dutycycle;
  19298. /* LTE SINR value in dB, when WLAN is ON. */
  19299. A_INT32 sinr_wlan_on;
  19300. /* LTE SINR value in dB, when WLAN is OFF. */
  19301. A_INT32 sinr_wlan_off;
  19302. /* LTE blocks with error for the current bler report.
  19303. * Number of LTE blocks with error for a given number (block_count) of LTE blocks.
  19304. */
  19305. A_UINT32 bler_count;
  19306. /* Number of LTE blocks considered for bler count report.
  19307. * Bler repot will be generated after the reception of every "block_count" number of blocks.
  19308. */
  19309. A_UINT32 block_count;
  19310. /* WLAN RSSI level
  19311. * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w)
  19312. * 0-Good, 1-Moderate, 2-Low
  19313. */
  19314. A_UINT32 wlan_rssi_level;
  19315. /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm
  19316. * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints.
  19317. */
  19318. A_INT32 wlan_rssi;
  19319. /* Indicates whether any TDM policy triggered from Dynamic power back-off policy.
  19320. * 1 - TDM triggered.
  19321. * 0 - TDM not triggered.
  19322. */
  19323. A_UINT32 is_tdm_running;
  19324. } wmi_vdev_get_mws_coex_dpwb_state_fixed_param;
  19325. typedef struct {
  19326. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */
  19327. A_UINT32 vdev_id;
  19328. /* Time Division Multiplexing (TDM) LTE-Coex Policy type.
  19329. * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM)
  19330. * Bit 0 - SINR TDM policy.
  19331. * Bit 1 - RSSI TDM policy.
  19332. * Bit 2 - Low Rx rate TDM policy
  19333. * Bit 3 - Sticky TDM policy
  19334. */
  19335. A_UINT32 tdm_policy_bitmap;
  19336. /* TDM LTE/WLAN sub-frame bitmap
  19337. * Indicates the bitmap of LTE/WLAN sub-frames.
  19338. * value 0: WLAN slot.
  19339. * value 1: LTE slot.
  19340. */
  19341. A_UINT32 tdm_sf_bitmap;
  19342. } wmi_vdev_get_mws_coex_tdm_state_fixed_param;
  19343. typedef struct {
  19344. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */
  19345. A_UINT32 vdev_id;
  19346. /* SUB0 LTE-coex tech.
  19347. *------------------------
  19348. * TECH TECH_ID
  19349. *------------------------
  19350. * LTE 0
  19351. * TDSCDMA 1
  19352. * GSM1 2
  19353. * ONEX 3
  19354. * HDR 4
  19355. * WCDMA 5
  19356. * GSM2 6
  19357. * GSM3 7
  19358. * WCDMA2 8
  19359. * LTE2 9
  19360. * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1
  19361. */
  19362. A_UINT32 sub0_techid;
  19363. /* SUB0 mitigation policy.
  19364. * Indicates the mitigation policy used to coexist with WLAN.
  19365. * 1 - Tx blanking
  19366. * 2 - Static power back-off
  19367. */
  19368. A_UINT32 sub0_policy;
  19369. /* Set if SUB0 is in link critical state.
  19370. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  19371. */
  19372. A_UINT32 sub0_is_link_critical;
  19373. /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex.
  19374. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  19375. */
  19376. A_INT32 sub0_static_power;
  19377. /* LTE SUB0 RSSI value in dBm */
  19378. A_INT32 sub0_rssi;
  19379. /* SUB1 LTE-coex tech.
  19380. *------------------------
  19381. * TECH TECH_ID
  19382. *------------------------
  19383. * LTE 0
  19384. * TDSCDMA 1
  19385. * GSM1 2
  19386. * ONEX 3
  19387. * HDR 4
  19388. * WCDMA 5
  19389. * GSM2 6
  19390. * GSM3 7
  19391. * WCDMA2 8
  19392. * LTE2 9
  19393. * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2
  19394. */
  19395. A_UINT32 sub1_techid;
  19396. /* SUB1 mitigation policy.
  19397. * Indicates the mitigation policy used to coexist with WLAN.
  19398. * 1 - Tx blanking
  19399. * 2 - Static power back-off
  19400. */
  19401. A_UINT32 sub1_policy;
  19402. /* Set if SUB1 is in link critical state.
  19403. * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side.
  19404. */
  19405. A_UINT32 sub1_is_link_critical;
  19406. /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex.
  19407. * Value of static power applied during LTE page cycle ranges from 3-21 dBm.
  19408. */
  19409. A_INT32 sub1_static_power;
  19410. /* LTE SUB1 RSSI value in dBm */
  19411. A_INT32 sub1_rssi;
  19412. } wmi_vdev_get_mws_coex_idrx_state_fixed_param;
  19413. typedef struct {
  19414. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */
  19415. A_UINT32 vdev_id;
  19416. /* BDF values of Coex flags.
  19417. * coexflag 0x1 = MWS Coex enabled
  19418. * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band.
  19419. */
  19420. A_UINT32 coex_flags;
  19421. /* BDF values of Coex Antenna sharing config
  19422. * coex_config 0x0 = no Antenna sharing
  19423. * coexconfig 0x1 = switched based Antenna sharing
  19424. * coexconfig 0x2 = splitter based Antenna sharing
  19425. */
  19426. A_UINT32 coex_config;
  19427. /* Tx Chain mask value
  19428. * Bit 0: Tx chain-0
  19429. * Bit 1: Tx Chain-1
  19430. * value: 0x1 - Operating in 1X1
  19431. * value: 0x3 - Operating in 2X2
  19432. */
  19433. A_UINT32 tx_chain_mask;
  19434. /* Rx Chain mask value
  19435. * Bit 0: Rx chain-0
  19436. * Bit 1: Rx Chain-1
  19437. * value: 0x1 - Operating in 1X1
  19438. * value: 0x3 - Operating in 2X2
  19439. */
  19440. A_UINT32 rx_chain_mask;
  19441. /* Currently active Rx Spatial streams
  19442. * Bit 0: Rx Spatial Stream-0
  19443. * Bit 1: Rx Spatial Stream-1
  19444. */
  19445. A_UINT32 rx_nss;
  19446. /* Forced MRC policy type
  19447. * BTC_FORCED (0x01)
  19448. * RSSI_FORCED (0x02)
  19449. * MODEM_ACQ_FORCED (0x04)
  19450. */
  19451. A_UINT32 force_mrc;
  19452. /* RSSI value considered for MRC
  19453. * 1: Data RSSI
  19454. * 2: Beacon RSSI
  19455. */
  19456. A_UINT32 rssi_type;
  19457. /* RSSI value measured at Chain-0 in dBm */
  19458. A_INT32 chain0_rssi;
  19459. /* RSSI value measured at Chain-1 in dBm */
  19460. A_INT32 chain1_rssi;
  19461. /* RSSI value of two chains combined in dBm */
  19462. A_INT32 combined_rssi;
  19463. /* Absolute imbalance between two Rx chains in dB */
  19464. A_UINT32 imbalance;
  19465. /* RSSI threshold defined for the above imbalance value in dBm.
  19466. * Based on the degree of imbalance between the rx chains, different
  19467. * RSSI thresholds are used to determine whether MRC (Maximum-Ratio
  19468. * Combining) use of multiple rx chains is suitable.
  19469. * This field shows the RSSI threshold below which MRC is used.
  19470. */
  19471. A_INT32 mrc_threshold;
  19472. /* Antenna grant duration to WLAN, in milliseconds */
  19473. A_UINT32 grant_duration;
  19474. } wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param;
  19475. typedef enum wmi_chip_power_save_failure_reason_code_type {
  19476. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  19477. WMI_HW_POWER_SAVE_FAILURE_REASON,
  19478. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  19479. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  19480. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  19481. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  19482. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  19483. typedef struct {
  19484. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  19485. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  19486. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  19487. } wmi_chip_power_save_failure_detected_fixed_param;
  19488. typedef struct {
  19489. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  19490. A_UINT32 ofdm_level;
  19491. } wmi_ani_ofdm_event_fixed_param;
  19492. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  19493. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  19494. * lower priority when compared to WLAN high priority traffic.
  19495. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  19496. */
  19497. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  19498. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  19499. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  19500. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  19501. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  19502. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  19503. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  19504. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  19505. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  19506. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  19507. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  19508. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  19509. typedef enum wmi_coex_algo_type {
  19510. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  19511. WMI_COEX_ALGO_FREERUN = 1,
  19512. WMI_COEX_ALGO_OCS = 2,
  19513. } WMI_COEX_ALGO_TYPE;
  19514. typedef enum wmi_coex_config_type {
  19515. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  19516. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  19517. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  19518. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  19519. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  19520. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  19521. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  19522. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  19523. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  19524. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  19525. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  19526. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  19527. 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) */
  19528. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  19529. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  19530. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  19531. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  19532. arg1 PTA num,
  19533. arg2 mode (2-wire/3-wire/PTA),
  19534. arg3 first slot time in microsec,
  19535. arg4 BT priority time in microsec,
  19536. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  19537. arg6 PTA priority */
  19538. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  19539. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  19540. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  19541. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  19542. arg2-arg5: BT information parameters */
  19543. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  19544. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  19545. WMI_COEX_CONFIG_LOWRSSI_A2DPOPP_TDM = 23, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + A2dp + OPP + LOWRSSI */
  19546. WMI_COEX_CONFIG_BTC_MODE = 24, /* config BTC mode, arg1 mode: 0 TDD/1 FDD/2 Hybrid*/
  19547. WMI_COEX_CONFIG_ANTENNA_ISOLATION = 25, /* config isolation between BT and WLAN chains
  19548. * The arguments are interpreted differently
  19549. * depending on whether the target suppports
  19550. * WMI_SERVICE_COEX_SUPPORT_UNEQUAL_ISOLATION
  19551. * If (not COEX_SUPPORT_UNEQUAL_ISOLATION) or arg2 == 0:
  19552. * arg1 => isolation between BT and WLAN chains,
  19553. * dB units,
  19554. * same isolation for all chains
  19555. * Else:
  19556. * arg1 bits 7:0 - chain 0 isolation, in dB
  19557. * arg1 bits 15:8 - chain 1 isolation, in dB
  19558. * arg1 bits 23:16 - chain 2 isolation, in dB
  19559. * arg1 bits 31:24 - chain 3 isolation, in dB
  19560. * arg2 - 0 => Equal isolation b/w BT and each WLAN chain (default)
  19561. * 1 => Different isolation b/w BT and each WLAN chain
  19562. */
  19563. WMI_COEX_CONFIG_BT_LOW_RSSI_THRESHOLD = 26,/*config BT low rssi threshold (dbm units)*/
  19564. WMI_COEX_CONFIG_BT_INTERFERENCE_LEVEL = 27,/*config bt interference level (dbm units)
  19565. arg1 low - lower limit
  19566. arg2 low - upper limit
  19567. arg3 medium - lower limit
  19568. arg4 medium - upper limit
  19569. arg5 high - lower limit
  19570. arg6 high - upper limit */
  19571. WMI_COEX_CONFIG_WLAN_OVER_ZBLOW = 28, /* config to boost WiFi traffic over 15.4 Low prio traffic */
  19572. WMI_COEX_CONFIG_WLAN_MGMT_OVER_BT_A2DP = 29, /* config to raise WLAN priority higher than BT in coex scenario of SAP + BT or 15.4 */
  19573. WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */
  19574. WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */
  19575. WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */
  19576. /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA
  19577. * config to T_PRIO T_DELAY parameter for each case
  19578. * arg1 - wlan/bt state
  19579. * 0: beacon tx
  19580. * 1: wlan connecting
  19581. * 2: wlan in dhcp
  19582. * 3: a2dp critical
  19583. * 4: eSCO
  19584. * arg2 - t_prio for low priority traffic (microsecond units)
  19585. * arg3 - t_delay for low priority traffic (microsecond units)
  19586. * arg4 - t_prio for high priority traffic (microsecond units)
  19587. * arg5 - t_delay for high priority traffic (microsecond units)
  19588. */
  19589. WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33,
  19590. } WMI_COEX_CONFIG_TYPE;
  19591. typedef struct {
  19592. A_UINT32 tlv_header;
  19593. A_UINT32 vdev_id;
  19594. A_UINT32 config_type; /* wmi_coex_config_type enum */
  19595. A_UINT32 config_arg1;
  19596. A_UINT32 config_arg2;
  19597. A_UINT32 config_arg3;
  19598. A_UINT32 config_arg4;
  19599. A_UINT32 config_arg5;
  19600. A_UINT32 config_arg6;
  19601. } WMI_COEX_CONFIG_CMD_fixed_param;
  19602. /**
  19603. * This command is sent from WLAN host driver to firmware to
  19604. * request firmware to enable/disable channel avoidance report
  19605. * to host.
  19606. *
  19607. */
  19608. enum {
  19609. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  19610. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  19611. };
  19612. typedef struct {
  19613. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  19614. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  19615. A_UINT32 rpt_allow;
  19616. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  19617. /*
  19618. * Periodic channel stats WMI command structure
  19619. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  19620. */
  19621. typedef struct {
  19622. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  19623. /** 1 = enable, 0 = disable */
  19624. A_UINT32 enable;
  19625. /** periodic stats duration (units are milliseconds) */
  19626. A_UINT32 stats_period;
  19627. /** pdev_id for identifying the MAC
  19628. * See macros starting with WMI_PDEV_ID_ for values.
  19629. */
  19630. A_UINT32 pdev_id;
  19631. } wmi_set_periodic_channel_stats_config_fixed_param;
  19632. typedef struct {
  19633. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  19634. /** pdev_id for identifying the MAC
  19635. * See macros starting with WMI_PDEV_ID_ for values.
  19636. */
  19637. A_UINT32 pdev_id;
  19638. /* Identify the wlan module */
  19639. A_UINT32 module_id;
  19640. /* Num of elements in the following args[] array */
  19641. A_UINT32 num_args;
  19642. /**
  19643. * Following this structure are the TLVs:
  19644. * A_UINT32 args[];
  19645. **/
  19646. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  19647. typedef struct {
  19648. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  19649. /**
  19650. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  19651. * @details
  19652. * Each WMM access category (voice, video, best-effort, background)
  19653. * will have its own timeout value to dictate how long to wait for
  19654. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  19655. * have already been received.
  19656. * This parameter specifies the timeout in milliseconds for each
  19657. * access category.
  19658. * The array elements are indexed by the WMI_AC enum to identify
  19659. * which array element corresponds to which AC / traffic type.
  19660. */
  19661. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  19662. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  19663. /**
  19664. * wlan stats shall be understood as per period.
  19665. * Generally, it is reported periodically based on the period specified by host.
  19666. * But if the variation of one stats of compared to the
  19667. * pervious notification exceeds a threshold,
  19668. * FW will report the wlan stats immediately.
  19669. * The values of the stats becomes the new reference to compute variations.
  19670. * This threshold can be a global setting or per category.
  19671. * Host can enable/disable the mechanism for any stats per bitmap.
  19672. * TX/RX thresholds (percentage value) are shared across ACs,
  19673. * and TX/RX stats comprisons are processed per AC of each peer.
  19674. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  19675. * and the detailed tx_mpdus threshold value is set to 10%,
  19676. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  19677. * and it reaches 110 during the second period,
  19678. * FW will generate and send out a wlan stats event immediately.
  19679. */
  19680. typedef struct {
  19681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  19682. /** Indicate if threshold mechnism is enabled or disabled.
  19683. * It is disabled by default.
  19684. * Host can enable and disable it dynamically.
  19685. */
  19686. A_UINT32 enable_thresh;
  19687. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  19688. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  19689. */
  19690. A_UINT32 use_thresh_bitmap;
  19691. /** global threshold, valid when use_thresh_bitmap equals 0.
  19692. * It takes effect for all counters.
  19693. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  19694. */
  19695. A_UINT32 gbl_thresh;
  19696. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  19697. A_UINT32 cca_thresh_enable_bitmap;
  19698. /** Enable/disable bitmap for threshold mechanism of signal stats */
  19699. A_UINT32 signal_thresh_enable_bitmap;
  19700. /** Enable/disable bitmap for threshold mechanism of TX stats */
  19701. A_UINT32 tx_thresh_enable_bitmap;
  19702. /** Enable/disable bitmap for threshold mechanism of RX stats */
  19703. A_UINT32 rx_thresh_enable_bitmap;
  19704. /* This TLV is followed by TLVs below:
  19705. * wmi_chan_cca_stats_thresh cca_thresh;
  19706. * wmi_peer_signal_stats_thresh signal_thresh;
  19707. * wmi_tx_stats_thresh tx_thresh;
  19708. * wmi_rx_stats_thresh rx_thresh;
  19709. */
  19710. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  19711. typedef enum {
  19712. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  19713. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  19714. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  19715. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  19716. } wmi_wlan_stats_id;
  19717. typedef struct {
  19718. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  19719. wmi_wlan_stats_id stats_id;
  19720. } wmi_request_wlan_stats_cmd_fixed_param;
  19721. typedef enum {
  19722. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  19723. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  19724. } wmi_peer_stats_info_request_type;
  19725. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  19726. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  19727. */
  19728. typedef struct {
  19729. /** TLV tag and len; tag equals
  19730. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  19731. A_UINT32 tlv_header;
  19732. /** request_type to indicate if only stats of
  19733. * one peer or all peers of the VDEV are requested,
  19734. * see wmi_peer_stats_info_request_type.
  19735. */
  19736. A_UINT32 request_type;
  19737. /** VDEV identifier */
  19738. A_UINT32 vdev_id;
  19739. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  19740. wmi_mac_addr peer_macaddr;
  19741. /** flag to indicate if FW needs to reset requested peers stats */
  19742. A_UINT32 reset_after_request;
  19743. } wmi_request_peer_stats_info_cmd_fixed_param;
  19744. typedef enum {
  19745. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  19746. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  19747. } wmi_radio_chan_stats_request_type;
  19748. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  19749. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  19750. */
  19751. typedef struct {
  19752. /** TLV tag and len; tag equals
  19753. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  19754. A_UINT32 tlv_header;
  19755. /** request_type to indicate if only stats of
  19756. * one channel or all channels are requested,
  19757. * see wmi_radio_chan_stats_request_type.
  19758. */
  19759. A_UINT32 request_type;
  19760. /** Frequency of channel whose stats is requested,
  19761. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  19762. */
  19763. A_UINT32 chan_mhz;
  19764. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  19765. A_UINT32 reset_after_request;
  19766. } wmi_request_radio_chan_stats_cmd_fixed_param;
  19767. typedef struct {
  19768. /** TLV tag and len; tag equals
  19769. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  19770. A_UINT32 tlv_header;
  19771. /* VDEV identifier */
  19772. A_UINT32 vdev_id;
  19773. /* Leader's mac address */
  19774. wmi_mac_addr leader_mac_addr;
  19775. } wmi_rmc_set_leader_cmd_fixed_param;
  19776. typedef struct {
  19777. /** TLV tag and len; tag equals
  19778. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  19779. A_UINT32 tlv_header;
  19780. /* VDEV identifier */
  19781. A_UINT32 vdev_id;
  19782. /* 0: success
  19783. * 1: selected leader not found in network, able to find using auto selection
  19784. * -1: error
  19785. * non zero value should be return to userspace in case of failure */
  19786. A_INT32 status;
  19787. /* bssid of new leader */
  19788. wmi_mac_addr leader_mac_addr;
  19789. } wmi_rmc_manual_leader_event_fixed_param;
  19790. typedef enum {
  19791. WLAN_2G_CAPABILITY = 0x1,
  19792. WLAN_5G_CAPABILITY = 0x2,
  19793. } WLAN_BAND_CAPABILITY;
  19794. typedef enum wmi_hw_mode_config_type {
  19795. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  19796. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  19797. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  19798. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  19799. * Support for both PHYs within one band is planned for 5G only
  19800. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  19801. * but could be extended to other bands in the future.
  19802. * The separation of the band between the two PHYs needs to be communicated separately.
  19803. */
  19804. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  19805. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  19806. */
  19807. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  19808. } WMI_HW_MODE_CONFIG_TYPE;
  19809. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  19810. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  19811. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  19812. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  19813. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  19814. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  19815. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  19816. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  19817. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  19818. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  19819. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  19820. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  19821. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  19822. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  19823. typedef struct {
  19824. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  19825. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  19826. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  19827. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  19828. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  19829. * though in practice the elements may always be ordered by hw_mode_id */
  19830. A_UINT32 hw_mode_id;
  19831. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  19832. A_UINT32 pdev_id;
  19833. /* phy id. Starts with 0 */
  19834. A_UINT32 phy_id;
  19835. /* supported modulations and number of MU beamformees */
  19836. union {
  19837. struct {
  19838. A_UINT32 supports_11b:1,
  19839. supports_11g:1,
  19840. supports_11a:1,
  19841. supports_11n:1,
  19842. supports_11ac:1,
  19843. supports_11ax:1,
  19844. unused: 22,
  19845. max_mubfee: 4; /* max MU beamformees supported per MAC */
  19846. };
  19847. A_UINT32 supported_flags;
  19848. };
  19849. /* supported bands, enum WLAN_BAND_CAPABILITY */
  19850. A_UINT32 supported_bands;
  19851. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  19852. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  19853. A_UINT32 ampdu_density;
  19854. /* max bw supported 2G, enum wmi_channel_width */
  19855. A_UINT32 max_bw_supported_2G;
  19856. /* WMI HT Capability, WMI_HT_CAP defines */
  19857. A_UINT32 ht_cap_info_2G;
  19858. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  19859. A_UINT32 vht_cap_info_2G;
  19860. /* VHT Supported MCS Set field Rx/Tx same
  19861. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  19862. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  19863. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  19864. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  19865. * - 3 indicates that n spatial streams is not supported
  19866. * - bit [15:0] Each NSS takes 2 bit.
  19867. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  19868. * n spatial streams
  19869. * - bit 16 - for NSS 1
  19870. * - bit 17 - for NSS 2
  19871. * - .
  19872. * - .
  19873. * - bit 23 - for NSS 8
  19874. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  19875. * are valid
  19876. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  19877. */
  19878. A_UINT32 vht_supp_mcs_2G;
  19879. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  19880. A_UINT32 he_cap_info_2G;
  19881. /* HE Supported MCS Set field Rx/Tx same
  19882. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19883. * bit 2-0 indicating max HE MCS of NSS1
  19884. * bit 5-3 indicating max HE MCS of NSS2 and so on
  19885. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  19886. * HE BW less than or equal to 80MHZ is encoded as follows
  19887. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  19888. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  19889. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  19890. * - 3 indicates that n spatial streams is not supported
  19891. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19892. */
  19893. A_UINT32 he_supp_mcs_2G;
  19894. /* Valid Transmit chain mask */
  19895. A_UINT32 tx_chain_mask_2G;
  19896. /* Valid Receive chain mask */
  19897. A_UINT32 rx_chain_mask_2G;
  19898. /* max bw supported 5G, enum wmi_channel_width */
  19899. A_UINT32 max_bw_supported_5G;
  19900. /* WMI HT Capability, WMI_HT_CAP defines */
  19901. A_UINT32 ht_cap_info_5G;
  19902. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  19903. A_UINT32 vht_cap_info_5G;
  19904. /* VHT Supported MCS Set field Rx/Tx same
  19905. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  19906. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  19907. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  19908. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  19909. * - 3 indicates that n spatial streams is not supported
  19910. * - bit [15:0] Each NSS takes 2 bit.
  19911. * - bit [23:16] Indicates support for VHT-MCS 10 and 11 for
  19912. * n spatial streams
  19913. * - bit 16 - for NSS 1
  19914. * - bit 17 - for NSS 2
  19915. * - .
  19916. * - .
  19917. * - bit 23 - for NSS 8
  19918. * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16
  19919. * are valid
  19920. * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros.
  19921. */
  19922. A_UINT32 vht_supp_mcs_5G;
  19923. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  19924. A_UINT32 he_cap_info_5G;
  19925. /* HE Supported MCS Set field Rx/Tx same
  19926. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  19927. * bit 2-0 indicating max HE MCS of NSS1
  19928. * bit 5-3 indicating max HE MCS of NSS2 and so on
  19929. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  19930. * HE BW less than or equal to 80MHZ is encoded as follows
  19931. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  19932. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  19933. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  19934. * - 3 indicates that n spatial streams is not supported
  19935. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  19936. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  19937. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  19938. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  19939. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  19940. */
  19941. A_UINT32 he_supp_mcs_5G;
  19942. /* Valid Transmit chain mask */
  19943. A_UINT32 tx_chain_mask_5G;
  19944. /* Valid Receive chain mask */
  19945. A_UINT32 rx_chain_mask_5G;
  19946. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  19947. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  19948. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  19949. wmi_ppe_threshold he_ppet2G;
  19950. wmi_ppe_threshold he_ppet5G;
  19951. /* chainmask table to be used for the MAC */
  19952. A_UINT32 chainmask_table_id;
  19953. /* PDEV ID to LMAC ID mapping */
  19954. A_UINT32 lmac_id;
  19955. /* 2nd DWORD of HE capability info field of 802.11ax, support Draft 3+ */
  19956. A_UINT32 he_cap_info_2G_ext;
  19957. A_UINT32 he_cap_info_5G_ext;
  19958. /*
  19959. * bit 0 : Indicated support for RX 1xLTF + 0.4us
  19960. * bit 1 : Indicates support for RX 2xLTF + 0.4us
  19961. * bit 2 : Indicates support for 2xLTF in 160/80+80 MHz HE PPDU
  19962. * bit[31:3] : Reserved
  19963. * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros
  19964. */
  19965. A_UINT32 he_cap_info_internal;
  19966. } WMI_MAC_PHY_CAPABILITIES;
  19967. typedef struct {
  19968. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  19969. /* hw_mode_id - identify a particular set of HW characteristics,
  19970. * as specified by the subsequent fields */
  19971. A_UINT32 hw_mode_id;
  19972. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  19973. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  19974. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  19975. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  19976. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  19977. A_UINT32 phy_id_map;
  19978. /* hw_mode_config_type
  19979. * Identify a particular type of HW mode such as SBS, DBS etc.
  19980. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  19981. */
  19982. A_UINT32 hw_mode_config_type;
  19983. } WMI_HW_MODE_CAPABILITIES;
  19984. /*
  19985. * The following macros are for the bitfields witihin the supported flags field
  19986. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  19987. * Capabilities for the chainmask
  19988. */
  19989. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  19990. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  19991. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  19992. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  19993. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  19994. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  19995. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  19996. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  19997. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  19998. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  19999. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  20000. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  20001. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  20002. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  20003. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  20004. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  20005. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  20006. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  20007. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  20008. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  20009. /** Definition of valid chainmask and associated capabilities */
  20010. typedef struct {
  20011. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  20012. /* supported flags: Capabilities for this chianmask*/
  20013. union {
  20014. struct {
  20015. A_UINT32 supports_chan_width_20:1,
  20016. supports_chan_width_40:1,
  20017. supports_chan_width_80:1,
  20018. supports_chan_width_160:1,
  20019. supports_chan_width_80P80:1,
  20020. reserved:22, /* bits 26:5 */
  20021. chain_mask_2G:1,
  20022. chain_mask_5G:1,
  20023. chain_mask_tx:1,
  20024. chain_mask_rx:1,
  20025. supports_aDFS:1; /* agile DFS */
  20026. };
  20027. A_UINT32 supported_flags;
  20028. };
  20029. A_UINT32 chainmask;
  20030. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  20031. typedef struct {
  20032. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  20033. A_UINT32 chainmask_table_id;
  20034. /* Number of vaild Chainmask in the table */
  20035. A_UINT32 num_valid_chainmask;
  20036. /*
  20037. * This TLV is followed by the below TLVs:
  20038. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  20039. */
  20040. } WMI_MAC_PHY_CHAINMASK_COMBO;
  20041. typedef struct {
  20042. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  20043. /* num HW modes */
  20044. A_UINT32 num_hw_modes;
  20045. /* number of unique chainmask combo tables */
  20046. A_UINT32 num_chainmask_tables;
  20047. /*
  20048. * This TLV is followed by the below TLVs:
  20049. *
  20050. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  20051. *
  20052. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  20053. *
  20054. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  20055. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  20056. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  20057. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  20058. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  20059. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  20060. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  20061. * etc.
  20062. */
  20063. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  20064. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  20065. typedef struct {
  20066. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  20067. /* phy id */
  20068. A_UINT32 phy_id;
  20069. /* regdomain value specified in EEPROM */
  20070. A_UINT32 eeprom_reg_domain;
  20071. /* regdomain */
  20072. A_UINT32 eeprom_reg_domain_ext;
  20073. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  20074. A_UINT32 regcap1;
  20075. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  20076. A_UINT32 regcap2;
  20077. /* REGDMN MODE, see REGDMN_MODE_ enum */
  20078. A_UINT32 wireless_modes;
  20079. A_UINT32 low_2ghz_chan;
  20080. A_UINT32 high_2ghz_chan;
  20081. A_UINT32 low_5ghz_chan;
  20082. A_UINT32 high_5ghz_chan;
  20083. } WMI_HAL_REG_CAPABILITIES_EXT;
  20084. typedef struct {
  20085. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  20086. A_UINT32 num_phy;
  20087. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  20088. } WMI_SOC_HAL_REG_CAPABILITIES;
  20089. typedef struct {
  20090. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  20091. A_UINT32 pdev_id;
  20092. A_UINT32 min_num_ptr;
  20093. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  20094. A_UINT32 min_buf_size;
  20095. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  20096. A_UINT32 min_buf_align;
  20097. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  20098. } WMI_OEM_DMA_RING_CAPABILITIES;
  20099. typedef struct {
  20100. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  20101. /* sar version in bdf */
  20102. A_UINT32 active_version;
  20103. } WMI_SAR_CAPABILITIES;
  20104. typedef struct {
  20105. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  20106. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  20107. A_UINT32 default_adaptive_dwell_mode;
  20108. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  20109. A_UINT32 adapative_lpf_weight;
  20110. /** interval to monitor passive scan in msec */
  20111. A_UINT32 passive_monitor_interval_ms;
  20112. /** % of wifi activity to switch from passive to active 0-100 */
  20113. A_UINT32 wifi_activity_threshold_pct;
  20114. } wmi_scan_adaptive_dwell_parameters_tlv;
  20115. typedef struct {
  20116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  20117. /* globally enable/disable adaptive dwell */
  20118. A_UINT32 enable;
  20119. /** pdev_id for identifying the MAC
  20120. * See macros starting with WMI_PDEV_ID_ for values.
  20121. * In non-DBDC case host should set it to 0
  20122. */
  20123. A_UINT32 pdev_id;
  20124. /**
  20125. * followed by TLV (tag length value) parameters array
  20126. * The TLV's are:
  20127. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  20128. */
  20129. } wmi_scan_adaptive_dwell_config_fixed_param;
  20130. typedef struct {
  20131. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  20132. /** module_id **/
  20133. A_UINT32 module_id;
  20134. /** number of dbs scans */
  20135. A_UINT32 num_dbs_scans;
  20136. /** number of non-dbs scans */
  20137. A_UINT32 num_non_dbs_scans;
  20138. } wmi_scan_dbs_duty_cycle_tlv_param;
  20139. typedef struct {
  20140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  20141. /* number of scan client dutycycle param elements */
  20142. A_UINT32 num_clients;
  20143. /** pdev_id for identifying the MAC
  20144. * See macros starting with WMI_PDEV_ID_ for values.
  20145. * In non-DBDC case host should set it to 0
  20146. */
  20147. A_UINT32 pdev_id;
  20148. /**
  20149. * followed by TLV (tag length value) parameters array
  20150. * The TLV's are:
  20151. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  20152. */
  20153. } wmi_scan_dbs_duty_cycle_fixed_param;
  20154. typedef struct {
  20155. /** TLV tag and len; tag equals
  20156. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  20157. A_UINT32 tlv_header;
  20158. /**
  20159. * temperature sensor value in celsius when to exit to lower zone,
  20160. * this value can be lower than HWM of lower zone as zone overlapping
  20161. * is permitted by design to provide hysteresis
  20162. */
  20163. A_UINT32 temp_lwm;
  20164. /**
  20165. * temperature sensor value in celsius when to exit to higher zone,
  20166. * this value can be higher than LWM of higher zone as zone overlapping
  20167. * is permitted by design to provide hysteresis
  20168. */
  20169. A_UINT32 temp_hwm;
  20170. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  20171. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  20172. * Prioritization:
  20173. * 0 = disable all data tx queues, No Prioritization defined
  20174. * 1 = disable BK tx queue
  20175. * 2 = disable BK+BE tx queues
  20176. * 3 = disable BK+BE+VI tx queues
  20177. */
  20178. A_UINT32 prio;
  20179. } wmi_therm_throt_level_config_info;
  20180. typedef struct {
  20181. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  20182. A_UINT32 pdev_id; /* config for each pdev */
  20183. A_UINT32 enable; /* 0:disable, 1:enable */
  20184. A_UINT32 dc; /* duty cycle in ms */
  20185. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  20186. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  20187. /*
  20188. * Following this structure is the TLV:
  20189. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  20190. */
  20191. } wmi_therm_throt_config_request_fixed_param;
  20192. /** FW response with the stats event id for every pdev and zones */
  20193. typedef struct {
  20194. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  20195. A_UINT32 tlv_header;
  20196. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  20197. A_UINT32 temp; /* Temperature reading in celsius */
  20198. A_UINT32 level; /* current thermal throttling level */
  20199. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  20200. /* This TLV is followed by another TLV of array of structs
  20201. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  20202. */
  20203. } wmi_therm_throt_stats_event_fixed_param;
  20204. typedef struct {
  20205. /** TLV tag and len; tag equals
  20206. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  20207. A_UINT32 tlv_header;
  20208. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  20209. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  20210. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  20211. } wmi_therm_throt_level_stats_info;
  20212. typedef enum {
  20213. WMI_REG_EXT_FCC_MIDBAND = 0,
  20214. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  20215. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  20216. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  20217. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  20218. WMI_REG_EXT_FCC_CH_144 = 5,
  20219. } WMI_REG_EXT_BITMAP;
  20220. #ifdef WMI_CMD_STRINGS
  20221. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  20222. {
  20223. switch (wmi_command) {
  20224. /* initialize the wlan sub system */
  20225. WMI_RETURN_STRING(WMI_INIT_CMDID);
  20226. /* Scan specific commands */
  20227. /* start scan request to FW */
  20228. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  20229. /* stop scan request to FW */
  20230. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  20231. /* full list of channels as defined by the regulatory
  20232. * that will be used by scanner */
  20233. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  20234. /* overwrite default priority table in scan scheduler */
  20235. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  20236. /* This command to adjust the priority and min.max_rest_time
  20237. * of an on ongoing scan request.
  20238. */
  20239. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  20240. /* PDEV(physical device) specific commands */
  20241. /* set regulatorty ctl id used by FW to determine the exact
  20242. * ctl power limits */
  20243. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  20244. /* set channel. mainly used for supporting monitor mode */
  20245. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  20246. /* set pdev specific parameters */
  20247. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  20248. /* enable packet log */
  20249. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  20250. /* disable packet log*/
  20251. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  20252. /* set wmm parameters */
  20253. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  20254. /* set HT cap ie that needs to be carried probe requests
  20255. * HT/VHT channels */
  20256. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  20257. /* set VHT cap ie that needs to be carried on probe
  20258. * requests on VHT channels */
  20259. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  20260. /* Command to send the DSCP-to-TID map to the target */
  20261. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  20262. /* set quiet ie parameters. primarily used in AP mode */
  20263. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  20264. /* Enable/Disable Green AP Power Save */
  20265. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  20266. /* get TPC config for the current operating channel */
  20267. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  20268. /* set the base MAC address for the physical device before
  20269. * a VDEV is created. For firmware that does not support
  20270. * this feature and this command, the pdev MAC address will
  20271. * not be changed. */
  20272. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  20273. /* eeprom content dump , the same to bdboard data */
  20274. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  20275. /* VDEV(virtual device) specific commands */
  20276. /* vdev create */
  20277. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  20278. /* vdev delete */
  20279. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  20280. /* vdev start request */
  20281. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  20282. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  20283. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  20284. /* vdev up request */
  20285. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  20286. /* vdev stop request */
  20287. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  20288. /* vdev down request */
  20289. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  20290. /* set a vdev param */
  20291. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  20292. /* set a key (used for setting per peer unicast
  20293. * and per vdev multicast) */
  20294. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  20295. /* wnm sleep mode command */
  20296. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  20297. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  20298. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  20299. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  20300. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  20301. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  20302. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  20303. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  20304. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  20305. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  20306. /* peer specific commands */
  20307. /** create a peer */
  20308. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  20309. /** delete a peer */
  20310. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  20311. /** flush specific tid queues of a peer */
  20312. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  20313. /** set a parameter of a peer */
  20314. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  20315. /* set peer to associated state. will cary all parameters
  20316. * determined during assocication time */
  20317. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  20318. /* add a wds (4 address ) entry. used only for testing
  20319. * WDS feature on AP products */
  20320. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  20321. /* remove wds (4 address ) entry. used only for testing WDS
  20322. * feature on AP products */
  20323. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  20324. /* set up mcast info for multicast to unicast conversion */
  20325. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  20326. /* request peer info from FW to get PEER_INFO_EVENTID */
  20327. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  20328. /* unmap response for a peer */
  20329. WMI_RETURN_STRING(WMI_PEER_UNMAP_RESPONSE_CMDID);
  20330. /* beacon/management specific commands */
  20331. /* transmit beacon by reference. used for transmitting beacon
  20332. * on low latency interface like pcie */
  20333. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  20334. /* transmit beacon by value */
  20335. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  20336. /* set the beacon template. used in beacon offload mode to setup
  20337. * the common beacon template with the FW to be used by FW to
  20338. * generate beacons */
  20339. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  20340. /* set beacon filter with FW */
  20341. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  20342. /* enable/disable filtering of probe requests in the firmware */
  20343. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  20344. /* transmit management frame by value. will be deprecated */
  20345. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  20346. /* set the probe response template. used in beacon offload mode
  20347. * to setup the common probe response template with the FW to
  20348. * be used by FW to generate probe responses */
  20349. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  20350. /* commands to directly control ba negotiation directly from
  20351. * host. only used in test mode */
  20352. /* turn off FW Auto addba mode and let host control addba */
  20353. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  20354. /* send add ba request */
  20355. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  20356. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  20357. /* send del ba */
  20358. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  20359. /* set add ba response will be used by FW to generate
  20360. * addba response*/
  20361. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  20362. /* send single VHT MPDU with AMSDU */
  20363. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  20364. /* Station power save specific config */
  20365. /* enable/disable station powersave */
  20366. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  20367. /* set station power save specific parameter */
  20368. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  20369. /* set station mimo powersave mode */
  20370. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  20371. /* DFS-specific commands */
  20372. /* enable DFS (radar detection)*/
  20373. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  20374. /* disable DFS (radar detection)*/
  20375. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  20376. /* enable DFS phyerr/parse filter offload */
  20377. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  20378. /* enable DFS phyerr/parse filter offload */
  20379. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  20380. /* Roaming specific commands */
  20381. /* set roam scan mode */
  20382. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  20383. /* set roam scan rssi threshold below which roam
  20384. * scan is enabled */
  20385. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  20386. /* set roam scan period for periodic roam scan mode */
  20387. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  20388. /* set roam scan trigger rssi change threshold */
  20389. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  20390. /* set roam AP profile */
  20391. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  20392. /* set channel list for roam scans */
  20393. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  20394. /* offload scan specific commands */
  20395. /* set offload scan AP profile */
  20396. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  20397. /* remove offload scan AP profile */
  20398. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  20399. /* set offload scan period */
  20400. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  20401. /* P2P specific commands */
  20402. /* set P2P device info. FW will used by FW to create P2P IE
  20403. * to be carried in probe response generated during p2p listen
  20404. * and for p2p discoverability */
  20405. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  20406. /* enable/disable p2p discoverability on STA/AP VDEVs */
  20407. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  20408. /* set p2p ie to be carried in beacons generated by FW for GO */
  20409. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  20410. /* set p2p ie to be carried in probe response frames generated
  20411. * by FW for GO */
  20412. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  20413. /* set the vendor specific p2p ie data.
  20414. * FW will use this to parse the P2P NoA
  20415. * attribute in the beacons/probe responses received.
  20416. */
  20417. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  20418. /* set the configure of p2p find offload */
  20419. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  20420. /* set the vendor specific p2p ie data for p2p find offload */
  20421. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  20422. /* set the BSSID/device name pattern of p2p find offload */
  20423. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  20424. /* set OppPS related parameters **/
  20425. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  20426. /* AP power save specific config
  20427. * set AP power save specific param */
  20428. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  20429. /* set AP UAPSD coex pecific param */
  20430. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  20431. /* Rate-control specific commands */
  20432. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  20433. /* WLAN Profiling commands. */
  20434. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  20435. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  20436. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  20437. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  20438. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  20439. /* Suspend resume command Ids */
  20440. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  20441. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  20442. /* Beacon filter commands */
  20443. /* add a beacon filter */
  20444. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  20445. /* remove a beacon filter */
  20446. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  20447. /* WOW Specific WMI commands */
  20448. /* add pattern for awake */
  20449. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  20450. /* deleta a wake pattern */
  20451. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  20452. /* enable/deisable wake event */
  20453. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  20454. /* enable WOW */
  20455. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  20456. /* host woke up from sleep event to FW. Generated in response
  20457. * to WOW Hardware event */
  20458. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  20459. /* RTT measurement related cmd */
  20460. /* reques to make an RTT measurement */
  20461. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  20462. /* reques to report a tsf measurement */
  20463. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  20464. /* spectral scan command */
  20465. /* configure spectral scan */
  20466. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  20467. /* enable/disable spectral scan and trigger */
  20468. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  20469. /* F/W stats */
  20470. /* one time request for stats */
  20471. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  20472. /* Push MCC Adaptive Scheduler Stats to Firmware */
  20473. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  20474. /* ARP OFFLOAD REQUEST*/
  20475. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  20476. /* Proactive ARP Response Add Pattern Command*/
  20477. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  20478. /* Proactive ARP Response Del Pattern Command*/
  20479. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  20480. /* NS offload confid*/
  20481. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  20482. /* GTK offload Specific WMI commands */
  20483. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  20484. /* CSA offload Specific WMI commands */
  20485. /* csa offload enable */
  20486. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  20487. /* chan switch command */
  20488. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  20489. /* Chatter commands */
  20490. /* Change chatter mode of operation */
  20491. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  20492. /* chatter add coalescing filter command */
  20493. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  20494. /* chatter delete coalescing filter command */
  20495. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  20496. /* chatter coalecing query command */
  20497. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  20498. /* addba specific commands */
  20499. /* start the aggregation on this TID */
  20500. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  20501. /* stop the aggregation on this TID */
  20502. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  20503. /* set station mimo powersave method */
  20504. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  20505. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  20506. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  20507. /* Configure the Keep Alive Parameters */
  20508. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  20509. /* Request ssn from target for a sta/tid pair */
  20510. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  20511. /* misc command group */
  20512. /* echo command mainly used for testing */
  20513. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  20514. /* !!IMPORTANT!!
  20515. * If you need to add a new WMI command to the
  20516. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  20517. * please make sure you add it BEHIND
  20518. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  20519. * as we MUST have a fixed value here to maintain compatibility between
  20520. * UTF and the ART2 driver
  20521. */
  20522. /* UTF WMI commands */
  20523. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  20524. /* set debug log config */
  20525. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  20526. /* QVIT specific command id */
  20527. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  20528. /* Factory Testing Mode request command
  20529. * used for integrated chipsets */
  20530. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  20531. /* set and get keepalive parameters command */
  20532. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  20533. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  20534. /* For fw recovery test command */
  20535. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  20536. /* Set Mcast/Bdcast filter */
  20537. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  20538. /* set thermal management params */
  20539. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  20540. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  20541. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  20542. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  20543. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  20544. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  20545. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  20546. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  20547. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  20548. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  20549. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  20550. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  20551. /* GPIO Configuration */
  20552. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  20553. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  20554. /* Txbf configuration command */
  20555. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  20556. /* FWTEST Commands */
  20557. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  20558. /* set NoA descs */
  20559. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  20560. /* TDLS Configuration */
  20561. /* enable/disable TDLS */
  20562. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  20563. /* set tdls peer state */
  20564. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  20565. /* Resmgr Configuration */
  20566. /* Adaptive OCS is enabled by default in the FW.
  20567. * This command is used to disable FW based adaptive OCS.
  20568. */
  20569. WMI_RETURN_STRING
  20570. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  20571. /* set the requested channel time quota for the home channels */
  20572. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  20573. /* set the requested latency for the home channels */
  20574. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  20575. /* STA SMPS Configuration */
  20576. /* force SMPS mode */
  20577. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  20578. /* set SMPS parameters */
  20579. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  20580. /* Wlan HB commands */
  20581. /* enalbe/disable wlan HB */
  20582. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  20583. /* set tcp parameters for wlan HB */
  20584. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  20585. /* set tcp pkt filter for wlan HB */
  20586. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  20587. /* set udp parameters for wlan HB */
  20588. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  20589. /* set udp pkt filter for wlan HB */
  20590. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  20591. /* Wlan RMC commands*/
  20592. /* enable/disable RMC */
  20593. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  20594. /* configure action frame period */
  20595. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  20596. /* For debug/future enhancement purposes only,
  20597. * configures/finetunes RMC algorithms */
  20598. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  20599. /* WLAN MHF offload commands */
  20600. /* enable/disable MHF offload */
  20601. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  20602. /* Plumb routing table for MHF offload */
  20603. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  20604. /* location scan commands */
  20605. /* start batch scan */
  20606. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  20607. /* stop batch scan */
  20608. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  20609. /* get batch scan result */
  20610. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  20611. /* OEM related cmd */
  20612. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  20613. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  20614. /* NAN request cmd */
  20615. WMI_RETURN_STRING(WMI_NAN_CMDID);
  20616. /* Modem power state cmd */
  20617. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  20618. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  20619. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  20620. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  20621. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  20622. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  20623. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  20624. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  20625. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  20626. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  20627. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  20628. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  20629. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  20630. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  20631. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  20632. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  20633. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  20634. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  20635. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  20636. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  20637. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  20638. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  20639. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  20640. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  20641. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  20642. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  20643. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  20644. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  20645. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  20646. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  20647. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  20648. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  20649. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  20650. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  20651. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  20652. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  20653. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  20654. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  20655. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  20656. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  20657. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  20658. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  20659. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  20660. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  20661. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  20662. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  20663. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  20664. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  20665. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  20666. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  20667. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  20668. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  20669. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  20670. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  20671. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  20672. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  20673. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  20674. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  20675. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  20676. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  20677. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  20678. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  20679. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  20680. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  20681. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  20682. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  20683. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  20684. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  20685. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  20686. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  20687. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  20688. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  20689. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  20690. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  20691. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  20692. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  20693. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  20694. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  20695. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  20696. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  20697. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  20698. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  20699. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  20700. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  20701. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  20702. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  20703. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  20704. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  20705. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  20706. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  20707. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  20708. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  20709. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  20710. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  20711. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  20712. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  20713. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  20714. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  20715. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  20716. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  20717. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  20718. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  20719. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  20720. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  20721. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  20722. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  20723. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  20724. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  20725. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  20726. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  20727. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  20728. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  20729. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  20730. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  20731. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  20732. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  20733. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  20734. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  20735. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  20736. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  20737. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  20738. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  20739. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  20740. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  20741. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  20742. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  20743. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  20744. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  20745. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  20746. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  20747. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  20748. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  20749. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  20750. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  20751. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  20752. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  20753. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  20754. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  20755. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  20756. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  20757. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  20758. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  20759. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  20760. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  20761. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  20762. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  20763. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  20764. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  20765. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  20766. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  20767. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  20768. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  20769. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  20770. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  20771. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  20772. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  20773. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  20774. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  20775. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  20776. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  20777. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  20778. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  20779. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  20780. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  20781. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  20782. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  20783. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  20784. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  20785. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  20786. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  20787. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  20788. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  20789. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  20790. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  20791. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  20792. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  20793. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  20794. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  20795. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  20796. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  20797. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  20798. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  20799. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  20800. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  20801. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  20802. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  20803. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  20804. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  20805. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  20806. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  20807. WMI_RETURN_STRING(WMI_MOTION_DET_CONFIG_PARAM_CMDID);
  20808. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_CONFIG_PARAM_CMDID);
  20809. WMI_RETURN_STRING(WMI_MOTION_DET_START_STOP_CMDID);
  20810. WMI_RETURN_STRING(WMI_MOTION_DET_BASE_LINE_START_STOP_CMDID);
  20811. WMI_RETURN_STRING(WMI_SAR_LIMITS_CMDID);
  20812. WMI_RETURN_STRING(WMI_SAR_GET_LIMITS_CMDID);
  20813. WMI_RETURN_STRING(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID);
  20814. WMI_RETURN_STRING(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID);
  20815. WMI_RETURN_STRING(WMI_PDEV_HE_TB_ACTION_FRM_CMDID);
  20816. WMI_RETURN_STRING(WMI_HPCS_PULSE_START_CMDID);
  20817. WMI_RETURN_STRING(WMI_VDEV_CHAINMASK_CONFIG_CMDID);
  20818. WMI_RETURN_STRING(WMI_VDEV_BCN_OFFLOAD_QUIET_CONFIG_CMDID);
  20819. WMI_RETURN_STRING(WMI_NDP_CMDID);
  20820. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_FILTER_CMDID);
  20821. WMI_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
  20822. WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID);
  20823. WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID);
  20824. WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID);
  20825. WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID);
  20826. WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID);
  20827. }
  20828. return "Invalid WMI cmd";
  20829. }
  20830. #endif /* WMI_CMD_STRINGS */
  20831. /** WMI commands/events for the regulatory offload */
  20832. /** Host indicating current country code to FW */
  20833. typedef struct {
  20834. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  20835. A_UINT32 pdev_id;
  20836. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  20837. } wmi_set_current_country_cmd_fixed_param;
  20838. typedef enum {
  20839. WMI_COUNTRYCODE_ALPHA2,
  20840. WMI_COUNTRYCODE_COUNTRY_ID,
  20841. WMI_COUNTRYCODE_DOMAIN_CODE,
  20842. } WMI_COUNTRYCODE_TYPE;
  20843. typedef struct {
  20844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  20845. A_UINT32 pdev_id;
  20846. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  20847. union {
  20848. struct {
  20849. /* Three character for alpha2. The first two is ISO name for country the last one
  20850. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  20851. A_UINT32 alpha2:24,
  20852. unused:8;
  20853. };
  20854. A_UINT32 country_id; /* Country ID */
  20855. A_UINT32 domain_code; /* Domain code */
  20856. } country_code;
  20857. } wmi_set_init_country_cmd_fixed_param;
  20858. /* Freq units in MHz */
  20859. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  20860. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  20861. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  20862. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  20863. /* BW in MHz */
  20864. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  20865. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  20866. /* regpower in dBm */
  20867. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  20868. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  20869. /* antenna gain */
  20870. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  20871. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  20872. typedef enum {
  20873. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  20874. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  20875. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  20876. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  20877. } WMI_REGULATORY_FLAGS;
  20878. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  20879. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  20880. typedef struct {
  20881. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  20882. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  20883. * bits 31:16 = u16 end_freq
  20884. * (both in MHz units) */
  20885. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  20886. bits 23:16 = u8 reg_power (dBm units),
  20887. bits 31:24 = u8 ant_gain (dB units) */
  20888. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  20889. bits 31:16 reserved */
  20890. } wmi_regulatory_rule_struct;
  20891. typedef enum {
  20892. WMI_REG_DFS_UNINIT_REGION = 0,
  20893. WMI_REG_DFS_FCC_REGION = 1,
  20894. WMI_REG_DFS_ETSI_REGION = 2,
  20895. WMI_REG_DFS_MKK_REGION = 3,
  20896. WMI_REG_DFS_CN_REGION = 4,
  20897. WMI_REG_DFS_KR_REGION = 5,
  20898. /* Add new items above */
  20899. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  20900. } WMI_REG_DFS_REGION;
  20901. typedef enum {
  20902. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  20903. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  20904. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  20905. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  20906. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  20907. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  20908. } WMI_REGULATORY_PHYBITMAP;
  20909. typedef enum {
  20910. WMI_REG_SET_CC_STATUS_PASS = 0,
  20911. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  20912. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  20913. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  20914. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  20915. WMI_REG_SET_CC_STATUS_FAIL = 5,
  20916. } WMI_REG_SET_CC_STATUS_CODE;
  20917. typedef struct {
  20918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  20919. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  20920. A_UINT32 phy_id;
  20921. A_UINT32 alpha2;
  20922. A_UINT32 num_phy;
  20923. A_UINT32 country_id;
  20924. A_UINT32 domain_code;
  20925. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  20926. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  20927. A_UINT32 min_bw_2g; /* BW in MHz */
  20928. A_UINT32 max_bw_2g; /* BW in MHz */
  20929. A_UINT32 min_bw_5g; /* BW in MHz */
  20930. A_UINT32 max_bw_5g; /* BW in MHz */
  20931. A_UINT32 num_2g_reg_rules;
  20932. A_UINT32 num_5g_reg_rules;
  20933. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  20934. } wmi_reg_chan_list_cc_event_fixed_param;
  20935. typedef struct {
  20936. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  20937. A_UINT32 vdev_id;
  20938. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  20939. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  20940. } wmi_11d_scan_start_cmd_fixed_param;
  20941. typedef struct {
  20942. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  20943. A_UINT32 vdev_id;
  20944. } wmi_11d_scan_stop_cmd_fixed_param;
  20945. /** FW indicating new current country code to Host */
  20946. typedef struct {
  20947. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  20948. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  20949. } wmi_11d_new_country_event_fixed_param;
  20950. typedef struct {
  20951. /** TLV tag and len; tag equals
  20952. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  20953. A_UINT32 tlv_header;
  20954. /* Currently there are no parameters for this message. */
  20955. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  20956. typedef struct {
  20957. /** TLV tag and len; tag equals
  20958. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  20959. A_UINT32 tlv_header;
  20960. /** pdev_id for identifying the MAC
  20961. * See macros starting with WMI_PDEV_ID_ for values.
  20962. */
  20963. A_UINT32 pdev_id;
  20964. } wmi_pdev_get_nfcal_power_fixed_param;
  20965. typedef struct {
  20966. /** TLV tag and len; tag equals
  20967. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  20968. A_UINT32 tlv_header;
  20969. /** 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.
  20970. * Currently the HW descriptor only supports 4 chains at most.
  20971. * Further isolation_chainX elements can be added in the future
  20972. * for additional chains, if needed.
  20973. */
  20974. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  20975. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  20976. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  20977. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  20978. } wmi_coex_report_isolation_event_fixed_param;
  20979. typedef enum {
  20980. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  20981. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  20982. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  20983. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  20984. } wmi_rcpi_measurement_type;
  20985. typedef struct {
  20986. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  20987. A_UINT32 tlv_header;
  20988. /* VDEV identifier */
  20989. A_UINT32 vdev_id;
  20990. /* peer MAC address */
  20991. wmi_mac_addr peer_macaddr;
  20992. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  20993. A_UINT32 measurement_type;
  20994. } wmi_request_rcpi_cmd_fixed_param;
  20995. typedef struct {
  20996. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  20997. A_UINT32 tlv_header;
  20998. /* VDEV identifier */
  20999. A_UINT32 vdev_id;
  21000. /* peer MAC address */
  21001. wmi_mac_addr peer_macaddr;
  21002. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  21003. A_UINT32 measurement_type;
  21004. /* Measured RCPI in dBm of the peer requested by host */
  21005. A_INT32 rcpi;
  21006. /** status
  21007. * 0 - Requested peer RCPI available
  21008. * 1 - Requested peer RCPI not available
  21009. */
  21010. A_UINT32 status;
  21011. } wmi_update_rcpi_event_fixed_param;
  21012. /* Definition of mask for various package id */
  21013. #define WMI_PKGID_MASK_AUTO 0x00000080
  21014. typedef struct {
  21015. /** TLV tag and len; tag equals*/
  21016. A_UINT32 tlv_header;
  21017. /**
  21018. * The value field is filled with WMI_PKGID_MASK values.
  21019. * Currently, the only flag used within values is
  21020. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  21021. */
  21022. A_UINT32 value;
  21023. } wmi_pkgid_event_fixed_param;
  21024. typedef struct {
  21025. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  21026. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  21027. /* enable is set to 1 if mac randomization to be enabled */
  21028. A_UINT32 enable;
  21029. /* randomization mac address if randomization is enabled */
  21030. wmi_mac_addr mac_addr;
  21031. /* To get the PMAC from freq param */
  21032. A_UINT32 freq; /* units in MHz */
  21033. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  21034. typedef struct {
  21035. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  21036. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  21037. A_UINT32 status; /* status is 1 if success and 0 if failed */
  21038. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  21039. /* Definition of HW data filtering */
  21040. typedef enum {
  21041. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  21042. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  21043. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  21044. typedef struct {
  21045. A_UINT32 tlv_header;
  21046. A_UINT32 vdev_id;
  21047. A_UINT32 enable; /* 1 . enable, 0- disable */
  21048. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  21049. } wmi_hw_data_filter_cmd_fixed_param;
  21050. /* This command is used whenever host wants to restart multiple
  21051. * VDEVs using single command and the VDEV that are restarted will
  21052. * need to have same properties they had before restart except for the
  21053. * operating channel
  21054. */
  21055. typedef struct {
  21056. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  21057. /** pdev_id for identifying the MAC
  21058. * See macros starting with WMI_PDEV_ID_ for values.
  21059. * In non-DBDC case host should set it to 0
  21060. */
  21061. A_UINT32 pdev_id;
  21062. /** unique id identifying the module, generated by the caller */
  21063. A_UINT32 requestor_id;
  21064. /** Disable H/W ack.
  21065. * During CAC, Our HW shouldn't ack directed frames
  21066. */
  21067. A_UINT32 disable_hw_ack;
  21068. /* Determine the duration of CAC on the given channel 'chan' */
  21069. A_UINT32 cac_duration_ms;
  21070. A_UINT32 num_vdevs;
  21071. /* The TLVs follows this structure:
  21072. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  21073. * wmi_channel chan; <------ WMI channel
  21074. */
  21075. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  21076. typedef struct {
  21077. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  21078. A_UINT32 tlv_header;
  21079. /** pdev_id for identifying the MAC
  21080. * See macros starting with WMI_PDEV_ID_ for values.
  21081. * In non-DBDC case host should set it to 0
  21082. */
  21083. A_UINT32 pdev_id;
  21084. /** CSA switch count value in the last transmitted beacon */
  21085. A_UINT32 current_switch_count;
  21086. A_UINT32 num_vdevs;
  21087. /* The TLVs follows this structure:
  21088. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  21089. */
  21090. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  21091. typedef struct {
  21092. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */
  21093. A_UINT32 vdev_id;
  21094. A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */
  21095. } wmi_csc_vdev_list;
  21096. typedef struct {
  21097. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */
  21098. A_UINT32 tlv_header;
  21099. /** pdev_id for identifying the MAC
  21100. * See macros starting with WMI_PDEV_ID_ for values.
  21101. * In non-DBDC case host should set it to 0
  21102. */
  21103. A_UINT32 pdev_id;
  21104. /** CSC switch count value in the last transmitted beacon */
  21105. A_UINT32 current_switch_count;
  21106. /* The TLVs follows this structure:
  21107. * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values
  21108. */
  21109. } wmi_pdev_csc_switch_count_status_event_fixed_param;
  21110. /* Operation types for packet routing command */
  21111. typedef enum {
  21112. WMI_PDEV_ADD_PKT_ROUTING,
  21113. WMI_PDEV_DEL_PKT_ROUTING,
  21114. } wmi_pdev_pkt_routing_op_code;
  21115. /* Packet routing types based on specific data types */
  21116. typedef enum {
  21117. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  21118. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  21119. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  21120. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  21121. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  21122. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  21123. } wmi_pdev_pkt_routing_type;
  21124. /* 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 */
  21125. typedef struct {
  21126. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  21127. A_UINT32 tlv_header;
  21128. /** Identifies pdev on which routing needs to be applied */
  21129. A_UINT32 pdev_id;
  21130. /** Indicates the routing operation type: add/delete */
  21131. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  21132. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  21133. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  21134. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  21135. * packet needs to be routed.
  21136. */
  21137. A_UINT32 dest_ring;
  21138. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  21139. * CCE copies this back in RX_MSDU_END_TLV.
  21140. */
  21141. A_UINT32 meta_data;
  21142. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  21143. typedef enum {
  21144. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  21145. WMI_CALIBRATION_OK, /* The calibration status is OK */
  21146. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  21147. } WMI_CALIBRATION_STATUS;
  21148. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  21149. /**
  21150. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  21151. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  21152. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  21153. * null-terminator
  21154. */
  21155. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  21156. typedef struct {
  21157. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  21158. A_UINT32 software_cal_version; /* Current software level calibration data version */
  21159. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  21160. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  21161. /* board_mcn_detail:
  21162. * Provides board's MCN (Material Control Number) information for the host
  21163. * to display. This is used to track the Hardware level revisions/versions.
  21164. * This array carries the ASCII values of the MCN to the host. And host
  21165. * would just print this in a string format whenever user requests.
  21166. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  21167. * of a WMI message will be automatically byteswapped by the copy engine
  21168. * as the messages are transferred between host and target, to convert
  21169. * between the target's little-endianness and the host's big-endianness.
  21170. * Consequently, a big-endian host will have to manually unswap the bytes
  21171. * within the board_mcn_detail string buffer to get the bytes back into
  21172. * the desired natural order.
  21173. */
  21174. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  21175. /** pdev_id for identifying the MAC
  21176. * See macros starting with WMI_PDEV_ID_ for values.
  21177. */
  21178. A_UINT32 pdev_id;
  21179. } wmi_pdev_check_cal_version_event_fixed_param;
  21180. typedef struct {
  21181. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  21182. /** pdev_id for identifying the MAC
  21183. * See macros starting with WMI_PDEV_ID_ for values.
  21184. */
  21185. A_UINT32 pdev_id;
  21186. } wmi_pdev_check_cal_version_cmd_fixed_param;
  21187. typedef struct {
  21188. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  21189. /** Identifies pdev on which diversity gain to be applied */
  21190. A_UINT32 pdev_id;
  21191. /** The number of spatial stream */
  21192. A_UINT32 nss;
  21193. /** The number of gains */
  21194. A_UINT32 num_gains;
  21195. /*
  21196. * This fixed_param TLV is followed by other TLVs:
  21197. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  21198. */
  21199. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  21200. /* flags for unit_test_event */
  21201. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  21202. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  21203. /* from bit 2 to bit 31 are reserved */
  21204. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  21205. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  21206. } while (0)
  21207. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  21208. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  21209. } while (0)
  21210. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  21211. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  21212. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  21213. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  21214. } while (0)
  21215. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  21216. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  21217. } while (0)
  21218. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  21219. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  21220. typedef struct {
  21221. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  21222. A_UINT32 tlv_header;
  21223. /* unique id identifying the VDEV, generated by the caller */
  21224. A_UINT32 vdev_id;
  21225. /* Identify the wlan module */
  21226. A_UINT32 module_id;
  21227. /* unique id identifying the unit test cmd, generated by the caller */
  21228. A_UINT32 diag_token;
  21229. /* flag for the status of the unit_test_cmd */
  21230. A_UINT32 flag;
  21231. /* data length number of bytes for current dump */
  21232. A_UINT32 payload_len;
  21233. /* TLV/Payload after this structure is sent in little endian
  21234. * format for the length mentioned in this structure.
  21235. * A_UINT8 payload[1];
  21236. */
  21237. } wmi_unit_test_event_fixed_param;
  21238. /* Definition of latency levels */
  21239. typedef enum {
  21240. WMI_WLM_LL_NORMAL = 0x0,
  21241. WMI_WLM_LL_MODERATE = 0x1,
  21242. WMI_WLM_LL_LOW = 0x2,
  21243. WMI_WLM_LL_ULTRA_LOW = 0x3,
  21244. } WMI_WLM_LATENCY_LEVEL;
  21245. /*
  21246. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  21247. *
  21248. * |31 17|16 14| 13 | 12 | 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  21249. * +------+-----+----+----+------+------+------+------+------+------+-----+-----+
  21250. * | RSVD | NSS |EDCA| TRY| SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  21251. * +----------------------+-------------+-------------+-------------------------+
  21252. * | WAL | PS | Roam | Scan |
  21253. *
  21254. * Flag values:
  21255. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  21256. * based on the traffic's latency level
  21257. * (0) default tx retry behavior
  21258. * EDCA: (1) Apply VO parameters on BE
  21259. * (0) default behavior
  21260. * NSS: (0) no Nss limits, other than those negotiatied during association
  21261. * (1) during 2-chain operation, tx only a single spatial stream
  21262. * (2) - (7) reserved / invalid
  21263. */
  21264. /* bit 0-3 of flags is used for scan operation */
  21265. /* bit 0: WLM_FLAGS_SCAN_SUPPRESS, suppress all scan and other bits would be ignored if bit is set */
  21266. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  21267. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  21268. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  21269. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  21270. (b3 b2)
  21271. (0 0 ): Default dwell time
  21272. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  21273. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  21274. overall scan duration.
  21275. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  21276. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  21277. the accuracy of scan result.
  21278. (1 1 ): reserved
  21279. */
  21280. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  21281. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  21282. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  21283. /* bit 4-5: reserved for scan */
  21284. /* bit 6-7 of flags is used for roaming operation */
  21285. /* bit 6-7: define roaming policy:
  21286. (b7 b6)
  21287. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  21288. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  21289. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  21290. (1 1 ): reserved
  21291. */
  21292. #define WLM_FLAGS_ROAM_ALLOW 0
  21293. #define WLM_FLAGS_ROAM_SUPPRESS 1
  21294. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  21295. /* bit 8: reserved for roaming */
  21296. /* bit 9-11 of flags is used for powersave operation */
  21297. /* bit 9: WLM_FLAGS_PS_DISABLE_BMPS, disable BMPS if bit is set */
  21298. #define WLM_FLAGS_PS_DISABLE_BMPS 1 /* disable BMPS */
  21299. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  21300. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  21301. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  21302. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  21303. /* bit 17-31 of flags is reserved for powersave and WAL */
  21304. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  21305. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  21306. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  21307. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  21308. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  21309. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  21310. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  21311. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  21312. #define WLM_FLAGS_PS_IS_BMPS_DISABLED(flag) WMI_GET_BITS(flag, 9, 1)
  21313. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  21314. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  21315. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  21316. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  21317. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  21318. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  21319. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  21320. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  21321. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  21322. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  21323. typedef struct {
  21324. /** TLV tag and len; tag equals
  21325. * WMI_WLM_CONFIG_CMD_fixed_param */
  21326. A_UINT32 tlv_header;
  21327. /* VDEV identifier */
  21328. A_UINT32 vdev_id;
  21329. /* Refer to WMI_WLM_LATENCY_LEVEL
  21330. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  21331. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  21332. * operation to support lower latency of WLAN.
  21333. */
  21334. A_UINT32 latency_level;
  21335. /* represent uplink latency in ms
  21336. * This parameter will be used by STAPS module to decide timing parameters, like
  21337. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  21338. * durations.
  21339. */
  21340. A_UINT32 ul_latency;
  21341. /* represent downlink latency in ms
  21342. * Similar usage as ul_latency
  21343. */
  21344. A_UINT32 dl_latency;
  21345. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  21346. A_UINT32 flags;
  21347. } wmi_wlm_config_cmd_fixed_param;
  21348. typedef struct {
  21349. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  21350. /** 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
  21351. */
  21352. A_UINT32 pdev_id;
  21353. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  21354. A_UINT32 mbss_support; /* Flag indicating if AP TWT feature supported in MBSS mode or not */
  21355. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  21356. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  21357. /*
  21358. * The congestion parameters below are in percent of occupied airtime.
  21359. */
  21360. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  21361. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  21362. /*
  21363. * The interference parameters below use an abstract method of evaluating
  21364. * interference. The parameters are in percent, ranging from 0 for no
  21365. * interference, to 100 for interference extreme enough to completely
  21366. * block the signal of interest.
  21367. */
  21368. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  21369. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  21370. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  21371. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  21372. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  21373. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  21374. 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) */
  21375. /*
  21376. * The below interval parameters have units of milliseconds.
  21377. */
  21378. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  21379. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  21380. A_UINT32 remove_sta_slot_interval; /* Inrerval between decisions making to remove TWT slot of STAs */
  21381. } wmi_twt_enable_cmd_fixed_param;
  21382. /* status code of enabling TWT */
  21383. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  21384. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  21385. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  21386. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  21387. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  21388. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  21389. } WMI_ENABLE_TWT_STATUS_T;
  21390. typedef struct {
  21391. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  21392. /** 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 */
  21393. A_UINT32 pdev_id;
  21394. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  21395. } wmi_twt_enable_complete_event_fixed_param;
  21396. typedef struct {
  21397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  21398. /** 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 */
  21399. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  21400. } wmi_twt_disable_cmd_fixed_param;
  21401. typedef struct {
  21402. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  21403. A_UINT32 reserved0; /* unused right now */
  21404. } wmi_twt_disable_complete_event_fixed_param;
  21405. /* from IEEE 802.11ah section 9.4.2.200 */
  21406. typedef enum _WMI_TWT_COMMAND_T {
  21407. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  21408. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  21409. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  21410. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  21411. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  21412. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  21413. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  21414. WMI_TWT_COMMAND_REJECT_TWT = 7,
  21415. } WMI_TWT_COMMAND_T;
  21416. /* TWT command, refer to WMI_TWT_COMMAND_T */
  21417. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  21418. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  21419. /* 0 means Individual TWT, 1 means Broadcast TWT */
  21420. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  21421. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  21422. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  21423. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  21424. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  21425. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  21426. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  21427. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  21428. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  21429. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  21430. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  21431. typedef struct {
  21432. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  21433. A_UINT32 vdev_id; /* VDEV identifier */
  21434. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21435. A_UINT32 dialog_id; /* TWT dialog_id is per peer */
  21436. /* 1. wake_intvl_mantis must be <= 0xFFFF
  21437. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  21438. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  21439. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  21440. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  21441. */
  21442. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  21443. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  21444. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  21445. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 0xFFFF */
  21446. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  21447. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  21448. } wmi_twt_add_dialog_cmd_fixed_param;
  21449. /* status code of adding TWT dialog */
  21450. typedef enum _WMI_ADD_TWT_STATUS_T {
  21451. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  21452. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  21453. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  21454. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  21455. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  21456. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  21457. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  21458. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  21459. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  21460. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  21461. } WMI_ADD_TWT_STATUS_T;
  21462. typedef struct {
  21463. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  21464. A_UINT32 vdev_id; /* VDEV identifier */
  21465. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21466. A_UINT32 dialog_id; /* TWT dialog ID */
  21467. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  21468. } wmi_twt_add_dialog_complete_event_fixed_param;
  21469. typedef struct {
  21470. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  21471. A_UINT32 vdev_id; /* VDEV identifier */
  21472. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21473. A_UINT32 dialog_id; /* TWT dialog ID */
  21474. } wmi_twt_del_dialog_cmd_fixed_param;
  21475. /* status code of deleting TWT dialog */
  21476. typedef enum _WMI_DEL_TWT_STATUS_T {
  21477. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  21478. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  21479. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  21480. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  21481. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  21482. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  21483. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  21484. } WMI_DEL_TWT_STATUS_T;
  21485. typedef struct {
  21486. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  21487. A_UINT32 vdev_id; /* VDEV identifier */
  21488. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21489. A_UINT32 dialog_id; /* TWT dialog ID */
  21490. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  21491. } wmi_twt_del_dialog_complete_event_fixed_param;
  21492. typedef struct {
  21493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  21494. A_UINT32 vdev_id; /* VDEV identifier */
  21495. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21496. A_UINT32 dialog_id; /* TWT dialog ID */
  21497. } wmi_twt_pause_dialog_cmd_fixed_param;
  21498. /* status code of pausing TWT dialog */
  21499. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  21500. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  21501. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  21502. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  21503. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  21504. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  21505. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  21506. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  21507. } WMI_PAUSE_TWT_STATUS_T;
  21508. typedef struct {
  21509. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  21510. A_UINT32 vdev_id; /* VDEV identifier */
  21511. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21512. A_UINT32 dialog_id; /* TWT dialog ID */
  21513. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  21514. } wmi_twt_pause_dialog_complete_event_fixed_param;
  21515. typedef struct {
  21516. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  21517. A_UINT32 vdev_id; /* VDEV identifier */
  21518. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21519. A_UINT32 dialog_id; /* TWT dialog ID */
  21520. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  21521. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax sectin "9.4.1.60 TWT Information field" */
  21522. } wmi_twt_resume_dialog_cmd_fixed_param;
  21523. /* status code of resuming TWT dialog */
  21524. typedef enum _WMI_RESUME_TWT_STATUS_T {
  21525. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  21526. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  21527. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  21528. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  21529. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  21530. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  21531. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  21532. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  21533. } WMI_RESUME_TWT_STATUS_T;
  21534. typedef struct {
  21535. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  21536. A_UINT32 vdev_id; /* VDEV identifier */
  21537. wmi_mac_addr peer_macaddr; /* peer MAC address */
  21538. A_UINT32 dialog_id; /* TWT dialog ID */
  21539. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  21540. } wmi_twt_resume_dialog_complete_event_fixed_param;
  21541. typedef enum {
  21542. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  21543. } WMI_DMA_RING_SUPPORTED_MODULE;
  21544. typedef struct {
  21545. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  21546. A_UINT32 pdev_id;
  21547. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  21548. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  21549. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  21550. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  21551. } WMI_DMA_RING_CAPABILITIES;
  21552. #define WMI_DMA_RING_PADDR_LO_S 0
  21553. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  21554. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  21555. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  21556. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  21557. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  21558. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  21559. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  21560. #define WMI_DMA_RING_PADDR_HI_S 0
  21561. #define WMI_DMA_RING_PADDR_HI 0xffff
  21562. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  21563. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  21564. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  21565. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  21566. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  21567. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  21568. typedef struct {
  21569. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  21570. A_UINT32 pdev_id;
  21571. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  21572. /**
  21573. * Bits 31:0: base address of ring [31:0]
  21574. */
  21575. A_UINT32 base_paddr_lo;
  21576. /**
  21577. * Bits 15:0: base address of ring [47:32]
  21578. * Bits 31:16: reserved (set to 0x0)
  21579. */
  21580. A_UINT32 base_paddr_hi;
  21581. /**
  21582. * Bits 31:0: address of head index [31:0]
  21583. */
  21584. A_UINT32 head_idx_paddr_lo;
  21585. /**
  21586. * Bits 15:0: address of head index [47:32]
  21587. * Bits 31:16: reserved (set to 0x0)
  21588. */
  21589. A_UINT32 head_idx_paddr_hi;
  21590. /**
  21591. * Bits 31:0: address of tail index [31:0]
  21592. */
  21593. A_UINT32 tail_idx_paddr_lo;
  21594. /**
  21595. * Bits 15:0: address of tail index [47:32]
  21596. * Bits 31:16: reserved (set to 0x0)
  21597. */
  21598. A_UINT32 tail_idx_paddr_hi;
  21599. A_UINT32 num_elems; /** Number of elems in the ring */
  21600. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  21601. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  21602. /**
  21603. * This parameter specifies the timeout in milliseconds.
  21604. * Target should timeout and send whatever resp it has if this time expires.
  21605. */
  21606. A_UINT32 event_timeout_ms;
  21607. } wmi_dma_ring_cfg_req_fixed_param;
  21608. typedef struct {
  21609. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  21610. A_UINT32 pdev_id;
  21611. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  21612. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  21613. } wmi_dma_ring_cfg_rsp_fixed_param;
  21614. typedef struct {
  21615. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  21616. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  21617. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  21618. A_UINT32 num_buf_release_entry;
  21619. A_UINT32 num_meta_data_entry;
  21620. /* This TLV is followed by another TLV of array of structs.
  21621. * wmi_dma_buf_release_entry entries[num_buf_release_entry];
  21622. * wmi_dma_buf_release_spectral_meta_data meta_datat[num_meta_data_entry];
  21623. */
  21624. } wmi_dma_buf_release_fixed_param;
  21625. typedef struct {
  21626. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  21627. /**
  21628. * Bits 31:0: address of data [31:0]
  21629. */
  21630. A_UINT32 paddr_lo;
  21631. /**
  21632. * Bits 15:0: address of data [47:32]
  21633. * Bits 31:16: reserved
  21634. */
  21635. A_UINT32 paddr_hi;
  21636. } wmi_dma_buf_release_entry;
  21637. typedef struct {
  21638. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_spectral_meta_data */
  21639. /**
  21640. * meta data information.
  21641. * Host uses the noise floor values as one of the major parameter
  21642. * to classify the spectral data.
  21643. * This information will not be provided by ucode unlike the fft reports
  21644. * which gets DMAed to DDR buffer.
  21645. * Hence sending the NF values in dBm units as meta data information.
  21646. */
  21647. A_INT32 noise_floor[WMI_MAX_CHAINS];
  21648. /**
  21649. * The time taken by target in micro seconds to complete the reset routine
  21650. * and re-initiate the spectral scan.
  21651. * If the delay is 0, the WAR to bookkeep the timestamp wont be exercised
  21652. * in HOST.
  21653. */
  21654. A_UINT32 reset_delay;
  21655. } wmi_dma_buf_release_spectral_meta_data;
  21656. typedef enum {
  21657. NO_SCALING = 0, /* No bin scaling*/
  21658. /**
  21659. * scaled_bin_mag = bin_mag *
  21660. * sqrt(10^(max(legacy_max_gain - default_agc_max_gain + low_level_offset - RSSI_corr,
  21661. * (agc_total_gain_db < default_agc_max_gain) * high_level_offset)/10)) *
  21662. * 2^(DET{0,1,2}_SPECTRAL_SCAN_BIN_SCALE - legacy_spectral_scan_bin_scale)
  21663. */
  21664. AGC_GAIN_RSSI_CORR_BASED = 1,
  21665. } WMI_SPECTRAL_SCALING_FORMULA_ID;
  21666. typedef struct {
  21667. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_spectral_bin_scaling_params */
  21668. A_UINT32 pdev_id; /* ID of pdev to which the scaling parameters are to be applied */
  21669. WMI_SPECTRAL_SCALING_FORMULA_ID formula_id; /* Represets the formula to be used */
  21670. A_UINT32 low_level_offset; /* low level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  21671. A_UINT32 high_level_offset; /* high level offset for fine tuning the scaling factor based on RSSI and AGC gain */
  21672. A_UINT32 rssi_thr; /* RSSI threshold to be used to adjust the inband power of the given spectral report */
  21673. A_UINT32 default_agc_max_gain;/* DEFAULT AGC MAX GAIN used. Fetched from register RXTD_RADAR_SBS_CTRL_1_L bits20:13 */
  21674. } wmi_spectral_bin_scaling_params;
  21675. typedef struct {
  21676. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_ctl_failsafe_event_params */
  21677. A_UINT32 pdev_id; /* ID of pdev to which ctl failsafe status is sent */
  21678. A_UINT32 ctl_FailsafeStatus; /* To indicate if Failsafe value is imposed on CTL. 0- Success, 1- Failsafe imposed */
  21679. } wmi_pdev_ctl_failsafe_check_fixed_param;
  21680. typedef struct {
  21681. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  21682. A_UINT32 enable; /* Enable/disable */
  21683. /* Thermal Thresholds,
  21684. * DPD recalibration will be triggered, when current temperature is
  21685. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  21686. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  21687. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  21688. */
  21689. A_UINT32 dlt_tmpt_c_h;
  21690. A_UINT32 dlt_tmpt_c_l;
  21691. /* cooling_time_ms
  21692. * The time (in milliseconds) expected to be needed for the unit
  21693. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  21694. */
  21695. A_UINT32 cooling_time_ms;
  21696. /* Max duration for dpd re-cal. Unit: ms */
  21697. A_UINT32 dpd_dur_max_ms;
  21698. } wmi_runtime_dpd_recal_cmd_fixed_param;
  21699. typedef enum {
  21700. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  21701. WMI_ROAM_TRIGGER_REASON_PER,
  21702. WMI_ROAM_TRIGGER_REASON_BMISS,
  21703. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  21704. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  21705. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  21706. WMI_ROAM_TRIGGER_REASON_MAWC,
  21707. WMI_ROAM_TRIGGER_REASON_DENSE,
  21708. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  21709. WMI_ROAM_TRIGGER_REASON_FORCED,
  21710. WMI_ROAM_TRIGGER_REASON_BTM,
  21711. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  21712. WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
  21713. WMI_ROAM_TRIGGER_REASON_MAX,
  21714. } WMI_ROAM_TRIGGER_REASON_ID;
  21715. /* value for DENSE roam trigger */
  21716. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  21717. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  21718. typedef struct {
  21719. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  21720. /* interpretation of trigger value is as follows, for different trigger IDs
  21721. * ID = PER -> value = PER percentage
  21722. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  21723. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  21724. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  21725. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  21726. * ID = PERIODIC -> value = periodicity in ms
  21727. *
  21728. * for other IDs trigger_value would be 0 (invalid)
  21729. */
  21730. A_UINT32 trigger_value;
  21731. } wmi_roam_scan_trigger_reason;
  21732. typedef struct {
  21733. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  21734. A_UINT32 vdev_id;
  21735. } wmi_request_roam_scan_stats_cmd_fixed_param;
  21736. /** BSS load configuration parameters for roam trigger */
  21737. typedef struct {
  21738. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bss_load_cmd_fixed_param */
  21739. A_UINT32 vdev_id;
  21740. /** Minimum number of beacons to be consider for calculating average AP BSS load within time monitor_time_window */
  21741. A_UINT32 beacons_min_count;
  21742. /** Monitor time window in seconds */
  21743. A_UINT32 monitor_time_window;
  21744. /** BSS load threshold after which roam scan should trigger */
  21745. A_UINT32 bss_load_threshold;
  21746. } wmi_roam_bss_load_config_cmd_fixed_param;
  21747. typedef struct {
  21748. /*
  21749. * The timestamp is in units of ticks of a 19.2MHz clock.
  21750. * The timestamp is taken at roam scan start.
  21751. */
  21752. A_UINT32 lower32bit;
  21753. A_UINT32 upper32bit;
  21754. } wmi_roaming_timestamp;
  21755. typedef struct {
  21756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  21757. A_UINT32 vdev_id;
  21758. /* number of roam scans */
  21759. A_UINT32 num_roam_scans;
  21760. /* This TLV is followed by TLV's:
  21761. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  21762. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  21763. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  21764. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  21765. * The num_channels[] elements specify how many elements there are
  21766. * within chan_info[] for each scan.
  21767. * For example, if num_channels = [2, 3] then chan_info will have 5
  21768. * elements, with the first 2 elements from the first scan, and
  21769. * the last 3 elements from the second scan.
  21770. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  21771. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  21772. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  21773. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  21774. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  21775. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  21776. * The num_of_roam_candidates[] elements specify how many elements
  21777. * there are within bssid[] for each scan.
  21778. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  21779. * have 5 elements, with the first 2 elements from the first scan,
  21780. * and the last 3 elements from the second scan.
  21781. * A_UINT32 score[]; score of candidates in each roam scan
  21782. * The num_of_roam_candidates[] elements specify how many elements
  21783. * there are within score[] for each scan.
  21784. * For example, if num_of_roam_candidates = [2, 3] then score will
  21785. * have 5 elements, with the first 2 elements from the first scan,
  21786. * and the last 3 elements from the second scan.
  21787. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  21788. * The num_of_roam_candidates[] elements specify how many elements
  21789. * there are within channel[] for each scan.
  21790. * For example, if num_of_roam_candidates = [2, 3] then channel will
  21791. * have 5 elements, with the first 2 elements from the first scan,
  21792. * and the last 3 elements from the second scan.
  21793. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  21794. * in each roam scan.
  21795. * The num_of_roam_candidates[] elements specify how many elements
  21796. * there are within rssi[] for each scan.
  21797. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  21798. * have 5 elements, with the first 2 elements from the first scan,
  21799. * and the last 3 elements from the second scan.
  21800. */
  21801. } wmi_roam_scan_stats_event_fixed_param;
  21802. typedef struct {
  21803. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  21804. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  21805. /* The mode value has the following meaning :
  21806. * 0 : 11a
  21807. * 1 : 11bg
  21808. * 2 : 11b
  21809. * 3 : 11g only
  21810. * 4 : 11a HT20
  21811. * 5 : 11g HT20
  21812. * 6 : 11a HT40
  21813. * 7 : 11g HT40
  21814. * 8 : 11a VHT20
  21815. * 9 : 11a VHT40
  21816. * 10 : 11a VHT80
  21817. * 11 : 11g VHT20
  21818. * 12 : 11g VHT40
  21819. * 13 : 11g VHT80
  21820. * 14 : unknown
  21821. */
  21822. A_UINT32 mode;
  21823. A_UINT32 rate; /* rate index */
  21824. A_UINT32 nss; /* number of spatial stream */
  21825. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  21826. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  21827. A_UINT32 chain_index; /* index for the antenna */
  21828. } wmi_get_tpc_power_cmd_fixed_param;
  21829. typedef struct {
  21830. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  21831. A_UINT32 request_id; /* request ID set by the command */
  21832. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  21833. } wmi_get_tpc_power_evt_fixed_param;
  21834. /* below structures are related to Motion Detection. */
  21835. typedef struct {
  21836. /** TLV tag and len; tag equals
  21837. * WMITLV_TAG_STRUC_wmi_motion_det_config_params_cmd_fixed_param */
  21838. A_UINT32 tlv_header; /** TLV Header */
  21839. A_UINT32 vdev_id; /** Vdev ID */
  21840. A_UINT32 time_t1; /** Time gap of successive bursts of
  21841. * measurement frames during coarse
  21842. * motion detection (in ms) */
  21843. A_UINT32 time_t2; /** Time gap of successive bursts of
  21844. * measurement frames during fine
  21845. * motion detection (in ms) */
  21846. A_UINT32 n1; /** number of measurement frames in one
  21847. * burst, for coarse detection */
  21848. A_UINT32 n2; /** number of measurement frames in one
  21849. * burst, for fine detection */
  21850. A_UINT32 time_t1_gap; /** gap between measurement frames in
  21851. * course detection (in ms) */
  21852. A_UINT32 time_t2_gap; /** gap between measurement frames in
  21853. * fine detection (in ms) */
  21854. A_UINT32 coarse_K; /** number of times motion detection has to
  21855. * be performed for coarse detection */
  21856. A_UINT32 fine_K; /** number of times motion detection has to
  21857. * be performed for fine detection */
  21858. A_UINT32 coarse_Q; /** number of times motion is expected
  21859. * to be detected for success case in
  21860. * coarse detection */
  21861. A_UINT32 fine_Q; /** number of times motion is expected
  21862. * to be detected for success case in
  21863. * fine detection */
  21864. A_UINT32 md_coarse_thr_high; /** higher threshold value (in percent)
  21865. * from host to FW, which will be used in
  21866. * coarse detection phase of motion detection.
  21867. * This is the threshold for the correlation
  21868. * of the old RF local-scattering environment
  21869. * with the current RF local-scattering
  21870. * environment. A value of 100(%) indicates
  21871. * that neither the transceiver nor any
  21872. * nearby objects have changed position. */
  21873. A_UINT32 md_fine_thr_high; /** higher threshold value (in percent)
  21874. * from host to FW, which will be used in
  21875. * fine detection phase of motion detection.
  21876. * This is the threshold for correlation
  21877. * between the old and current RF environments,
  21878. * as explained above. */
  21879. A_UINT32 md_coarse_thr_low; /** lower threshold value (in percent)
  21880. * for immediate detection of motion in
  21881. * coarse detection phase.
  21882. * This is the threshold for correlation
  21883. * between the old and current RF environments,
  21884. * as explained above. */
  21885. A_UINT32 md_fine_thr_low; /** lower threshold value (in percent)
  21886. * for immediate detection of motion in
  21887. * fine detection phase.
  21888. * This is the threshold for correlation
  21889. * between the old and current RF environments,
  21890. * as explained above. */
  21891. } wmi_motion_det_config_params_cmd_fixed_param;
  21892. typedef struct {
  21893. /** TLV tag and len; tag equals
  21894. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_config_params_cmd_fixed_param */
  21895. A_UINT32 tlv_header; /** TLV Header */
  21896. A_UINT32 vdev_id; /** Vdev ID */
  21897. A_UINT32 bl_time_t; /** time T for baseline (in ms)
  21898. * Every bl_time_t, bl_n packets are sent */
  21899. A_UINT32 bl_packet_gap; /** gap between measurement frames for baseline
  21900. * (in ms) */
  21901. A_UINT32 bl_n; /** number of measurement frames to be sent
  21902. * during one baseline */
  21903. A_UINT32 bl_num_meas; /** number of times the baseline measurement
  21904. * to be done */
  21905. } wmi_motion_det_base_line_config_params_cmd_fixed_param;
  21906. typedef struct {
  21907. /** TLV tag and len; tag equals
  21908. * WMITLV_TAG_STRUC_wmi_motion_det_start_stop_cmd_fixed_param */
  21909. A_UINT32 tlv_header; /** TLV Header */
  21910. A_UINT32 vdev_id; /** Vdev ID */
  21911. A_UINT32 enable; /** start = 1, stop =0 */
  21912. } wmi_motion_det_start_stop_cmd_fixed_param;
  21913. typedef struct {
  21914. /** TLV tag and len; tag equals
  21915. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_start_stop_cmd_fixed_param */
  21916. A_UINT32 tlv_header; /** TLV Header */
  21917. A_UINT32 vdev_id; /** Vdev ID */
  21918. A_UINT32 enable; /** start = 1, stop =0 */
  21919. } wmi_motion_det_base_line_start_stop_cmd_fixed_param;
  21920. typedef struct {
  21921. /** TLV tag and len; tag equals
  21922. * WMITLV_TAG_STRUC_wmi_motion_det_event */
  21923. A_UINT32 tlv_header; /** TLV Header */
  21924. A_UINT32 vdev_id; /** Vdev ID */
  21925. A_UINT32 status; /** status = 1 -> motion detected */
  21926. } wmi_motion_det_event;
  21927. typedef struct {
  21928. /** TLV tag and len; tag equals
  21929. * WMITLV_TAG_STRUC_wmi_motion_det_base_line_event */
  21930. A_UINT32 tlv_header; /** TLV Header */
  21931. A_UINT32 vdev_id; /** Vdev ID */
  21932. A_UINT32 bl_baseline_value; /** baseline correlation value calculated
  21933. * during baselining phase (in %) */
  21934. A_UINT32 bl_max_corr_reserved; /** max corr value obtained during baselining
  21935. * phase (in %); reserved for future */
  21936. A_UINT32 bl_min_corr_reserved; /** min corr value obtained during baselining
  21937. * phase (in %); reserved for future */
  21938. } wmi_motion_det_base_line_event;
  21939. /* Below structures are related to OBSS_PD_SPATIAL Reuse */
  21940. typedef struct {
  21941. /** TLV tag and len; tag equals
  21942. * WMITLV_TAG_STRUC_wmi_obss_set_cmd_fixed_param */
  21943. A_UINT32 tlv_header;
  21944. /** Enable/Disable Spatial Reuse */
  21945. A_UINT32 enable;
  21946. /*
  21947. * In the below fields, "OBSS level" refers to the power of the
  21948. * signals received from "Other BSS".
  21949. * Spatial reuse will only be permitted if the Other BSS's signal power
  21950. * is witin the min to max range specified by the below fields.
  21951. */
  21952. /** Minimum OBSS level to use */
  21953. A_INT32 obss_min; /* RSSI in dBm */
  21954. /** Maximum OBSS level to use */
  21955. A_INT32 obss_max; /* RSSI in dBm */
  21956. /** Vdev id*/
  21957. A_UINT32 vdev_id;
  21958. } wmi_obss_spatial_reuse_set_cmd_fixed_param;
  21959. /*
  21960. * Below structure is related to WMI CMD that configures the default
  21961. * mimimum (OBSS_MIN) and maximum (OBSS_MAX) Other BSS levels (RSSI in dbm)
  21962. * for VDEV of a give type (STA or AP). These thresholds are configured
  21963. * within the Host and passed down to the FW. FW will use these
  21964. * default OBSS_MIN and OBSS_MAX values during roaming if the assoc response
  21965. * from the AP does not include spatial reuse parameter set Info Element.
  21966. */
  21967. typedef struct {
  21968. /** TLV tag and len; tag equals
  21969. * WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param
  21970. */
  21971. A_UINT32 tlv_header;
  21972. /*
  21973. * In the below fields, "OBSS level" refers to the power of the
  21974. * signals received from "Other BSS".
  21975. * Spatial reuse will only be permitted if the Other BSS's signal power
  21976. * is witin the min to max range specified by the below fields.
  21977. */
  21978. /** Minimum OBSS level to use */
  21979. A_INT32 obss_min; /* RSSI in dBm */
  21980. /** Maximum OBSS level to use */
  21981. A_INT32 obss_max; /* RSSI in dBm */
  21982. /** Type of VDEV for which these threshold are applicable.
  21983. * vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
  21984. */
  21985. A_UINT32 vdev_type;
  21986. } wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param;
  21987. typedef struct {
  21988. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_chan_width_peer_list */
  21989. wmi_mac_addr peer_macaddr;
  21990. A_UINT32 chan_width; /* wmi_channel_width */
  21991. } wmi_chan_width_peer_list;
  21992. typedef struct {
  21993. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_chan_width_switch_cmd_fixed_param */
  21994. A_UINT32 num_peers;
  21995. /*
  21996. * Following this structure is the TLV:
  21997. * struct wmi_chan_width_peer_list chan_width_peer_info[num_peers];
  21998. */
  21999. } wmi_peer_chan_width_switch_cmd_fixed_param;
  22000. typedef struct {
  22001. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */
  22002. A_UINT32 tlv_header;
  22003. /* enable or disable HE TB Action frame */
  22004. A_UINT32 enable;
  22005. /* length of action frame body in bytes */
  22006. A_UINT32 data_len;
  22007. /* This TLV is followed by another TLV of array of bytes
  22008. * A_UINT8 data[];
  22009. * This data array contains the action frame raw data
  22010. */
  22011. } wmi_pdev_he_tb_action_frm_cmd_fixed_param;
  22012. typedef struct {
  22013. /** TLV tag and len; tag equals
  22014. * WMITLV_TAG_STRUC_wmi_hpcs_pulse_start_cmd_fixed_param */
  22015. A_UINT32 tlv_header; /** TLV Header */
  22016. A_UINT32 vdev_id; /** Vdev ID */
  22017. A_UINT32 start; /** Start/Stop */
  22018. A_UINT32 sync_time; /** Lower 32-bit of the TSF at which the
  22019. * pulse should be synced. */
  22020. A_UINT32 pulse_interval; /** Periodicity of pulses in micro seconds */
  22021. A_UINT32 active_sync_period; /** Number of beacons to sync before generating
  22022. * pulse in units of beacon interval.
  22023. * Valid for clock slaves only. */
  22024. A_UINT32 gpio_pin; /** GPIO Pin number to be used */
  22025. A_UINT32 pulse_width; /** Duration of pulse in micro seconds */
  22026. } wmi_hpcs_pulse_start_cmd_fixed_param;
  22027. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  22028. #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3)
  22029. #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value)
  22030. /* TWT required */
  22031. #define WMI_HEOPS_TWT_REQUIRED_GET_D3(he_ops) WMI_GET_BITS(he_ops, 3, 1)
  22032. #define WMI_HEOPS_TWT_REQUIRED_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 3, 1, value)
  22033. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  22034. #define WMI_HEOPS_RTSTHLD_GET_D3(he_ops) WMI_GET_BITS(he_ops, 4, 10)
  22035. #define WMI_HEOPS_RTSTHLD_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 4, 10, value)
  22036. /* VHT Operation Information Present */
  22037. #define WMI_HEOPS_VHTOPSPRSNT_GET_D3(he_ops) WMI_GET_BITS(he_ops, 14, 1)
  22038. #define WMI_HEOPS_VHTOPSPRSNT_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 14, 1, value)
  22039. /* Co-Located BSS */
  22040. #define WMI_HEOPS_COLOCBSS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 15, 1)
  22041. #define WMI_HEOPS_COLOCBSS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 15, 1, value)
  22042. /* ER SU Disable */
  22043. #define WMI_HEOPS_ERSUDIS_GET_D3(he_ops) WMI_GET_BITS(he_ops, 16, 1)
  22044. #define WMI_HEOPS_ERSUDIS_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 16, 1, value)
  22045. /* bit17 - bit23 are reserved */
  22046. /* BSS color */
  22047. #define WMI_HEOPS_COLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 24, 6)
  22048. #define WMI_HEOPS_COLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 24, 6, value)
  22049. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  22050. #define WMI_HEOPS_PARTBSSCOLOR_GET_D3(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  22051. #define WMI_HEOPS_PARTBSSCOLOR_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  22052. /* when set to 1 disables use of BSS color */
  22053. #define WMI_HEOPS_BSSCOLORDISABLE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 31, 1)
  22054. #define WMI_HEOPS_BSSCOLORDISABLE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 31, 1, value)
  22055. /* PHY Capabilities Information field */
  22056. /* bit 0 reserved */
  22057. /*
  22058. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  22059. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  22060. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  22061. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  22062. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  22063. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  22064. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  22065. * 242-tone RU mapping in 40 MHz and 80
  22066. * MHz channel width in 5 GHz. Otherwise Reserved.
  22067. * B6: Reserved
  22068. */
  22069. #define WMI_HECAP_PHY_CBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  22070. #define WMI_HECAP_PHY_CBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  22071. /*
  22072. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  22073. * where in the preamble only the secondary 20 MHz is punctured
  22074. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  22075. * where in the preamble only one of the two 20 MHz sub-channels in the
  22076. * secondary 40 MHz is punctured
  22077. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  22078. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  22079. * secondary 20 MHz is punctured
  22080. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  22081. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  22082. * primary 40 MHz is present
  22083. */
  22084. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  22085. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  22086. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  22087. #define WMI_HECAP_PHY_COD_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  22088. #define WMI_HECAP_PHY_COD_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  22089. /* Indicates support of transmission and reception of LDPC encoded packets */
  22090. #define WMI_HECAP_PHY_LDPC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  22091. #define WMI_HECAP_PHY_LDPC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  22092. /*
  22093. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  22094. */
  22095. #define WMI_HECAP_PHY_LTFGIFORHE_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  22096. #define WMI_HECAP_PHY_LTFGIFORHE_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  22097. /*
  22098. * If the Doppler Rx subfield is 1, indicates the maximum number of space-time streams supported for reception
  22099. * when a midamble is present in the Data field.
  22100. * If the Doppler Tx subfield is 1, indicates the maximum number of space-time streams supported for transmission
  22101. * when a midamble is present in the Data field.
  22102. * If both Doppler Rx and Doppler Tx subfields are 1, indicates the maximum number of space-time streams
  22103. * supported for transmission and reception when a midamble is present in the Data field.
  22104. */
  22105. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  22106. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  22107. /*
  22108. * B0: For a transmitting STA acting as beamformee, it indicates support of
  22109. * NDP reception using 4x LTF and 3.2 us guard interval duration
  22110. */
  22111. #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  22112. #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  22113. /*
  22114. * indicates support for the transmission of an HE TB PPDU that has a
  22115. * bandwidth less than or equal to 80 MHz and is using STBC and with
  22116. * one spatial stream
  22117. */
  22118. #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  22119. #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  22120. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */
  22121. #define WMI_HECAP_PHY_RXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  22122. #define WMI_HECAP_PHY_RXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  22123. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  22124. #define WMI_HECAP_PHY_TXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  22125. #define WMI_HECAP_PHY_TXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  22126. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  22127. #define WMI_HECAP_PHY_RXDOPPLER_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  22128. #define WMI_HECAP_PHY_RXDOPPLER_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  22129. /*
  22130. * If the transmitting STA is an AP:
  22131. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  22132. * transmission.
  22133. * If the transmitting STA is a non-AP STA:
  22134. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  22135. * transmission.
  22136. */
  22137. #define WMI_HECAP_PHY_UL_MU_MIMO_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  22138. #define WMI_HECAP_PHY_UL_MU_MIMO_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  22139. /*
  22140. * If the transmitting STA is an AP:
  22141. * indicates STA supports of reception of UL MUMIMO transmission on an
  22142. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  22143. * If the transmitting STA is a non-AP STA:
  22144. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  22145. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  22146. */
  22147. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  22148. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  22149. /* Tx DCM
  22150. * B0:B1
  22151. * 00: Does not support DCM
  22152. * 01: BPSK
  22153. * 10: QPSK
  22154. * 11: 16-QAM
  22155. * B2 signals maximum number of spatial streams with DCM
  22156. * 0: 1 spatial stream
  22157. * 1: 2 spatial streams
  22158. */
  22159. #define WMI_HECAP_PHY_DCMTX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  22160. #define WMI_HECAP_PHY_DCMTX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  22161. /* Rx DCM
  22162. * B0:B1
  22163. * 00: Does not support DCM
  22164. * 01: BPSK
  22165. * 10: QPSK
  22166. * 11: 16-QAM
  22167. * B2 signals maximum number of spatial streams with DCM
  22168. * 0: 1 spatial stream
  22169. * 1: 2 spatial streams
  22170. */
  22171. #define WMI_HECAP_PHY_DCMRX_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  22172. #define WMI_HECAP_PHY_DCMRX_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  22173. /*
  22174. * Indicates that the STA supports the reception of an HE MU PPDU payload
  22175. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  22176. */
  22177. #define WMI_HECAP_PHY_ULHEMU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  22178. #define WMI_HECAP_PHY_ULHEMU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  22179. /* Indicates support for operation as an SU beamformer */
  22180. #define WMI_HECAP_PHY_SUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  22181. #define WMI_HECAP_PHY_SUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  22182. /* Indicates support for operation as an SU beamformee */
  22183. #define WMI_HECAP_PHY_SUBFME_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  22184. #define WMI_HECAP_PHY_SUBFME_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  22185. /* Indicates support for operation as an MU Beamformer */
  22186. #define WMI_HECAP_PHY_MUBFMR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  22187. #define WMI_HECAP_PHY_MUBFMR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  22188. /*
  22189. * Num STS -1 for <= 80MHz (min val 3)
  22190. * The maximum number of space-time streams minus 1 that the STA can
  22191. * receive in an HE NDP
  22192. */
  22193. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  22194. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  22195. /*
  22196. * Num STS -1 for > 80MHz (min val 3)
  22197. * The maximum number of space-time streams minus 1 that the STA can
  22198. * receive in an HE NDP
  22199. */
  22200. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  22201. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  22202. /*
  22203. * Number Of Sounding Dimensions For <= 80 MHz
  22204. * If SU beamformer capable, set to the maximum supported value of the
  22205. * TXVECTOR parameter NUM_STS minus 1.
  22206. * Otherwise, reserved.
  22207. */
  22208. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  22209. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  22210. /*
  22211. * Number Of Sounding Dimensions For > 80 MHz
  22212. * If SU beamformer capable, set to the maximum supported value of the
  22213. * TXVECTOR parameter NUM_STS minus 1.
  22214. * Otherwise, reserved.
  22215. */
  22216. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  22217. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  22218. /*
  22219. * Indicates if the HE beamformee is capable of feedback with tone
  22220. * grouping of 16 in the HE Compressed Beamforming Report field for
  22221. * a SU-type feedback.
  22222. */
  22223. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  22224. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  22225. /*
  22226. * Indicates if the HE beamformee is capable of feedback with tone
  22227. * grouping of 16 in the HE Compressed Beamforming Report field for
  22228. * a MU-type feedback.
  22229. */
  22230. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  22231. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  22232. /*
  22233. * Indicates if HE beamformee is capable of feedback with codebook
  22234. * size {4, 2} in the HECompressed Beamforming Report field for
  22235. * a SU-type feedback.
  22236. */
  22237. #define WMI_HECAP_PHY_CODBK42SU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  22238. #define WMI_HECAP_PHY_CODBK42SU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  22239. /*
  22240. * Indicates if HE beamformee is capable of feedback with codebook
  22241. * size {7, 5} in the HE Compressed Beamforming Report field for
  22242. * a MU-type feedback.
  22243. */
  22244. #define WMI_HECAP_PHY_CODBK75MU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  22245. #define WMI_HECAP_PHY_CODBK75MU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  22246. /*
  22247. * Beamforming Feedback With Trigger Frame
  22248. * If the transmitting STA is an AP STA:
  22249. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  22250. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  22251. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  22252. * If the transmitting STA is a non-AP STA:
  22253. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  22254. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  22255. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  22256. */
  22257. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  22258. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  22259. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  22260. * over the right 106-tone RU or partial BW ER
  22261. */
  22262. #define WMI_HECAP_PHY_HEERSU_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  22263. #define WMI_HECAP_PHY_HEERSU_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  22264. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  22265. * where the RU does not span the entire PPDU bandwidth.
  22266. */
  22267. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  22268. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  22269. /* Indicates whether or not the PPE Threshold field is present */
  22270. #define WMI_HECAP_PHY_PETHRESPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  22271. #define WMI_HECAP_PHY_PETHRESPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  22272. /* Indicates that the STA supports SRP-based SR operation */
  22273. #define WMI_HECAP_PHY_SRPSPRESENT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  22274. #define WMI_HECAP_PHY_SRPPRESENT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  22275. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  22276. #define WMI_HECAP_PHY_PWRBOOSTAR_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  22277. #define WMI_HECAP_PHY_PWRBOOSTAR_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  22278. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  22279. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  22280. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  22281. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  22282. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  22283. * minus 1. Otherwise, reserved.
  22284. */
  22285. #define WMI_HECAP_PHY_MAXNC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  22286. #define WMI_HECAP_PHY_MAXNC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  22287. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  22288. * STBC with one spatial stream
  22289. */
  22290. #define WMI_HECAP_PHY_STBCTXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  22291. #define WMI_HECAP_PHY_STBCTXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  22292. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  22293. * STBC with one spatial stream
  22294. */
  22295. #define WMI_HECAP_PHY_STBCRXGT80_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  22296. #define WMI_HECAP_PHY_STBCRXGT80_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  22297. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  22298. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  22299. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  22300. /*
  22301. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  22302. * 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.
  22303. */
  22304. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  22305. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  22306. /*
  22307. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  22308. * 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.
  22309. */
  22310. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  22311. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  22312. /*
  22313. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  22314. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  22315. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  22316. * 160 MHz HE TB PPDU.
  22317. */
  22318. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  22319. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  22320. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  22321. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  22322. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  22323. /*
  22324. * If the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF in
  22325. * 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
  22326. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  22327. *
  22328. * If the Doppler Tx subfield is 1, indicates support for transmitting midambles with 2x HE-LTF, 1x HE-LTF
  22329. * in HE TB PPDU when allowed.
  22330. * If both the Doppler Rx and Doppler Tx subfields are 1, indicates support for receiving midambles with 2x HELTF,
  22331. * 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
  22332. * 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
  22333. * to 1; and also support for transmitting midambles with 2x HE-LTF, 1x HE-LTF in HE TB PPDU when allowed.
  22334. */
  22335. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  22336. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  22337. /*
  22338. * If the DCM Max Constellation Tx subfield is greater than 0, then the DCM Max BW subfield indicates the
  22339. * maximum bandwidth of a PPDU that the STA might transmit with DCM applied.
  22340. *
  22341. * If the DCM Max Constellation Rx subfield is greater than 0, then the DCM Max BW subfield indicates the
  22342. * maximum bandwidth of a PPDU with DCM applied that the STA can receive.
  22343. *
  22344. * If both the DCM Max Constellation Tx subfield and DCM Max Constellation Rx subfield are 0, then this
  22345. * subfield is reserved.
  22346. *
  22347. * 0=20MHz, 1=40Mhz, 2=80Mhz, 3=160Mhz or 80+80Mhz
  22348. */
  22349. #define WMI_HECAP_PHY_DCMMAXBW_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 6, 2)
  22350. #define WMI_HECAP_PHY_DCMMAXBW_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 6, 2, value)
  22351. /*
  22352. * For a non-AP STA, indicates support for receiving a DL HE MU PPDU where the number of OFDM symbols
  22353. * in the HE SIG-B field is greater than 16.
  22354. */
  22355. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 8, 1)
  22356. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 8, 1, value)
  22357. /*
  22358. * For an AP, indicates support for the reception of full bandwidth non-triggered CQI-only feedback.
  22359. * For a non-AP STA, indicates support for the transmission of full bandwidth non-triggered CQI-only feedback.
  22360. */
  22361. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 9, 1)
  22362. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 9, 1, value)
  22363. /*
  22364. * For a non-AP STA, indicates support for the transmission of 1024-QAM on a 26-, 52-, and 106-tone RU.
  22365. * Reserved for an AP.
  22366. */
  22367. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 10, 1)
  22368. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 10, 1, value)
  22369. /*
  22370. * Indicates support for the reception of 1024-QAM on a 26-, 52-, and 106-tone RU.
  22371. */
  22372. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 11, 1)
  22373. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 11, 1, value)
  22374. /*
  22375. * Indicates support for reception of an HE MU PPDU with an RU spanning the entire PPDU bandwidth and a
  22376. * compressed HE-SIG-B format.
  22377. */
  22378. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 12, 1)
  22379. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 12, 1, value)
  22380. /*
  22381. * Indicates support for reception of an HE MU PPDU with a bandwidth less than or equal to 80 MHz, an RU
  22382. * spanning the entire PPDU bandwidth and a non-compressed HE-SIG-B format.
  22383. */
  22384. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 13, 1)
  22385. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 13, 1, value)
  22386. /* HE MAC Capabilities Information field format */
  22387. /* HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field */
  22388. #define WMI_HECAP_MAC_HECTRL_GET_D3(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  22389. #define WMI_HECAP_MAC_HECTRL_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  22390. /* set to 1 to for TWT Requestor support */
  22391. #define WMI_HECAP_MAC_TWTREQ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  22392. #define WMI_HECAP_MAC_TWTREQ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  22393. /* set to 1 to for TWT Responder support */
  22394. #define WMI_HECAP_MAC_TWTRSP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  22395. #define WMI_HECAP_MAC_TWTRSP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  22396. /* Level of frag support
  22397. Set to 0 for no support for dynamic fragmentation.
  22398. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  22399. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  22400. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  22401. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  22402. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  22403. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  22404. */
  22405. #define WMI_HECAP_MAC_HEFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  22406. #define WMI_HECAP_MAC_HEFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  22407. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs */
  22408. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  22409. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  22410. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  22411. #define WMI_HECAP_MAC_MINFRAGSZ_GET_D3(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  22412. #define WMI_HECAP_MAC_MINFRAGSZ_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  22413. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  22414. #define WMI_HECAP_MAC_TRIGPADDUR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  22415. #define WMI_HECAP_MAC_TRIGPADDUR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  22416. /* Indicates the number of TIDs of QoS Data frames that an HE STA can receive in a multi-TID AMPDU */
  22417. #define WMI_HECAP_MAC_MTID_RX_GET_D3(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  22418. #define WMI_HECAP_MAC_MTID_RX_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  22419. /* Indicates support for link adaptation using the HLA Control subfield. */
  22420. #define WMI_HECAP_MAC_HELINK_ADPT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 15, 2)
  22421. #define WMI_HECAP_MAC_HELINK_ADPT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 15, 2, value)
  22422. /* Set to 1 for reception of AllAck support */
  22423. #define WMI_HECAP_MAC_AACK_GET_D3(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  22424. #define WMI_HECAP_MAC_AACK_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  22425. /* Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field */
  22426. #define WMI_HECAP_MAC_TRS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  22427. #define WMI_HECAP_MAC_TRS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  22428. /* Set to 1 if the STA supports the BSR A-Control field functionality.*/
  22429. #define WMI_HECAP_MAC_BSR_GET_D3(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  22430. #define WMI_HECAP_MAC_BSR_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  22431. /* Set to 1 when the STA supports broadcast TWT functionality.*/
  22432. #define WMI_HECAP_MAC_BCSTTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  22433. #define WMI_HECAP_MAC_BCSTTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  22434. /* Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap */
  22435. #define WMI_HECAP_MAC_32BITBA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  22436. #define WMI_HECAP_MAC_32BITBA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  22437. /* Set to 1 if the STA supports MU cascading operation */
  22438. #define WMI_HECAP_MAC_MUCASCADE_GET_D3(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  22439. #define WMI_HECAP_MAC_MUCASCADE_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  22440. /* Set to 1 when the STA supports reception of this multi-TID A-MPDU format */
  22441. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  22442. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  22443. /* bit 24 - reserved */
  22444. /* Set to 1 if the STA supports reception of the OMI A-Control field */
  22445. #define WMI_HECAP_MAC_OMI_GET_D3(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  22446. #define WMI_HECAP_MAC_OMI_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  22447. /*1 if OFDMA Random Access Supported */
  22448. #define WMI_HECAP_MAC_OFDMARA_GET_D3(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  22449. #define WMI_HECAP_MAC_OFDMARA_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  22450. /* Maximum AMPDU Length Exponent.
  22451. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  22452. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  22453. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  22454. * padding is not included in this limit.
  22455. */
  22456. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  22457. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  22458. /* A-MSDU Fragmentation Support */
  22459. #define WMI_HECAP_MAC_AMSDUFRAG_GET_D3(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  22460. #define WMI_HECAP_MAC_AMSDUFRAG_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  22461. /* Flexible TWT Schedule Support */
  22462. #define WMI_HECAP_MAC_FLEXTWT_GET_D3(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  22463. #define WMI_HECAP_MAC_FLEXTWT_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  22464. /* Rx Control Frame to MultiBSS */
  22465. #define WMI_HECAP_MAC_MBSS_GET_D3(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  22466. #define WMI_HECAP_MAC_MBSS_SET_D3(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  22467. /* 2nd DWORD of HE MAC Capabilities */
  22468. /* BSRP A-MPDU Aggregation
  22469. * maintaining compatability since we dont support this now so not wasting memory
  22470. */
  22471. #define WMI_HECAP_MAC_BSRPAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 0, 1)
  22472. #define WMI_HECAP_MAC_BSRPAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 0, 1, value)
  22473. /* Quiet Time Period (QTP) operation
  22474. * maintaining compatability since we dont support this now so not wasting memory
  22475. */
  22476. #define WMI_HECAP_MAC_QTP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 1, 1)
  22477. #define WMI_HECAP_MAC_QTP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 1, 1, value)
  22478. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  22479. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  22480. * that contains a BQR in the A-Control subfield
  22481. * maintaining compatability since we dont support this now so not wasting memory
  22482. */
  22483. #define WMI_HECAP_MAC_ABQR_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 2, 1)
  22484. #define WMI_HECAP_MAC_ABQR_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 2, 1, value)
  22485. /* Indicates support by the STA for the role of SRP Responder.*/
  22486. #define WMI_HECAP_MAC_SRPRESP_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 3, 1)
  22487. #define WMI_HECAP_MAC_SRPRESP_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 3, 1, value)
  22488. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  22489. * the NDP Feedback Report Poll Trigger frame.
  22490. */
  22491. #define WMI_HECAP_MAC_NDPFDBKRPT_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 4, 1)
  22492. #define WMI_HECAP_MAC_NDPFDBKRPT_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 4, 1, value)
  22493. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  22494. * frames or TIM frames as described in AP operation for opportunistic power save.
  22495. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  22496. */
  22497. #define WMI_HECAP_MAC_OPS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 5, 1)
  22498. #define WMI_HECAP_MAC_OPS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 5, 1, value)
  22499. /* Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  22500. * a QoS Data frame for which no block ack agreement exists.
  22501. */
  22502. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 6, 1)
  22503. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 6, 1, value)
  22504. /* Indicates the number of TIDs of QoS Data frames that an HE STA can transmit in a multi-TID AMPDU */
  22505. #define WMI_HECAP_MAC_MTID_TX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 7, 3)
  22506. #define WMI_HECAP_MAC_MTID_TX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 7, 3, value)
  22507. /* Indicates whether an HE STA supports an HE subchannel selective transmission operation */
  22508. #define WMI_HECAP_MAC_SUBCHANSELTX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 10, 1)
  22509. #define WMI_HECAP_MAC_SUBCHANSELTX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 10, 1, value)
  22510. /* Indicates support by a STA to receive a TRS Control subfield or a Trigger frame with a User Info
  22511. * field addressed to the STA with the RU Allocation subfield of the TRS Control subfield or the User
  22512. * Info field indicating 2x996-tone.
  22513. */
  22514. #define WMI_HECAP_MAC_UL2X996RU_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 11, 1)
  22515. #define WMI_HECAP_MAC_UL2X996RU_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 11, 1, value)
  22516. /* Indicates whether an AP supports interpretation of the UL MU Data Disable subfield of the OM Control subfield */
  22517. #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1)
  22518. #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value)
  22519. /* Indicates the spatial multiplexing power save mode after receiving a
  22520. * Trigger frame that is in operation immediately after (re)association.
  22521. */
  22522. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1)
  22523. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value)
  22524. /* Indicates support for Punctured Sounding */
  22525. #define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1)
  22526. #define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value)
  22527. /* Indicates support for receiving a Trigger frame in an HT PPDU and
  22528. * receiving a Trigger frame in a VHT PPDU
  22529. */
  22530. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1)
  22531. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value)
  22532. /*
  22533. * The following conditionally-defined macros can be used in systems
  22534. * which only support either 802.11ax draft 2 or 802.11ax draft 3,
  22535. * but not both, and which make this D2 vs. D3 selection at build time.
  22536. */
  22537. #ifdef SUPPORT_11AX_D3
  22538. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D3
  22539. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D3
  22540. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D3
  22541. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D3
  22542. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D3
  22543. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D3
  22544. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_REQUIRED_GET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET */
  22545. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_REQUIRED_SET_D3 /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET */
  22546. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D3
  22547. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D3
  22548. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D3
  22549. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D3
  22550. #define WMI_HEOPS_COLOCBSS_GET WMI_HEOPS_COLOCBSS_GET_D3
  22551. #define WMI_HEOPS_COLOCBSS_SET WMI_HEOPS_COLOCBSS_SET_D3
  22552. #define WMI_HEOPS_VHTOPSPRSNT_GET WMI_HEOPS_VHTOPSPRSNT_GET_D3
  22553. #define WMI_HEOPS_VHTOPSPRSNT_SET WMI_HEOPS_VHTOPSPRSNT_SET_D3
  22554. #define WMI_HEOPS_ERSUDIS_GET WMI_HEOPS_ERSUDIS_GET_D3
  22555. #define WMI_HEOPS_ERSUDIS_SET WMI_HEOPS_ERSUDIS_SET_D3
  22556. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D3
  22557. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D3
  22558. #define WMI_HEOPS_TXBSSID_GET(he_ops) (0) /* DEPRECATED - DO NOT USE */
  22559. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) /* DEPRECATED - DO NOT USE */
  22560. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D3
  22561. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D3
  22562. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D3
  22563. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D3
  22564. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D3
  22565. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D3
  22566. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D3
  22567. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D3
  22568. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  22569. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  22570. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_LDPC_GET /* Deprecated use WMI_HECAP_PHY_LDPC */
  22571. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_LDPC_SET /* Deprecated use WMI_HECAP_PHY_LDPC */
  22572. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D3
  22573. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D3
  22574. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3
  22575. #define WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3
  22576. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D3
  22577. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D3
  22578. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D3
  22579. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D3
  22580. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D3
  22581. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D3
  22582. #define WMI_HECAP_PHY_TXDOPPLER WMI_HECAP_PHY_TXDOPPLER_GET_D3
  22583. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D3
  22584. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D3
  22585. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D3
  22586. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D3
  22587. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D3
  22588. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D3
  22589. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D3
  22590. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D3
  22591. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D3
  22592. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D3
  22593. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D3
  22594. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  22595. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCMRX_GET_D3
  22596. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCMRX_SET_D3
  22597. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D3
  22598. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D3
  22599. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D3
  22600. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D3
  22601. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D3
  22602. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D3
  22603. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D3
  22604. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D3
  22605. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  22606. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  22607. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  22608. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  22609. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D3
  22610. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D3
  22611. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D3
  22612. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D3
  22613. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D3
  22614. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D3
  22615. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D3
  22616. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D3
  22617. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D3
  22618. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D3
  22619. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D3
  22620. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D3
  22621. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D3
  22622. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D3
  22623. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D3
  22624. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D3
  22625. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D3
  22626. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D3
  22627. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D3
  22628. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D3
  22629. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D3
  22630. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D3
  22631. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D3
  22632. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D3
  22633. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D3
  22634. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D3
  22635. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D3
  22636. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D3
  22637. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D3
  22638. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D3
  22639. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D3
  22640. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D3
  22641. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D3
  22642. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D3
  22643. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D3
  22644. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D3
  22645. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D3
  22646. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D3
  22647. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D3
  22648. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D3
  22649. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D3
  22650. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D3
  22651. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D3
  22652. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D3
  22653. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D3
  22654. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D3
  22655. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET_D3
  22656. #define WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET_D3
  22657. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_GET /* DEPRECATED */
  22658. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLETXRX2XAND1XHELTF_SET /* DEPRECATED */
  22659. #define WMI_HECAP_PHY_DCMMAXBW_GET WMI_HECAP_PHY_DCMMAXBW_GET_D3
  22660. #define WMI_HECAP_PHY_DCMMAXBW_SET WMI_HECAP_PHY_DCMMAXBW_SET_D3
  22661. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_GET_D3
  22662. #define WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET WMI_HECAP_PHY_LNG16SIGBSYMBSUPRT_SET_D3
  22663. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_GET_D3
  22664. #define WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET WMI_HECAP_PHY_NONTRIGCQIFEEDBK_SET_D3
  22665. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_GET_D3
  22666. #define WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_TX1024QAM242RUSUPRT_SET_D3
  22667. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_GET_D3
  22668. #define WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET WMI_HECAP_PHY_RX1024QAM242RUSUPRT_SET_D3
  22669. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_GET_D3
  22670. #define WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWCMPRSSIGB_SET_D3
  22671. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_GET_D3
  22672. #define WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET WMI_HECAP_PHY_RXFULBWSUWNONCMPRSSIGB_SET_D3
  22673. #define WMI_HECAP_PHY_DB_GET(he_phy_cap) (0) /* DEPRECATED - DO NOT USE */
  22674. #define WMI_HECAP_PHY_DB_SET(he_phy_cap, value) /* DEPRECATED - DO NOT USE */
  22675. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D3
  22676. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D3
  22677. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D3
  22678. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D3
  22679. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D3
  22680. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D3
  22681. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D3
  22682. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D3
  22683. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D3
  22684. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D3
  22685. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D3
  22686. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D3
  22687. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D3
  22688. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D3
  22689. #define WMI_HECAP_MAC_MTID_RX_GET WMI_HECAP_MAC_MTID_RX_GET_D3
  22690. #define WMI_HECAP_MAC_MTID_RX_SET WMI_HECAP_MAC_MTID_RX_SET_D3
  22691. #define WMI_HECAP_MAC_HELINK_ADPT_GET WMI_HECAP_MAC_HELINK_ADPT_GET_D3
  22692. #define WMI_HECAP_MAC_HELINK_ADPT_SET WMI_HECAP_MAC_HELINK_ADPT_SET_D3
  22693. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D3
  22694. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D3
  22695. #define WMI_HECAP_MAC_TRS_GET WMI_HECAP_MAC_TRS_GET_D3
  22696. #define WMI_HECAP_MAC_TRS_SET WMI_HECAP_MAC_TRS_SET_D3
  22697. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  22698. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  22699. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D3
  22700. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D3
  22701. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D3
  22702. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D3
  22703. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D3
  22704. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D3
  22705. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D3
  22706. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D3
  22707. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D3
  22708. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D3
  22709. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  22710. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  22711. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D3
  22712. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D3
  22713. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D3
  22714. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D3
  22715. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D3
  22716. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D3
  22717. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D3
  22718. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D3
  22719. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D3
  22720. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D3
  22721. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D3
  22722. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D3
  22723. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D3
  22724. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D3
  22725. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D3
  22726. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D3
  22727. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D3
  22728. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D3
  22729. #define WMI_HECAP_MAC_SRPRESP_GET WMI_HECAP_MAC_SRPRESP_GET_D3
  22730. #define WMI_HECAP_MAC_SRPRESP_SET WMI_HECAP_MAC_SRPRESP_SET_D3
  22731. #define WMI_HECAP_MAC_SRRESP_GET(he_cap2) (0) /* DEPRECATED, DO NOT USE */
  22732. #define WMI_HECAP_MAC_SRRESP_SET(he_cap2, value) /* DEPRECATED, DO NOT USE */
  22733. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D3
  22734. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D3
  22735. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D3
  22736. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D3
  22737. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D3
  22738. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D3
  22739. #define WMI_HECAP_MAC_MTID_TX_GET WMI_HECAP_MAC_MTID_TX_GET_D3
  22740. #define WMI_HECAP_MAC_MTID_TX_SET WMI_HECAP_MAC_MTID_TX_SET_D3
  22741. #define WMI_HECAP_MAC_SUBCHANSELTX_GET WMI_HECAP_MAC_SUBCHANSELTX_GET_D3
  22742. #define WMI_HECAP_MAC_SUBCHANSELTX_SET WMI_HECAP_MAC_SUBCHANSELTX_SET_D3
  22743. #define WMI_HECAP_MAC_UL2X996RU_GET WMI_HECAP_MAC_UL2X996RU_GET_D3
  22744. #define WMI_HECAP_MAC_UL2X996RU_SET WMI_HECAP_MAC_UL2X996RU_SET_D3
  22745. #define WMI_HECAP_MAC_OMCULMUDDIS_GET WMI_HECAP_MAC_OMCULMUDDIS_GET_D3
  22746. #define WMI_HECAP_MAC_OMCULMUDDIS_SET WMI_HECAP_MAC_OMCULMUDDIS_SET_D3
  22747. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0) /* DEPRECATED, DO NOT USE */
  22748. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */
  22749. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */
  22750. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */
  22751. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3
  22752. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3
  22753. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3
  22754. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3
  22755. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3
  22756. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3
  22757. #else /* SUPPORT_11AX_D3 vs. D2 */
  22758. /* D2 and D2- */
  22759. #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2
  22760. #define WMI_HEOPS_COLOR_SET WMI_HEOPS_COLOR_SET_D2
  22761. #define WMI_HEOPS_DEFPE_GET WMI_HEOPS_DEFPE_GET_D2
  22762. #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2
  22763. #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2
  22764. #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2
  22765. #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Depricated */
  22766. #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Depricated */
  22767. #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2
  22768. #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2
  22769. #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2
  22770. #define WMI_HEOPS_PARTBSSCOLOR_SET WMI_HEOPS_PARTBSSCOLOR_SET_D2
  22771. #define WMI_HEOPS_MAXBSSID_GET WMI_HEOPS_MAXBSSID_GET_D2
  22772. #define WMI_HEOPS_MAXBSSID_SET WMI_HEOPS_MAXBSSID_SET_D2
  22773. #define WMI_HEOPS_TXBSSID_GET WMI_HEOPS_TXBSSID_GET_D2
  22774. #define WMI_HEOPS_TXBSSID_SET WMI_HEOPS_TXBSSID_SET_D2
  22775. #define WMI_HEOPS_BSSCOLORDISABLE_GET WMI_HEOPS_BSSCOLORDISABLE_GET_D2
  22776. #define WMI_HEOPS_BSSCOLORDISABLE_SET WMI_HEOPS_BSSCOLORDISABLE_SET_D2
  22777. #define WMI_HEOPS_DUALBEACON_GET WMI_HEOPS_DUALBEACON_GET_D2
  22778. #define WMI_HEOPS_DUALBEACON_SET WMI_HEOPS_DUALBEACON_SET_D2
  22779. #define WMI_HECAP_PHY_DB_GET WMI_HECAP_PHY_DB_GET_D2
  22780. #define WMI_HECAP_PHY_DB_SET WMI_HECAP_PHY_DB_SET_D2
  22781. #define WMI_HECAP_PHY_CBW_GET WMI_HECAP_PHY_CBW_GET_D2
  22782. #define WMI_HECAP_PHY_CBW_SET WMI_HECAP_PHY_CBW_SET_D2
  22783. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET WMI_HECAP_PHY_PREAMBLEPUNCRX_GET_D2
  22784. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET WMI_HECAP_PHY_PREAMBLEPUNCRX_SET_D2
  22785. #define WMI_HECAP_PHY_COD_GET WMI_HECAP_PHY_COD_GET_D2
  22786. #define WMI_HECAP_PHY_COD_SET WMI_HECAP_PHY_COD_SET_D2
  22787. #define WMI_HECAP_PHY_LDPC_GET WMI_HECAP_PHY_LDPC_GET_D2
  22788. #define WMI_HECAP_PHY_LDPC_SET WMI_HECAP_PHY_LDPC_SET_D2
  22789. #define WMI_HECAP_PHY_TXLDPC_GET WMI_HECAP_PHY_TXLDPC_GET_D2
  22790. #define WMI_HECAP_PHY_TXLDPC_SET WMI_HECAP_PHY_TXLDPC_SET_D2
  22791. #define WMI_HECAP_PHY_RXLDPC_GET WMI_HECAP_PHY_RXLDPC_GET_D2
  22792. #define WMI_HECAP_PHY_RXLDPC_SET WMI_HECAP_PHY_RXLDPC_SET_D2
  22793. #define WMI_HECAP_PHY_LTFGIFORHE_GET WMI_HECAP_PHY_LTFGIFORHE_GET_D2
  22794. #define WMI_HECAP_PHY_LTFGIFORHE_SET WMI_HECAP_PHY_LTFGIFORHE_SET_D2
  22795. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET_D2
  22796. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET_D2
  22797. #define WMI_HECAP_PHY_LTFGIFORNDP_GET WMI_HECAP_PHY_LTFGIFORNDP_GET_D2
  22798. #define WMI_HECAP_PHY_LTFGIFORNDP_SET WMI_HECAP_PHY_LTFGIFORNDP_SET_D2
  22799. #define WMI_HECAP_PHY_TXSTBC_GET WMI_HECAP_PHY_TXSTBC_GET_D2
  22800. #define WMI_HECAP_PHY_TXSTBC_SET WMI_HECAP_PHY_TXSTBC_SET_D2
  22801. #define WMI_HECAP_PHY_RXSTBC_GET WMI_HECAP_PHY_RXSTBC_GET_D2
  22802. #define WMI_HECAP_PHY_RXSTBC_SET WMI_HECAP_PHY_RXSTBC_SET_D2
  22803. #define WMI_HECAP_PHY_TXDOPPLER_GET WMI_HECAP_PHY_TXDOPPLER_GET_D2
  22804. #define WMI_HECAP_PHY_TXDOPPLER_SET WMI_HECAP_PHY_TXDOPPLER_SET_D2
  22805. #define WMI_HECAP_PHY_RXDOPPLER_GET WMI_HECAP_PHY_RXDOPPLER_GET_D2
  22806. #define WMI_HECAP_PHY_RXDOPPLER_SET WMI_HECAP_PHY_RXDOPPLER_SET_D2
  22807. #define WMI_HECAP_PHY_UL_MU_MIMO_GET WMI_HECAP_PHY_UL_MU_MIMO_GET_D2
  22808. #define WMI_HECAP_PHY_UL_MU_MIMO_SET WMI_HECAP_PHY_UL_MU_MIMO_SET_D2
  22809. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET_D2
  22810. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET_D2
  22811. #define WMI_HECAP_PHY_DCMTX_GET WMI_HECAP_PHY_DCMTX_GET_D2
  22812. #define WMI_HECAP_PHY_DCMTX_SET WMI_HECAP_PHY_DCMTX_SET_D2
  22813. #define WMI_HECAP_PHY_DCMRX_GET WMI_HECAP_PHY_DCMRX_GET_D2
  22814. #define WMI_HECAP_PHY_DCMRX_SET WMI_HECAP_PHY_DCMRX_SET_D2
  22815. #define WMI_HECAP_PHY_ULHEMU_GET WMI_HECAP_PHY_ULHEMU_GET_D2
  22816. #define WMI_HECAP_PHY_ULHEMU_SET WMI_HECAP_PHY_ULHEMU_SET_D2
  22817. #define WMI_HECAP_PHY_SUBFMR_GET WMI_HECAP_PHY_SUBFMR_GET_D2
  22818. #define WMI_HECAP_PHY_SUBFMR_SET WMI_HECAP_PHY_SUBFMR_SET_D2
  22819. #define WMI_HECAP_PHY_SUBFME_GET WMI_HECAP_PHY_SUBFME_GET_D2
  22820. #define WMI_HECAP_PHY_SUBFME_SET WMI_HECAP_PHY_SUBFME_SET_D2
  22821. #define WMI_HECAP_PHY_MUBFMR_GET WMI_HECAP_PHY_MUBFMR_GET_D2
  22822. #define WMI_HECAP_PHY_MUBFMR_SET WMI_HECAP_PHY_MUBFMR_SET_D2
  22823. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET WMI_HECAP_PHY_BFMESTSLT80MHZ_GET_D2
  22824. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET WMI_HECAP_PHY_BFMESTSLT80MHZ_SET_D2
  22825. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET WMI_HECAP_PHY_BFMESTSGT80MHZ_GET_D2
  22826. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET WMI_HECAP_PHY_BFMESTSGT80MHZ_SET_D2
  22827. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET_D2
  22828. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET_D2
  22829. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET_D2
  22830. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET_D2
  22831. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET_D2
  22832. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET_D2
  22833. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET_D2
  22834. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET_D2
  22835. #define WMI_HECAP_PHY_CODBK42SU_GET WMI_HECAP_PHY_CODBK42SU_GET_D2
  22836. #define WMI_HECAP_PHY_CODBK42SU_SET WMI_HECAP_PHY_CODBK42SU_SET_D2
  22837. #define WMI_HECAP_PHY_CODBK75MU_GET WMI_HECAP_PHY_CODBK75MU_GET_D2
  22838. #define WMI_HECAP_PHY_CODBK75MU_SET WMI_HECAP_PHY_CODBK75MU_SET_D2
  22839. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET WMI_HECAP_PHY_BFFEEDBACKTRIG_GET_D2
  22840. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET WMI_HECAP_PHY_BFFEEDBACKTRIG_SET_D2
  22841. #define WMI_HECAP_PHY_HEERSU_GET WMI_HECAP_PHY_HEERSU_GET_D2
  22842. #define WMI_HECAP_PHY_HEERSU_SET WMI_HECAP_PHY_HEERSU_SET_D2
  22843. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET_D2
  22844. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET_D2
  22845. #define WMI_HECAP_PHY_PETHRESPRESENT_GET WMI_HECAP_PHY_PETHRESPRESENT_GET_D2
  22846. #define WMI_HECAP_PHY_PETHRESPRESENT_SET WMI_HECAP_PHY_PETHRESPRESENT_SET_D2
  22847. #define WMI_HECAP_PHY_SRPSPRESENT_GET WMI_HECAP_PHY_SRPSPRESENT_GET_D2
  22848. #define WMI_HECAP_PHY_SRPPRESENT_SET WMI_HECAP_PHY_SRPPRESENT_SET_D2
  22849. #define WMI_HECAP_PHY_PWRBOOSTAR_GET WMI_HECAP_PHY_PWRBOOSTAR_GET_D2
  22850. #define WMI_HECAP_PHY_PWRBOOSTAR_SET WMI_HECAP_PHY_PWRBOOSTAR_SET_D2
  22851. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET_D2
  22852. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET_D2
  22853. #define WMI_HECAP_PHY_MAXNC_GET WMI_HECAP_PHY_MAXNC_GET_D2
  22854. #define WMI_HECAP_PHY_MAXNC_SET WMI_HECAP_PHY_MAXNC_SET_D2
  22855. #define WMI_HECAP_PHY_STBCTXGT80_GET WMI_HECAP_PHY_STBCTXGT80_GET_D2
  22856. #define WMI_HECAP_PHY_STBCTXGT80_SET WMI_HECAP_PHY_STBCTXGT80_SET_D2
  22857. #define WMI_HECAP_PHY_STBCRXGT80_GET WMI_HECAP_PHY_STBCRXGT80_GET_D2
  22858. #define WMI_HECAP_PHY_STBCRXGT80_SET WMI_HECAP_PHY_STBCRXGT80_SET_D2
  22859. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET WMI_HECAP_PHY_ERSU4X800NSECGI_GET_D2
  22860. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET WMI_HECAP_PHY_ERSU4X800NSECGI_SET_D2
  22861. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET_D2
  22862. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET_D2
  22863. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET_D2
  22864. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET_D2
  22865. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET_D2
  22866. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET_D2
  22867. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET WMI_HECAP_PHY_ERSU1X800NSECGI_GET_D2
  22868. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET WMI_HECAP_PHY_ERSU1X800NSECGI_SET_D2
  22869. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET_D2
  22870. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET_D2
  22871. #define WMI_HECAP_MAC_HECTRL_GET WMI_HECAP_MAC_HECTRL_GET_D2
  22872. #define WMI_HECAP_MAC_HECTRL_SET WMI_HECAP_MAC_HECTRL_SET_D2
  22873. #define WMI_HECAP_MAC_TWTREQ_GET WMI_HECAP_MAC_TWTREQ_GET_D2
  22874. #define WMI_HECAP_MAC_TWTREQ_SET WMI_HECAP_MAC_TWTREQ_SET_D2
  22875. #define WMI_HECAP_MAC_TWTRSP_GET WMI_HECAP_MAC_TWTRSP_GET_D2
  22876. #define WMI_HECAP_MAC_TWTRSP_SET WMI_HECAP_MAC_TWTRSP_SET_D2
  22877. #define WMI_HECAP_MAC_HEFRAG_GET WMI_HECAP_MAC_HEFRAG_GET_D2
  22878. #define WMI_HECAP_MAC_HEFRAG_SET WMI_HECAP_MAC_HEFRAG_SET_D2
  22879. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET WMI_HECAP_MAC_MAXFRAGMSDU_GET_D2
  22880. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET WMI_HECAP_MAC_MAXFRAGMSDU_SET_D2
  22881. #define WMI_HECAP_MAC_MINFRAGSZ_GET WMI_HECAP_MAC_MINFRAGSZ_GET_D2
  22882. #define WMI_HECAP_MAC_MINFRAGSZ_SET WMI_HECAP_MAC_MINFRAGSZ_SET_D2
  22883. #define WMI_HECAP_MAC_TRIGPADDUR_GET WMI_HECAP_MAC_TRIGPADDUR_GET_D2
  22884. #define WMI_HECAP_MAC_TRIGPADDUR_SET WMI_HECAP_MAC_TRIGPADDUR_SET_D2
  22885. #define WMI_HECAP_MAC_MTID_GET WMI_HECAP_MAC_MTID_GET_D2
  22886. #define WMI_HECAP_MAC_MTID_SET WMI_HECAP_MAC_MTID_SET_D2
  22887. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET WMI_HECAP_MAC_AMSDUINAMPDU_GET_D2
  22888. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET WMI_HECAP_MAC_AMSDUINAMPDU_SET_D2
  22889. #define WMI_HECAP_MAC_HELKAD_GET WMI_HECAP_MAC_HELKAD_GET_D2
  22890. #define WMI_HECAP_MAC_HELKAD_SET WMI_HECAP_MAC_HELKAD_SET_D2
  22891. #define WMI_HECAP_MAC_AACK_GET WMI_HECAP_MAC_AACK_GET_D2
  22892. #define WMI_HECAP_MAC_AACK_SET WMI_HECAP_MAC_AACK_SET_D2
  22893. #define WMI_HECAP_MAC_ULMURSP_GET WMI_HECAP_MAC_ULMURSP_GET_D2
  22894. #define WMI_HECAP_MAC_ULMURSP_SET WMI_HECAP_MAC_ULMURSP_SET_D2
  22895. #define WMI_HECAP_MAC_BSR_GET WMI_HECAP_MAC_BSR_GET_D2
  22896. #define WMI_HECAP_MAC_BSR_SET WMI_HECAP_MAC_BSR_SET_D2
  22897. #define WMI_HECAP_MAC_BCSTTWT_GET WMI_HECAP_MAC_BCSTTWT_GET_D2
  22898. #define WMI_HECAP_MAC_BCSTTWT_SET WMI_HECAP_MAC_BCSTTWT_SET_D2
  22899. #define WMI_HECAP_MAC_32BITBA_GET WMI_HECAP_MAC_32BITBA_GET_D2
  22900. #define WMI_HECAP_MAC_32BITBA_SET WMI_HECAP_MAC_32BITBA_SET_D2
  22901. #define WMI_HECAP_MAC_MUCASCADE_GET WMI_HECAP_MAC_MUCASCADE_GET_D2
  22902. #define WMI_HECAP_MAC_MUCASCADE_SET WMI_HECAP_MAC_MUCASCADE_SET_D2
  22903. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET WMI_HECAP_MAC_ACKMTIDAMPDU_GET_D2
  22904. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET WMI_HECAP_MAC_ACKMTIDAMPDU_SET_D2
  22905. #define WMI_HECAP_MAC_GROUPMSTABA_GET WMI_HECAP_MAC_GROUPMSTABA_GET_D2
  22906. #define WMI_HECAP_MAC_GROUPMSTABA_SET WMI_HECAP_MAC_GROUPMSTABA_SET_D2
  22907. #define WMI_HECAP_MAC_OMI_GET WMI_HECAP_MAC_OMI_GET_D2
  22908. #define WMI_HECAP_MAC_OMI_SET WMI_HECAP_MAC_OMI_SET_D2
  22909. #define WMI_HECAP_MAC_OFDMARA_GET WMI_HECAP_MAC_OFDMARA_GET_D2
  22910. #define WMI_HECAP_MAC_OFDMARA_SET WMI_HECAP_MAC_OFDMARA_SET_D2
  22911. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET_D2
  22912. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET_D2
  22913. #define WMI_HECAP_MAC_AMSDUFRAG_GET WMI_HECAP_MAC_AMSDUFRAG_GET_D2
  22914. #define WMI_HECAP_MAC_AMSDUFRAG_SET WMI_HECAP_MAC_AMSDUFRAG_SET_D2
  22915. #define WMI_HECAP_MAC_FLEXTWT_GET WMI_HECAP_MAC_FLEXTWT_GET_D2
  22916. #define WMI_HECAP_MAC_FLEXTWT_SET WMI_HECAP_MAC_FLEXTWT_SET_D2
  22917. #define WMI_HECAP_MAC_MBSS_GET WMI_HECAP_MAC_MBSS_GET_D2
  22918. #define WMI_HECAP_MAC_MBSS_SET WMI_HECAP_MAC_MBSS_SET_D2
  22919. #define WMI_HECAP_MAC_BSRPAMPDU_GET WMI_HECAP_MAC_BSRPAMPDU_GET_D2
  22920. #define WMI_HECAP_MAC_BSRPAMPDU_SET WMI_HECAP_MAC_BSRPAMPDU_SET_D2
  22921. #define WMI_HECAP_MAC_QTP_GET WMI_HECAP_MAC_QTP_GET_D2
  22922. #define WMI_HECAP_MAC_QTP_SET WMI_HECAP_MAC_QTP_SET_D2
  22923. #define WMI_HECAP_MAC_ABQR_GET WMI_HECAP_MAC_ABQR_GET_D2
  22924. #define WMI_HECAP_MAC_ABQR_SET WMI_HECAP_MAC_ABQR_SET_D2
  22925. #define WMI_HECAP_MAC_SRRESP_GET WMI_HECAP_MAC_SRRESP_GET_D2
  22926. #define WMI_HECAP_MAC_SRRESP_SET WMI_HECAP_MAC_SRRESP_SET_D2
  22927. #define WMI_HECAP_MAC_OPS_GET WMI_HECAP_MAC_OPS_GET_D2
  22928. #define WMI_HECAP_MAC_OPS_SET WMI_HECAP_MAC_OPS_SET_D2
  22929. #define WMI_HECAP_MAC_NDPFDBKRPT_GET WMI_HECAP_MAC_NDPFDBKRPT_GET_D2
  22930. #define WMI_HECAP_MAC_NDPFDBKRPT_SET WMI_HECAP_MAC_NDPFDBKRPT_SET_D2
  22931. #define WMI_HECAP_MAC_MBAHECTRL_GET WMI_HECAP_MAC_MBAHECTRL_GET_D2
  22932. #define WMI_HECAP_MAC_MBAHECTRL_SET WMI_HECAP_MAC_MBAHECTRL_SET_D2
  22933. #define WMI_HECAP_MAC_MURTS_GET WMI_HECAP_MAC_MURTS_GET_D2
  22934. #define WMI_HECAP_MAC_MURTS_SET WMI_HECAP_MAC_MURTS_SET_D2
  22935. #define WMI_HECAP_PHY_CBMODE_GET WMI_HECAP_PHY_CBMODE_GET_D2
  22936. #define WMI_HECAP_PHY_CBMODE_SET WMI_HECAP_PHY_CBMODE_SET_D2
  22937. #define WMI_HECAP_PHY_OLTF_GET WMI_HECAP_PHY_OLTF_GET_D2
  22938. #define WMI_HECAP_PHY_OLTF_SET WMI_HECAP_PHY_OLTF_SET_D2
  22939. #define WMI_HECAP_PHY_SUBFMESTS_GET WMI_HECAP_PHY_SUBFMESTS_GET_D2
  22940. #define WMI_HECAP_PHY_SUBFMESTS_SET WMI_HECAP_PHY_SUBFMESTS_SET_D2
  22941. #define WMI_HECAP_PHY_PADDING_GET WMI_HECAP_PHY_PADDING_GET_D2
  22942. #define WMI_HECAP_PHY_PADDING_SET WMI_HECAP_PHY_PADDING_SET_D2
  22943. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET WMI_HECAP_PHY_DLOFMAMUMIMO_GET_D2
  22944. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET WMI_HECAP_PHY_DLOFDMAMUMIO_SET_D2
  22945. #define WMI_HECAP_PHY_32GI_GET WMI_HECAP_PHY_32GI_GET_D2
  22946. #define WMI_HECAP_PHY_32GI_SET WMI_HECAP_PHY_32GI_SET_D2
  22947. #define WMI_HECAP_PHY_NOSUNDIMENS_GET WMI_HECAP_PHY_NOSUNDIMENS_GET_D2
  22948. #define WMI_HECAP_PHY_NOSUNDIMENS_SET WMI_HECAP_PHY_NOSUNDIMENS_SET_D2
  22949. #define WMI_HECAP_PHY_40MHZNSS_GET WMI_HECAP_PHY_40MHZNSS_GET_D2
  22950. #define WMI_HECAP_PHY_40MHZNSS_SET WMI_HECAP_PHY_40MHZNSS_SET_D2
  22951. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULOFDMA_GET_D2
  22952. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULOFDMA_SET_D2
  22953. #define WMI_HECAP_PHY_DCM_GET WMI_HECAP_PHY_DCM_GET_D2
  22954. #define WMI_HECAP_PHY_DCM_SET WMI_HECAP_PHY_DCM_SET_D2
  22955. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET WMI_HECAP_PHY_NSTSLT80MHZ_GET_D2
  22956. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2
  22957. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2
  22958. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2
  22959. #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2
  22960. #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2
  22961. #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2
  22962. #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2
  22963. #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2
  22964. #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2
  22965. #endif /* SUPPORT_11AX_D3 */
  22966. /* ADD NEW DEFS HERE */
  22967. /*****************************************************************************
  22968. * The following structures are deprecated. DO NOT USE THEM!
  22969. */
  22970. /** Max number of channels in the schedule. */
  22971. #define OCB_CHANNEL_MAX (5)
  22972. /* NOTE: Make sure these data structures are identical to those
  22973. * defined in sirApi.h */
  22974. typedef struct
  22975. {
  22976. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  22977. A_UINT32 aifsn;
  22978. /** Contention Window minimum. Range: 1 - 10 */
  22979. A_UINT32 cwmin;
  22980. /** Contention Window maximum. Range: 1 - 10 */
  22981. A_UINT32 cwmax;
  22982. } wmi_qos_params_t;
  22983. typedef struct
  22984. {
  22985. /** Channel frequency in MHz */
  22986. A_UINT32 chan_freq;
  22987. /** Channel duration in ms */
  22988. A_UINT32 duration;
  22989. /** Start guard interval in ms */
  22990. A_UINT32 start_guard_interval;
  22991. /** End guard interval in ms */
  22992. A_UINT32 end_guard_interval;
  22993. /** Transmit power in dBm, range 0 - 23 */
  22994. A_UINT32 tx_power;
  22995. /** Transmit datarate in Mbps */
  22996. A_UINT32 tx_rate;
  22997. /** QoS parameters for each AC */
  22998. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  22999. /** 1 to enable RX stats for this channel, 0 otherwise */
  23000. A_UINT32 rx_stats;
  23001. } wmi_ocb_channel_t;
  23002. typedef struct {
  23003. /** TLV tag and len; tag equals
  23004. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  23005. A_UINT32 tlv_header;
  23006. /* VDEV identifier */
  23007. A_UINT32 vdev_id;
  23008. /** Number of valid channels in the channels array */
  23009. A_UINT32 num_channels;
  23010. /** The array of channels */
  23011. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  23012. /** 1 to allow off-channel tx, 0 otherwise */
  23013. A_UINT32 off_channel_tx; /* Not supported */
  23014. } wmi_ocb_set_sched_cmd_fixed_param;
  23015. typedef struct {
  23016. /** Return status. 0 for success, non-zero otherwise */
  23017. A_UINT32 status;
  23018. } wmi_ocb_set_sched_event_fixed_param;
  23019. /*****************************************************************************
  23020. * END DEPRECATED
  23021. */
  23022. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  23023. #ifdef __cplusplus
  23024. }
  23025. #endif
  23026. #endif /*_WMI_UNIFIED_H_*/
  23027. /**@}*/