wmi_unified.h 940 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774
  1. /*
  2. * Copyright (c) 2010-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /**
  27. * @addtogroup WMIAPI
  28. *@{
  29. */
  30. /** @file
  31. * This file specifies the WMI interface for the Software Architecture.
  32. *
  33. * It includes definitions of all the commands and events. Commands are messages
  34. * from the host to the target. Events and Replies are messages from the target
  35. * to the host.
  36. *
  37. * Ownership of correctness in regards to WMI commands
  38. * belongs to the host driver and the target is not required to validate
  39. * parameters for value, proper range, or any other checking.
  40. *
  41. * Guidelines for extending this interface are below.
  42. *
  43. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  44. * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
  45. * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
  46. * 3. DO NOT define bit fields within structures. Implement bit fields using masks
  47. * if necessary. Do not use the programming language's bit field definition.
  48. * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
  49. * variables. Use these macros for set/get of these fields. Try to use this to
  50. * optimize the structure without bloating it with A_UINT32 variables for every lower
  51. * sized field.
  52. * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
  53. * already 4-byte aligned by virtue of being a A_UINT32 type.
  54. * 6. Comment each parameter part of the WMI command/event structure by using the
  55. * 2 stars at the begining of C comment instead of one star to enable HTML document
  56. * generation using Doxygen.
  57. *
  58. */
  59. #ifndef _WMI_UNIFIED_H_
  60. #define _WMI_UNIFIED_H_
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64. #include <wlan_defs.h>
  65. #include <wmi_services.h>
  66. #define ATH_MAC_LEN 6 /**< length of MAC in bytes */
  67. #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
  68. #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
  69. #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates*/
  70. #define MAX_RSSI_VALUES 10 /*Max Rssi values*/
  71. #define WMI_MAX_CHAINS 8
  72. /* The WLAN_MAX_AC macro cannot be changed without breaking
  73. WMI compatibility. */
  74. /* The maximum value of access category */
  75. #define WLAN_MAX_AC 4
  76. /*
  77. * These don't necessarily belong here; but as the MS/SM macros require
  78. * ar6000_internal.h to be included, it may not be defined as yet.
  79. */
  80. #define WMI_F_MS(_v, _f) \
  81. (((_v) & (_f)) >> (_f##_S))
  82. /*
  83. * This breaks the "good macro practice" of only referencing each
  84. * macro field once (to avoid things like field++ from causing issues.)
  85. */
  86. #define WMI_F_RMW(_var, _v, _f) \
  87. do { \
  88. (_var) &= ~(_f); \
  89. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  90. } while (0)
  91. #define WMI_GET_BITS(_val,_index,_num_bits) \
  92. (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
  93. #define WMI_SET_BITS(_var,_index,_num_bits,_val) do { \
  94. (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
  95. (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
  96. } while (0)
  97. /**
  98. * A packed array is an array where each entry in the array is less than
  99. * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
  100. * For example, if each entry in the array is 11 bits, then you can stuff
  101. * an array of 4 11-bit values into an array of 2 A_UINT32 values.
  102. * The first 2 11-bit values will be stored in the first A_UINT32,
  103. * and the last 2 11-bit values will be stored in the second A_UINT32.
  104. */
  105. #define WMI_PACKED_ARR_SIZE(num_entries,bits_per_entry) \
  106. (((num_entries) / (32 / (bits_per_entry))) + \
  107. (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
  108. #define WMI_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
  109. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  110. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  111. {
  112. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  113. A_UINT32 uint_index = (entry_index / entries_per_uint);
  114. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  115. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  116. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  117. return (arr[uint_index] >> start_bit_in_uint) &
  118. ((1 << bits_per_entry) - 1);
  119. }
  120. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  121. A_UINT32 bits_per_entry, A_UINT32 val)
  122. {
  123. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  124. A_UINT32 uint_index = (entry_index / entries_per_uint);
  125. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  126. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  127. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  128. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  129. arr[uint_index] |=
  130. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  131. }
  132. /** 2 word representation of MAC addr */
  133. typedef struct {
  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. * wmi command groups.
  159. */
  160. typedef enum {
  161. /* 0 to 2 are reserved */
  162. WMI_GRP_START = 0x3,
  163. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  164. WMI_GRP_PDEV, /* 0x4 */
  165. WMI_GRP_VDEV, /* 0x5 */
  166. WMI_GRP_PEER, /* 0x6 */
  167. WMI_GRP_MGMT, /* 0x7 */
  168. WMI_GRP_BA_NEG, /* 0x8 */
  169. WMI_GRP_STA_PS, /* 0x9 */
  170. WMI_GRP_DFS, /* 0xa */
  171. WMI_GRP_ROAM, /* 0xb */
  172. WMI_GRP_OFL_SCAN, /* 0xc */
  173. WMI_GRP_P2P, /* 0xd */
  174. WMI_GRP_AP_PS, /* 0xe */
  175. WMI_GRP_RATE_CTRL, /* 0xf */
  176. WMI_GRP_PROFILE, /* 0x10 */
  177. WMI_GRP_SUSPEND, /* 0x11 */
  178. WMI_GRP_BCN_FILTER, /* 0x12 */
  179. WMI_GRP_WOW, /* 0x13 */
  180. WMI_GRP_RTT, /* 0x14 */
  181. WMI_GRP_SPECTRAL, /* 0x15 */
  182. WMI_GRP_STATS, /* 0x16 */
  183. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  184. WMI_GRP_NLO_OFL, /* 0x18 */
  185. WMI_GRP_GTK_OFL, /* 0x19 */
  186. WMI_GRP_CSA_OFL, /* 0x1a */
  187. WMI_GRP_CHATTER, /* 0x1b */
  188. WMI_GRP_TID_ADDBA, /* 0x1c */
  189. WMI_GRP_MISC, /* 0x1d */
  190. WMI_GRP_GPIO, /* 0x1e */
  191. WMI_GRP_FWTEST, /* 0x1f */
  192. WMI_GRP_TDLS, /* 0x20 */
  193. WMI_GRP_RESMGR, /* 0x21 */
  194. WMI_GRP_STA_SMPS, /* 0x22 */
  195. WMI_GRP_WLAN_HB, /* 0x23 */
  196. WMI_GRP_RMC, /* 0x24 */
  197. WMI_GRP_MHF_OFL, /* 0x25 */
  198. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  199. WMI_GRP_OEM, /* 0x27 */
  200. WMI_GRP_NAN, /* 0x28 */
  201. WMI_GRP_COEX, /* 0x29 */
  202. WMI_GRP_OBSS_OFL, /* 0x2a */
  203. WMI_GRP_LPI, /* 0x2b */
  204. WMI_GRP_EXTSCAN, /* 0x2c */
  205. WMI_GRP_DHCP_OFL, /* 0x2d */
  206. WMI_GRP_IPA, /* 0x2e */
  207. WMI_GRP_MDNS_OFL, /* 0x2f */
  208. WMI_GRP_SAP_OFL, /* 0x30 */
  209. WMI_GRP_OCB, /* 0x31 */
  210. WMI_GRP_SOC, /* 0x32 */
  211. WMI_GRP_PKT_FILTER, /* 0x33 */
  212. WMI_GRP_MAWC, /* 0x34 */
  213. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  214. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  215. WMI_GRP_NAN_DATA, /* 0x37 */
  216. WMI_GRP_PROTOTYPE, /* 0x38 */
  217. WMI_GRP_MONITOR, /* 0x39 */
  218. WMI_GRP_REGULATORY, /* 0x3a */
  219. WMI_GRP_HW_DATA_FILTER, /* 0x3b */
  220. WMI_GRP_WLM, /* 0x3c WLAN Latency Manager */
  221. WMI_GRP_11K_OFFLOAD, /* 0x3d */
  222. WMI_GRP_TWT, /* 0x3e TWT (Target Wake Time) for STA and AP */
  223. } WMI_GRP_ID;
  224. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  225. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  226. /**
  227. * Command IDs and commange events
  228. */
  229. typedef enum {
  230. /** initialize the wlan sub system */
  231. WMI_INIT_CMDID = 0x1,
  232. /* Scan specific commands */
  233. /** start scan request to FW */
  234. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  235. /** stop scan request to FW */
  236. WMI_STOP_SCAN_CMDID,
  237. /** full list of channels as defined by the regulatory that will be used by scanner */
  238. WMI_SCAN_CHAN_LIST_CMDID,
  239. /** overwrite default priority table in scan scheduler */
  240. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  241. /** This command to adjust the priority and min.max_rest_time
  242. * of an on ongoing scan request.
  243. */
  244. WMI_SCAN_UPDATE_REQUEST_CMDID,
  245. /** set OUI to be used in probe request if enabled */
  246. WMI_SCAN_PROB_REQ_OUI_CMDID,
  247. /** config adaptive dwell scan */
  248. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  249. /** Only applicable to DBS capable product */
  250. WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID,
  251. /* PDEV(physical device) specific commands */
  252. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  253. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  254. /** set channel. mainly used for supporting monitor mode */
  255. WMI_PDEV_SET_CHANNEL_CMDID,
  256. /** set pdev specific parameters */
  257. WMI_PDEV_SET_PARAM_CMDID,
  258. /** enable packet log */
  259. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  260. /** disable packet log*/
  261. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  262. /** set wmm parameters */
  263. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  264. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  265. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  266. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  267. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  268. /** Command to send the DSCP-to-TID map to the target */
  269. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  270. /** set quiet ie parameters. primarily used in AP mode */
  271. WMI_PDEV_SET_QUIET_MODE_CMDID,
  272. /** Enable/Disable Green AP Power Save */
  273. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  274. /** get TPC config for the current operating channel */
  275. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  276. /** set the base MAC address for the physical device before a VDEV is created.
  277. * For firmware that doesn't support this feature and this command, the pdev
  278. * MAC address will not be changed. */
  279. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  280. /* eeprom content dump , the same to bdboard data */
  281. WMI_PDEV_DUMP_CMDID,
  282. /* set LED configuration */
  283. WMI_PDEV_SET_LED_CONFIG_CMDID,
  284. /* Get Current temprature of chip in Celcius degree*/
  285. WMI_PDEV_GET_TEMPERATURE_CMDID,
  286. /* Set LED flashing behavior */
  287. WMI_PDEV_SET_LED_FLASHING_CMDID,
  288. /** Enable/Disable Smart Antenna */
  289. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  290. /** Set Smart Antenna RX antenna*/
  291. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  292. /** Override the antenna switch table */
  293. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  294. /** Override the CTL table */
  295. WMI_PDEV_SET_CTL_TABLE_CMDID,
  296. /** Override the array gain table */
  297. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  298. /** FIPS test mode command */
  299. WMI_PDEV_FIPS_CMDID,
  300. /** get CCK ANI level */
  301. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  302. /** get OFDM ANI level */
  303. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  304. /** NF Cal Power dBr/dBm */
  305. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  306. /** TxPPDU TPC */
  307. WMI_PDEV_GET_TPC_CMDID,
  308. /** Set to enable MIB stats collection */
  309. WMI_MIB_STATS_ENABLE_CMDID,
  310. /** Set preferred channel list for DBS Mgr */
  311. WMI_PDEV_SET_PCL_CMDID,
  312. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  313. WMI_PDEV_SET_HW_MODE_CMDID,
  314. /** Set DFS, SCAN modes and other FW configurations */
  315. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  316. /** Set per band and per pdev antenna chains */
  317. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  318. /** Periodic channel stats request command */
  319. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  320. /** WMI command for power debug framework */
  321. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  322. /** set per-AC rx reorder timeouts */
  323. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  324. /** WMI command for WOW gpio and type */
  325. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  326. /* Get current ANT's per chain's RSSI info */
  327. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  328. /** WMI command for getting Chip Power Stats */
  329. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  330. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  331. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  332. /** vdev restart request for multiple vdevs */
  333. WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID,
  334. /** Pdev update packet routing command */
  335. WMI_PDEV_UPDATE_PKT_ROUTING_CMDID,
  336. /** Get Calibration data version details */
  337. WMI_PDEV_CHECK_CAL_VERSION_CMDID,
  338. /** Set Diversity Gain */
  339. WMI_PDEV_SET_DIVERSITY_GAIN_CMDID,
  340. /** Get chain RSSI and antena index command */
  341. WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID,
  342. /** get bss chan info */
  343. WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  344. /** update pmk cache info */
  345. WMI_PDEV_UPDATE_PMK_CACHE_CMDID,
  346. /** update fils HLP */
  347. WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID,
  348. /** update ctltable request **/
  349. WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID,
  350. /** Command to set beacon OUI **/
  351. WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID,
  352. /** enable/disable per-AC tx queue optimizations */
  353. WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID,
  354. /** enable/disable rx promiscuous mode */
  355. WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID,
  356. /* set a generic direct DMA ring config */
  357. WMI_PDEV_DMA_RING_CFG_REQ_CMDID,
  358. /* VDEV (virtual device) specific commands */
  359. /** vdev create */
  360. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  361. /** vdev delete */
  362. WMI_VDEV_DELETE_CMDID,
  363. /** vdev start request */
  364. WMI_VDEV_START_REQUEST_CMDID,
  365. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  366. WMI_VDEV_RESTART_REQUEST_CMDID,
  367. /** vdev up request */
  368. WMI_VDEV_UP_CMDID,
  369. /** vdev stop request */
  370. WMI_VDEV_STOP_CMDID,
  371. /** vdev down request */
  372. WMI_VDEV_DOWN_CMDID,
  373. /* set a vdev param */
  374. WMI_VDEV_SET_PARAM_CMDID,
  375. /* set a key (used for setting per peer unicast and per vdev multicast) */
  376. WMI_VDEV_INSTALL_KEY_CMDID,
  377. /* wnm sleep mode command */
  378. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  379. WMI_VDEV_WMM_ADDTS_CMDID,
  380. WMI_VDEV_WMM_DELTS_CMDID,
  381. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  382. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  383. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  384. WMI_VDEV_PLMREQ_START_CMDID,
  385. WMI_VDEV_PLMREQ_STOP_CMDID,
  386. /* TSF timestamp action for specified vdev */
  387. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  388. /** set the additional IEs in probe requests for scan or
  389. * assoc req etc for frames FW locally generates */
  390. WMI_VDEV_SET_IE_CMDID,
  391. WMI_VDEV_RATEMASK_CMDID,
  392. /** ATF VDEV REQUEST commands. */
  393. WMI_VDEV_ATF_REQUEST_CMDID,
  394. /** Command to send the DSCP-to-TID map to the target for VAP */
  395. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  396. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  397. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  398. /** set quiet ie parameters. primarily used in AP mode */
  399. WMI_VDEV_SET_QUIET_MODE_CMDID,
  400. /** To set custom aggregation size for per vdev */
  401. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  402. /* DISA feature: Encrypt-decrypt data request */
  403. WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
  404. /** Command to enable mac randomizaton **/
  405. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID,
  406. /** WMI commands related to dbg arp stats */
  407. WMI_VDEV_SET_ARP_STAT_CMDID,
  408. WMI_VDEV_GET_ARP_STAT_CMDID,
  409. /** get tx power for the current vdev */
  410. WMI_VDEV_GET_TX_POWER_CMDID,
  411. /* limit STA offchannel activity */
  412. WMI_VDEV_LIMIT_OFFCHAN_CMDID,
  413. /** To set custom software retries per-AC for vdev */
  414. WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID,
  415. /* peer specific commands */
  416. /** create a peer */
  417. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  418. /** delete a peer */
  419. WMI_PEER_DELETE_CMDID,
  420. /** flush specific tid queues of a peer */
  421. WMI_PEER_FLUSH_TIDS_CMDID,
  422. /** set a parameter of a peer */
  423. WMI_PEER_SET_PARAM_CMDID,
  424. /** set peer to associated state. will cary all parameters determined during assocication time */
  425. WMI_PEER_ASSOC_CMDID,
  426. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  427. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  428. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  429. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  430. /** set up mcast group infor for multicast to unicast conversion */
  431. WMI_PEER_MCAST_GROUP_CMDID,
  432. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  433. WMI_PEER_INFO_REQ_CMDID,
  434. /** request the estimated link speed for the peer. FW shall respond with
  435. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  436. */
  437. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  438. /** Set the conditions to report peer justified rate to driver
  439. * The justified rate means the user-rate is justified by PER.
  440. */
  441. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  442. /** update a wds (4 address) entry */
  443. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  444. /** add a proxy sta entry */
  445. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  446. /** Set Smart Antenna TX antenna */
  447. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  448. /** Set Smart Antenna TX train info */
  449. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  450. /** Set SA node config options */
  451. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  452. /** ATF PEER REQUEST commands */
  453. WMI_PEER_ATF_REQUEST_CMDID,
  454. /** bandwidth fairness (BWF) peer configuration request command */
  455. WMI_PEER_BWF_REQUEST_CMDID,
  456. /** rx reorder queue setup for peer/tid */
  457. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  458. /** rx reorder queue remove for peer/tid */
  459. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  460. /** specify a limit for rx A-MPDU block size */
  461. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  462. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  463. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  464. /*
  465. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def was originally mistakenly
  466. * placed here, amongst the CMDID defs.
  467. * The WMI_PEER_OPER_MODE_CHANGE_EVENTID def has been moved to the
  468. * EVENTID section, but to preserve backwards compatibility, the value
  469. * here that had been used for WMI_PEER_OPER_MODE_CHANGE_EVENTID
  470. * is kept reserved/deprecated.
  471. *
  472. * This WMI_PEER_RESERVED0_CMDID value can be replaced with an actual
  473. * WMI peer event message ID, though it will be simpler to instead add
  474. * new WMI_PEER CMDID defs at the end of the WMI_GRP_PEER WMI_CMD_GRP.
  475. */
  476. WMI_PEER_RESERVED0_CMDID,
  477. /** Peer/Tid/Msduq threshold update */
  478. WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID,
  479. /** TID specific configurations per peer of type
  480. * wmi_peer_tid_configurations_cmd_fixed_param
  481. */
  482. WMI_PEER_TID_CONFIGURATIONS_CMDID,
  483. /* beacon/management specific commands */
  484. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  485. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  486. /** transmit beacon by value */
  487. WMI_PDEV_SEND_BCN_CMDID,
  488. /** set the beacon template. used in beacon offload mode to setup the
  489. * the common beacon template with the FW to be used by FW to generate beacons */
  490. WMI_BCN_TMPL_CMDID,
  491. /** set beacon filter with FW */
  492. WMI_BCN_FILTER_RX_CMDID,
  493. /* enable/disable filtering of probe requests in the firmware */
  494. WMI_PRB_REQ_FILTER_RX_CMDID,
  495. /** transmit management frame by value. will be deprecated */
  496. WMI_MGMT_TX_CMDID,
  497. /** set the probe response template. used in beacon offload mode to setup the
  498. * the common probe response template with the FW to be used by FW to generate
  499. * probe responses */
  500. WMI_PRB_TMPL_CMDID,
  501. /** Transmit Mgmt frame by reference */
  502. WMI_MGMT_TX_SEND_CMDID,
  503. /** Transmit data frame by reference */
  504. WMI_OFFCHAN_DATA_TX_SEND_CMDID,
  505. /** transmit FILS Discovery frame by value */
  506. WMI_PDEV_SEND_FD_CMDID,
  507. /** Cmd to enable/disable offloaded beacons */
  508. WMI_BCN_OFFLOAD_CTRL_CMDID,
  509. /** Cmd to enable FW handling BSS color change notification from AP. */
  510. WMI_BSS_COLOR_CHANGE_ENABLE_CMDID,
  511. /** commands to directly control ba negotiation directly from host. only used in test mode */
  512. /** turn off FW Auto addba mode and let host control addba */
  513. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  514. /** send add ba request */
  515. WMI_ADDBA_SEND_CMDID,
  516. WMI_ADDBA_STATUS_CMDID,
  517. /** send del ba */
  518. WMI_DELBA_SEND_CMDID,
  519. /** set add ba response will be used by FW to generate addba response*/
  520. WMI_ADDBA_SET_RESP_CMDID,
  521. /** send single VHT MPDU with AMSDU */
  522. WMI_SEND_SINGLEAMSDU_CMDID,
  523. /** Station power save specific config */
  524. /** enable/disable station powersave */
  525. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  526. /** set station power save specific parameter */
  527. WMI_STA_POWERSAVE_PARAM_CMDID,
  528. /** set station mimo powersave mode */
  529. WMI_STA_MIMO_PS_MODE_CMDID,
  530. /** DFS-specific commands */
  531. /** enable DFS (radar detection)*/
  532. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  533. /** disable DFS (radar detection)*/
  534. WMI_PDEV_DFS_DISABLE_CMDID,
  535. /** enable DFS phyerr/parse filter offload */
  536. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  537. /** enable DFS phyerr/parse filter offload */
  538. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  539. /** enable DFS phyerr processing offload */
  540. WMI_PDEV_DFS_PHYERR_OFFLOAD_ENABLE_CMDID,
  541. /** disable DFS phyerr processing offload */
  542. WMI_PDEV_DFS_PHYERR_OFFLOAD_DISABLE_CMDID,
  543. /** set ADFS channel config */
  544. WMI_VDEV_ADFS_CH_CFG_CMDID,
  545. /** abort ADFS off-channel-availability-check currently in progress */
  546. WMI_VDEV_ADFS_OCAC_ABORT_CMDID,
  547. /* Roaming specific commands */
  548. /** set roam scan mode */
  549. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  550. /** set roam scan rssi threshold below which roam scan is enabled */
  551. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  552. /** set roam scan period for periodic roam scan mode */
  553. WMI_ROAM_SCAN_PERIOD,
  554. /** set roam scan trigger rssi change threshold */
  555. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  556. /** set roam AP profile */
  557. WMI_ROAM_AP_PROFILE,
  558. /** set channel list for roam scans */
  559. WMI_ROAM_CHAN_LIST,
  560. /** Stop scan command */
  561. WMI_ROAM_SCAN_CMD,
  562. /** roaming sme offload sync complete */
  563. WMI_ROAM_SYNCH_COMPLETE,
  564. /** set ric request element for 11r roaming */
  565. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  566. /** Invoke roaming forcefully */
  567. WMI_ROAM_INVOKE_CMDID,
  568. /** roaming filter cmd to allow further filtering of roaming candidate */
  569. WMI_ROAM_FILTER_CMDID,
  570. /** set gateway ip, mac and retries for subnet change detection */
  571. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  572. /** configure thresholds for MAWC */
  573. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  574. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  575. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  576. /** configure packet error rate threshold for triggering roaming */
  577. WMI_ROAM_PER_CONFIG_CMDID,
  578. /** configure BSS Transition Management (BTM) offload for roaming */
  579. WMI_ROAM_BTM_CONFIG_CMDID,
  580. /** Enable or Disable Fast Initial Link Setup (FILS) feature */
  581. WMI_ENABLE_FILS_CMDID,
  582. /** Request for roam scan stats */
  583. WMI_REQUEST_ROAM_SCAN_STATS_CMDID,
  584. /** offload scan specific commands */
  585. /** set offload scan AP profile */
  586. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  587. /** remove offload scan AP profile */
  588. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  589. /** set offload scan period */
  590. WMI_OFL_SCAN_PERIOD,
  591. /* P2P specific commands */
  592. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  593. * generated during p2p listen and for p2p discoverability */
  594. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  595. /** enable/disable p2p discoverability on STA/AP VDEVs */
  596. WMI_P2P_DEV_SET_DISCOVERABILITY,
  597. /** set p2p ie to be carried in beacons generated by FW for GO */
  598. WMI_P2P_GO_SET_BEACON_IE,
  599. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  600. WMI_P2P_GO_SET_PROBE_RESP_IE,
  601. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  602. * attribute in the beacons/probe responses received.
  603. * Note: This command is currently used only for Apple P2P implementation.
  604. */
  605. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  606. /** set the configure of p2p find offload */
  607. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  608. /** set the vendor specific p2p ie data for p2p find offload using */
  609. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  610. /** set the BSSID/device name pattern of p2p find offload */
  611. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  612. /** set OppPS related parameters **/
  613. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  614. /** set listen offload start related parameters */
  615. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  616. /** set listen offload stop related parameters */
  617. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  618. /** AP power save specific config */
  619. /** set AP power save specific param */
  620. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  621. /** set AP UAPSD coex pecific param */
  622. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  623. /** set Enhanced Green AP param */
  624. WMI_AP_PS_EGAP_PARAM_CMDID,
  625. /** Rate-control specific commands */
  626. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  627. /** WLAN Profiling commands. */
  628. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  629. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  630. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  631. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  632. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  633. /** Suspend resume command Ids */
  634. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  635. WMI_PDEV_RESUME_CMDID,
  636. /* Beacon filter commands */
  637. /** add a beacon filter */
  638. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  639. /** remove a beacon filter */
  640. WMI_RMV_BCN_FILTER_CMDID,
  641. /* WOW Specific WMI commands*/
  642. /** add pattern for awake */
  643. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  644. /** deleta a wake pattern */
  645. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  646. /** enable/deisable wake event */
  647. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  648. /** enable WOW */
  649. WMI_WOW_ENABLE_CMDID,
  650. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  651. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  652. /* IOAC add keep alive cmd. */
  653. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  654. /* IOAC del keep alive cmd. */
  655. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  656. /* IOAC add pattern for awake */
  657. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  658. /* IOAC deleta a wake pattern */
  659. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  660. /* D0-WOW enable or disable cmd */
  661. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  662. /* enable extend WoW */
  663. WMI_EXTWOW_ENABLE_CMDID,
  664. /* Extend WoW command to configure app type1 parameter */
  665. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  666. /* Extend WoW command to configure app type2 parameter */
  667. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  668. /* enable ICMPv6 Network advertisement filtering */
  669. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  670. /*
  671. * Set a pattern to match UDP packet in WOW mode.
  672. * If match, construct a tx frame in a local buffer
  673. * to send through the peer AP to the entity in the
  674. * IP network that sent the UDP packet to this STA.
  675. */
  676. WMI_WOW_UDP_SVC_OFLD_CMDID,
  677. /* configure WOW host wakeup PIN pattern */
  678. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  679. /* Set which action category should wake the host from suspend */
  680. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  681. /* RTT measurement related cmd */
  682. /** request to make an RTT measurement */
  683. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  684. /** request to report a tsf measurement */
  685. WMI_RTT_TSF_CMDID,
  686. /** spectral scan command */
  687. /** configure spectral scan */
  688. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  689. /** enable/disable spectral scan and trigger */
  690. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  691. /* F/W stats */
  692. /** one time request for stats */
  693. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  694. /** Push MCC Adaptive Scheduler Stats to Firmware */
  695. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  696. /** one time request for txrx stats */
  697. WMI_REQUEST_STATS_EXT_CMDID,
  698. /* Link Layer stats */
  699. /** Request for link layer stats */
  700. WMI_REQUEST_LINK_STATS_CMDID,
  701. /** Request for setting params to link layer stats */
  702. WMI_START_LINK_STATS_CMDID,
  703. /** Request to clear stats*/
  704. WMI_CLEAR_LINK_STATS_CMDID,
  705. /** Request for getting the Firmware Memory Dump */
  706. WMI_GET_FW_MEM_DUMP_CMDID,
  707. /** Request to flush of the buffered debug messages */
  708. WMI_DEBUG_MESG_FLUSH_CMDID,
  709. /** Cmd to configure the verbose level */
  710. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  711. /** One time request for wlan stats */
  712. WMI_REQUEST_WLAN_STATS_CMDID,
  713. /** Request for getting RCPI of peer */
  714. WMI_REQUEST_RCPI_CMDID,
  715. /** One time request for peer stats info */
  716. WMI_REQUEST_PEER_STATS_INFO_CMDID,
  717. /** One time request for radio channel stats */
  718. WMI_REQUEST_RADIO_CHAN_STATS_CMDID,
  719. /** ARP OFFLOAD REQUEST*/
  720. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  721. /** Proactive ARP Response Add Pattern Command*/
  722. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  723. /** Proactive ARP Response Del Pattern Command*/
  724. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  725. /** NS offload confid*/
  726. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  727. /** APFIND Config */
  728. WMI_APFIND_CMDID,
  729. /** Passpoint list config */
  730. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  731. /** configure supprssing parameters for MAWC */
  732. WMI_NLO_CONFIGURE_MAWC_CMDID,
  733. /* GTK offload Specific WMI commands*/
  734. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  735. /* CSA offload Specific WMI commands*/
  736. /** csa offload enable */
  737. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  738. /** chan switch command */
  739. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  740. /* Chatter commands*/
  741. /* Change chatter mode of operation */
  742. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  743. /** chatter add coalescing filter command */
  744. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  745. /** chatter delete coalescing filter command */
  746. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  747. /** chatter coalecing query command */
  748. WMI_CHATTER_COALESCING_QUERY_CMDID,
  749. /**addba specific commands */
  750. /** start the aggregation on this TID */
  751. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  752. /** stop the aggregation on this TID */
  753. WMI_PEER_TID_DELBA_CMDID,
  754. /** set station mimo powersave method */
  755. WMI_STA_DTIM_PS_METHOD_CMDID,
  756. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  757. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  758. /** Configure the Keep Alive Parameters */
  759. WMI_STA_KEEPALIVE_CMDID,
  760. /* Request ssn from target for a sta/tid pair */
  761. WMI_BA_REQ_SSN_CMDID,
  762. /* misc command group */
  763. /** echo command mainly used for testing */
  764. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  765. /* !!IMPORTANT!!
  766. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  767. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  768. * as we MUST have a fixed value here to maintain compatibility between
  769. * UTF and the ART2 driver
  770. */
  771. /** UTF WMI commands */
  772. WMI_PDEV_UTF_CMDID,
  773. /** set debug log config */
  774. WMI_DBGLOG_CFG_CMDID,
  775. /* QVIT specific command id */
  776. WMI_PDEV_QVIT_CMDID,
  777. /* Factory Testing Mode request command
  778. * used for integrated chipsets */
  779. WMI_PDEV_FTM_INTG_CMDID,
  780. /* set and get keepalive parameters command */
  781. WMI_VDEV_SET_KEEPALIVE_CMDID,
  782. WMI_VDEV_GET_KEEPALIVE_CMDID,
  783. /* For fw recovery test command */
  784. WMI_FORCE_FW_HANG_CMDID,
  785. /* Set Mcast/Bdcast filter */
  786. WMI_SET_MCASTBCAST_FILTER_CMDID,
  787. /** set thermal management params **/
  788. WMI_THERMAL_MGMT_CMDID,
  789. /** set host auto shutdown params **/
  790. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  791. /** set tpc chainmask config command */
  792. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  793. /** set Antenna diversity command */
  794. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  795. /** Set OCB Sched Request, deprecated */
  796. WMI_OCB_SET_SCHED_CMDID,
  797. /** Set rssi monitoring config command */
  798. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  799. /** Enable/disable Large Receive Offload processing; provide cfg params */
  800. WMI_LRO_CONFIG_CMDID,
  801. /** transfer data from host to firmware to write flash */
  802. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  803. /** Command to enable/disable filtering of multicast IP with unicast mac */
  804. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  805. /** Command to control WISA mode */
  806. WMI_VDEV_WISA_CMDID,
  807. /** set debug log time stamp sync up with host */
  808. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  809. /** Command for host to set/delete multiple mcast filters */
  810. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  811. /** upload a requested section of data from firmware flash to host */
  812. WMI_READ_DATA_FROM_FLASH_CMDID,
  813. /* Thermal Throttling SET CONF commands */
  814. WMI_THERM_THROT_SET_CONF_CMDID,
  815. /* set runtime dpd recalibration params */
  816. WMI_RUNTIME_DPD_RECAL_CMDID,
  817. /* get TX power for input HALPHY parameters */
  818. WMI_GET_TPC_POWER_CMDID,
  819. /* Offload 11k related requests */
  820. WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD),
  821. /* invoke neighbor report from FW */
  822. WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID,
  823. /* GPIO Configuration */
  824. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  825. WMI_GPIO_OUTPUT_CMDID,
  826. /* Txbf configuration command */
  827. WMI_TXBF_CMDID,
  828. /* FWTEST Commands */
  829. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  830. /** set NoA descs **/
  831. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  832. /* UNIT Tests */
  833. WMI_UNIT_TEST_CMDID,
  834. /* set debug and tuning parameters */
  835. WMI_FWTEST_CMDID,
  836. /* Q-Boost configuration test commands */
  837. WMI_QBOOST_CFG_CMDID,
  838. /** TDLS Configuration */
  839. /** enable/disable TDLS */
  840. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  841. /** set tdls peer state */
  842. WMI_TDLS_PEER_UPDATE_CMDID,
  843. /** TDLS Offchannel control */
  844. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  845. /** Resmgr Configuration */
  846. /** Adaptive OCS is enabled by default in the FW. This command is used to
  847. * disable FW based adaptive OCS.
  848. */
  849. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  850. /** set the requested channel time quota for the home channels */
  851. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  852. /** set the requested latency for the home channels */
  853. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  854. /** STA SMPS Configuration */
  855. /** force SMPS mode */
  856. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  857. /** set SMPS parameters */
  858. WMI_STA_SMPS_PARAM_CMDID,
  859. /* Wlan HB commands*/
  860. /* enalbe/disable wlan HB */
  861. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  862. /* set tcp parameters for wlan HB */
  863. WMI_HB_SET_TCP_PARAMS_CMDID,
  864. /* set tcp pkt filter for wlan HB */
  865. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  866. /* set udp parameters for wlan HB */
  867. WMI_HB_SET_UDP_PARAMS_CMDID,
  868. /* set udp pkt filter for wlan HB */
  869. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  870. /* OIC ping keep alive */
  871. WMI_HB_OIC_PING_OFFLOAD_PARAM_CMDID,
  872. WMI_HB_OIC_PING_OFFLOAD_SET_ENABLE_CMDID,
  873. /* WMI commands related to DHCP Lease Renew Offload **/
  874. WMI_HB_DHCP_LEASE_RENEW_OFFLOAD_CMDID,
  875. /** Wlan RMC commands*/
  876. /** enable/disable RMC */
  877. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  878. /** configure action frame period */
  879. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  880. /** For debug/future enhancement purposes only,
  881. * configures/finetunes RMC algorithms */
  882. WMI_RMC_CONFIG_CMDID,
  883. /** select manual leader */
  884. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  885. /** WLAN MHF offload commands */
  886. /** enable/disable MHF offload */
  887. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  888. /** Plumb routing table for MHF offload */
  889. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  890. /*location scan commands*/
  891. /*start batch scan*/
  892. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  893. /*stop batch scan*/
  894. WMI_BATCH_SCAN_DISABLE_CMDID,
  895. /*get batch scan result*/
  896. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  897. /* OEM related cmd */
  898. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  899. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  900. /* OEM related cmd used for Low Power ranging */
  901. WMI_LPI_OEM_REQ_CMDID,
  902. WMI_OEM_DMA_RING_CFG_REQ_CMDID,
  903. /** Nan Request */
  904. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  905. /** Modem power state command */
  906. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  907. WMI_CHAN_AVOID_UPDATE_CMDID,
  908. WMI_COEX_CONFIG_CMDID,
  909. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  910. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  911. WMI_SAR_LIMITS_CMDID,
  912. WMI_SAR_GET_LIMITS_CMDID,
  913. /**
  914. * OBSS scan offload enable/disable commands
  915. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  916. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  917. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  918. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  919. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  920. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  921. */
  922. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  923. WMI_OBSS_SCAN_DISABLE_CMDID,
  924. WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID,
  925. /**LPI commands*/
  926. /**LPI mgmt snooping config command*/
  927. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  928. /**LPI scan start command*/
  929. WMI_LPI_START_SCAN_CMDID,
  930. /**LPI scan stop command*/
  931. WMI_LPI_STOP_SCAN_CMDID,
  932. /** ExtScan commands */
  933. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  934. WMI_EXTSCAN_STOP_CMDID,
  935. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  936. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  937. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  938. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  939. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  940. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  941. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  942. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  943. /** DHCP server offload commands */
  944. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  945. /** IPA Offload features related commands */
  946. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  947. /** mDNS responder offload commands */
  948. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  949. WMI_MDNS_SET_FQDN_CMDID,
  950. WMI_MDNS_SET_RESPONSE_CMDID,
  951. WMI_MDNS_GET_STATS_CMDID,
  952. /* enable/disable AP Authentication offload */
  953. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  954. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  955. WMI_SAP_OBSS_DETECTION_CFG_CMDID,
  956. /** Out-of-context-of-BSS (OCB) commands */
  957. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  958. WMI_OCB_SET_UTC_TIME_CMDID,
  959. WMI_OCB_START_TIMING_ADVERT_CMDID,
  960. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  961. WMI_OCB_GET_TSF_TIMER_CMDID,
  962. WMI_DCC_GET_STATS_CMDID,
  963. WMI_DCC_CLEAR_STATS_CMDID,
  964. WMI_DCC_UPDATE_NDL_CMDID,
  965. /* System-On-Chip commands */
  966. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  967. WMI_SOC_SET_HW_MODE_CMDID,
  968. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  969. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  970. /* packet filter commands */
  971. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  972. WMI_PACKET_FILTER_ENABLE_CMDID,
  973. /** Motion Aided WiFi Connectivity (MAWC) commands */
  974. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  975. /** WMI commands related to PMF 11w Offload */
  976. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  977. /** WMI commands related to pkt filter (BPF) offload */
  978. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  979. WMI_BPF_GET_VDEV_STATS_CMDID,
  980. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  981. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  982. WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID,
  983. WMI_BPF_SET_VDEV_ENABLE_CMDID,
  984. WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID,
  985. WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID,
  986. /** WMI commands related to monitor mode. */
  987. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  988. /** WMI commands related to regulatory offload */
  989. WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY),
  990. WMI_11D_SCAN_START_CMDID,
  991. WMI_11D_SCAN_STOP_CMDID,
  992. WMI_SET_INIT_COUNTRY_CMDID,
  993. /**
  994. * Nan Data commands
  995. * NDI - NAN Data Interface
  996. * NDP - NAN Data Path
  997. */
  998. /* Commands in prototyping phase */
  999. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1000. WMI_NDP_INITIATOR_REQ_CMDID,
  1001. WMI_NDP_RESPONDER_REQ_CMDID,
  1002. WMI_NDP_END_REQ_CMDID,
  1003. /** WMI commands related to HW data filtering **/
  1004. WMI_HW_DATA_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HW_DATA_FILTER),
  1005. /** WMI commands related to WLAN latency module **/
  1006. WMI_WLM_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLM),
  1007. /** WMI commands related to STA & AP TWT module **/
  1008. WMI_TWT_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TWT),
  1009. WMI_TWT_DISABLE_CMDID,
  1010. WMI_TWT_ADD_DIALOG_CMDID,
  1011. WMI_TWT_DEL_DIALOG_CMDID,
  1012. WMI_TWT_PAUSE_DIALOG_CMDID,
  1013. WMI_TWT_RESUME_DIALOG_CMDID,
  1014. } WMI_CMD_ID;
  1015. typedef enum {
  1016. /** WMI service is ready; after this event WMI messages can be sent/received */
  1017. WMI_SERVICE_READY_EVENTID = 0x1,
  1018. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  1019. WMI_READY_EVENTID,
  1020. /** Specify what WMI services the target supports (for services beyond
  1021. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  1022. */
  1023. WMI_SERVICE_AVAILABLE_EVENTID,
  1024. /** Scan specific events */
  1025. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  1026. /* PDEV specific events */
  1027. /** TPC config for the current operating channel */
  1028. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  1029. /** Channel stats event */
  1030. WMI_CHAN_INFO_EVENTID,
  1031. /** PHY Error specific WMI event */
  1032. WMI_PHYERR_EVENTID,
  1033. /** eeprom dump event */
  1034. WMI_PDEV_DUMP_EVENTID,
  1035. /** traffic pause event */
  1036. WMI_TX_PAUSE_EVENTID,
  1037. /** DFS radar event */
  1038. WMI_DFS_RADAR_EVENTID,
  1039. /** track L1SS entry and residency event */
  1040. WMI_PDEV_L1SS_TRACK_EVENTID,
  1041. /** Report current temprature of the chip in Celcius degree */
  1042. WMI_PDEV_TEMPERATURE_EVENTID,
  1043. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  1044. WMI_SERVICE_READY_EXT_EVENTID,
  1045. /** FIPS test mode event */
  1046. WMI_PDEV_FIPS_EVENTID,
  1047. /** Channel hopping avoidance */
  1048. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  1049. /** CCK ANI level event */
  1050. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  1051. /** OFDM ANI level event */
  1052. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1053. /** Tx PPDU params */
  1054. WMI_PDEV_TPC_EVENTID,
  1055. /** NF Cal Power in DBR/DBM for all channels */
  1056. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1057. /** SOC/PDEV events */
  1058. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  1059. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  1060. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  1061. /** Report ANT DIV feature's status */
  1062. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  1063. /** Chip level Power stats */
  1064. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  1065. /** Power Save Failure Detected */
  1066. WMI_PDEV_CHIP_POWER_SAVE_FAILURE_DETECTED_EVENTID,
  1067. /* Event to report the switch count in csa of one or more VDEVs */
  1068. WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID,
  1069. /** Report the caldata version to host */
  1070. WMI_PDEV_CHECK_CAL_VERSION_EVENTID,
  1071. /** Report chain RSSI and antenna index to host */
  1072. WMI_PDEV_DIV_RSSI_ANTID_EVENTID,
  1073. /** provide noise floor and cycle counts for a channel */
  1074. WMI_PDEV_BSS_CHAN_INFO_EVENTID,
  1075. /** Response received the ctl table to host */
  1076. WMI_PDEV_UPDATE_CTLTABLE_EVENTID,
  1077. WMI_PDEV_DMA_RING_CFG_RSP_EVENTID,
  1078. WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID,
  1079. /* VDEV specific events */
  1080. /** VDEV started event in response to VDEV_START request */
  1081. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  1082. /** vdev stopped event , generated in response to VDEV_STOP request */
  1083. WMI_VDEV_STOPPED_EVENTID,
  1084. /* Indicate the set key (used for setting per
  1085. * peer unicast and per vdev multicast)
  1086. * operation has completed */
  1087. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  1088. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  1089. don't use this for any new implementations */
  1090. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  1091. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  1092. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  1093. /* Return the TSF timestamp of specified vdev */
  1094. WMI_VDEV_TSF_REPORT_EVENTID,
  1095. /* FW response to Host for vdev delete cmdid */
  1096. WMI_VDEV_DELETE_RESP_EVENTID,
  1097. /* DISA feature: FW response to Host with encrypted/decrypted 802.11 DISA frame */
  1098. WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
  1099. /** event to report mac randomization success **/
  1100. WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_STATUS_EVENTID,
  1101. /* event for ARP stats collection */
  1102. WMI_VDEV_GET_ARP_STAT_EVENTID,
  1103. /** get tx power event in response to VDEV_GET_TX_POWER request */
  1104. WMI_VDEV_GET_TX_POWER_EVENTID,
  1105. /* peer specific events */
  1106. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  1107. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  1108. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  1109. WMI_PEER_INFO_EVENTID,
  1110. /** Event indicating that TX fail count reaching threshold */
  1111. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  1112. /* Return the estimate link speed for the Peer specified in the
  1113. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  1114. */
  1115. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  1116. /* Return the peer state
  1117. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  1118. */
  1119. WMI_PEER_STATE_EVENTID,
  1120. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  1121. * After that, host will send Mx message.
  1122. * Otherwise, host will pause any Mx(STA:M2/M4) message
  1123. */
  1124. WMI_PEER_ASSOC_CONF_EVENTID,
  1125. /* FW response to Host for peer delete cmdid */
  1126. WMI_PEER_DELETE_RESP_EVENTID,
  1127. /** Valid rate code list for peer */
  1128. WMI_PEER_RATECODE_LIST_EVENTID,
  1129. WMI_WDS_PEER_EVENTID,
  1130. WMI_PEER_STA_PS_STATECHG_EVENTID,
  1131. /** Peer Ant Div Info Event with rssi per chain, etc */
  1132. WMI_PEER_ANTDIV_INFO_EVENTID,
  1133. /*
  1134. * WMI_PEER_RESERVED_EVENTID
  1135. * These values are used for placeholders, to allow the subsequent
  1136. * WMI_PEER_OPER_MODE_CHANGE_EVENTID constant to have the same value
  1137. * as it had in its original location, when it was mistakenly placed
  1138. * amongst the WMI_PEER CMDID defs.
  1139. *
  1140. * These WMI_PEER_RESERVED values can be replaced with actual WMI peer
  1141. * event message IDs, though it will be simpler to instead add new
  1142. * WMI_PEER EVENTID defs at the end of the WMI_GRP_PEER WMI_EVT_GRP.
  1143. */
  1144. WMI_PEER_RESERVED0_EVENTID,
  1145. WMI_PEER_RESERVED1_EVENTID,
  1146. WMI_PEER_RESERVED2_EVENTID,
  1147. WMI_PEER_RESERVED3_EVENTID,
  1148. WMI_PEER_RESERVED4_EVENTID,
  1149. WMI_PEER_RESERVED5_EVENTID,
  1150. WMI_PEER_RESERVED6_EVENTID,
  1151. WMI_PEER_RESERVED7_EVENTID,
  1152. WMI_PEER_RESERVED8_EVENTID,
  1153. WMI_PEER_RESERVED9_EVENTID,
  1154. WMI_PEER_RESERVED10_EVENTID,
  1155. /** Peer operating mode change indication sent to host to update stats */
  1156. WMI_PEER_OPER_MODE_CHANGE_EVENTID,
  1157. /* beacon/mgmt specific events */
  1158. /** RX management frame. the entire frame is carried along with the event. */
  1159. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  1160. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  1161. use only in host beacon mode */
  1162. WMI_HOST_SWBA_EVENTID,
  1163. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theoretical value.
  1164. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  1165. staggered beacon transmission mode */
  1166. WMI_TBTTOFFSET_UPDATE_EVENTID,
  1167. /** event after the first beacon is transmitted following
  1168. a change in the template.*/
  1169. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  1170. /** event after the first probe response is transmitted following
  1171. a change in the template.*/
  1172. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  1173. /** Event for Mgmt TX completion event */
  1174. WMI_MGMT_TX_COMPLETION_EVENTID,
  1175. /** Event for Mgmt TX bundle completion event */
  1176. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  1177. /** vdev_map used in WMI_TBTTOFFSET_UPDATE_EVENTID supports max 32 vdevs.
  1178. * Use this event if number of vdevs > 32.
  1179. */
  1180. WMI_TBTTOFFSET_EXT_UPDATE_EVENTID,
  1181. /** Event for offchan data TX completion event */
  1182. WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID,
  1183. /** software FILS Discovery Frame alert event to Host, requesting host to Queue an FD frame for transmission */
  1184. WMI_HOST_SWFDA_EVENTID,
  1185. /** software beacon alert event to Host requesting host to Queue a beacon for transmission.
  1186. * Used only in host beacon mode. */
  1187. WMI_HOST_SWBA_V2_EVENTID,
  1188. /* ADDBA Related WMI Events*/
  1189. /** Indication the completion of the prior
  1190. WMI_PEER_TID_DELBA_CMDID(initiator) */
  1191. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  1192. /** Indication the completion of the prior
  1193. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  1194. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1195. /* Seq num returned from hw for a sta/tid pair */
  1196. WMI_BA_RSP_SSN_EVENTID,
  1197. /* Aggregation state requested by BTC */
  1198. WMI_AGGR_STATE_TRIG_EVENTID,
  1199. /** Roam event to trigger roaming on host */
  1200. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1201. /** matching AP found from list of profiles */
  1202. WMI_PROFILE_MATCH,
  1203. /** roam synch event */
  1204. WMI_ROAM_SYNCH_EVENTID,
  1205. /** roam synch frame event */
  1206. WMI_ROAM_SYNCH_FRAME_EVENTID,
  1207. /** various roam scan stats */
  1208. WMI_ROAM_SCAN_STATS_EVENTID,
  1209. /** P2P disc found */
  1210. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1211. /** send noa info to host when noa is changed for beacon tx offload enable */
  1212. WMI_P2P_NOA_EVENTID,
  1213. /** send p2p listen offload stopped event with different reason */
  1214. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1215. /** Send EGAP Info to host */
  1216. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1217. /* send pdev resume event to host after pdev resume. */
  1218. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1219. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1220. will cary wake reason */
  1221. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1222. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1223. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1224. /*RTT related event ID*/
  1225. /** RTT measurement report */
  1226. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1227. /** TSF measurement report */
  1228. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1229. /** RTT error report */
  1230. WMI_RTT_ERROR_REPORT_EVENTID,
  1231. /*STATS specific events*/
  1232. /** txrx stats event requested by host */
  1233. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1234. /** FW iface link stats Event */
  1235. WMI_IFACE_LINK_STATS_EVENTID,
  1236. /** FW iface peer link stats Event */
  1237. WMI_PEER_LINK_STATS_EVENTID,
  1238. /** FW Update radio stats Event */
  1239. WMI_RADIO_LINK_STATS_EVENTID,
  1240. /** Firmware memory dump Complete event*/
  1241. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1242. /** Event indicating the DIAG logs/events supported by FW */
  1243. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1244. /** Instantaneous RSSI event */
  1245. WMI_INST_RSSI_STATS_EVENTID,
  1246. /** FW update tx power levels event */
  1247. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1248. /** This event is used to report wlan stats to host.
  1249. * It is triggered under 3 conditions:
  1250. * (a) Periodic timer timed out, based on the period specified
  1251. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1252. * (b) Whenever any of the (enabled) stats thresholds specified
  1253. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1254. * within the current stats period.
  1255. * (c) In response to the one-time wlan stats request of
  1256. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1257. *
  1258. * If this event is triggered by condition a or b,
  1259. * the stats counters are cleared at the start of each period.
  1260. * But if it is triggered by condition c, stats counters won't be cleared.
  1261. */
  1262. WMI_REPORT_STATS_EVENTID,
  1263. /** Event indicating RCPI of the peer requested by host in the WMI_REQUEST_RCPI_CMDID */
  1264. WMI_UPDATE_RCPI_EVENTID,
  1265. /** This event is used to respond to WMI_REQUEST_PEER_STATS_INFO_CMDID
  1266. * and report peer stats info to host */
  1267. WMI_PEER_STATS_INFO_EVENTID,
  1268. /** This event is used to respond to WMI_REQUEST_RADIO_CHAN_STATS_CMDID
  1269. * and report radio channel stats to host */
  1270. WMI_RADIO_CHAN_STATS_EVENTID,
  1271. /* NLO specific events */
  1272. /** NLO match event after the first match */
  1273. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1274. /** NLO scan complete event */
  1275. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1276. /** APFIND specific events */
  1277. WMI_APFIND_EVENTID,
  1278. /** passpoint network match event */
  1279. WMI_PASSPOINT_MATCH_EVENTID,
  1280. /** GTK offload stautus event requested by host */
  1281. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1282. /** GTK offload failed to rekey event */
  1283. WMI_GTK_REKEY_FAIL_EVENTID,
  1284. /* CSA IE received event */
  1285. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1286. /*chatter query reply event*/
  1287. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1288. /** DFS related events */
  1289. WMI_PDEV_DFS_RADAR_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_DFS),
  1290. /** Indicate channel-availability-check completion event to host */
  1291. WMI_VDEV_DFS_CAC_COMPLETE_EVENTID,
  1292. /** Indicate off-channel-availability-check completion event to host */
  1293. WMI_VDEV_ADFS_OCAC_COMPLETE_EVENTID,
  1294. /** echo event in response to echo command */
  1295. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1296. /* !!IMPORTANT!!
  1297. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1298. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1299. * as we MUST have a fixed value here to maintain compatibility between
  1300. * UTF and the ART2 driver
  1301. */
  1302. /** UTF specific WMI event */
  1303. WMI_PDEV_UTF_EVENTID,
  1304. /** event carries buffered debug messages */
  1305. WMI_DEBUG_MESG_EVENTID,
  1306. /** FW stats(periodic or on shot) */
  1307. WMI_UPDATE_STATS_EVENTID,
  1308. /** debug print message used for tracing FW code while debugging */
  1309. WMI_DEBUG_PRINT_EVENTID,
  1310. /** DCS wlan or non-wlan interference event
  1311. */
  1312. WMI_DCS_INTERFERENCE_EVENTID,
  1313. /** VI spoecific event */
  1314. WMI_PDEV_QVIT_EVENTID,
  1315. /** FW code profile data in response to profile request */
  1316. WMI_WLAN_PROFILE_DATA_EVENTID,
  1317. /* Factory Testing Mode request event
  1318. * used for integrated chipsets */
  1319. WMI_PDEV_FTM_INTG_EVENTID,
  1320. /* avoid list of frequencies .
  1321. */
  1322. WMI_WLAN_FREQ_AVOID_EVENTID,
  1323. /* Indicate the keepalive parameters */
  1324. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1325. /*Thermal Management event*/
  1326. WMI_THERMAL_MGMT_EVENTID,
  1327. /* Container for DIAG event and log data */
  1328. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1329. /* host auto shutdown event */
  1330. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1331. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1332. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1333. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1334. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1335. WMI_DIAG_EVENTID,
  1336. /** Set OCB Sched Response, deprecated */
  1337. WMI_OCB_SET_SCHED_EVENTID,
  1338. /** event to indicate the flush of the buffered debug messages is complete*/
  1339. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1340. /** event to report mix/max RSSI breach events */
  1341. WMI_RSSI_BREACH_EVENTID,
  1342. /** event to report completion of data storage into flash memory */
  1343. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1344. /** event to report SCPC calibrated data to host */
  1345. WMI_PDEV_UTF_SCPC_EVENTID,
  1346. /** event to provide requested data from the target's flash memory */
  1347. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1348. /** event to report rx aggregation failure frame information */
  1349. WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
  1350. /** event to upload a PKGID to host to identify chip for various products */
  1351. WMI_PKGID_EVENTID,
  1352. /* Thermal Throttling stats event id for every pdev and zones, etc */
  1353. WMI_THERM_THROT_STATS_EVENTID,
  1354. /* WMI UNIT TEST event */
  1355. WMI_UNIT_TEST_EVENTID,
  1356. /** event to report result of host configure SAR2 */
  1357. WMI_SAR2_RESULT_EVENTID,
  1358. /** event to get TX power per input HALPHY parameters */
  1359. WMI_GET_TPC_POWER_EVENTID,
  1360. /* GPIO Event */
  1361. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1362. /** upload H_CV info WMI event
  1363. * to indicate uploaded H_CV info to host
  1364. */
  1365. WMI_UPLOADH_EVENTID,
  1366. /** capture H info WMI event
  1367. * to indicate captured H info to host
  1368. */
  1369. WMI_CAPTUREH_EVENTID,
  1370. /* hw RFkill */
  1371. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1372. /* TDLS Event */
  1373. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1374. /** STA SMPS Event */
  1375. /** force SMPS mode */
  1376. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1377. /*location scan event*/
  1378. /*report the firmware's capability of batch scan*/
  1379. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1380. /*batch scan result*/
  1381. WMI_BATCH_SCAN_RESULT_EVENTID,
  1382. /* OEM Event */
  1383. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1384. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1385. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1386. WMI_OEM_RESPONSE_EVENTID,
  1387. WMI_OEM_DMA_RING_CFG_RSP_EVENTID,
  1388. WMI_OEM_DMA_BUF_RELEASE_EVENTID,
  1389. /* NAN Event */
  1390. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1391. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1392. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1393. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1394. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1395. /* Coex Event */
  1396. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1397. WMI_SAR_GET_LIMITS_EVENTID,
  1398. /* LPI Event */
  1399. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1400. WMI_LPI_STATUS_EVENTID,
  1401. WMI_LPI_HANDOFF_EVENTID,
  1402. /* ExtScan events */
  1403. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1404. WMI_EXTSCAN_OPERATION_EVENTID,
  1405. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1406. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1407. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1408. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1409. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1410. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1411. /* mDNS offload events */
  1412. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1413. /* SAP Authentication offload events */
  1414. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1415. WMI_SAP_OFL_DEL_STA_EVENTID,
  1416. WMI_SAP_OBSS_DETECTION_REPORT_EVENTID,
  1417. /* OBSS Offloads events */
  1418. WMI_OBSS_COLOR_COLLISION_DETECTION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OBSS_OFL),
  1419. /** Out-of-context-of-bss (OCB) events */
  1420. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1421. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1422. WMI_DCC_GET_STATS_RESP_EVENTID,
  1423. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1424. WMI_DCC_STATS_EVENTID,
  1425. /* System-On-Chip events */
  1426. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1427. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1428. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1429. /** Motion Aided WiFi Connectivity (MAWC) events */
  1430. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1431. /** pkt filter (BPF) offload relevant events */
  1432. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1433. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1434. WMI_BPF_GET_VDEV_WORK_MEMORY_RESP_EVENTID,
  1435. /* RMC specific event */
  1436. /* RMC manual leader selected event */
  1437. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1438. /** WMI events related to regulatory offload */
  1439. WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY),
  1440. WMI_11D_NEW_COUNTRY_EVENTID,
  1441. /** Events for TWT(Target Wake Time) of STA and AP */
  1442. WMI_TWT_ENABLE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TWT),
  1443. WMI_TWT_DISABLE_COMPLETE_EVENTID,
  1444. WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID,
  1445. WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID,
  1446. WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID,
  1447. WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID,
  1448. /** Events in Prototyping phase */
  1449. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1450. WMI_NDP_INITIATOR_RSP_EVENTID,
  1451. WMI_NDP_RESPONDER_RSP_EVENTID,
  1452. WMI_NDP_END_RSP_EVENTID,
  1453. WMI_NDP_INDICATION_EVENTID,
  1454. WMI_NDP_CONFIRM_EVENTID,
  1455. WMI_NDP_END_INDICATION_EVENTID,
  1456. WMI_WLAN_COEX_BT_ACTIVITY_EVENTID,
  1457. WMI_NDL_SCHEDULE_UPDATE_EVENTID,
  1458. } WMI_EVT_ID;
  1459. /* defines for OEM message sub-types */
  1460. #define WMI_OEM_CAPABILITY_REQ 0x01
  1461. #define WMI_OEM_CAPABILITY_RSP 0x02
  1462. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1463. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1464. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1465. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1466. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1467. #define WMI_OEM_NAN_PEER_INFO 0x08
  1468. #define WMI_OEM_CONFIGURE_LCR 0x09
  1469. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1470. #define WMI_CHAN_LIST_TAG 0x1
  1471. #define WMI_SSID_LIST_TAG 0x2
  1472. #define WMI_BSSID_LIST_TAG 0x3
  1473. #define WMI_IE_TAG 0x4
  1474. #define WMI_SCAN_START_OFFSET_TAG 0x5
  1475. typedef struct {
  1476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1477. /** primary 20 MHz channel frequency in mhz */
  1478. A_UINT32 mhz;
  1479. /** Center frequency 1 in MHz*/
  1480. A_UINT32 band_center_freq1;
  1481. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1482. A_UINT32 band_center_freq2;
  1483. /** channel info described below */
  1484. A_UINT32 info;
  1485. /** contains min power, max power, reg power and reg class id. */
  1486. A_UINT32 reg_info_1;
  1487. /** contains antennamax */
  1488. A_UINT32 reg_info_2;
  1489. } wmi_channel;
  1490. typedef enum {
  1491. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1492. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1493. } wmi_channel_change_cause;
  1494. /** channel info consists of 6 bits of channel mode */
  1495. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1496. (pwmi_channel)->info &= 0xffffffc0; \
  1497. (pwmi_channel)->info |= (val); \
  1498. } while (0)
  1499. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1500. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1501. #define WMI_CHAN_FLAG_PASSIVE 7
  1502. #define WMI_CHAN_ADHOC_ALLOWED 8
  1503. #define WMI_CHAN_AP_DISABLED 9
  1504. #define WMI_CHAN_FLAG_DFS 10
  1505. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1506. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1507. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1508. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1509. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1510. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1511. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1512. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1513. (pwmi_channel)->info |= (1 << flag); \
  1514. } while (0)
  1515. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1516. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1517. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1518. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1519. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1520. } while (0)
  1521. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1522. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1523. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1524. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1525. } while (0)
  1526. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1527. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1528. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1529. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1530. } while (0)
  1531. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1532. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1533. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1534. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1535. } while (0)
  1536. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1537. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1538. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1539. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1540. } while (0)
  1541. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1542. /* max tx power is in 1 dBm units */
  1543. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1544. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1545. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1546. } while (0)
  1547. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1548. /** HT Capabilities*/
  1549. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1550. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1551. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1552. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1553. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1554. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1555. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1556. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1557. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1558. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1559. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1560. #define WMI_HT_CAP_HT40_SGI 0x0800
  1561. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1562. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1563. /* These macros should be used when we wish to advertise STBC support for
  1564. * only 1SS or 2SS or 3SS. */
  1565. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1566. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1567. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1568. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1569. WMI_HT_CAP_HT20_SGI | \
  1570. WMI_HT_CAP_HT40_SGI | \
  1571. WMI_HT_CAP_TX_STBC | \
  1572. WMI_HT_CAP_RX_STBC | \
  1573. WMI_HT_CAP_LDPC | \
  1574. WMI_HT_CAP_TX_LDPC | \
  1575. WMI_HT_CAP_RX_LDPC)
  1576. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1577. field. The fields not defined here are not supported, or reserved.
  1578. Do not change these masks and if you have to add new one follow the
  1579. bitmask as specified by 802.11ac draft.
  1580. */
  1581. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1582. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1583. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1584. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1585. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1586. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1587. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1588. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1589. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1590. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1591. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1592. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1593. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1594. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1595. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1596. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1597. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1598. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1599. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1600. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1601. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1602. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1603. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1604. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1605. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1606. /* TEMPORARY:
  1607. * Preserve the incorrect old name as an alias for the correct new name
  1608. * until all references to the old name have been removed from all hosts
  1609. * and targets.
  1610. */
  1611. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1612. /* These macros should be used when we wish to advertise STBC support for
  1613. * only 1SS or 2SS or 3SS. */
  1614. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1615. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1616. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1617. /* TEMPORARY:
  1618. * Preserve the incorrect old name as an alias for the correct new name
  1619. * until all references to the old name have been removed from all hosts
  1620. * and targets.
  1621. */
  1622. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1623. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1624. WMI_VHT_CAP_SGI_80MHZ | \
  1625. WMI_VHT_CAP_TX_STBC | \
  1626. WMI_VHT_CAP_RX_STBC_MASK | \
  1627. WMI_VHT_CAP_RX_LDPC | \
  1628. WMI_VHT_CAP_TX_LDPC | \
  1629. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1630. WMI_VHT_CAP_RX_FIXED_ANT | \
  1631. WMI_VHT_CAP_TX_FIXED_ANT)
  1632. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1633. 802.11ac
  1634. */
  1635. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1636. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1637. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1638. /** 11ax capabilities */
  1639. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1640. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1641. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1642. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1643. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1644. /* Interested readers refer to Rx/Tx MCS Map definition as defined in 802.11ax
  1645. */
  1646. #define WMI_HE_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1647. /* fragmentation support field value */
  1648. enum {
  1649. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1650. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1651. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1652. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1653. };
  1654. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1655. #define WMI_MAX_NUM_SS MAX_HE_NSS
  1656. #define WMI_MAX_NUM_RU MAX_HE_RU
  1657. /*
  1658. * Figure 8 554ae: -PPE Threshold Info field format
  1659. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1660. *
  1661. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1662. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1663. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1664. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1665. *
  1666. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1667. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1668. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1669. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1670. *
  1671. * etc.
  1672. */
  1673. /*
  1674. * Note that in these macros, "ru" is one-based, not zero-based, while
  1675. * nssm1 is zero-based.
  1676. */
  1677. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1678. do { \
  1679. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6)); \
  1680. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) & 3) * 6)); \
  1681. } while (0)
  1682. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1683. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6)) & 7)
  1684. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1, ppet) \
  1685. do { \
  1686. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) & 3) * 6 + 3)); \
  1687. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) & 3) * 6 + 3)); \
  1688. } while (0)
  1689. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1690. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) & 3) * 6 + 3)) & 7)
  1691. typedef struct _wmi_ppe_threshold {
  1692. A_UINT32 numss_m1; /** NSS - 1*/
  1693. union {
  1694. A_UINT32 ru_count; /** RU COUNT OBSOLETE to be removed after few versions */
  1695. A_UINT32 ru_mask; /** RU index mask */
  1696. };
  1697. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1698. } wmi_ppe_threshold;
  1699. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1700. */
  1701. #define WMI_SYS_CAP_ENABLE 0x00000001
  1702. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1703. /*
  1704. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1705. * Bits 5:0 are reserved
  1706. */
  1707. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1708. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1709. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1710. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1711. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1712. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1713. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1714. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1715. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1716. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1717. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1718. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1719. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1720. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1721. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1722. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1723. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1724. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1725. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1726. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1727. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1728. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1729. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1730. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1731. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1732. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1733. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1734. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1735. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1736. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1737. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1738. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1739. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1740. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1741. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1742. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1743. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1744. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1745. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1746. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1747. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1748. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1749. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1750. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1751. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1752. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1753. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1754. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1755. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1756. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1757. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1758. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS (28)
  1759. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS (27)
  1760. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1761. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1762. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1763. #define WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1764. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1765. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1766. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1767. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1768. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1769. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1770. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1771. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_SET(scan_cfg, value) \
  1772. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS, 1, value)
  1773. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_SET(scan_cfg, value) \
  1774. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS, 1, value)
  1775. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1776. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1777. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1778. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1779. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1780. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1781. #define WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_GET(scan_cfg) \
  1782. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_ASYC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_ASYNC_DBS_SCAN_BITPOS)
  1783. #define WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_GET(scan_cfg) \
  1784. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_SYNC_DBS_SCAN_BITPOS)
  1785. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1786. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1787. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS (29)
  1788. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS (28)
  1789. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS (27)
  1790. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1791. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1792. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1793. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1794. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1795. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1796. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1797. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1798. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1799. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_SET(fw_mode, value) \
  1800. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS, 1, value)
  1801. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_SET(fw_mode, value) \
  1802. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS, 1, value)
  1803. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_SET(fw_mode, value) \
  1804. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS, 1, value)
  1805. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1806. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1807. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1808. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1809. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_GET(fw_mode) \
  1810. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_CXN_BITPOS)
  1811. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_GET(fw_mode) \
  1812. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_STA_BITPOS)
  1813. #define WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_GET(fw_mode) \
  1814. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_FOR_STA_PLUS_P2P_BITPOS)
  1815. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1816. typedef struct _wmi_abi_version {
  1817. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  1818. A_UINT32 abi_version_1; /** WMI change revision */
  1819. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  1820. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  1821. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  1822. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  1823. } wmi_abi_version;
  1824. /*
  1825. * maximum number of memroy requests allowed from FW.
  1826. */
  1827. #define WMI_MAX_MEM_REQS 16
  1828. /* !!NOTE!!:
  1829. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1830. * Please don't change it.
  1831. */
  1832. #define HW_BD_INFO_SIZE 5
  1833. /**
  1834. * PDEV ID to identify the physical device,
  1835. * value 0 reserved for SOC level commands/event
  1836. */
  1837. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1838. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1839. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1840. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1841. /**
  1842. * The following struct holds optional payload for
  1843. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1844. * device capability to the host.
  1845. */
  1846. typedef struct {
  1847. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1848. A_UINT32 fw_build_vers; /* firmware build number */
  1849. wmi_abi_version fw_abi_vers;
  1850. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1851. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1852. A_UINT32 num_rf_chains;
  1853. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1854. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1855. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1856. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1857. A_UINT32 hw_min_tx_power;
  1858. A_UINT32 hw_max_tx_power;
  1859. /* sys_cap_info:
  1860. * bits 1:0 - RXTX LED + RFKILL enable flags (see WMI_LEDRFKILL_FLAGS)
  1861. * bits 31:2 - reserved (must be set to zero)
  1862. */
  1863. A_UINT32 sys_cap_info;
  1864. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1865. /** Max beacon and Probe Response IE offload size (includes
  1866. * optional P2P IEs) */
  1867. A_UINT32 max_bcn_ie_size;
  1868. /*
  1869. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  1870. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  1871. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  1872. * by DMA.
  1873. */
  1874. A_UINT32 num_mem_reqs;
  1875. /* Max No. scan channels target can support
  1876. * If FW is too old and doesn't indicate this number, host side value will default to
  1877. * 0, and host will take the original compatible value (62) for future scan channel
  1878. * setup.
  1879. */
  1880. A_UINT32 max_num_scan_channels;
  1881. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  1882. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  1883. */
  1884. A_UINT32 hw_bd_id;
  1885. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  1886. /*
  1887. * Number of MACs supported, i.e. a DBS-capable device will return 2
  1888. */
  1889. A_UINT32 max_supported_macs;
  1890. /*
  1891. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  1892. */
  1893. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  1894. /*
  1895. * Number of Dual Band Simultaneous (DBS) hardware modes
  1896. */
  1897. A_UINT32 num_dbs_hw_modes;
  1898. /*
  1899. * txrx_chainmask
  1900. * [7:0] - 2G band tx chain mask
  1901. * [15:8] - 2G band rx chain mask
  1902. * [23:16] - 5G band tx chain mask
  1903. * [31:24] - 5G band rx chain mask
  1904. *
  1905. */
  1906. A_UINT32 txrx_chainmask;
  1907. /*
  1908. * default Dual Band Simultaneous (DBS) hardware mode
  1909. */
  1910. A_UINT32 default_dbs_hw_mode_index;
  1911. /*
  1912. * Number of msdu descriptors target would use
  1913. */
  1914. A_UINT32 num_msdu_desc;
  1915. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  1916. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  1917. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1918. * wlan_host_mem_req mem_reqs[];
  1919. * wlan_dbs_hw_mode_list[];
  1920. */
  1921. } wmi_service_ready_event_fixed_param;
  1922. typedef enum {
  1923. WMI_RXTX_LED_ENABLE = 0x00000001,
  1924. WMI_RFKILL_ENABLE = 0x00000002,
  1925. } WMI_LEDRFKILL_FLAGS;
  1926. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  1927. typedef struct {
  1928. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  1929. /*
  1930. * The wmi_service_segment offset field specifies the position within the
  1931. * logical bitmap of WMI service flags at which the WMI service flags
  1932. * specified within this message begin.
  1933. * Since the first 128 WMI service flags are specified within the
  1934. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  1935. * the wmi_service_segment_offset value is expected to be 128 or more.
  1936. */
  1937. A_UINT32 wmi_service_segment_offset;
  1938. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  1939. } wmi_service_available_event_fixed_param;
  1940. typedef struct {
  1941. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  1942. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  1943. A_UINT32 default_conc_scan_config_bits;
  1944. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  1945. A_UINT32 default_fw_config_bits;
  1946. wmi_ppe_threshold ppet;
  1947. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  1948. /*
  1949. * An HT STA shall not allow transmission of more than one MPDU start
  1950. * within the time limit described in the MPDU maximum density field.
  1951. */
  1952. A_UINT32 mpdu_density; /* units are microseconds */
  1953. /*
  1954. * Maximum no of BSSID based RX filters host can program
  1955. * Value 0 means FW hasn't given any limit to host.
  1956. */
  1957. A_UINT32 max_bssid_rx_filters;
  1958. /*
  1959. * Extended FW build version information:
  1960. * bits 27:0 -> reserved
  1961. * bits 31:28 -> CRM sub ID
  1962. */
  1963. A_UINT32 fw_build_vers_ext;
  1964. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  1965. * This limit is the maximum number of SSIDs that can be configured in the
  1966. * target for Network List Offload (i.e. scanning for a preferred network).
  1967. * If this value is 0x0, the target supports WMI_NLO_MAX_SSIDS (16).
  1968. * If this value is non-zero, the host should send back in the
  1969. * WMI_INIT message's wmi_resource_config.max_nlo_ssids a value that
  1970. * is equal to or less than the target capability limit reported here.
  1971. */
  1972. A_UINT32 max_nlo_ssids;
  1973. } wmi_service_ready_ext_event_fixed_param;
  1974. typedef enum {
  1975. WMI_FW_STA_RTT_INITR = 0x00000001,
  1976. WMI_FW_STA_RTT_RESPR = 0x00000002,
  1977. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  1978. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  1979. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  1980. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  1981. WMI_FW_AP_RTT_INITR = 0x00000040,
  1982. WMI_FW_AP_RTT_RESPR = 0x00000080,
  1983. WMI_FW_NAN_RTT_INITR = 0x00000100,
  1984. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  1985. WMI_FW_SCAN_DBS_POLICY = 0x00000400,
  1986. /*
  1987. * New fw sub feature capabilites before
  1988. * WMI_FW_MAX_SUB_FEAT_CAP
  1989. */
  1990. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  1991. } WMI_FW_SUB_FEAT_CAPS;
  1992. typedef enum {
  1993. WMI_HWBD_NONE = 0, /* No hw board information is given */
  1994. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  1995. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  1996. } WMI_HWBD_ID;
  1997. #define ATH_BD_DATA_REV_MASK 0x000000FF
  1998. #define ATH_BD_DATA_REV_SHIFT 0
  1999. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  2000. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  2001. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  2002. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  2003. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  2004. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  2005. #define SET_BD_DATA_REV(bd_data_ver, value) \
  2006. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  2007. #define GET_BD_DATA_REV(bd_data_ver) \
  2008. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  2009. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  2010. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  2011. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  2012. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  2013. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  2014. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  2015. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  2016. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  2017. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  2018. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  2019. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  2020. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  2021. #ifdef ROME_LTE_COEX_FREQ_AVOID
  2022. typedef struct {
  2023. A_UINT32 start_freq; /* start frequency, not channel center freq */
  2024. A_UINT32 end_freq; /* end frequency */
  2025. } avoid_freq_range_desc;
  2026. typedef struct {
  2027. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  2028. A_UINT32 num_freq_ranges;
  2029. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  2030. avoid_freq_range_desc avd_freq_range[0];
  2031. } wmi_wlan_avoid_freq_ranges_event;
  2032. #endif
  2033. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  2034. #define WLAN_INIT_STATUS_SUCCESS 0x0
  2035. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  2036. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  2037. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  2038. typedef A_UINT32 WLAN_INIT_STATUS;
  2039. typedef struct {
  2040. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  2041. wmi_abi_version fw_abi_vers;
  2042. /*
  2043. * mac_addr is always filled; in addition, there can be a mac_addr_list
  2044. * TLV following this fixed_param TLV to specify additional MAC addresses,
  2045. * for cases where the target specifies one MAC address per pdev
  2046. * (so the host can treat the pdevs within the target as separately
  2047. * as possible) rather than one MAC address for the whole SOC.
  2048. */
  2049. wmi_mac_addr mac_addr;
  2050. A_UINT32 status;
  2051. A_UINT32 num_dscp_table;
  2052. /* num_extra_mac_addr -
  2053. * how many additional MAC addresses besides the above mac_addr
  2054. * are provided in the subsequent mac_addr_list TLV
  2055. */
  2056. A_UINT32 num_extra_mac_addr;
  2057. /*
  2058. * Total number of "real" peers (remote peers of an AP vdev,
  2059. * BSS peer of a STA vdev, TDLS peer of a STA vdev) that FW supports.
  2060. * If 0, then Host can use param_tlv->resource_config->num_peers as
  2061. * total number of peers.
  2062. */
  2063. A_UINT32 num_total_peers;
  2064. /*
  2065. * Number of extra peers that Firmware adds.
  2066. * These are self peers and/or other FW only peers that don't represent
  2067. * a 802.11 transceiver, but instead are used for convenience, e.g. to
  2068. * provide a pseudo-peer object for an AP vdev's bcast/mcast tx queues,
  2069. * to allow each tx queue to belong to a peer object.
  2070. * Peer ID can be up to num_total_peers + num_extra_peers.
  2071. */
  2072. A_UINT32 num_extra_peers;
  2073. /*
  2074. * This fixed_param TLV is followed by these additional TLVs:
  2075. * mac_addr_list[num_extra_mac_addr];
  2076. */
  2077. } wmi_ready_event_fixed_param;
  2078. typedef struct {
  2079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  2080. /**
  2081. * @brief num_vdev - number of virtual devices (VAPs) to support
  2082. */
  2083. A_UINT32 num_vdevs;
  2084. /**
  2085. * @brief num_peers - number of peer nodes to support
  2086. */
  2087. A_UINT32 num_peers;
  2088. /*
  2089. * @brief In offload mode target supports features like WOW, chatter and other
  2090. * protocol offloads. In order to support them some functionalities like
  2091. * reorder buffering, PN checking need to be done in target. This determines
  2092. * maximum number of peers suported by target in offload mode
  2093. */
  2094. A_UINT32 num_offload_peers;
  2095. /* @brief Number of reorder buffers available for doing target based reorder
  2096. * Rx reorder buffering
  2097. */
  2098. A_UINT32 num_offload_reorder_buffs;
  2099. /**
  2100. * @brief num_peer_keys - number of keys per peer
  2101. */
  2102. A_UINT32 num_peer_keys;
  2103. /**
  2104. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  2105. */
  2106. A_UINT32 num_tids;
  2107. /**
  2108. * @brief ast_skid_limit - max skid for resolving hash collisions
  2109. * @details
  2110. * The address search table is sparse, so that if two MAC addresses
  2111. * result in the same hash value, the second of these conflicting
  2112. * entries can slide to the next index in the address search table,
  2113. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2114. * specifies the upper bound on how many subsequent indices to search
  2115. * over to find an unoccupied space.
  2116. */
  2117. A_UINT32 ast_skid_limit;
  2118. /**
  2119. * @brief tx_chain_mask - the nominal chain mask for transmit
  2120. * @details
  2121. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  2122. * a reduced number of chains if no clients are associated.
  2123. * This configuration parameter specifies the nominal chain-mask that
  2124. * should be used when not operating with a reduced set of tx chains.
  2125. */
  2126. A_UINT32 tx_chain_mask;
  2127. /**
  2128. * @brief rx_chain_mask - the nominal chain mask for receive
  2129. * @details
  2130. * The chain mask may be modified dynamically, e.g. for a client to use
  2131. * a reduced number of chains for receive if the traffic to the client
  2132. * is low enough that it doesn't require downlink MIMO or antenna
  2133. * diversity.
  2134. * This configuration parameter specifies the nominal chain-mask that
  2135. * should be used when not operating with a reduced set of rx chains.
  2136. */
  2137. A_UINT32 rx_chain_mask;
  2138. /**
  2139. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  2140. * @details
  2141. * Each WMM access class (voice, video, best-effort, background) will
  2142. * have its own timeout value to dictate how long to wait for missing
  2143. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2144. * been received.
  2145. * This parameter specifies the timeout in milliseconds for each class .
  2146. * NOTE: the number of class (defined as 4) cannot be
  2147. * changed in the future without breaking WMI compatibility.
  2148. */
  2149. A_UINT32 rx_timeout_pri[4];
  2150. /**
  2151. * @brief rx_decap mode - what mode the rx should decap packets to
  2152. * @details
  2153. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2154. * THis setting also determines the default TX behavior, however TX
  2155. * behavior can be modified on a per VAP basis during VAP init
  2156. */
  2157. A_UINT32 rx_decap_mode;
  2158. /**
  2159. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  2160. */
  2161. A_UINT32 scan_max_pending_req;
  2162. /**
  2163. * @brief maximum VDEV that could use BMISS offload
  2164. */
  2165. A_UINT32 bmiss_offload_max_vdev;
  2166. /**
  2167. * @brief maximum VDEV that could use offload roaming
  2168. */
  2169. A_UINT32 roam_offload_max_vdev;
  2170. /**
  2171. * @brief maximum AP profiles that would push to offload roaming
  2172. */
  2173. A_UINT32 roam_offload_max_ap_profiles;
  2174. /**
  2175. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  2176. * @details
  2177. * The target's WAL maintains a table to hold information regarding which
  2178. * peers belong to a given multicast group, so that if multicast->unicast
  2179. * conversion is enabled, the target can convert multicast tx frames to a
  2180. * series of unicast tx frames, to each peer within the multicast group.
  2181. * This num_mcast_groups configuration parameter tells the target how
  2182. * many multicast groups to provide storage for within its multicast
  2183. * group membership table.
  2184. */
  2185. A_UINT32 num_mcast_groups;
  2186. /**
  2187. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  2188. * @details
  2189. * This num_mcast_table_elems configuration parameter tells the target
  2190. * how many peer elements it needs to provide storage for in its
  2191. * multicast group membership table.
  2192. * These multicast group membership table elements are shared by the
  2193. * multicast groups stored within the table.
  2194. */
  2195. A_UINT32 num_mcast_table_elems;
  2196. /**
  2197. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  2198. * @details
  2199. * This configuration parameter specifies whether the target should
  2200. * perform multicast --> unicast conversion on transmit, and if so,
  2201. * what to do if it finds no entries in its multicast group membership
  2202. * table for the multicast IP address in the tx frame.
  2203. * Configuration value:
  2204. * 0 -> Do not perform multicast to unicast conversion.
  2205. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2206. * from the tx frame is found in the multicast group membership
  2207. * table. If the IP multicast address is not found, drop the frame.
  2208. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2209. * from the tx frame is found in the multicast group membership
  2210. * table. If the IP multicast address is not found, transmit the
  2211. * frame as multicast.
  2212. */
  2213. A_UINT32 mcast2ucast_mode;
  2214. /**
  2215. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  2216. * @details
  2217. * This parameter controls how much memory the target will allocate to
  2218. * store a log of tx PPDU meta-information (how large the PPDU was,
  2219. * when it was sent, whether it was successful, etc.)
  2220. */
  2221. A_UINT32 tx_dbg_log_size;
  2222. /**
  2223. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  2224. */
  2225. A_UINT32 num_wds_entries;
  2226. /**
  2227. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  2228. * this limit can be 0 -default, 1 256B
  2229. */
  2230. A_UINT32 dma_burst_size;
  2231. /**
  2232. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  2233. * to account for interface latency to avoid underrun.
  2234. */
  2235. A_UINT32 mac_aggr_delim;
  2236. /**
  2237. * @brief rx_skip_defrag_timeout_dup_detection_check
  2238. * @details
  2239. * determine whether target is responsible for detecting duplicate
  2240. * non-aggregate MPDU and timing out stale fragments.
  2241. *
  2242. * A-MPDU reordering is always performed on the target.
  2243. *
  2244. * 0: target responsible for frag timeout and dup checking
  2245. * 1: host responsible for frag timeout and dup checking
  2246. */
  2247. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  2248. /**
  2249. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  2250. * and Max no of descriptors for each Video link (node).
  2251. */
  2252. A_UINT32 vow_config;
  2253. /**
  2254. * @brief maximum VDEV that could use GTK offload
  2255. */
  2256. A_UINT32 gtk_offload_max_vdev;
  2257. /**
  2258. * @brief num_msdu_desc - Number of msdu descriptors target should use
  2259. */
  2260. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  2261. /**
  2262. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  2263. * @details
  2264. * This parameter controls the max number of Tx fragments per MSDU.
  2265. * This is sent by the target as part of the WMI_SERVICE_READY event
  2266. * and is overriden by the OS shim as required.
  2267. */
  2268. A_UINT32 max_frag_entries;
  2269. /**
  2270. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  2271. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  2272. */
  2273. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  2274. /**
  2275. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  2276. * @details
  2277. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  2278. * peers in a connection tracking table for possible TDLS link creation
  2279. * or deletion. This controls the number of tracked peers per vdev.
  2280. */
  2281. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  2282. A_UINT32 beacon_tx_offload_max_vdev;
  2283. A_UINT32 num_multicast_filter_entries;
  2284. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  2285. /**
  2286. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  2287. * from host.
  2288. */
  2289. A_UINT32 num_keep_alive_pattern;
  2290. /**
  2291. * @brief keep_alive_pattern_size - keep alive pattern size.
  2292. */
  2293. A_UINT32 keep_alive_pattern_size;
  2294. /**
  2295. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  2296. * @details
  2297. * Each TDLS STA can become a sleep STA independently. This parameter
  2298. * mentions how many such sleep STAs can be supported concurrently.
  2299. */
  2300. A_UINT32 max_tdls_concurrent_sleep_sta;
  2301. /**
  2302. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  2303. * @details
  2304. * Each TDLS STA can become a buffer STA independently. This parameter
  2305. * mentions how many such buffer STAs can be supported concurrently.
  2306. */
  2307. A_UINT32 max_tdls_concurrent_buffer_sta;
  2308. /**
  2309. * @brief wmi_send_separate - host configures fw to send the wmi separately
  2310. */
  2311. A_UINT32 wmi_send_separate;
  2312. /**
  2313. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  2314. */
  2315. A_UINT32 num_ocb_vdevs;
  2316. /**
  2317. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  2318. */
  2319. A_UINT32 num_ocb_channels;
  2320. /**
  2321. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  2322. */
  2323. A_UINT32 num_ocb_schedules;
  2324. /**
  2325. * @brief specific configuration from host, such as per platform configuration
  2326. */
  2327. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  2328. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  2329. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  2330. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  2331. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  2332. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  2333. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  2334. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  2335. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  2336. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2337. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2338. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2339. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2340. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2341. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2342. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2343. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2344. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2345. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2346. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2347. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_S 10
  2348. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_M 0x400
  2349. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_S 11
  2350. #define WMI_RSRC_CFG_FLAG_TX_PPDU_STATS_ENABLE_M 0x800
  2351. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_S 12
  2352. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_M 0x1000
  2353. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_S 13
  2354. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_M 0x2000
  2355. A_UINT32 flag1;
  2356. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2357. * @details
  2358. * 1 - Smart antenna is enabled.
  2359. * 0 - Smart antenna is disabled.
  2360. * In future this can contain smart antenna specifc capabilities.
  2361. */
  2362. A_UINT32 smart_ant_cap;
  2363. /**
  2364. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2365. * during init
  2366. */
  2367. A_UINT32 BK_Minfree;
  2368. A_UINT32 BE_Minfree;
  2369. A_UINT32 VI_Minfree;
  2370. A_UINT32 VO_Minfree;
  2371. /**
  2372. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2373. * descriptor memory allocation.
  2374. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2375. * If host wants to transmit data packet at its desired rate,
  2376. * this field must be set.
  2377. * 0 - Don't allocate fragment descriptor for data packet.
  2378. */
  2379. A_UINT32 alloc_frag_desc_for_data_pkt;
  2380. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2381. A_UINT32 num_ns_ext_tuples_cfg;
  2382. /**
  2383. * size (in bytes) of the buffer the FW shall allocate per vdev
  2384. * firmware can dynamic allocate memory (or disable)
  2385. * packet filtering feature.
  2386. * 0 - fw chooses its default value
  2387. * -1 (0XFFFFFFFF) - disable APF
  2388. */
  2389. A_UINT32 bpf_instruction_size;
  2390. /**
  2391. * Maximum no of BSSID based RX filters host would program
  2392. * Value 0 means host doesn't given any limit to FW.
  2393. */
  2394. A_UINT32 max_bssid_rx_filters;
  2395. /**
  2396. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2397. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2398. */
  2399. A_UINT32 use_pdev_id;
  2400. /** Maximum number of scan clients whose DBS scan duty cycle can be configured */
  2401. A_UINT32 max_num_dbs_scan_duty_cycle;
  2402. /** Maximum number of Multi group key to support */
  2403. A_UINT32 max_num_group_keys;
  2404. /**
  2405. * HTT peer map/unmap V2 format support
  2406. * 0 -> host doesn't support HTT peer map/unmap v2 format.
  2407. * 1 -> host supports HTT peer map/unmap v2 format; the target is
  2408. * allowed but not required to use peer map/unmap v2 format.
  2409. */
  2410. A_UINT32 peer_map_unmap_v2_support;
  2411. /** Sched config params for all pdevs
  2412. * These tx scheduling configuration parameters are currently only
  2413. * used for internal testing purposes; therefore the non-default
  2414. * values for this field are not currently documented.
  2415. * For regular use, this field should be set to 0x0.
  2416. */
  2417. A_UINT32 sched_params;
  2418. /* Number of MAC on which AP TWT feature is supported */
  2419. A_UINT32 twt_ap_pdev_count;
  2420. /* Max no of STA with which TWT sessions can be formed by the AP */
  2421. A_UINT32 twt_ap_sta_count;
  2422. /* max_nlo_ssids - dynamically negotiated maximum number of SSIDS for NLO
  2423. * This parameter provides the final specification for the maximum number
  2424. * of SSIDs for the target to support for Network List Offload's scanning
  2425. * for preferred networks.
  2426. * This wmi_resource_config.max_nlo_ssids must be <= the max_nlo_ssids
  2427. * field from the target's WMI_SERVICE_READY_EXT_EVENT message.
  2428. * (If the target didn't provide a max_nlo_ssids field in the
  2429. * WMI_SERVICE_READY_EXT message, or if the SERVICE_READY_EXT msg's
  2430. * max_nlo_ssids value was 0x0, the target doesn't support dynamic
  2431. * negotiation of max NLO SSIDs, and WMI_NLO_MAX_SSIDS (=16) applies.)
  2432. * If this wmi_resource_config.max_nlo_ssids field is absent or 0x0,
  2433. * the host does not support dynamic negotiation of max NLO SSIDs.
  2434. * In such a case, the target will respond as follows:
  2435. * If the target supports at least WMI_NLO_MAX_SSIDS, the target will
  2436. * use the statically-configured WMI_NLO_MAX_SSIDS value.
  2437. * If the target supports less than WMI_NLO_MAX_SSIDS, the target will
  2438. * abort its boot-up, due to receiving an invalid/unsupported
  2439. * configuration specification.
  2440. */
  2441. A_UINT32 max_nlo_ssids;
  2442. /**
  2443. * num_packet_filters: the num that host requests fw to support for
  2444. * pktfilter in total, then firmware can dynamic allocate
  2445. * memory(or disable) pktfilter feature.
  2446. *
  2447. * 0 - fw chooses its default value.
  2448. * -1(0XFFFFFFFF)- disable pktfilter.
  2449. */
  2450. A_UINT32 num_packet_filters;
  2451. /**
  2452. * num_max_sta_vdevs: the max num for the sta vdevs
  2453. * fw will use it to config the memory of offload features that
  2454. * are only for sta vdevs.
  2455. * p2p client should be included.
  2456. *
  2457. * 0 - fw chooses its default value: 'num_vdevs' of this structure.
  2458. */
  2459. A_UINT32 num_max_sta_vdevs;
  2460. } wmi_resource_config;
  2461. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2462. do { \
  2463. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2464. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2465. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2466. } while (0)
  2467. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2468. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2469. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2470. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2471. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2472. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2473. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2474. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2475. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2476. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2477. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2478. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2479. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2480. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2481. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2482. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2483. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2484. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2485. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2486. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2487. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2488. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2489. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2490. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2491. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2492. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2493. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2494. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2495. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2496. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2497. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2498. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2499. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2500. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2501. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2502. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2503. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2504. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2505. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2506. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2507. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2508. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2509. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2510. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_SET(word32, value) \
  2511. WMI_RSRC_CFG_FLAG_SET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT, (value))
  2512. #define WMI_RSRC_CFG_FLAG_TX_MSDU_ID_NEW_PARTITION_SUPPORT_GET(word32) \
  2513. WMI_RSRC_CFG_FLAG_GET((word32), TX_MSDU_ID_NEW_PARTITION_SUPPORT)
  2514. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(word32, value) \
  2515. WMI_RSRC_CFG_FLAG_SET((word32), TCL_CCE_DISABLE, (value))
  2516. #define WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_GET(word32) \
  2517. WMI_RSRC_CFG_FLAG_GET((word32), TCL_CCE_DISABLE)
  2518. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_SET(word32, value) \
  2519. WMI_RSRC_CFG_FLAG_SET((word32), TIM_V2_SUPPORT_ENABLE, (value))
  2520. #define WMI_RSRC_CFG_FLAG_TIM_V2_SUPPORT_ENABLE_GET(word32) \
  2521. WMI_RSRC_CFG_FLAG_GET((word32), TIM_V2_SUPPORT_ENABLE)
  2522. typedef struct {
  2523. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2524. /** The following indicate the WMI versions to be supported by
  2525. * the host driver. Note that the host driver decide to
  2526. * "downgrade" its WMI version support and this may not be the
  2527. * native version of the host driver. */
  2528. wmi_abi_version host_abi_vers;
  2529. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  2530. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  2531. * wmi_resource_config resource_config;
  2532. * wlan_host_memory_chunk host_mem_chunks[];
  2533. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2534. * Note that the hw_mode_config, in spite of its "pdev" name,
  2535. * applies to the entire target rather than for a single pdev
  2536. * within the target.
  2537. * To avoid specifying a HW mode for the target, the host should
  2538. * fill hw_mode_config's fields with 0x0.
  2539. */
  2540. } wmi_init_cmd_fixed_param;
  2541. /**
  2542. * TLV for channel list
  2543. */
  2544. typedef struct {
  2545. /** WMI_CHAN_LIST_TAG */
  2546. A_UINT32 tag;
  2547. /** # of channels to scan */
  2548. A_UINT32 num_chan;
  2549. /** channels in Mhz */
  2550. A_UINT32 channel_list[1];
  2551. } wmi_chan_list;
  2552. /**
  2553. * TLV for bssid list
  2554. */
  2555. typedef struct {
  2556. /** WMI_BSSID_LIST_TAG */
  2557. A_UINT32 tag;
  2558. /** number of bssids */
  2559. A_UINT32 num_bssid;
  2560. /** bssid list */
  2561. wmi_mac_addr bssid_list[1];
  2562. } wmi_bssid_list;
  2563. /**
  2564. * TLV for ie data.
  2565. */
  2566. typedef struct {
  2567. /** WMI_IE_TAG */
  2568. A_UINT32 tag;
  2569. /** number of bytes in ie data */
  2570. A_UINT32 ie_len;
  2571. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  2572. A_UINT32 ie_data[1];
  2573. } wmi_ie_data;
  2574. /**
  2575. * TLV used for length/buffer
  2576. */
  2577. typedef struct {
  2578. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  2579. A_UINT32 buf_len; /** Length of buf */
  2580. /**
  2581. * Following this structure is the TLV byte stream of buf of length buf_len:
  2582. * A_UINT8 buf[];
  2583. *
  2584. */
  2585. } wmi_tlv_buf_len_param;
  2586. typedef struct {
  2587. /** Len of the SSID */
  2588. A_UINT32 ssid_len;
  2589. /** SSID */
  2590. A_UINT32 ssid[8];
  2591. } wmi_ssid;
  2592. typedef struct {
  2593. /** WMI_SSID_LIST_TAG */
  2594. A_UINT32 tag;
  2595. A_UINT32 num_ssids;
  2596. wmi_ssid ssids[1];
  2597. } wmi_ssid_list;
  2598. typedef struct {
  2599. /** WMI_SCAN_START_OFFSET_TAG */
  2600. A_UINT32 tag;
  2601. /** Number of start TSF offsets */
  2602. A_UINT32 num_offset;
  2603. /** Array of start TSF offsets provided in milliseconds */
  2604. A_UINT32 start_tsf_offset[1];
  2605. } wmi_scan_start_offset;
  2606. /**
  2607. * WLAN_SCAN_CHAN_MODE Macros defined for A_UINT8 phymode_list[]
  2608. */
  2609. /** enum WLAN_PHY_MODE _mode starts from 0, but the WMI message requires
  2610. * 0 to be used to represent unspecified / don't care / default values.
  2611. * Therefore, WMI phy mode = WLAN phy mode + 1.
  2612. */
  2613. /** If the received WMI phy mode is 0 then it is ignored by the FW,
  2614. * and the FW will use any mode as long as the frequency matches.
  2615. */
  2616. /** The number of phy_mode's (BW+mode) passed in the TLV phymode_list[] must
  2617. * be equal to num_chan. (Unless the host does not specify phymode_list values
  2618. * at all, in which case the number of phymode_list elements will be zero.)
  2619. * The indexing of the phymode_list[] array corresponds to same index of
  2620. * the chan_list[] array.
  2621. */
  2622. #define WMI_SCAN_CHAN_SET_MODE(_c) ((_c) + 1)
  2623. #define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
  2624. #define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
  2625. /* prefix used by scan requestor ids on the host */
  2626. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2627. /* prefix used by scan request ids generated on the host */
  2628. /* host cycles through the lower 12 bits to generate ids */
  2629. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2630. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2631. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2632. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2633. /* NOTE: This constant cannot be changed without breaking WMI compatibility */
  2634. #define WMI_IE_BITMAP_SIZE 8
  2635. typedef struct {
  2636. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2637. /** Scan ID (lower 16 bits) MSB 4 bits is used to identify scan client based on enum WMI_SCAN_CLIENT_ID */
  2638. A_UINT32 scan_id;
  2639. /** Scan requestor ID (lower 16 bits) is used by scan client to classify the scan source, reason, ...etc */
  2640. A_UINT32 scan_req_id;
  2641. /** VDEV id(interface) that is requesting scan */
  2642. A_UINT32 vdev_id;
  2643. /** Scan Priority, input to scan scheduler */
  2644. A_UINT32 scan_priority;
  2645. /** Scan events subscription */
  2646. A_UINT32 notify_scan_events;
  2647. /** dwell time in msec on active channels */
  2648. A_UINT32 dwell_time_active;
  2649. /** dwell time in msec on passive channels */
  2650. A_UINT32 dwell_time_passive;
  2651. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2652. A_UINT32 min_rest_time;
  2653. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2654. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2655. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2656. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2657. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2658. * irrespective of activity. activity is determined by the idle_time parameter.
  2659. */
  2660. A_UINT32 max_rest_time;
  2661. /** time before sending next set of probe requests.
  2662. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2663. * The number of probe requests specified depends on the ssid_list and bssid_list
  2664. */
  2665. A_UINT32 repeat_probe_time;
  2666. /** time in msec between 2 consequetive probe requests with in a set. */
  2667. A_UINT32 probe_spacing_time;
  2668. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2669. A_UINT32 idle_time;
  2670. /** maximum time in msec allowed for scan */
  2671. A_UINT32 max_scan_time;
  2672. /** delay in msec before sending first probe request after switching to a channel */
  2673. A_UINT32 probe_delay;
  2674. /** Scan control flags */
  2675. A_UINT32 scan_ctrl_flags;
  2676. /** Burst duration time in msec*/
  2677. A_UINT32 burst_duration;
  2678. /** # if channels to scan. In the TLV channel_list[] */
  2679. A_UINT32 num_chan;
  2680. /** number of bssids. In the TLV bssid_list[] */
  2681. A_UINT32 num_bssid;
  2682. /** number of ssid. In the TLV ssid_list[] */
  2683. A_UINT32 num_ssids;
  2684. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2685. A_UINT32 ie_len;
  2686. /** Max number of probes to be sent */
  2687. A_UINT32 n_probes;
  2688. /** MAC Address to use in Probe Req as SA **/
  2689. wmi_mac_addr mac_addr;
  2690. /** Mask on which MAC has to be randomized **/
  2691. wmi_mac_addr mac_mask;
  2692. /** ie bitmap to use in probe req **/
  2693. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2694. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2695. A_UINT32 num_vendor_oui;
  2696. /** Scan control flags extended **/
  2697. A_UINT32 scan_ctrl_flags_ext;
  2698. /**
  2699. * TLV (tag length value) parameters follow the scan_cmd
  2700. * structure. The TLV's are:
  2701. * A_UINT32 channel_list[num_chan];
  2702. * wmi_ssid ssid_list[num_ssids];
  2703. * wmi_mac_addr bssid_list[num_bssid];
  2704. * A_UINT8 ie_data[ie_len];
  2705. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  2706. * A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
  2707. */
  2708. } wmi_start_scan_cmd_fixed_param;
  2709. /**
  2710. * scan control flags.
  2711. */
  2712. /** passively scan all channels including active channels */
  2713. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2714. /** add wild card ssid probe request even though ssid_list is specified. */
  2715. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2716. /** add cck rates to rates/xrate ie for the generated probe request */
  2717. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2718. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2719. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2720. /** To enable indication of Chan load and Noise floor to host */
  2721. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2722. /** Filter Probe request frames */
  2723. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2724. /**When set, not to scan DFS channels*/
  2725. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2726. /**When set, certain errors are ignored and scan continues.
  2727. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  2728. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2729. /** Enable promiscous mode for CCXv4 */
  2730. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  2731. /** allow to send probe req on DFS channel */
  2732. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  2733. /** add TPC content in probe req frame */
  2734. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  2735. /** add DS content in probe req frame */
  2736. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  2737. /** use random mac address for TA for probe request frame and add
  2738. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  2739. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  2740. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  2741. /** allow mgmt transmission during off channel scan */
  2742. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  2743. /** allow data transmission during off channel scan */
  2744. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  2745. /** allow capture ppdu with phy errrors */
  2746. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  2747. /** always do passive scan on passive channels */
  2748. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  2749. /** set HALF (10MHz) rate support */
  2750. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  2751. /** set Quarter (5MHz) rate support */
  2752. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  2753. #define WMI_SCAN_RANDOM_SEQ_NO_IN_PROBE_REQ 0x80000
  2754. #define WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ 0x100000
  2755. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  2756. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  2757. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  2758. typedef enum {
  2759. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  2760. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  2761. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  2762. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  2763. WMI_SCAN_DWELL_MODE_STATIC = 4,
  2764. } WMI_SCAN_DWELL_MODE;
  2765. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  2766. do { \
  2767. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  2768. WMI_SCAN_DWELL_MODE_MASK); \
  2769. } while (0)
  2770. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  2771. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  2772. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2773. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2774. /*
  2775. * Masks identifying types/ID of scans
  2776. * Scan_Stop macros should be the same value as below defined in UMAC
  2777. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  2778. * #define IEEE80211_VAP_SCAN 0x01000000
  2779. * #define IEEE80211_ALL_SCANS 0x04000000
  2780. */
  2781. #define WMI_SCAN_STOP_ONE 0x00000000
  2782. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  2783. #define WMI_SCAN_STOP_ALL 0x04000000
  2784. /** extended Scan ctrl flags **/
  2785. #define WMI_SCAN_FLAG_EXT_DBS_SCAN_POLICY_MASK 0x00000003 /* Bit 0-1 reserved for DBS scan selection policy.*/
  2786. #define WMI_SCAN_DBS_POLICY_DEFAULT 0x0 /** Select duty cycle if configured, else fall back to whatever
  2787. policy scan manager computes */
  2788. #define WMI_SCAN_DBS_POLICY_FORCE_NONDBS 0x1 /** Force to select Non-DBS scan */
  2789. #define WMI_SCAN_DBS_POLICY_IGNORE_DUTY 0x2 /** Ignore duty cycle even if configured and fall back to whatever
  2790. policy scan manager computes*/
  2791. #define WMI_SCAN_DBS_POLICY_RESERVED 0x3
  2792. #define WMI_SCAN_DBS_POLICY_MAX 0x3
  2793. /** Enable Reception of Public Action frame with this flag
  2794. * (inside scan_ctrl_flags_ext field of wmi_start_scan_cmd_fixed_param)
  2795. */
  2796. #define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME 0x4
  2797. typedef struct {
  2798. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  2799. /** requestor requesting cancel */
  2800. A_UINT32 requestor;
  2801. /** Scan ID */
  2802. A_UINT32 scan_id;
  2803. /**
  2804. * Req Type
  2805. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  2806. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id (on a specific pdev in DBDC)
  2807. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  2808. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine (on a specific pdev in DBDC)
  2809. */
  2810. A_UINT32 req_type;
  2811. /**
  2812. * vDev ID
  2813. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  2814. */
  2815. A_UINT32 vdev_id;
  2816. /** pdev_id for identifying the MAC
  2817. * See macros starting with WMI_PDEV_ID_ for values.
  2818. * In non-DBDC case host should set it to 0
  2819. */
  2820. A_UINT32 pdev_id;
  2821. } wmi_stop_scan_cmd_fixed_param;
  2822. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  2823. #define APPEND_TO_EXISTING_CHAN_LIST 1
  2824. typedef struct {
  2825. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  2826. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  2827. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  2828. 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. */
  2829. /** Followed by the variable length TLV chan_info:
  2830. * wmi_channel chan_info[] */
  2831. } wmi_scan_chan_list_cmd_fixed_param;
  2832. /*
  2833. * Priority numbers must be sequential, starting with 0.
  2834. */
  2835. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  2836. typedef enum {
  2837. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2838. WMI_SCAN_PRIORITY_LOW,
  2839. WMI_SCAN_PRIORITY_MEDIUM,
  2840. WMI_SCAN_PRIORITY_HIGH,
  2841. WMI_SCAN_PRIORITY_VERY_HIGH,
  2842. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2843. } wmi_scan_priority;
  2844. /* Five Levels for Requested Priority */
  2845. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  2846. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  2847. /**
  2848. * 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
  2849. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  2850. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  2851. */
  2852. typedef struct {
  2853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  2854. /**
  2855. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  2856. * 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
  2857. */
  2858. A_UINT32 vdev_type;
  2859. /**
  2860. * number of rows in mapping_table for a specific vdev
  2861. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  2862. */
  2863. A_UINT32 number_rows;
  2864. /**
  2865. * pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values.
  2866. * In non-DBDC case host should set it to 0
  2867. */
  2868. A_UINT32 pdev_id;
  2869. /** mapping_table for a specific vdev follows this TLV
  2870. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  2871. } wmi_scan_sch_priority_table_cmd_fixed_param;
  2872. /** update flags */
  2873. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  2874. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  2875. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  2876. typedef struct {
  2877. A_UINT32 tlv_header;
  2878. /** requestor requesting update scan request */
  2879. A_UINT32 requestor;
  2880. /** Scan ID of the scan request that need to be update */
  2881. A_UINT32 scan_id;
  2882. /** update flags, indicating which of the following fields are valid and need to be updated*/
  2883. A_UINT32 scan_update_flags;
  2884. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  2885. A_UINT32 scan_priority;
  2886. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  2887. A_UINT32 min_rest_time;
  2888. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  2889. A_UINT32 max_rest_time;
  2890. /** 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 */
  2891. A_UINT32 pdev_id;
  2892. } wmi_scan_update_request_cmd_fixed_param;
  2893. #define WMI_SCAN_PROBE_OUI_SPOOFED_MAC_IN_PROBE_REQ 0x1
  2894. #define WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ 0x2
  2895. #define WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ 0x4
  2896. typedef struct _wmi_vendor_oui {
  2897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vendor_oui */
  2898. A_UINT32 oui_type_subtype; /** Vendor OUI type and subtype, lower 3 bytes is type and highest byte is subtype**/
  2899. }wmi_vendor_oui;
  2900. typedef struct {
  2901. A_UINT32 tlv_header;
  2902. /** oui to be used in probe request frame when random mac addresss is
  2903. * requested part of scan parameters. this is applied to both FW internal scans and
  2904. * host initated scans. host can request for random mac address with
  2905. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  2906. A_UINT32 prob_req_oui;
  2907. A_UINT32 vdev_id;
  2908. /** Control Flags **/
  2909. A_UINT32 flags;
  2910. /** ie bitmap to use in probe req **/
  2911. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  2912. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  2913. A_UINT32 num_vendor_oui;
  2914. /** 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 */
  2915. A_UINT32 pdev_id;
  2916. /* Following this tlv, there comes an array of structure of type wmi_vendor_oui
  2917. wmi_vendor_oui vendor_oui[];*/
  2918. } wmi_scan_prob_req_oui_cmd_fixed_param;
  2919. enum wmi_scan_event_type {
  2920. WMI_SCAN_EVENT_STARTED = 0x1,
  2921. WMI_SCAN_EVENT_COMPLETED = 0x2,
  2922. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  2923. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  2924. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  2925. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  2926. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  2927. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  2928. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  2929. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  2930. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  2931. WMI_SCAN_EVENT_MAX = 0x8000
  2932. };
  2933. enum wmi_scan_completion_reason {
  2934. /** scan related events */
  2935. WMI_SCAN_REASON_NONE = 0xFF,
  2936. WMI_SCAN_REASON_COMPLETED = 0,
  2937. WMI_SCAN_REASON_CANCELLED = 1,
  2938. WMI_SCAN_REASON_PREEMPTED = 2,
  2939. WMI_SCAN_REASON_TIMEDOUT = 3,
  2940. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  2941. WMI_SCAN_REASON_SUSPENDED = 5,
  2942. WMI_SCAN_REASON_MAX,
  2943. };
  2944. typedef struct {
  2945. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  2946. /** scan event (wmi_scan_event_type) */
  2947. A_UINT32 event;
  2948. /** status of the scan completion event */
  2949. A_UINT32 reason;
  2950. /** channel freq , only valid for FOREIGN channel event*/
  2951. A_UINT32 channel_freq;
  2952. /**id of the requestor whose scan is in progress */
  2953. A_UINT32 requestor;
  2954. /**id of the scan that is in progress */
  2955. A_UINT32 scan_id;
  2956. /**id of VDEV that requested the scan */
  2957. A_UINT32 vdev_id;
  2958. /** TSF Timestamp when the scan event (wmi_scan_event_type) is completed
  2959. * In case of AP it is TSF of the AP vdev
  2960. * In case of STA connected state this is the TSF of the AP
  2961. * In case of STA not connected it will be the free running HW timer
  2962. */
  2963. A_UINT32 tsf_timestamp;
  2964. } wmi_scan_event_fixed_param;
  2965. /* WMI Diag event */
  2966. typedef struct {
  2967. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  2968. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  2969. A_UINT32 count; /* Number of diag frames added to current event */
  2970. A_UINT32 dropped;
  2971. /* followed by WMITLV_TAG_ARRAY_BYTE */
  2972. } wmi_diag_event_fixed_param;
  2973. #define WMI_11K_OFFLOAD_BITMAP_NEIGHBOR_REPORT_REQ 0x1
  2974. typedef struct {
  2975. A_UINT32 time_offset; /* positive offset in secs from the time 11k offload command has been received, 0xFFFFFFFF if offset is not valid */
  2976. 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 */
  2977. A_UINT32 bmiss_count_trigger; /* value 1 is to send neighbor report at 1st BMISS, 0xFFFFFFFF if input is not valid */
  2978. A_UINT32 per_threshold_offset; /* percentage offset from the current per_threshold, 0xFFFFFFFF if input is not valid */
  2979. 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 */
  2980. 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
  2981. * neighbor report requests that will be sent by FW after every roam */
  2982. wmi_ssid ssid; /* ssid of current connected AP FW might choose to use this SSID in the neighbor report req frame if it is
  2983. * interested in candidate of the same SSID */
  2984. } wmi_neighbor_report_offload;
  2985. typedef struct {
  2986. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_11k_report_fixed_param */
  2987. A_UINT32 vdev_id;
  2988. A_UINT32 offload_11k; /* bitmask to indicate to FW what all 11k features are offloaded */
  2989. } wmi_11k_offload_report_fixed_param;
  2990. typedef struct {
  2991. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_neighbor_report_offload_tlv_param */
  2992. wmi_neighbor_report_offload neighbor_rep_ofld_params;
  2993. } wmi_neighbor_report_11k_offload_tlv_param;
  2994. #define WMI_INVOKE_NEIGHBOR_REPORT_FLAGS_SEND_RESP_TO_HOST 0x1
  2995. typedef struct {
  2996. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_invoke_neighbor_report_fixed_param */
  2997. A_UINT32 vdev_id;
  2998. A_UINT32 flags;
  2999. wmi_ssid ssid; /* if ssid.len == 0, firmware doesn't include ssid sub-element.
  3000. * In that case AP gives all the candidates in ESS without SSID filter
  3001. * If host wants to insert ssid subelement in the neighbor report request frame, then it can specify the ssid here */
  3002. } wmi_11k_offload_invoke_neighbor_report_fixed_param;
  3003. #define WMI_MAX_PMKID_LEN 16
  3004. #define WMI_MAX_PMK_LEN 64
  3005. #define WMI_PMK_CACHE_CAT_FLAG_BSSID 0x1
  3006. #define WMI_PMK_CACHE_CAT_FLAG_SSID_CACHE_ID 0x2
  3007. #define WMI_PMK_CACHE_ACTION_FLAG_ADD_ENTRY 0x1
  3008. #define WMI_PMK_CACHE_ACTION_FLAG_DEL_ENTRY 0x2
  3009. typedef struct {
  3010. A_UINT32 tlv_header;
  3011. A_UINT32 pmk_len;
  3012. 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,
  3013. in spite of the automatic byte-swap applied to WMI messages during download*/
  3014. A_UINT32 pmkid_len;
  3015. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3016. wmi_mac_addr bssid;
  3017. wmi_ssid ssid;
  3018. A_UINT32 cache_id;
  3019. A_UINT32 cat_flag; // whether (bssid) or (ssid,cache_id) is valid
  3020. A_UINT32 action_flag; // add/delete the entry
  3021. } wmi_pmk_cache;
  3022. #define WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL 0x1
  3023. typedef struct {
  3024. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pmk_cache_cmd_fixed_param */
  3025. A_UINT32 op_flag; //option to flush all the cache at once
  3026. A_UINT32 vdev_id;
  3027. A_UINT32 num_cache;
  3028. /**
  3029. * TLV (tag length value) parameters follow the update_pmk_cache cmd
  3030. * structure. The TLV's are:
  3031. * wmi_pmk_cache cache_list[];
  3032. */
  3033. } wmi_pdev_update_pmk_cache_cmd_fixed_param;
  3034. #define WMI_FILS_MAX_USERNAME_LEN 16
  3035. #define WMI_FILS_MAX_REALM_LEN 256
  3036. #define WMI_FILS_MAX_RRK_LEN 64
  3037. #define WMI_FILS_MAX_RIK_LEN 64
  3038. /* for big-endian hosts, manual endian conversion will be needed to keep the array values in their original order,
  3039. in spite of the automatic byte-swap applied to WMI messages during download*/
  3040. typedef struct {
  3041. A_UINT8 username[WMI_FILS_MAX_USERNAME_LEN];
  3042. A_UINT32 username_length;
  3043. A_UINT32 next_erp_seq_num;
  3044. A_UINT8 rRk[WMI_FILS_MAX_RRK_LEN];
  3045. A_UINT32 rRk_length;
  3046. A_UINT8 rIk[WMI_FILS_MAX_RIK_LEN];
  3047. A_UINT32 rIk_length;
  3048. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3049. A_UINT32 realm_len;
  3050. } wmi_erp_info;
  3051. enum wmi_fils_hlp_pkt_type {
  3052. WMI_FILS_HLP_PKT_TYPE_DHCP_DISCOVER = 1,
  3053. };
  3054. typedef struct {
  3055. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_offload_tlv_param */
  3056. A_UINT32 flags;
  3057. wmi_erp_info vdev_erp_info;
  3058. } wmi_roam_fils_offload_tlv_param;
  3059. typedef struct {
  3060. A_UINT32 tlv_header; /** tag WMITLV_TAG_STRUC_wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param**/
  3061. A_UINT32 flags;
  3062. A_UINT32 vdev_id;
  3063. A_UINT32 size;
  3064. A_UINT32 pkt_type; // filled using enum wmi_fils_hlp_pkt_type
  3065. // A_UINT8 fils_hlp_pkt[];
  3066. } wmi_pdev_update_fils_hlp_pkt_cmd_fixed_param;
  3067. #define WMI_MAX_KEK_LEN 64
  3068. #define GTK_OFFLOAD_KEK_EXTENDED_BYTES WMI_MAX_KEK_LEN /*KEK len has been increased to 64 to support FILS security.
  3069. To not break backward compatibility, new GTK_OFFLOAD_KEK_EXTENDED_BYTES has been defined without modifying old GTK_OFFLOAD_KEK_BYTES */
  3070. typedef struct {
  3071. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_fils_synch_tlv_param */
  3072. A_UINT32 update_erp_next_seq_num;// Boolean denoting whether next erp_seq_num changed or not.
  3073. A_UINT32 next_erp_seq_num;
  3074. A_UINT32 kek_len;
  3075. A_UINT8 kek[WMI_MAX_KEK_LEN];
  3076. A_UINT32 pmk_len;
  3077. A_UINT8 pmk[WMI_MAX_PMK_LEN];
  3078. A_UINT8 pmkid[WMI_MAX_PMKID_LEN];
  3079. A_UINT8 realm[WMI_FILS_MAX_REALM_LEN];
  3080. A_UINT32 realm_len;
  3081. } wmi_roam_fils_synch_tlv_param;
  3082. /*
  3083. * If FW has multiple active channels due to MCC(multi channel concurrency),
  3084. * then these stats are combined stats for all the active channels.
  3085. */
  3086. typedef struct {
  3087. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  3088. /** ack count, it is an incremental number, not accumulated number */
  3089. A_UINT32 ackRcvBad;
  3090. /** bad rts count, it is an incremental number, not accumulated number */
  3091. A_UINT32 rtsBad;
  3092. /** good rts, it is an incremental number, not accumulated number */
  3093. A_UINT32 rtsGood;
  3094. /** fcs count, it is an incremental number, not accumulated number */
  3095. A_UINT32 fcsBad;
  3096. /** beacon count, it is an incremental number, not accumulated number */
  3097. A_UINT32 noBeacons;
  3098. } wmi_update_whal_mib_stats_event_fixed_param;
  3099. /*
  3100. * This defines how much headroom is kept in the
  3101. * receive frame between the descriptor and the
  3102. * payload, in order for the WMI PHY error and
  3103. * management handler to insert header contents.
  3104. *
  3105. * This is in bytes.
  3106. */
  3107. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  3108. /** This event will be used for sending scan results
  3109. * as well as rx mgmt frames to the host. The rx buffer
  3110. * will be sent as part of this WMI event. It would be a
  3111. * good idea to pass all the fields in the RX status
  3112. * descriptor up to the host.
  3113. */
  3114. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  3115. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  3116. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  3117. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  3118. /** flag indicating that the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  3119. #define WMI_MGMT_RX_HDR_ENLO 0x02
  3120. #define MAX_ANTENNA_EIGHT 8
  3121. typedef struct {
  3122. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  3123. /** channel on which this frame is received. */
  3124. A_UINT32 channel;
  3125. /** snr information used to cal rssi */
  3126. A_UINT32 snr;
  3127. /** Rate kbps */
  3128. A_UINT32 rate;
  3129. /** rx phy mode WLAN_PHY_MODE */
  3130. A_UINT32 phy_mode;
  3131. /** length of the frame */
  3132. A_UINT32 buf_len;
  3133. /** rx status */
  3134. A_UINT32 status;
  3135. /** RSSI of PRI 20MHz for each chain. */
  3136. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  3137. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  3138. A_UINT32 flags;
  3139. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  3140. A_INT32 rssi;
  3141. /** delta between local TSF(TSF timestamp when frame was RXd)
  3142. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  3143. * beacon,proberesp for e.g). If remote TSF is not available,
  3144. * delta set to 0.
  3145. * Although tsf_delta is stored as A_UINT32, it can be negative,
  3146. * and thus would need to be sign-extended if added to a value
  3147. * larger than 32 bits.
  3148. */
  3149. A_UINT32 tsf_delta;
  3150. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  3151. * TSF timestamp in the RX MAC descriptor provided by HW.
  3152. */
  3153. A_UINT32 rx_tsf_l32;
  3154. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  3155. * after the packet is received.
  3156. */
  3157. A_UINT32 rx_tsf_u32;
  3158. /** pdev_id for identifying the MAC the rx mgmt frame was received by
  3159. * See macros starting with WMI_PDEV_ID_ for values.
  3160. */
  3161. A_UINT32 pdev_id;
  3162. /* This TLV is followed by array of bytes:
  3163. * A_UINT8 bufp[]; <-- management frame buffer
  3164. */
  3165. /* This TLV is optionally followed by array of struct:
  3166. * wmi_rssi_ctl_ext rssi_ctl_ext;
  3167. */
  3168. } wmi_mgmt_rx_hdr;
  3169. /*
  3170. * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets,
  3171. * this new ext_hdr can be used for extending the header and will be only applicable for new targets.
  3172. */
  3173. typedef struct
  3174. {
  3175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_rssi_ctl_ext */
  3176. /** RSSI of PRI 20MHz for each chain, in dB w.r.t. noise floor */
  3177. A_UINT32 rssi_ctl_ext[MAX_ANTENNA_EIGHT - ATH_MAX_ANTENNA];
  3178. } wmi_rssi_ctl_ext;
  3179. typedef struct {
  3180. /** TSF timestamp */
  3181. A_UINT32 tsf_timestamp;
  3182. /**
  3183. * Current freq1, freq2
  3184. *
  3185. * [7:0]: freq1[lo]
  3186. * [15:8] : freq1[hi]
  3187. * [23:16]: freq2[lo]
  3188. * [31:24]: freq2[hi]
  3189. */
  3190. A_UINT32 freq_info_1;
  3191. /**
  3192. * Combined RSSI over all chains and channel width for this PHY error
  3193. *
  3194. * [7:0]: RSSI combined
  3195. * [15:8]: Channel width (MHz)
  3196. * [23:16]: PHY error code
  3197. * [24:16]: reserved (future use)
  3198. */
  3199. A_UINT32 freq_info_2;
  3200. /**
  3201. * RSSI on chain 0 through 3
  3202. *
  3203. * This is formatted the same as the PPDU_START RX descriptor
  3204. * field:
  3205. *
  3206. * [7:0]: pri20
  3207. * [15:8]: sec20
  3208. * [23:16]: sec40
  3209. * [31:24]: sec80
  3210. */
  3211. A_UINT32 rssi_chain0;
  3212. A_UINT32 rssi_chain1;
  3213. A_UINT32 rssi_chain2;
  3214. A_UINT32 rssi_chain3;
  3215. /**
  3216. * Last calibrated NF value for chain 0 through 3
  3217. *
  3218. * nf_list_1:
  3219. *
  3220. * + [15:0] - chain 0
  3221. * + [31:16] - chain 1
  3222. *
  3223. * nf_list_2:
  3224. *
  3225. * + [15:0] - chain 2
  3226. * + [31:16] - chain 3
  3227. */
  3228. A_UINT32 nf_list_1;
  3229. A_UINT32 nf_list_2;
  3230. /** Length of the frame */
  3231. A_UINT32 buf_len;
  3232. } wmi_single_phyerr_rx_hdr;
  3233. typedef struct {
  3234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_single_phyerr_ext_rx_hdr */
  3235. /**
  3236. * RSSI on chain 4 through 7 in dB w.r.t noise floor.
  3237. *
  3238. * This is formatted the same as the PPDU_START RX descriptor
  3239. * field:
  3240. *
  3241. * [7:0]: pri20
  3242. * [15:8]: sec20
  3243. * [23:16]: sec40
  3244. * [31:24]: sec80
  3245. */
  3246. A_UINT32 rssi_chain4;
  3247. A_UINT32 rssi_chain5;
  3248. A_UINT32 rssi_chain6;
  3249. A_UINT32 rssi_chain7;
  3250. /**
  3251. * Last calibrated NF value for chain 4 through 7 in dbm
  3252. *
  3253. * nf_list_3:
  3254. * + [15:0] - chain 4
  3255. * + [31:16] - chain 5
  3256. *
  3257. * nf_list_4:
  3258. * + [15:0] - chain 6
  3259. * + [31:16] - chain 7
  3260. *
  3261. * Each chain's noise floor is stored as a sign-extended (negative)
  3262. * value in dBm units.
  3263. */
  3264. A_UINT32 nf_list_3;
  3265. A_UINT32 nf_list_4;
  3266. } wmi_single_phyerr_ext_rx_hdr;
  3267. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  3268. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  3269. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  3270. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  3271. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  3272. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  3273. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  3274. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  3275. /*
  3276. * Please keep in mind that these _SET macros break macro side effect
  3277. * assumptions; don't be clever with them.
  3278. */
  3279. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  3280. (WMI_F_MS((hdr)->freq_info_1, \
  3281. WMI_UNIFIED_FREQINFO_##f##_LO) \
  3282. | (WMI_F_MS((hdr)->freq_info_1, \
  3283. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  3284. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  3285. do { \
  3286. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  3287. WMI_UNIFIED_FREQINFO_##f##_LO); \
  3288. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  3289. WMI_UNIFIED_FREQINFO_##f##_HI); \
  3290. } while (0)
  3291. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  3292. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  3293. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  3294. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  3295. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  3296. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  3297. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  3298. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  3299. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  3300. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  3301. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3302. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  3303. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  3304. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  3305. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  3306. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3307. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  3308. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  3309. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  3310. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  3311. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  3312. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  3313. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  3314. #define WMI_UNIFIED_CHAIN_0_S 0
  3315. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  3316. #define WMI_UNIFIED_CHAIN_1_S 16
  3317. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  3318. #define WMI_UNIFIED_CHAIN_2_S 0
  3319. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  3320. #define WMI_UNIFIED_CHAIN_3_S 16
  3321. #define WMI_UNIFIED_CHAIN_4 0x0000ffff
  3322. #define WMI_UNIFIED_CHAIN_4_S 0
  3323. #define WMI_UNIFIED_CHAIN_5 0xffff0000
  3324. #define WMI_UNIFIED_CHAIN_5_S 16
  3325. #define WMI_UNIFIED_CHAIN_6 0x0000ffff
  3326. #define WMI_UNIFIED_CHAIN_6_S 0
  3327. #define WMI_UNIFIED_CHAIN_7 0xffff0000
  3328. #define WMI_UNIFIED_CHAIN_7_S 16
  3329. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  3330. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  3331. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  3332. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  3333. #define WMI_UNIFIED_CHAIN_4_FIELD nf_list_3
  3334. #define WMI_UNIFIED_CHAIN_5_FIELD nf_list_3
  3335. #define WMI_UNIFIED_CHAIN_6_FIELD nf_list_4
  3336. #define WMI_UNIFIED_CHAIN_7_FIELD nf_list_4
  3337. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  3338. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  3339. WMI_UNIFIED_CHAIN_##c)))
  3340. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  3341. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  3342. WMI_UNIFIED_CHAIN_##c);
  3343. /*
  3344. * For now, this matches what the underlying hardware is doing.
  3345. * Update ar6000ProcRxDesc() to use these macros when populating
  3346. * the rx descriptor and then we can just copy the field over
  3347. * to the WMI PHY notification without worrying about breaking
  3348. * things.
  3349. */
  3350. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  3351. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  3352. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  3353. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  3354. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  3355. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  3356. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  3357. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  3358. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  3359. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  3360. WMI_UNIFIED_RSSI_CHAN_##ch);
  3361. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  3362. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  3363. WMI_UNIFIED_RSSI_CHAN_##ch)))
  3364. typedef struct {
  3365. /** Phy error event header */
  3366. wmi_single_phyerr_rx_hdr hdr;
  3367. /** frame buffer */
  3368. A_UINT8 bufp[1];
  3369. } wmi_single_phyerr_rx_event;
  3370. /* PHY ERROR MASK 0 */
  3371. /* bits 1:0 defined but not published */
  3372. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  3373. /* bits 23:3 defined but not published */
  3374. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  3375. /* bits 25:24 defined but not published */
  3376. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  3377. /* bits 31:27 defined but not published */
  3378. /* PHY ERROR MASK 1 */
  3379. /* bits 13:0 defined but not published */
  3380. /* bits 31:14 reserved */
  3381. /* PHY ERROR MASK 2 */
  3382. /* bits 31:0 reserved */
  3383. typedef struct {
  3384. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  3385. /** Phy error phy error count */
  3386. A_UINT32 num_phyerr_events;
  3387. A_UINT32 tsf_l32;
  3388. A_UINT32 tsf_u32;
  3389. A_UINT32 buf_len;
  3390. union {
  3391. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  3392. /** pdev_id for identifying the MAC
  3393. * See macros starting with WMI_PDEV_ID_ for values.
  3394. */
  3395. A_UINT32 pdev_id;
  3396. };
  3397. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  3398. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  3399. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  3400. /* This TLV is followed by array of bytes:
  3401. * frame buffer - contains multiple payloads in the order:
  3402. * header - payload, header - payload...
  3403. * (The header is of type: wmi_single_phyerr_rx_hdr)
  3404. * A_UINT8 bufp[];
  3405. * The extension hdr will repeat num_phyerr_events of times
  3406. * and will have 1:1 mapping with above header. i.e the 1st
  3407. * ext_rx_hdr will belong to 1st phyerr_rx_hdr and so on.
  3408. * wmi_single_phyerr_ext_rx_hdr single_phyerr_ext;
  3409. */
  3410. } wmi_comb_phyerr_rx_hdr;
  3411. /* WMI MGMT TX */
  3412. typedef struct {
  3413. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  3414. /** unique id identifying the VDEV, generated by the caller */
  3415. A_UINT32 vdev_id;
  3416. /** peer MAC address */
  3417. wmi_mac_addr peer_macaddr;
  3418. /** xmit rate */
  3419. A_UINT32 tx_rate;
  3420. /** xmit power */
  3421. A_UINT32 tx_power;
  3422. /** Buffer length in bytes */
  3423. A_UINT32 buf_len;
  3424. /* This TLV is followed by array of bytes:
  3425. * A_UINT8 bufp[]; <-- management frame buffer
  3426. */
  3427. } wmi_mgmt_tx_hdr;
  3428. #define WMI_TX_SEND_PARAM_PWR_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 0, 8)
  3429. #define WMI_TX_SEND_PARAM_PWR_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 0, 8, value)
  3430. #define WMI_TX_SEND_PARAM_MCS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 8, 12)
  3431. #define WMI_TX_SEND_PARAM_MCS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 8, 12, value)
  3432. #define WMI_TX_SEND_PARAM_NSS_MASK_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 20, 8)
  3433. #define WMI_TX_SEND_PARAM_NSS_MASK_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 20, 8, value)
  3434. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_GET(tx_param_dword0) WMI_GET_BITS(tx_param_dword0, 28, 4)
  3435. #define WMI_TX_SEND_PARAM_RETRY_LIMIT_SET(tx_param_dword0, value) WMI_SET_BITS(tx_param_dword0, 28, 4, value)
  3436. #define WMI_TX_SEND_PARAM_CHAIN_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 0, 8)
  3437. #define WMI_TX_SEND_PARAM_CHAIN_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 0, 8, value)
  3438. #define WMI_TX_SEND_PARAM_BW_MASK_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 8, 7)
  3439. #define WMI_TX_SEND_PARAM_BW_MASK_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 8, 7, value)
  3440. #define WMI_TX_SEND_PARAM_PREAMBLE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 15, 5)
  3441. #define WMI_TX_SEND_PARAM_PREAMBLE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 15, 5, value)
  3442. #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1)
  3443. #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value)
  3444. typedef struct {
  3445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */
  3446. union {
  3447. struct {
  3448. /* DWORD 0: tx power, tx rate, retry_limit */
  3449. A_UINT32
  3450. /* pwr -
  3451. * Specify what power the tx frame needs to be transmitted at.
  3452. * The power a signed (two's complement) value is in units of 0.5 dBm.
  3453. * The value needs to be appropriately sign-extended when extracting
  3454. * the value from the message and storing it in a variable that is
  3455. * larger than A_INT8. (fw automatically handles this sign-extension.)
  3456. * If the transmission uses multiple tx chains, this power spec is
  3457. * the total transmit power, assuming incoherent combination of
  3458. * per-chain power to produce the total power.
  3459. */
  3460. pwr: 8,
  3461. /* mcs_mask -
  3462. * Specify the allowable values for MCS index (modulation and coding)
  3463. * to use for transmitting the frame.
  3464. *
  3465. * For HT / VHT preamble types, this mask directly corresponds to
  3466. * the HT or VHT MCS indices that are allowed. For each bit N set
  3467. * within the mask, MCS index N is allowed for transmitting the frame.
  3468. * For legacy CCK and OFDM rates, separate bits are provided for CCK
  3469. * rates versus OFDM rates, so the host has the option of specifying
  3470. * that the target must transmit the frame with CCK or OFDM rates
  3471. * (not HT or VHT), but leaving the decision to the target whether
  3472. * to use CCK or OFDM.
  3473. *
  3474. * For CCK and OFDM, the bits within this mask are interpreted as
  3475. * follows:
  3476. * bit 0 -> CCK 1 Mbps rate is allowed
  3477. * bit 1 -> CCK 2 Mbps rate is allowed
  3478. * bit 2 -> CCK 5.5 Mbps rate is allowed
  3479. * bit 3 -> CCK 11 Mbps rate is allowed
  3480. * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
  3481. * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
  3482. * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
  3483. * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
  3484. * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
  3485. * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
  3486. * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
  3487. * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
  3488. *
  3489. * The MCS index specification needs to be compatible with the
  3490. * bandwidth mask specification. For example, a MCS index == 9
  3491. * specification is inconsistent with a preamble type == VHT,
  3492. * Nss == 1, and channel bandwidth == 20 MHz.
  3493. *
  3494. * Furthermore, the host has only a limited ability to specify to
  3495. * the target to select from HT + legacy rates, or VHT + legacy rates,
  3496. * since this mcs_mask can specify either HT/VHT rates or legacy rates.
  3497. * If no bits are set, target can choose what MCS type to use.
  3498. */
  3499. mcs_mask: 12,
  3500. /* nss_mask -
  3501. * Specify which numbers of spatial streams (MIMO factor) are permitted.
  3502. * Each bit in this mask corresponds to a Nss value:
  3503. * bit 0: if set, Nss = 1 (non-MIMO) is permitted
  3504. * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
  3505. * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
  3506. * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
  3507. * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
  3508. * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
  3509. * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
  3510. * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
  3511. * The values in the Nss mask must be suitable for the recipient, e.g.
  3512. * a value of 0x4 (Nss = 3) cannot be specified for a tx frame to a
  3513. * recipient which only supports 2x2 MIMO.
  3514. * If no bits are set, target can choose what NSS type to use.
  3515. */
  3516. nss_mask: 8,
  3517. /* retry_limit -
  3518. * Specify the maximum number of transmissions, including the
  3519. * initial transmission, to attempt before giving up if no ack
  3520. * is received.
  3521. * If the tx rate is specified, then all retries shall use the
  3522. * same rate as the initial transmission.
  3523. * If no tx rate is specified, the target can choose whether to
  3524. * retain the original rate during the retransmissions, or to
  3525. * fall back to a more robust rate.
  3526. */
  3527. retry_limit: 4;
  3528. };
  3529. A_UINT32 tx_param_dword0;
  3530. };
  3531. union {
  3532. struct {
  3533. /* DWORD 1: tx chain mask, preamble_type, tx BW */
  3534. A_UINT32
  3535. /* chain_mask - specify which chains to transmit from
  3536. * If not set, target will choose what chain_mask to use.
  3537. */
  3538. chain_mask: 8,
  3539. /* The bits in this mask correspond to the values as below
  3540. * bit 0 -> 5MHz
  3541. * bit 1 -> 10MHz
  3542. * bit 2 -> 20MHz
  3543. * bit 3 -> 40MHz
  3544. * bit 4 -> 80MHz
  3545. * bit 5 -> 160MHz
  3546. * bit 6 -> 80_80MHz
  3547. * If no bits are set, target can choose what BW to use.
  3548. */
  3549. bw_mask: 7,
  3550. /* preamble_type_mask -
  3551. * Specify which preamble types (CCK, OFDM, HT, VHT) the target
  3552. * may choose from for transmitting this frame.
  3553. * Each bit in this mask corresponds to a preamble_type value:
  3554. * bit 0: if set, OFDM
  3555. * bit 1: if set, CCK
  3556. * bit 2: if set, HT
  3557. * bit 3: if set, VHT
  3558. * bit 4: if set, HE
  3559. * If no bits are set, target can choose what preamble type to use.
  3560. */
  3561. preamble_type: 5,
  3562. /* Data:1 Mgmt:0
  3563. */
  3564. frame_type: 1,
  3565. reserved1_31_21: 11;
  3566. };
  3567. A_UINT32 tx_param_dword1;
  3568. };
  3569. } wmi_tx_send_params;
  3570. typedef struct {
  3571. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  3572. A_UINT32 vdev_id;
  3573. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3574. A_UINT32 chanfreq; /* MHz units */
  3575. A_UINT32 paddr_lo;
  3576. A_UINT32 paddr_hi;
  3577. A_UINT32 frame_len;
  3578. A_UINT32 buf_len; /** Buffer length in bytes */
  3579. /*
  3580. * The frame which will have tx_params_valid set will be always be RAW
  3581. * frame, as it will be tx'ed on non-pause tid
  3582. */
  3583. A_UINT32 tx_params_valid;
  3584. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  3585. * A_UINT8 bufp[];
  3586. */
  3587. /* This TLV is followed by wmi_tx_send_params
  3588. * wmi_tx_send_params tx_send_params;
  3589. */
  3590. } wmi_mgmt_tx_send_cmd_fixed_param;
  3591. typedef struct {
  3592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_send_cmd_fixed_param */
  3593. A_UINT32 vdev_id;
  3594. A_UINT32 desc_id; /* echoed in tx_compl_event */
  3595. A_UINT32 chanfreq; /* MHz units */
  3596. A_UINT32 paddr_lo;
  3597. A_UINT32 paddr_hi;
  3598. A_UINT32 frame_len;
  3599. A_UINT32 buf_len; /** Buffer length in bytes */
  3600. /* The frame which will have tx_params_valid set will be always be RAW
  3601. * frame, as it will be tx'ed on non-pause tid
  3602. */
  3603. A_UINT32 tx_params_valid;
  3604. /* This TLV is followed by array of bytes: First 64 bytes of frame
  3605. * A_UINT8 bufp[];
  3606. */
  3607. /* This TLV is followed by wmi_tx_send_params
  3608. * wmi_tx_send_params tx_send_params;
  3609. */
  3610. } wmi_offchan_data_tx_send_cmd_fixed_param;
  3611. typedef struct {
  3612. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  3613. A_UINT32 value;
  3614. } wmi_echo_event_fixed_param;
  3615. typedef struct {
  3616. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  3617. A_UINT32 value;
  3618. } wmi_echo_cmd_fixed_param;
  3619. typedef struct {
  3620. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  3621. /** pdev_id for identifying the MAC
  3622. * See macros starting with WMI_PDEV_ID_ for values.
  3623. */
  3624. A_UINT32 pdev_id;
  3625. /** reg domain code */
  3626. A_UINT32 reg_domain;
  3627. A_UINT32 reg_domain_2G;
  3628. A_UINT32 reg_domain_5G;
  3629. A_UINT32 conformance_test_limit_2G;
  3630. A_UINT32 conformance_test_limit_5G;
  3631. A_UINT32 dfs_domain;
  3632. } wmi_pdev_set_regdomain_cmd_fixed_param;
  3633. typedef struct {
  3634. /** TRUE for scan start and flase for scan end */
  3635. A_UINT32 scan_start;
  3636. } wmi_pdev_scan_cmd;
  3637. /* WMI support for setting ratemask in target */
  3638. typedef struct {
  3639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  3640. A_UINT32 vdev_id;
  3641. /*
  3642. * 0 - cck/ofdm
  3643. * 1 - HT
  3644. * 2 - VHT
  3645. * 3 - HE
  3646. */
  3647. A_UINT32 type;
  3648. A_UINT32 mask_lower32;
  3649. A_UINT32 mask_higher32;
  3650. A_UINT32 mask_lower32_2;
  3651. A_UINT32 mask_higher32_2;
  3652. } wmi_vdev_config_ratemask_cmd_fixed_param;
  3653. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  3654. enum {
  3655. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  3656. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  3657. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  3658. }; /* nrp - Neighbor Rx Packets */
  3659. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  3660. enum {
  3661. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  3662. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  3663. };
  3664. /* nrp flag - Filter Neighbor Rx Packets
  3665. * (capture flag, 2 & 3 not initially supported)
  3666. */
  3667. enum {
  3668. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  3669. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  3670. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  3671. };
  3672. typedef struct {
  3673. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  3674. A_UINT32 vdev_id;
  3675. /* AP Bssid or Client Mac-addr */
  3676. wmi_mac_addr addr;
  3677. /* Add/Remove NRF Filter */
  3678. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  3679. /* client/ap filter */
  3680. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  3681. /* optional - tx/rx capture */
  3682. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  3683. /* BSSID index - index of the BSSID register */
  3684. A_UINT32 bssid_idx;
  3685. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  3686. /*Command to set/unset chip in quiet mode*/
  3687. typedef struct {
  3688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  3689. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  3690. A_UINT32 period; /*period in TUs*/
  3691. A_UINT32 duration; /*duration in TUs*/
  3692. A_UINT32 next_start; /*offset in TUs*/
  3693. A_UINT32 enabled; /*enable/disable*/
  3694. } wmi_pdev_set_quiet_cmd_fixed_param;
  3695. typedef struct {
  3696. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  3697. A_UINT32 vdev_id; /* Virtual interface ID */
  3698. A_UINT32 period; /* period in TUs */
  3699. A_UINT32 duration; /* duration in TUs */
  3700. A_UINT32 next_start; /* offset in TUs */
  3701. A_UINT32 enabled; /* enable/disable */
  3702. } wmi_vdev_set_quiet_cmd_fixed_param;
  3703. typedef struct {
  3704. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  3705. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  3706. /* Size for tx aggregation for the vdev mentioned in vdev id
  3707. * (max MPDUs per A-MPDU or max MSDUs per A-MSDU based on aggr_type field)
  3708. */
  3709. A_UINT32 tx_aggr_size;
  3710. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id */
  3711. /*
  3712. * To set TX aggregation size limits per VDEV per AC
  3713. * bits 1:0 (ac):
  3714. * Access Category (0x0=BE, 0x1=BK, 0x2=VI, 0x3=VO)
  3715. * If tx_ac_enable bit is not set, tx_aggr_size is applied
  3716. * for all Access Categories
  3717. * bit 2 (aggr_type): TX Aggregation Type (0=A-MPDU, 1=A-MSDU)
  3718. * bit 3 (tx_aggr_size_disable): If set tx_aggr_size is invalid
  3719. * bit 4 (rx_aggr_size_disable): If set rx_aggr_size is invalid
  3720. * bit 5 (tx_ac_enable): If set, above ac bitmap is valid.
  3721. * bits 31:6: Reserved bits. should be set to zero.
  3722. */
  3723. A_UINT32 enable_bitmap;
  3724. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  3725. typedef enum {
  3726. WMI_VDEV_CUSTOM_AGGR_TYPE_AMPDU = 0,
  3727. WMI_VDEV_CUSTOM_AGGR_TYPE_AMSDU = 1,
  3728. WMI_VDEV_CUSTOM_AGGR_TYPE_MAX,
  3729. } wmi_vdev_custom_aggr_type_t;
  3730. #define WMI_VDEV_CUSTOM_AGGR_AC_BITPOS 0
  3731. #define WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS 2
  3732. #define WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS 2
  3733. #define WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS 1
  3734. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS 3
  3735. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS 1
  3736. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS 4
  3737. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS 1
  3738. #define WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS 5
  3739. #define WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS 1
  3740. #define WMI_VDEV_CUSTOM_AGGR_AC_SET(param, value) \
  3741. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  3742. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS, value)
  3743. #define WMI_VDEV_CUSTOM_AGGR_AC_GET(param) \
  3744. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_AC_BITPOS, \
  3745. WMI_VDEV_CUSTOM_AGGR_AC_NUM_BITS)
  3746. #define WMI_VDEV_CUSTOM_AGGR_TYPE_SET(param, value) \
  3747. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  3748. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS, value)
  3749. #define WMI_VDEV_CUSTOM_AGGR_TYPE_GET(param) \
  3750. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_AGGR_TYPE_BITPOS, \
  3751. WMI_VDEV_CUSTOM_AGGR_TYPE_NUM_BITS)
  3752. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_SET(param, value) \
  3753. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  3754. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS, value)
  3755. #define WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_GET(param) \
  3756. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_BITPOS, \
  3757. WMI_VDEV_CUSTOM_TX_AGGR_SZ_DIS_NUM_BITS)
  3758. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_SET(param, value) \
  3759. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  3760. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS, value)
  3761. #define WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_GET(param) \
  3762. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_BITPOS, \
  3763. WMI_VDEV_CUSTOM_RX_AGGR_SZ_DIS_NUM_BITS)
  3764. #define WMI_VDEV_CUSTOM_TX_AC_EN_SET(param, value) \
  3765. WMI_SET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  3766. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS, value)
  3767. #define WMI_VDEV_CUSTOM_TX_AC_EN_GET(param) \
  3768. WMI_GET_BITS(param, WMI_VDEV_CUSTOM_TX_AC_EN_BITPOS, \
  3769. WMI_VDEV_CUSTOM_TX_AC_EN_NUM_BITS)
  3770. typedef enum {
  3771. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_NONAGGR = 0,
  3772. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_AGGR = 1,
  3773. WMI_VDEV_CUSTOM_SW_RETRY_TYPE_MAX,
  3774. } wmi_vdev_custom_sw_retry_type_t;
  3775. typedef struct {
  3776. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param */
  3777. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom software retries will be applied. */
  3778. A_UINT32 ac_type; /* access category (VI, VO, BE, BK) enum wmi_traffic_ac */
  3779. A_UINT32 sw_retry_type; /* 0 = non-aggr retry, 1 = aggr retry (wmi_vdev_custom_sw_retry_type_t enum) */
  3780. A_UINT32 sw_retry_th; /* max retry count per AC base on ac_type for the vdev mentioned in vdev id*/
  3781. } wmi_vdev_set_custom_sw_retry_th_cmd_fixed_param;
  3782. /*
  3783. * Command to enable/disable Green AP Power Save.
  3784. * This helps conserve power during AP operation. When the AP has no
  3785. * stations associated with it, the host can enable Green AP Power Save
  3786. * to request the firmware to shut down all but one transmit and receive
  3787. * chains.
  3788. */
  3789. typedef struct {
  3790. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  3791. /** pdev_id for identifying the MAC
  3792. * See macros starting with WMI_PDEV_ID_ for values.
  3793. */
  3794. A_UINT32 pdev_id;
  3795. A_UINT32 enable; /*1:enable, 0:disable*/
  3796. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  3797. #define MAX_HT_IE_LEN 32
  3798. /* DEPRECATED */
  3799. typedef struct {
  3800. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  3801. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3802. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  3803. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3804. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3805. /** The TLV for the HT IE follows:
  3806. * A_UINT32 ie_data[];
  3807. */
  3808. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  3809. #define MAX_VHT_IE_LEN 32
  3810. /* DEPRECATED */
  3811. typedef struct {
  3812. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  3813. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3814. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  3815. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  3816. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  3817. /** The TLV for the VHT IE follows:
  3818. * A_UINT32 ie_data[];
  3819. */
  3820. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  3821. typedef struct {
  3822. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  3823. /** pdev_id for identifying the MAC
  3824. * See macros starting with WMI_PDEV_ID_ for values.
  3825. */
  3826. A_UINT32 pdev_id;
  3827. wmi_mac_addr base_macaddr;
  3828. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  3829. /*
  3830. * For now, the spectral configuration is global rather than
  3831. * per-vdev. The vdev is a placeholder and will be ignored
  3832. * by the firmware.
  3833. */
  3834. typedef struct {
  3835. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  3836. A_UINT32 vdev_id;
  3837. A_UINT32 spectral_scan_count;
  3838. A_UINT32 spectral_scan_period;
  3839. A_UINT32 spectral_scan_priority;
  3840. A_UINT32 spectral_scan_fft_size;
  3841. A_UINT32 spectral_scan_gc_ena;
  3842. A_UINT32 spectral_scan_restart_ena;
  3843. A_UINT32 spectral_scan_noise_floor_ref;
  3844. A_UINT32 spectral_scan_init_delay;
  3845. A_UINT32 spectral_scan_nb_tone_thr;
  3846. A_UINT32 spectral_scan_str_bin_thr;
  3847. A_UINT32 spectral_scan_wb_rpt_mode;
  3848. A_UINT32 spectral_scan_rssi_rpt_mode;
  3849. A_UINT32 spectral_scan_rssi_thr;
  3850. A_UINT32 spectral_scan_pwr_format;
  3851. A_UINT32 spectral_scan_rpt_mode;
  3852. A_UINT32 spectral_scan_bin_scale;
  3853. A_UINT32 spectral_scan_dBm_adj;
  3854. A_UINT32 spectral_scan_chn_mask;
  3855. } wmi_vdev_spectral_configure_cmd_fixed_param;
  3856. /*
  3857. * Enabling, disabling and triggering the spectral scan
  3858. * is a per-vdev operation. That is, it will set channel
  3859. * flags per vdev rather than globally; so concurrent scan/run
  3860. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  3861. */
  3862. typedef struct {
  3863. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  3864. A_UINT32 vdev_id;
  3865. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  3866. A_UINT32 trigger_cmd;
  3867. /* 0 - ignore; 1 - enable, 2 - disable */
  3868. A_UINT32 enable_cmd;
  3869. } wmi_vdev_spectral_enable_cmd_fixed_param;
  3870. typedef struct {
  3871. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_tx_power_cmd_fixed_param */
  3872. A_UINT32 vdev_id;
  3873. } wmi_vdev_get_tx_power_cmd_fixed_param;
  3874. #define WMI_BEACON_CTRL_TX_DISABLE 0
  3875. #define WMI_BEACON_CTRL_TX_ENABLE 1
  3876. #define WMI_BEACON_CTRL_SWBA_EVENT_DISABLE 2
  3877. #define WMI_BEACON_CTRL_SWBA_EVENT_ENABLE 3
  3878. typedef struct {
  3879. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_offload_ctrl_cmd_fixed_param */
  3880. /** unique id identifying the VDEV, generated by the caller */
  3881. A_UINT32 vdev_id;
  3882. A_UINT32 bcn_ctrl_op; /* fw default 1 (see WMI_BEACON_CTRL defs) */
  3883. } wmi_bcn_offload_ctrl_cmd_fixed_param;
  3884. /** common structure used for wmi_vedv_get_tx_power_event */
  3885. typedef struct {
  3886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_tx_power_event_fixed_param */
  3887. A_UINT32 tx_power; /** units: 0.5 dBm, per-chain tx power */
  3888. A_UINT32 vdev_id; /** unique id identifying the VDEV, generated by the caller */
  3889. } wmi_vdev_get_tx_power_event_fixed_param;
  3890. typedef enum {
  3891. /** Limit the offchannel duration */
  3892. WMI_VDEV_LIMIT_OFFCHAN_ENABLE = 0x1,
  3893. /** Skip DFS channels from Scan channel list.
  3894. * valid for both host scans and FW scans */
  3895. WMI_VDEV_LIMIT_OFFCHAN_SKIP_DFS = 0x2,
  3896. } wmi_vdev_limit_offchan_flags;
  3897. typedef struct {
  3898. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_vdev_limit_offchan_cmd_fixed_param */
  3899. /** Limit the duration of offchannel events requested by the vdev corresponding to the specified vdev_id */
  3900. A_UINT32 vdev_id;
  3901. /** see enum wmi_vdev_limit_offchan_flags */
  3902. A_UINT32 flags;
  3903. /** max offchannel time allowed in msec when WMI_VDEV_LIMIT_OFFCHAN_ENABLE flag is set */
  3904. A_UINT32 max_offchan_time;
  3905. /** rest time in msec on the BSS channel */
  3906. A_UINT32 rest_time;
  3907. } wmi_vdev_limit_offchan_cmd_fixed_param;
  3908. #define WMI_CSA_EVENT_QSBW_ISE_ID_MASK 0x000000FF /* information sub element id for QSBW, expected value is 0x02 */
  3909. #define WMI_CSA_EVENT_QSBW_ISE_LEN_MASK 0x0000FF00 /* length of QSBW ISE data, expected value is 0x02 */
  3910. #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) */
  3911. #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) */
  3912. #define WMI_CSA_EVENT_QSBW_ISE_ID 0x02
  3913. #define WMI_CSA_EVENT_QSBW_ISE_LEN 0x02
  3914. #define WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK 0x01
  3915. #define WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK 0x02
  3916. #define WMI_CSA_EVENT_QSBW_ISE_CAP_5M(qsbw_ise) \
  3917. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3918. #define WMI_CSA_EVENT_QSBW_ISE_CAP_10M(qsbw_ise) \
  3919. (((qsbw_ise) >> 16) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3920. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_5M(qsbw_ise) \
  3921. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_5M_BITMASK)
  3922. #define WMI_CSA_EVENT_QSBW_ISE_NOTIF_10M(qsbw_ise) \
  3923. (((qsbw_ise) >> 24) & WMI_CSA_EVENT_QSBW_ISE_10M_BITMASK)
  3924. typedef enum {
  3925. WMI_CSA_IE_PRESENT = 0x00000001,
  3926. WMI_XCSA_IE_PRESENT = 0x00000002,
  3927. WMI_WBW_IE_PRESENT = 0x00000004,
  3928. WMI_CSWARP_IE_PRESENT = 0x00000008,
  3929. WMI_QSBW_ISE_PRESENT = 0x00000010,
  3930. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  3931. /* wmi CSA receive event from beacon frame */
  3932. typedef struct {
  3933. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  3934. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  3935. wmi_mac_addr i_addr1;
  3936. wmi_mac_addr i_addr2;
  3937. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  3938. * changed in the future without breaking WMI compatibility */
  3939. A_UINT32 csa_ie[2];
  3940. A_UINT32 xcsa_ie[2];
  3941. A_UINT32 wb_ie[2];
  3942. A_UINT32 cswarp_ie;
  3943. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  3944. A_UINT32 qsbw_ise;
  3945. } wmi_csa_event_fixed_param;
  3946. typedef enum {
  3947. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  3948. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  3949. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  3950. } WMI_PEER_MCAST2UCAST_MODE;
  3951. typedef enum {
  3952. PKT_PWR_SAVE_NAP_ENABLE = 0x00000001,
  3953. PKT_PWR_SAVE_LS_ENABLE = 0x00000002,
  3954. PKT_PWR_SAVE_DS_ENABLE = 0x00000004,
  3955. PKT_PWR_SAVE_BTCOEX_ENABLE = 0x00000008,
  3956. PKT_PWR_SAVE_FSM_ENABLE = 0x80000000,
  3957. } WMI_PDEV_PKT_PWR_SAVE_LEVEL;
  3958. typedef enum {
  3959. /** TX chain mask */
  3960. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3961. /** RX chain mask */
  3962. WMI_PDEV_PARAM_RX_CHAIN_MASK, /* 0x2 */
  3963. /** TX power limit for 2G Radio */
  3964. WMI_PDEV_PARAM_TXPOWER_LIMIT2G, /* 0x3 */
  3965. /** TX power limit for 5G Radio */
  3966. WMI_PDEV_PARAM_TXPOWER_LIMIT5G, /* 0x4 */
  3967. /** TX power scale */
  3968. WMI_PDEV_PARAM_TXPOWER_SCALE, /* 0x5 */
  3969. /** Beacon generation mode . 0: host, 1: target */
  3970. WMI_PDEV_PARAM_BEACON_GEN_MODE, /* 0x6 */
  3971. /** Beacon generation mode . 0: staggered 1: bursted */
  3972. WMI_PDEV_PARAM_BEACON_TX_MODE, /* 0x7 */
  3973. /** Resource manager off chan mode .
  3974. * 0: turn off off chan mode. 1: turn on offchan mode
  3975. */
  3976. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, /* 0x8 */
  3977. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  3978. WMI_PDEV_PARAM_PROTECTION_MODE, /* 0x9 */
  3979. /** Dynamic bandwidth 0: disable 1: enable */
  3980. WMI_PDEV_PARAM_DYNAMIC_BW, /* 0xa */
  3981. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  3982. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0xb */
  3983. /** aggregrate sw retry threshold. 0-disable*/
  3984. WMI_PDEV_PARAM_AGG_SW_RETRY_TH, /* 0xc */
  3985. /** Station kickout threshold (non of consecutive failures).0-disable */
  3986. WMI_PDEV_PARAM_STA_KICKOUT_TH, /* 0xd */
  3987. /** Aggerate size scaling configuration per AC */
  3988. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, /* 0xe */
  3989. /** LTR enable */
  3990. WMI_PDEV_PARAM_LTR_ENABLE, /* 0xf */
  3991. /** LTR latency for BE, in us */
  3992. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, /* 0x10 */
  3993. /** LTR latency for BK, in us */
  3994. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, /* 0x11 */
  3995. /** LTR latency for VI, in us */
  3996. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, /* 0x12 */
  3997. /** LTR latency for VO, in us */
  3998. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, /* 0x13 */
  3999. /** LTR AC latency timeout, in ms */
  4000. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, /* 0x14 */
  4001. /** LTR platform latency override, in us */
  4002. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, /* 0x15 */
  4003. /** LTR-M override, in us */
  4004. WMI_PDEV_PARAM_LTR_RX_OVERRIDE, /* 0x16 */
  4005. /** Tx activity timeout for LTR, in us */
  4006. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, /* 0x17 */
  4007. /** L1SS state machine enable */
  4008. WMI_PDEV_PARAM_L1SS_ENABLE, /* 0x18 */
  4009. /** Deep sleep state machine enable */
  4010. WMI_PDEV_PARAM_DSLEEP_ENABLE, /* 0x19 */
  4011. /** RX buffering flush enable */
  4012. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, /* 0x1a */
  4013. /** RX buffering matermark */
  4014. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, /* 0x1b */
  4015. /** RX buffering timeout enable */
  4016. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, /* 0x1c */
  4017. /** RX buffering timeout value */
  4018. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, /* 0x1d */
  4019. /** pdev level stats update period in ms */
  4020. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, /* 0x1e */
  4021. /** vdev level stats update period in ms */
  4022. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, /* 0x1f */
  4023. /** peer level stats update period in ms */
  4024. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, /* 0x20 */
  4025. /** beacon filter status update period */
  4026. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, /* 0x21 */
  4027. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  4028. WMI_PDEV_PARAM_PMF_QOS, /* 0x22 */
  4029. /** Access category on which ARP frames are sent */
  4030. WMI_PDEV_PARAM_ARP_AC_OVERRIDE, /* 0x23 */
  4031. /** DCS configuration */
  4032. WMI_PDEV_PARAM_DCS, /* 0x24 */
  4033. /** Enable/Disable ANI on target */
  4034. WMI_PDEV_PARAM_ANI_ENABLE, /* 0x25 */
  4035. /** configure the ANI polling period */
  4036. WMI_PDEV_PARAM_ANI_POLL_PERIOD, /* 0x26 */
  4037. /** configure the ANI listening period */
  4038. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, /* 0x27 */
  4039. /** configure OFDM immunity level */
  4040. WMI_PDEV_PARAM_ANI_OFDM_LEVEL, /* 0x28 */
  4041. /** configure CCK immunity level */
  4042. WMI_PDEV_PARAM_ANI_CCK_LEVEL, /* 0x29 */
  4043. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  4044. WMI_PDEV_PARAM_DYNTXCHAIN, /* 0x2a */
  4045. /** Enable/Disable proxy STA */
  4046. WMI_PDEV_PARAM_PROXY_STA, /* 0x2b */
  4047. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  4048. WMI_PDEV_PARAM_IDLE_PS_CONFIG, /* 0x2c */
  4049. /** Enable/Disable power gating sleep */
  4050. WMI_PDEV_PARAM_POWER_GATING_SLEEP, /* 0x2d */
  4051. /** Enable/Disable Rfkill */
  4052. WMI_PDEV_PARAM_RFKILL_ENABLE, /* 0x2e */
  4053. /** Set Bursting DUR */
  4054. WMI_PDEV_PARAM_BURST_DUR, /* 0x2f */
  4055. /** Set Bursting ENABLE */
  4056. WMI_PDEV_PARAM_BURST_ENABLE, /* 0x30 */
  4057. /** HW rfkill config */
  4058. WMI_PDEV_PARAM_HW_RFKILL_CONFIG, /* 0x31 */
  4059. /** Enable radio low power features */
  4060. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, /* 0x32 */
  4061. /** L1SS entry and residency time track */
  4062. WMI_PDEV_PARAM_L1SS_TRACK, /* 0x33 */
  4063. /** set hyst at runtime, requirement from SS */
  4064. WMI_PDEV_PARAM_HYST_EN, /* 0x34 */
  4065. /** Enable/ Disable POWER COLLAPSE */
  4066. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, /* 0x35 */
  4067. /** configure LED system state */
  4068. WMI_PDEV_PARAM_LED_SYS_STATE, /* 0x36 */
  4069. /** Enable/Disable LED */
  4070. WMI_PDEV_PARAM_LED_ENABLE, /* 0x37 */
  4071. /** set DIRECT AUDIO time latency */
  4072. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ /* 0x38 */
  4073. /** set DIRECT AUDIO Feature ENABLE */
  4074. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ /* 0x39 */
  4075. /** pdev level whal mib stats update enable */
  4076. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, /* 0x3a */
  4077. /** ht/vht info based on vdev */
  4078. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, /* 0x3b */
  4079. /** Set CTS channel BW for dynamic BW adjustment feature */
  4080. WMI_PDEV_PARAM_CTS_CBW, /* 0x3c */
  4081. /** Set GPIO pin info used by WNTS */
  4082. WMI_PDEV_PARAM_WNTS_CONFIG, /* 0x3d */
  4083. /** Enable/Disable hardware adaptive early rx feature */
  4084. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, /* 0x3e */
  4085. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  4086. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, /* 0x3f */
  4087. /** Increasing/decreasing step used by hardware */
  4088. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, /* 0x40 */
  4089. /** The fixed early rx duration when adaptive early rx is disabled */
  4090. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, /* 0x41 */
  4091. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  4092. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, /* 0x42 */
  4093. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  4094. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, /* 0x43 */
  4095. /** Increasing/decreasing step used by hardware */
  4096. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, /* 0x44 */
  4097. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  4098. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, /* 0x45 */
  4099. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  4100. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, /* 0x46 */
  4101. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  4102. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, /* 0x47 */
  4103. /** 2G TX chain mask */
  4104. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, /* 0x48 */
  4105. /** 2G RX chain mask */
  4106. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, /* 0x49 */
  4107. /** 5G TX chain mask */
  4108. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, /* 0x4a */
  4109. /** 5G RX chain mask */
  4110. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, /* 0x4b */
  4111. /* Set tx chain mask for CCK rates */
  4112. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, /* 0x4c */
  4113. /* Set tx chain mask for 1SS stream */
  4114. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, /* 0x4d */
  4115. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  4116. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, /* 0x4e */
  4117. /** TX power backoff in dB: tx power -= param value
  4118. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  4119. * the values. Safety check will happen in Halphy
  4120. */
  4121. WMI_PDEV_PARAM_TXPOWER_DECR_DB, /* 0x4f */
  4122. /** enable and disable aggregate burst along with duration */
  4123. WMI_PDEV_PARAM_AGGR_BURST, /* 0x50 */
  4124. /** Set the global RX decap mode */
  4125. WMI_PDEV_PARAM_RX_DECAP_MODE, /* 0x51 */
  4126. /** Enable/Disable Fast channel reset */
  4127. WMI_PDEV_PARAM_FAST_CHANNEL_RESET, /* 0x52 */
  4128. /** Default antenna for Smart antenna */
  4129. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, /* 0x53 */
  4130. /** Set the user-specified antenna gain */
  4131. WMI_PDEV_PARAM_ANTENNA_GAIN, /* 0x54 */
  4132. /** Set the user-specified RX filter */
  4133. WMI_PDEV_PARAM_RX_FILTER, /* 0x55 */
  4134. /** configure the user-specified MCAST tid for managed mcast feature
  4135. * 0-15 is the valid range. 0xff will clear the tid setting */
  4136. WMI_PDEV_SET_MCAST_TO_UCAST_TID, /* 0x56 */
  4137. /** Enable/Disable Proxy sta mode */
  4138. WMI_PDEV_PARAM_PROXY_STA_MODE, /* 0x57 */
  4139. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  4140. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  4141. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, /* 0x58 */
  4142. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  4143. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, /* 0x59 */
  4144. /** Remove the Mcast buffers added by host */
  4145. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, /* 0x5a */
  4146. /** En/disable station power save state indication */
  4147. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, /* 0x5b */
  4148. /** Access category on which ARP frames are sent */
  4149. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, /* 0x5c */
  4150. /** allow or disallow interbss frame forwarding */
  4151. WMI_PDEV_PARAM_BLOCK_INTERBSS, /* 0x5d */
  4152. /** Enable/Disable reset */
  4153. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, /* 0x5e */
  4154. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  4155. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, /* 0x5f */
  4156. /** Set global PPDU duration limit (usec). */
  4157. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, /* 0x60 */
  4158. /** set txbf sounding period of vap in milliseconds */
  4159. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, /* 0x61 */
  4160. /** Set promiscuous mode */
  4161. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, /* 0x62 */
  4162. /** Set burst mode */
  4163. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, /* 0x63 */
  4164. /** enable enhanced stats */
  4165. WMI_PDEV_PARAM_EN_STATS, /* 0x64 */
  4166. /** Set mu-grouping policy */
  4167. WMI_PDEV_PARAM_MU_GROUP_POLICY, /* 0x65 */
  4168. /** Channel Hopping Enable */
  4169. WMI_PDEV_PARAM_NOISE_DETECTION, /* 0x66 */
  4170. /** Set Channel Hopping NF threshold in dBm */
  4171. WMI_PDEV_PARAM_NOISE_THRESHOLD, /* 0x67 */
  4172. /** Set PAPRD policy */
  4173. WMI_PDEV_PARAM_DPD_ENABLE, /* 0x68 */
  4174. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  4175. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, /* 0x69 */
  4176. /** ATF enable/disable strict schedule */
  4177. WMI_PDEV_PARAM_ATF_STRICT_SCH, /* 0x6a */
  4178. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  4179. WMI_PDEV_PARAM_ATF_SCHED_DURATION, /* 0x6b */
  4180. /** Default antenna polarization */
  4181. WMI_PDEV_PARAM_ANT_PLZN, /* 0x6c */
  4182. /** Set mgmt retry limit */
  4183. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, /* 0x6d */
  4184. /** Set CCA sensitivity level in dBm */
  4185. WMI_PDEV_PARAM_SENSITIVITY_LEVEL, /* 0x6e */
  4186. /** Set 2G positive and negative Tx power in 0.5dBm units */
  4187. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, /* 0x6f */
  4188. /** Set 5G positive and negative Tx power in 0.5dBm
  4189. * units */
  4190. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, /* 0x70 */
  4191. /** Enable/disble AMSDU for tids */
  4192. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, /* 0x71 */
  4193. /** Enable/disable AMPDU for tids */
  4194. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, /* 0x72 */
  4195. /** Set CCA threshold in dBm */
  4196. WMI_PDEV_PARAM_CCA_THRESHOLD, /* 0x73 */
  4197. /** RTS Fixed rate setting */
  4198. WMI_PDEV_PARAM_RTS_FIXED_RATE, /* 0x74 */
  4199. /** Pdev reset */
  4200. WMI_PDEV_PARAM_PDEV_RESET, /* 0x75 */
  4201. /** wapi mbssid offset **/
  4202. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, /* 0x76 */
  4203. /** ARP DEBUG source address*/
  4204. WMI_PDEV_PARAM_ARP_DBG_SRCADDR, /* 0x77 */
  4205. /** ARP DEBUG destination address*/
  4206. WMI_PDEV_PARAM_ARP_DBG_DSTADDR, /* 0x78 */
  4207. /** ATF enable/disable obss noise scheduling */
  4208. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, /* 0x79 */
  4209. /** ATF obss noise scaling factor */
  4210. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, /* 0x7a */
  4211. /**
  4212. * TX power reduction scaling exponent - final tx power is the
  4213. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  4214. * 2^(scale exponent). For example:
  4215. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  4216. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  4217. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  4218. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  4219. */
  4220. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, /* 0x7b */
  4221. /** ATF enabe/disabe dynamically */
  4222. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, /* 0x7c */
  4223. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  4224. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, /* 0x7d */
  4225. /** Set propagation delay for 2G / 5G band.
  4226. * The propagation delay is fundamentally a per-peer property, but
  4227. * the target may not support per-peer settings for ack timeouts.
  4228. * This pdev parameter allows the MAC-level ack timeout to be set to
  4229. * a value suitable for the worst-case propagation delay of any peer
  4230. * within that pdev.
  4231. * Units are microseconds.
  4232. */
  4233. WMI_PDEV_PARAM_PROPAGATION_DELAY, /* 0x7e */
  4234. /**
  4235. * Host can enable/disable ANT DIV feature
  4236. * if it's been enabled in BDF
  4237. */
  4238. WMI_PDEV_PARAM_ENA_ANT_DIV, /* 0x7f */
  4239. /** Host can force one chain to select a specific ANT */
  4240. WMI_PDEV_PARAM_FORCE_CHAIN_ANT, /* 0x80 */
  4241. /**
  4242. * Start a cycle ANT self test periodically.
  4243. * In the test, the FW would select each ANT pair
  4244. * one by one, the cycle time could be configured
  4245. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  4246. */
  4247. WMI_PDEV_PARAM_ANT_DIV_SELFTEST, /* 0x81 */
  4248. /**
  4249. * Configure the cycle time of ANT self test,
  4250. * the unit is micro second. Per the timer
  4251. * limitation, too small value could be not so
  4252. * accurate.
  4253. */
  4254. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, /* 0x82 */
  4255. /**
  4256. * wlan stats observation period, the unit is millisecond.
  4257. * The value of 0 is used to turn off periodic stats report.
  4258. */
  4259. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD, /* 0x83 */
  4260. /**
  4261. * Set tx_ppdu_delay[] bin size to specify how many
  4262. * milliseconds each bin of the wmi_tx_stats.tx_ppdu_delay[]
  4263. * histogram represents.
  4264. */
  4265. WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS, /* 0x84 */
  4266. /** set wmi_tx_stats.tx_ppdu_delay[] array length */
  4267. WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN, /* 0x85 */
  4268. /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
  4269. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN, /* 0x86 */
  4270. /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
  4271. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN, /* 0x87 */
  4272. /** Set TX delay value in TX sch module, unit is microseconds */
  4273. WMI_PDEV_PARAM_TX_SCH_DELAY, /* 0x88 */
  4274. /** Set RTS enable for SIFS bursting */
  4275. WMI_PDEV_PARAM_ENABLE_RTS_SIFS_BURSTING, /* 0x89 */
  4276. /** Set Maximum number of MPDUs in an AMPDU*/
  4277. WMI_PDEV_PARAM_MAX_MPDUS_IN_AMPDU, /* 0x8a */
  4278. /** Enable/disable peer stats info mechanism
  4279. * A zero value disables; a non-zero value enables.
  4280. */
  4281. WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE, /* 0x8b */
  4282. /** Configure Fast PWR Transition mode
  4283. * 0x0 -> inidcates Fast PWR transition disabled
  4284. * 0x1 -> indicates Static mode enabled
  4285. * 0x2 -> indicates Dynamic mode enabled
  4286. */
  4287. WMI_PDEV_PARAM_FAST_PWR_TRANSITION, /* 0x8c */
  4288. /** Enable/disable radio channel stats mechanism
  4289. * A zero value disables; a non-zero value enables.
  4290. */
  4291. WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE, /* 0x8d */
  4292. /** Enable/disable radio diagnosis feature
  4293. * which allows retrieving the status of radio.
  4294. * A zero value disables; a non-zero value enables.
  4295. */
  4296. WMI_PDEV_PARAM_RADIO_DIAGNOSIS_ENABLE, /* 0x8e */
  4297. /** Enable/Disable mesh mcast traffic
  4298. * 1 - Allow mesh mcast traffic
  4299. * 0 - Disallow mesh mcast traffic
  4300. */
  4301. WMI_PDEV_PARAM_MESH_MCAST_ENABLE, /* 0x8f */
  4302. /** Enable/Disable smart chainmask scheme
  4303. * 1 - Enable smart chainmask scheme
  4304. * 0 - Disable smart chainmask scheme
  4305. */
  4306. WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME, /* 0x90 */
  4307. /** Enable/Disable alternate chainmask scheme
  4308. * 1 - Enable alternate chainmask scheme
  4309. * 0 - Disable alternate chainmask scheme
  4310. */
  4311. WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME, /* 0x91 */
  4312. /** User configured parameters for antenna diversity algorithm
  4313. * BIT[25..13]: Probe period (milliseconds units)
  4314. * BIT[12..0]: Stay period (milliseconds units)
  4315. */
  4316. WMI_PDEV_PARAM_ANT_DIV_USRCFG, /* 0x92 */
  4317. /** pdev packet power save levels,
  4318. * refer to WMI_PDEV_PKT_PWR_SAVE_LEVEL
  4319. */
  4320. WMI_PDEV_PARAM_PACKET_POWER_SAVE_LEVEL, /* 0x93 */
  4321. /** Define IOT pattern to be enabled/disabled
  4322. * bit values: 0 - disable, 1 - enable
  4323. * BIT[0..31]: each bit represents an IOT pattern
  4324. * -----
  4325. * Bit 0 - avoid SMPS with certain APs
  4326. * Bits 31:1 - reserved
  4327. */
  4328. WMI_PDEV_PARAM_SET_IOT_PATTERN, /* 0x94 */
  4329. /** ACK timeout - change wireless packet ack timeout configuration,
  4330. * units are microseconds
  4331. */
  4332. WMI_PDEV_PARAM_ACK_TIMEOUT, /* 0x95 */
  4333. /** Number of TX chains to use for a/b/g rates.
  4334. * bit 0~15 : 11b mode TX chain number.
  4335. * bit 16~31 : 11ag mode TX chain number.
  4336. */
  4337. WMI_PDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x96 */
  4338. /** Enable/Disable cck txfir override
  4339. * bit 0 - enable (1) or disable (0) CCK tx FIR
  4340. * bits 31:1 - unused / reserved (set to 0)
  4341. */
  4342. WMI_PDEV_PARAM_ENABLE_CCK_TXFIR_OVERRIDE, /* 0x97 */
  4343. /** Enable/Disable DTIM Synth
  4344. * 1- Enable DTIM Synth
  4345. * 0- Disable DTIM Synth
  4346. */
  4347. WMI_PDEV_PARAM_DTIM_SYNTH, /* 0x98 */
  4348. /** Configure auto detect power failure feature.
  4349. * 0 - FW will trigger crash if power failure happens.
  4350. * 1 - FW will send a failure notification to host, and the host
  4351. * framework determines how to respond to the power failure
  4352. * 2 - Silently rejuvenate if power failure occurs.
  4353. * 3 - Feature disabled.
  4354. */
  4355. WMI_PDEV_AUTO_DETECT_POWER_FAILURE, /* 0x99 */
  4356. /** Configure operating voltage corner mode based on phymode and bw.
  4357. * bit 0-1 - operating voltage corner mode for 11a/b.
  4358. * bit 2-3 - operating voltage corner mode for 11g.
  4359. * bit 4-5 - operating voltage corner mode for 11n, 20MHz, 1x1.
  4360. * bit 6-7 - operating voltage corner mode for 11n, 20MHz, 2x2.
  4361. * bit 8-9 - operating voltage corner mode for 11n, 40MHz, 1x1.
  4362. * bit 10-11 - operating voltage corner mode for 11n, 40MHz, 2x2.
  4363. * bit 12-13 - operating voltage corner mode for 11ac, 20MHz, 1x1.
  4364. * bit 14-15 - operating voltage corner mode for 11ac, 20MHz, 2x2.
  4365. * bit 16-17 - operating voltage corner mode for 11ac, 40MHz, 1x1.
  4366. * bit 18-19 - operating voltage corner mode for 11ac, 40MHz, 2x2.
  4367. * bit 20-21 - operating voltage corner mode for 11ac, 80MHz, 1x1.
  4368. * bit 22-23 - operating voltage corner mode for 11ac, 80MHz, 2x2.
  4369. * bit 24-25 - operating voltage corner mode for 11ac, 160MHz, 1x1.
  4370. * bit 26-27 - operating voltage corner mode for 11ac, 160MHz, 2x2.
  4371. * ---------------------------------------------
  4372. * 00 - Static voltage corner SVS
  4373. * 01 - static voltage corner LOW SVS
  4374. * 10 - Dynamic voltage corner selection based on TPUT
  4375. * 11 - Dynamic voltage corner selection based on TPUT and Tx Flush counters
  4376. */
  4377. WMI_PDEV_UPDATE_WDCVS_ALGO, /* 0x9a */
  4378. /* Enable/Disable data stall detection */
  4379. WMI_PDEV_PARAM_DATA_STALL_DETECT_ENABLE, /* 0x9b */
  4380. /* GCMP Support indication to FW */
  4381. WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE, /* 0x9c */
  4382. /** Enable/Disable chain selection optimization for one chain dtim
  4383. * non-zero - Enable optimization and use this non-zero value as the
  4384. * chain imbalance threshold for optimization to kick in
  4385. * (units = dB)
  4386. * 0- Disable optimization
  4387. */
  4388. WMI_PDEV_PARAM_1CH_DTIM_OPTIMIZED_CHAIN_SELECTION,/* 0x9d */
  4389. /*
  4390. * Override default FW behavior and explicitly enable / disable
  4391. * the use of CCK for PPDU transmissions.
  4392. *
  4393. * When CCK transmissions are disabled, the default OFDM legacy
  4394. * rate will be used instead.
  4395. */
  4396. WMI_PDEV_PARAM_CCK_TX_ENABLE, /* 0x9e */
  4397. /*
  4398. * Set the user-specified antenna gain, but in 0.5 dB units.
  4399. * This is a finer-granularity version of WMI_PDEV_PARAM_ANTENNA_GAIN.
  4400. * E.g. to set a gain of 15.5 dB, a value of 31 could be provided as the
  4401. * value accompanying the PDEV_PARAM_ANTENNA_GAIN_HALF_DB parameter type.
  4402. */
  4403. WMI_PDEV_PARAM_ANTENNA_GAIN_HALF_DB, /* 0x9f */
  4404. } WMI_PDEV_PARAM;
  4405. typedef struct {
  4406. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  4407. /** pdev_id for identifying the MAC
  4408. * See macros starting with WMI_PDEV_ID_ for values.
  4409. */
  4410. A_UINT32 pdev_id;
  4411. /** parameter id */
  4412. A_UINT32 param_id; /* WMI_PDEV_PARAM */
  4413. /** parameter value */
  4414. A_UINT32 param_value;
  4415. } wmi_pdev_set_param_cmd_fixed_param;
  4416. /** MACRO define to set / get 11b and 11ag mode TX chain number:
  4417. * bit 0~15 : 11b mode TX chain number.
  4418. * bit 16~31: 11ag mode TX chain number.
  4419. */
  4420. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM_S 0
  4421. #define WMI_PDEV_PARAM_11B_TX_CHAIN_NUM 0x0000FFFF
  4422. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM_S 16
  4423. #define WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM 0xFFFF0000
  4424. #define WMI_PDEV_PARAM_GET_11B_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4425. #define WMI_PDEV_PARAM_SET_11B_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11B_TX_CHAIN_NUM)
  4426. #define WMI_PDEV_PARAM_GET_11AG_TX_CHAIN_NUM(word32) WMI_F_MS(word32, WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4427. #define WMI_PDEV_PARAM_SET_11AG_TX_CHAIN_NUM(word32, value) WMI_F_RMW(word32,value,WMI_PDEV_PARAM_11AG_TX_CHAIN_NUM)
  4428. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  4429. typedef enum {
  4430. WMI_CTS_CBW_INVALID = 0,
  4431. WMI_CTS_CBW_20,
  4432. WMI_CTS_CBW_40,
  4433. WMI_CTS_CBW_80,
  4434. WMI_CTS_CBW_80_80,
  4435. WMI_CTS_CBW_160,
  4436. } WMI_CTS_CBW;
  4437. typedef struct {
  4438. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  4439. /** pdev_id for identifying the MAC
  4440. * See macros starting with WMI_PDEV_ID_ for values.
  4441. */
  4442. A_UINT32 pdev_id;
  4443. /** parameter */
  4444. A_UINT32 param;
  4445. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  4446. typedef struct {
  4447. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_div_get_rssi_antid_fixed_param */
  4448. /** pdev_id for identifying the MAC */
  4449. A_UINT32 pdev_id;
  4450. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4451. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4452. /** index of the last-used antenna for each chain */
  4453. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4454. /** mac address of diversity peer */
  4455. wmi_mac_addr macaddr;
  4456. } wmi_pdev_div_get_rssi_antid_fixed_param;
  4457. typedef struct {
  4458. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_request_fixed_param */
  4459. A_UINT32 param; /* 1 = read only, 2= read and clear */
  4460. } wmi_pdev_bss_chan_info_request_fixed_param;
  4461. typedef struct {
  4462. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_request_fixed_param */
  4463. A_UINT32 total_len; /* the total number of ctl table bytes to be transferred */
  4464. A_UINT32 len; /* the number of ctltable bytes in current payload */
  4465. A_UINT32 seq; /* the number of current transfers */
  4466. /*
  4467. * This TLV is followed by the following additional TLVs:
  4468. * ARRAY_BYTE TLV of ctltable_data
  4469. */
  4470. } wmi_pdev_update_ctltable_request_fixed_param;
  4471. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  4472. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  4473. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  4474. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4475. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  4476. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  4477. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  4478. do { \
  4479. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4480. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  4481. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  4482. } while (0)
  4483. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  4484. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4485. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  4486. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  4487. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  4488. do { \
  4489. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4490. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  4491. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  4492. } while (0)
  4493. typedef struct {
  4494. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  4495. union {
  4496. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  4497. /** pdev_id for identifying the MAC
  4498. * See macros starting with WMI_PDEV_ID_ for values.
  4499. */
  4500. A_UINT32 pdev_id;
  4501. };
  4502. /**
  4503. * The following "value" field is divided into bit fields as follows:
  4504. * bits | purpose
  4505. * -----+---------------------------------------
  4506. * 0 | enable/disable FAST diversity
  4507. * 1 | enable/disable SLOW diversity
  4508. * 5:2 | chain0 slow-diversity weighting factor
  4509. * 9:6 | chain1 slow-diversity weighting factor
  4510. * 31:10| currenty unused (set to 0x0)
  4511. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  4512. */
  4513. A_UINT32 value;
  4514. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  4515. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  4516. typedef struct {
  4517. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  4518. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  4519. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  4520. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  4521. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  4522. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  4523. 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] */
  4524. 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] */
  4525. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  4526. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  4527. } wmi_rssi_breach_monitor_config_fixed_param;
  4528. typedef struct {
  4529. /** parameter */
  4530. A_UINT32 param;
  4531. } wmi_pdev_dump_cmd;
  4532. typedef enum {
  4533. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  4534. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  4535. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  4536. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4537. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  4538. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  4539. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  4540. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  4541. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  4542. PAUSE_TYPE_HOST = 0x15, /* host is requesting vdev pause */
  4543. } wmi_tx_pause_type;
  4544. typedef enum {
  4545. ACTION_PAUSE = 0x0,
  4546. ACTION_UNPAUSE = 0x1,
  4547. } wmi_tx_pause_action;
  4548. typedef struct {
  4549. A_UINT32 tlv_header;
  4550. A_UINT32 pause_type;
  4551. A_UINT32 action;
  4552. A_UINT32 vdev_map;
  4553. A_UINT32 peer_id;
  4554. A_UINT32 tid_map;
  4555. } wmi_tx_pause_event_fixed_param;
  4556. typedef enum {
  4557. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  4558. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  4559. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  4560. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  4561. WMI_MGMT_TX_COMP_TYPE_MAX,
  4562. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  4563. typedef struct {
  4564. A_UINT32 tlv_header;
  4565. A_UINT32 desc_id; /* from tx_send_cmd */
  4566. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  4567. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4568. * See macros starting with WMI_PDEV_ID_ for values.
  4569. */
  4570. A_UINT32 pdev_id;
  4571. /* ppdu_id
  4572. * Hardware PPDU ID for tracking the completion stats
  4573. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  4574. */
  4575. A_UINT32 ppdu_id;
  4576. } wmi_mgmt_tx_compl_event_fixed_param;
  4577. typedef struct {
  4578. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offchan_data_tx_compl_event_fixed_param */
  4579. A_UINT32 desc_id; /* from tx_send_cmd */
  4580. A_UINT32 status; /* same status as WMI_MGMT_TX_COMP_STATUS_TYPE */
  4581. /** pdev_id for identifying the MAC that transmitted the mgmt frame
  4582. * See macros starting with WMI_PDEV_ID_ for values.
  4583. */
  4584. A_UINT32 pdev_id;
  4585. /* ppdu_id
  4586. * Hardware PPDU ID for tracking the completion stats
  4587. * A ppdu_id value of 0x0 is invalid, and should be ignored.
  4588. */
  4589. A_UINT32 ppdu_id;
  4590. } wmi_offchan_data_tx_compl_event_fixed_param;
  4591. typedef struct {
  4592. A_UINT32 tlv_header;
  4593. A_UINT32 num_reports;
  4594. /* tlv for completion
  4595. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  4596. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  4597. * A_UINT32 ppdu_id[num_reports]; <- list of PPDU IDs
  4598. */
  4599. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  4600. #define WMI_TPC_RATE_MAX 160
  4601. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4602. #define WMI_TPC_TX_NUM_CHAIN 4
  4603. typedef enum {
  4604. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  4605. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  4606. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  4607. } WMI_TPC_CONFIG_EVENT_FLAG;
  4608. typedef struct {
  4609. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  4610. A_UINT32 regDomain;
  4611. A_UINT32 chanFreq;
  4612. A_UINT32 phyMode;
  4613. A_UINT32 twiceAntennaReduction;
  4614. A_UINT32 twiceMaxRDPower;
  4615. A_INT32 twiceAntennaGain;
  4616. A_UINT32 powerLimit;
  4617. A_UINT32 rateMax;
  4618. A_UINT32 numTxChain;
  4619. A_UINT32 ctl;
  4620. A_UINT32 flags;
  4621. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  4622. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  4623. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4624. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4625. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  4626. /** pdev_id for identifying the MAC
  4627. * See macros starting with WMI_PDEV_ID_ for values.
  4628. */
  4629. A_UINT32 pdev_id;
  4630. /* This TLV is followed by a byte array:
  4631. * A_UINT8 ratesArray[];
  4632. */
  4633. } wmi_pdev_tpc_config_event_fixed_param;
  4634. typedef struct {
  4635. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_div_rssi_antid_event_fixed_param */
  4636. A_UINT32 tlv_header;
  4637. /** how many elements in the MAX_CHAINS arrays below contain valid info */
  4638. A_UINT32 num_chains_valid;
  4639. /** RSSI (rssi_chain_x_pri20) on each chain (units: dB above noise floor) */
  4640. A_UINT32 chain_rssi[WMI_MAX_CHAINS];
  4641. /** index of the last-used antenna for each chain */
  4642. A_UINT32 ant_id[WMI_MAX_CHAINS];
  4643. /** mac address of diversity peer */
  4644. wmi_mac_addr macaddr;
  4645. } wmi_pdev_div_rssi_antid_event_fixed_param;
  4646. typedef struct {
  4647. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_bss_chan_info_event_fixed_param */
  4648. A_UINT32 freq; /* Units in MHz */
  4649. A_INT32 noise_floor; /* units are dBm */
  4650. /* rx clear - how often the channel was unused */
  4651. A_UINT32 rx_clear_count_low; /* low 31 bits of rx_clear cnt in 64bits format */
  4652. A_UINT32 rx_clear_count_high; /* high 31 bits of rx_clear cnt in 64bits format */
  4653. /* cycle count - elapsed time during the measured period, in clock ticks */
  4654. A_UINT32 cycle_count_low; /* low 31 bits of cycle cnt in 64bits format */
  4655. A_UINT32 cycle_count_high; /* high 31 bits of cycle cnt in 64bits format */
  4656. /* tx cycle count - elapsed time spent in tx, in clock ticks */
  4657. A_UINT32 tx_cycle_count_low; /* low 31 bits of tx_cycle cnt in 64bits format */
  4658. A_UINT32 tx_cycle_count_high; /* high 31 bits of tx_cycle cnt in 64bits format */
  4659. /* rx cycle count - elapsed time spent in rx, in clock ticks */
  4660. A_UINT32 rx_cycle_count_low; /* low 31 bits of rx_cycle cnt in 64bits format */
  4661. A_UINT32 rx_cycle_count_high; /* high 31 bits of rx_cycle cnt in 64bits format */
  4662. A_UINT32 rx_bss_cycle_count_low; /* low 31 bits of rx cycle cnt for my bss in 64bits format */
  4663. A_UINT32 rx_bss_cycle_count_high; /* high 31 bits of rx_cycle cnt for my bss in 64bits format */
  4664. } wmi_pdev_bss_chan_info_event_fixed_param;
  4665. typedef struct {
  4666. /* WMI event response update ctltable request to host */
  4667. A_UINT32 tlv_header; /* WMITLV_TAG_STRUC_wmi_pdev_update_ctltable_event_fixed_param */
  4668. A_UINT32 total_len; /* the total number of bytes to be transferred */
  4669. A_UINT32 len; /* the number of FW received bytes from host */
  4670. A_UINT32 seq; /* the number of current transfers */
  4671. } wmi_pdev_update_ctltable_event_fixed_param;
  4672. typedef struct {
  4673. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  4674. A_UINT32 periodCnt;
  4675. A_UINT32 L1Cnt;
  4676. A_UINT32 L11Cnt;
  4677. A_UINT32 L12Cnt;
  4678. A_UINT32 L1Entry;
  4679. A_UINT32 L11Entry;
  4680. A_UINT32 L12Entry;
  4681. /** pdev_id for identifying the MAC
  4682. * See macros starting with WMI_PDEV_ID_ for values.
  4683. */
  4684. A_UINT32 pdev_id;
  4685. } wmi_pdev_l1ss_track_event_fixed_param;
  4686. typedef struct {
  4687. A_UINT32 len;
  4688. A_UINT32 msgref;
  4689. A_UINT32 segmentInfo;
  4690. } wmi_pdev_seg_hdr_info;
  4691. /*
  4692. * Transmit power scale factor.
  4693. *
  4694. */
  4695. typedef enum {
  4696. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  4697. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  4698. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  4699. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  4700. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  4701. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  4702. } WMI_TP_SCALE;
  4703. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  4704. typedef struct {
  4705. /** message buffer, NULL terminated */
  4706. char bufp[WMI_MAX_DEBUG_MESG];
  4707. } wmi_debug_mesg_event;
  4708. enum {
  4709. /** P2P device */
  4710. VDEV_SUBTYPE_P2PDEV = 0,
  4711. /** P2P client */
  4712. VDEV_SUBTYPE_P2PCLI,
  4713. /** P2P GO */
  4714. VDEV_SUBTYPE_P2PGO,
  4715. /** BT3.0 HS */
  4716. VDEV_SUBTYPE_BT,
  4717. };
  4718. typedef struct {
  4719. /** idnore power , only use flags , mode and freq */
  4720. wmi_channel chan;
  4721. } wmi_pdev_set_channel_cmd;
  4722. typedef enum {
  4723. WMI_PKTLOG_EVENT_RX = 0x1,
  4724. WMI_PKTLOG_EVENT_TX = 0x2,
  4725. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  4726. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  4727. /* 0x10 used by deprecated DBG_PRINT */
  4728. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  4729. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  4730. } WMI_PKTLOG_EVENT;
  4731. typedef enum {
  4732. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  4733. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  4734. } WMI_PKTLOG_ENABLE;
  4735. typedef struct {
  4736. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  4737. /** pdev_id for identifying the MAC
  4738. * See macros starting with WMI_PDEV_ID_ for values.
  4739. */
  4740. A_UINT32 pdev_id;
  4741. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  4742. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  4743. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  4744. typedef struct {
  4745. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  4746. /** pdev_id for identifying the MAC
  4747. * See macros starting with WMI_PDEV_ID_ for values.
  4748. */
  4749. A_UINT32 pdev_id;
  4750. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  4751. typedef struct {
  4752. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  4753. /** pdev_id for identifying the MAC
  4754. * See macros starting with WMI_PDEV_ID_ for values.
  4755. */
  4756. A_UINT32 pdev_id;
  4757. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  4758. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  4759. } wmi_mib_stats_enable_cmd_fixed_param;
  4760. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  4761. * NOTE: This constant cannot be changed without breaking
  4762. * WMI Compatibility. */
  4763. #define WMI_DSCP_MAP_MAX (64)
  4764. /*
  4765. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  4766. * @details
  4767. * Create an API for sending the custom DSCP-to-TID map to the target
  4768. * If this is a request from the user space or from above the UMAC
  4769. * then the best place to implement this is in the umac_if_offload of the OL path.
  4770. * Provide a place holder for this API in the ieee80211com (ic).
  4771. *
  4772. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  4773. * in the target should be directed to the function pointer in the ic.
  4774. *
  4775. * Implementation details of the API to send the map to the target are as described-
  4776. *
  4777. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  4778. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  4779. * 64 TID values for 2^6 (64) DSCP ids.
  4780. * Example:
  4781. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  4782. * 0, 0, 0, 0, 0, 0, 0, 0,
  4783. * 1, 1, 1, 1, 1, 1, 1, 1,
  4784. * 2, 2, 2, 2, 2, 2, 2, 2,
  4785. * 3, 3, 3, 3, 3, 3, 3, 3,
  4786. * 4, 4, 4, 4, 4, 4, 4, 4,
  4787. * 5, 5, 5, 5, 5, 5, 5, 5,
  4788. * 6, 6, 6, 6, 6, 6, 6, 6,
  4789. * 7, 7, 7, 7, 7, 7, 7, 7,
  4790. * };
  4791. *
  4792. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  4793. *
  4794. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  4795. *
  4796. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  4797. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  4798. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  4799. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  4800. *
  4801. */
  4802. /* DEPRECATED - use VDEV level command instead
  4803. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  4804. */
  4805. typedef struct {
  4806. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  4807. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4808. /* map indicating DSCP to TID conversion */
  4809. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  4810. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  4811. typedef struct {
  4812. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  4813. A_UINT32 vdev_id;
  4814. /** map indicating DSCP to TID conversion */
  4815. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  4816. A_UINT32 enable_override;
  4817. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  4818. enum WMI_WAKE_GPIO_TYPE {
  4819. WMI_WAKE_GPIO_LOW = 1,
  4820. WMI_WAKE_GPIO_HIGH = 2,
  4821. WMI_WAKE_GPIO_RISING_EDGE = 3,
  4822. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  4823. };
  4824. /**
  4825. * Set GPIO numbers used to wakeup host and wakeup target.
  4826. */
  4827. typedef struct {
  4828. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  4829. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  4830. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  4831. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  4832. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  4833. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  4834. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  4835. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  4836. * @details
  4837. * Create an API for setting the custom rate for the MCAST and BCAST frames
  4838. * in the target. If this is a request from the user space or from above the UMAC
  4839. * then the best place to implement this is in the umac_if_offload of the OL path.
  4840. * Provide a place holder for this API in the ieee80211com (ic).
  4841. *
  4842. * Implementation details of the API to set custom rates for MCAST and BCAST in
  4843. * the target are as described-
  4844. *
  4845. * 1. The function will have 3 arguments-
  4846. * vap structure,
  4847. * MCAST/ BCAST identifier code,
  4848. * 8 bit rate code
  4849. *
  4850. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  4851. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  4852. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  4853. * b'3-b'0 indicate the rate, which is indicated as follows:
  4854. * OFDM : 0: OFDM 48 Mbps
  4855. * 1: OFDM 24 Mbps
  4856. * 2: OFDM 12 Mbps
  4857. * 3: OFDM 6 Mbps
  4858. * 4: OFDM 54 Mbps
  4859. * 5: OFDM 36 Mbps
  4860. * 6: OFDM 18 Mbps
  4861. * 7: OFDM 9 Mbps
  4862. * CCK (pream == 1)
  4863. * 0: CCK 11 Mbps Long
  4864. * 1: CCK 5.5 Mbps Long
  4865. * 2: CCK 2 Mbps Long
  4866. * 3: CCK 1 Mbps Long
  4867. * 4: CCK 11 Mbps Short
  4868. * 5: CCK 5.5 Mbps Short
  4869. * 6: CCK 2 Mbps Short
  4870. * HT/VHT (pream == 2/3)
  4871. * 0..7: MCS0..MCS7 (HT)
  4872. * 0..9: MCS0..MCS9 (VHT)
  4873. *
  4874. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  4875. * to the target.
  4876. * Arguments to the API are-
  4877. * wmi handle,
  4878. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  4879. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  4880. * rate value.
  4881. */
  4882. typedef enum {
  4883. WMI_SET_MCAST_RATE,
  4884. WMI_SET_BCAST_RATE
  4885. } MCAST_BCAST_RATE_ID;
  4886. typedef struct {
  4887. MCAST_BCAST_RATE_ID rate_id;
  4888. A_UINT32 rate;
  4889. } mcast_bcast_rate;
  4890. typedef struct {
  4891. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  4892. A_UINT32 cwmin;
  4893. A_UINT32 cwmax;
  4894. A_UINT32 aifs;
  4895. A_UINT32 txoplimit;
  4896. A_UINT32 acm;
  4897. A_UINT32 no_ack;
  4898. } wmi_wmm_params;
  4899. /* DEPRECATED - use VDEV level command instead
  4900. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  4901. */
  4902. typedef struct {
  4903. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  4904. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  4905. A_UINT32 dg_type;
  4906. /* The TLVs for the 4 AC follows:
  4907. * wmi_wmm_params wmm_params_ac_be;
  4908. * wmi_wmm_params wmm_params_ac_bk;
  4909. * wmi_wmm_params wmm_params_ac_vi;
  4910. * wmi_wmm_params wmm_params_ac_vo;
  4911. */
  4912. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  4913. typedef enum {
  4914. WMI_REQUEST_PEER_STAT = 0x01,
  4915. WMI_REQUEST_AP_STAT = 0x02,
  4916. WMI_REQUEST_PDEV_STAT = 0x04,
  4917. WMI_REQUEST_VDEV_STAT = 0x08,
  4918. WMI_REQUEST_BCNFLT_STAT = 0x10,
  4919. WMI_REQUEST_VDEV_RATE_STAT = 0x20,
  4920. WMI_REQUEST_INST_STAT = 0x40,
  4921. WMI_REQUEST_MIB_STAT = 0x80,
  4922. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
  4923. WMI_REQUEST_CONGESTION_STAT = 0x200,
  4924. WMI_REQUEST_PEER_EXTD_STAT = 0x400,
  4925. WMI_REQUEST_BCN_STAT = 0x800,
  4926. } wmi_stats_id;
  4927. /*
  4928. * cfg_retry_count is set to max number of times the AP should try sending
  4929. * QoS Null frames to the STA for measuring the instantaneous RSSI
  4930. *
  4931. * retry_count is used to maintain the number of times the AP has tried sending
  4932. * QoS Null frames to the STA for measuring the instantaneous RSSI
  4933. */
  4934. typedef struct {
  4935. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_sub_struc_param */
  4936. A_UINT32 cfg_retry_count;
  4937. A_UINT32 retry_count;
  4938. } wmi_inst_rssi_stats_params;
  4939. typedef struct {
  4940. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  4941. wmi_stats_id stats_id;
  4942. /** unique id identifying the VDEV, generated by the caller */
  4943. A_UINT32 vdev_id;
  4944. /** peer MAC address */
  4945. wmi_mac_addr peer_macaddr;
  4946. 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. */
  4947. /*
  4948. * This TLV is (optionally) followed by other TLVs:
  4949. * wmi_inst_rssi_stats_params inst_rssi_params;
  4950. */
  4951. } wmi_request_stats_cmd_fixed_param;
  4952. /* stats type bitmap */
  4953. #define WMI_LINK_STATS_RADIO 0x00000001
  4954. #define WMI_LINK_STATS_IFACE 0x00000002
  4955. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  4956. #define WMI_LINK_STATS_PER_PEER 0x00000008
  4957. /* wifi clear statistics bitmap */
  4958. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  4959. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  4960. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  4961. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  4962. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  4963. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  4964. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  4965. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  4966. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  4967. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  4968. /** Default value for stats if the stats collection has not started */
  4969. #define WMI_STATS_VALUE_INVALID 0xffffffff
  4970. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  4971. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  4972. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  4973. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  4974. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4975. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4976. typedef struct {
  4977. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  4978. A_UINT32 num_of_diag_events_logs;
  4979. /* The TLVs will follow.
  4980. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4981. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4982. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  4983. */
  4984. } wmi_diag_event_log_config_fixed_param;
  4985. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  4986. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  4987. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  4988. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  4989. typedef struct {
  4990. A_UINT32 tlv_header;
  4991. A_UINT32 num_of_diag_events_logs;
  4992. /* The TLVs will follow.
  4993. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  4994. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  4995. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  4996. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  4997. */
  4998. } wmi_diag_event_log_supported_event_fixed_params;
  4999. typedef struct {
  5000. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  5001. A_UINT32 reserved0; /** placeholder for future */
  5002. } wmi_debug_mesg_flush_fixed_param;
  5003. typedef struct {
  5004. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param */
  5005. A_UINT32 vdev_id_bitmap; /** bitmap representation for vdev_id's where data stall happened */
  5006. A_UINT32 data_stall_type; /** wlan_dbg_data_stall_type_e */
  5007. /** reason_code1:
  5008. * The information stored in reason_code1 varies based on the data stally
  5009. * type values:
  5010. * data_stall_type | reason_code1
  5011. * -----------------------------------------------------
  5012. * HWSCHED_CMD_FLUSH | flush req reason (0-40)
  5013. * RX_REFILL_FAILED | ring_id (0-7)
  5014. * RX_FCS_LEN_ERROR | exact error type
  5015. */
  5016. A_UINT32 reason_code1;
  5017. A_UINT32 reason_code2; /** on which tid/hwq stall happened */
  5018. A_UINT32 recovery_type; /** wlan_dbg_data_stall_recovery_type_e */
  5019. } wmi_debug_mesg_fw_data_stall_param;
  5020. typedef struct {
  5021. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  5022. A_UINT32 reserved0; /** placeholder for future */
  5023. } wmi_debug_mesg_flush_complete_fixed_param;
  5024. typedef struct {
  5025. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  5026. /* vdev_id, where RSSI breach event occurred */
  5027. A_UINT32 vdev_id;
  5028. /* request id */
  5029. A_UINT32 request_id;
  5030. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  5031. A_UINT32 event_bitmap;
  5032. /* rssi at the time of RSSI breach. Unit dBm */
  5033. A_UINT32 rssi;
  5034. /* bssid of the monitored AP's */
  5035. wmi_mac_addr bssid;
  5036. } wmi_rssi_breach_event_fixed_param;
  5037. typedef struct {
  5038. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  5039. /** unique id identifying the segment */
  5040. A_UINT32 seg_id;
  5041. /** Start address of the segment to be read */
  5042. A_UINT32 seg_start_addr_lo;
  5043. A_UINT32 seg_start_addr_hi;
  5044. /** Length of the segment to be read */
  5045. A_UINT32 seg_length;
  5046. /** Host bufeer address to which the segment will be read and dumped */
  5047. A_UINT32 dest_addr_lo;
  5048. A_UINT32 dest_addr_hi;
  5049. } wmi_fw_mem_dump;
  5050. /* Command to get firmware memory dump*/
  5051. typedef struct {
  5052. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  5053. /** unique id identifying the request */
  5054. A_UINT32 request_id;
  5055. /** number of memory dump segments */
  5056. A_UINT32 num_fw_mem_dump_segs;
  5057. /**
  5058. * This TLV is followed by another TLV
  5059. * wmi_fw_mem_dump fw_mem_dump[];
  5060. */
  5061. } wmi_get_fw_mem_dump_fixed_param;
  5062. /** Event to indicate the completion of fw mem dump */
  5063. typedef struct {
  5064. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  5065. /** unique id identifying the request, given in the request stats command */
  5066. A_UINT32 request_id;
  5067. /*In case of Firmware memory dump */
  5068. A_UINT32 fw_mem_dump_complete;
  5069. } wmi_update_fw_mem_dump_fixed_param;
  5070. typedef enum {
  5071. WMI_ROAMING_IDLE = 0,
  5072. WMI_ROAMING_ACTIVE = 1,
  5073. } wmi_roam_state;
  5074. /* access categories */
  5075. typedef enum {
  5076. WMI_AC_VO = 0,
  5077. WMI_AC_VI = 1,
  5078. WMI_AC_BE = 2,
  5079. WMI_AC_BK = 3,
  5080. WMI_AC_MAX = 4,
  5081. } wmi_traffic_ac;
  5082. typedef enum {
  5083. WMI_STA_STATS = 0,
  5084. WMI_SOFTAP_STATS = 1,
  5085. WMI_IBSS_STATS = 2,
  5086. WMI_P2P_CLIENT_STATS = 3,
  5087. WMI_P2P_GO_STATS = 4,
  5088. WMI_NAN_STATS = 5,
  5089. WMI_MESH_STATS = 6,
  5090. } wmi_link_iface_type;
  5091. /* channel operating width */
  5092. typedef enum {
  5093. WMI_CHAN_WIDTH_20 = 0,
  5094. WMI_CHAN_WIDTH_40 = 1,
  5095. WMI_CHAN_WIDTH_80 = 2,
  5096. WMI_CHAN_WIDTH_160 = 3,
  5097. WMI_CHAN_WIDTH_80P80 = 4,
  5098. WMI_CHAN_WIDTH_5 = 5,
  5099. WMI_CHAN_WIDTH_10 = 6,
  5100. } wmi_channel_width;
  5101. /*Clear stats*/
  5102. typedef struct {
  5103. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  5104. /** unique id identifying the VDEV, generated by the caller */
  5105. A_UINT32 vdev_id;
  5106. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  5107. A_UINT32 stop_stats_collection_req;
  5108. /** identifies what stats to be cleared */
  5109. A_UINT32 stats_clear_req_mask;
  5110. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  5111. wmi_mac_addr peer_macaddr;
  5112. } wmi_clear_link_stats_cmd_fixed_param;
  5113. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  5114. typedef struct {
  5115. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  5116. /** threshold to classify the pkts as short or long */
  5117. A_UINT32 mpdu_size_threshold;
  5118. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  5119. A_UINT32 aggressive_statistics_gathering;
  5120. } wmi_start_link_stats_cmd_fixed_param;
  5121. typedef struct {
  5122. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  5123. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  5124. A_UINT32 stats_type;
  5125. /** unique id identifying the VDEV, generated by the caller */
  5126. A_UINT32 vdev_id;
  5127. /** unique id identifying the request, generated by the caller */
  5128. A_UINT32 request_id;
  5129. /** peer MAC address */
  5130. wmi_mac_addr peer_macaddr;
  5131. } wmi_request_link_stats_cmd_fixed_param;
  5132. /* channel statistics */
  5133. typedef struct {
  5134. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  5135. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  5136. A_UINT32 channel_width;
  5137. /** Primary 20 MHz channel */
  5138. A_UINT32 center_freq;
  5139. /** center frequency (MHz) first segment */
  5140. A_UINT32 center_freq0;
  5141. /** center frequency (MHz) second segment */
  5142. A_UINT32 center_freq1;
  5143. /** msecs the radio is awake (32 bits number accruing over time) */
  5144. A_UINT32 radio_awake_time;
  5145. /** msecs the CCA register is busy (32 bits number accruing over time) */
  5146. A_UINT32 cca_busy_time;
  5147. } wmi_channel_stats;
  5148. /*
  5149. * Each step represents 0.5 dB. The starting value is 0 dBm.
  5150. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  5151. */
  5152. #define MAX_TPC_LEVELS 64
  5153. /* radio statistics */
  5154. typedef struct {
  5155. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  5156. /** Wifi radio (if multiple radio supported) */
  5157. A_UINT32 radio_id;
  5158. /** msecs the radio is awake (32 bits number accruing over time) */
  5159. A_UINT32 on_time;
  5160. /** msecs the radio is transmitting (32 bits number accruing over time) */
  5161. A_UINT32 tx_time;
  5162. /** msecs the radio is in active receive (32 bits number accruing over time) */
  5163. A_UINT32 rx_time;
  5164. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  5165. A_UINT32 on_time_scan;
  5166. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  5167. A_UINT32 on_time_nbd;
  5168. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  5169. A_UINT32 on_time_gscan;
  5170. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  5171. A_UINT32 on_time_roam_scan;
  5172. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  5173. A_UINT32 on_time_pno_scan;
  5174. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  5175. A_UINT32 on_time_hs20;
  5176. /** number of channels */
  5177. A_UINT32 num_channels;
  5178. /** tx time per TPC level - DEPRECATED
  5179. * This field is deprecated.
  5180. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  5181. */
  5182. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  5183. /** msecs the radio is awake due to Host initiated scan (accruing over time) */
  5184. A_UINT32 on_time_host_scan;
  5185. /** msecs the radio is awake due to LPI scan (accruing over time) */
  5186. A_UINT32 on_time_lpi_scan;
  5187. } wmi_radio_link_stats;
  5188. /** tx time per power level statistics */
  5189. typedef struct {
  5190. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  5191. /** total number of tx power levels */
  5192. A_UINT32 total_num_tx_power_levels;
  5193. /** number of tx power levels that are carried in this event */
  5194. A_UINT32 num_tx_power_levels;
  5195. /** offset of current stats
  5196. * If ((num_tx_power_levels + power_level_offset)) ==
  5197. * total_num_tx_power_levels)
  5198. * this message completes the report of tx time per power levels.
  5199. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  5200. * will be sent by the target to deliver the remainder of the tx time
  5201. * per power level stats.
  5202. */
  5203. A_UINT32 power_level_offset;
  5204. /* radio id for this tx time per power level statistics (if multiple radio supported) */
  5205. A_UINT32 radio_id;
  5206. /*
  5207. * This TLV will be followed by a TLV containing a variable-length array of
  5208. * A_UINT32 with tx time per power level data
  5209. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  5210. * The tx time is in units of milliseconds.
  5211. * The power levels are board-specific values; a board-specific translation
  5212. * has to be applied to determine what actual power corresponds to each
  5213. * power level.
  5214. * Just as the host has a BDF file available, the host should also have
  5215. * a data file available that provides the power level to power translations.
  5216. */
  5217. } wmi_tx_power_level_stats_evt_fixed_param;
  5218. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  5219. typedef struct {
  5220. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5221. /** unique id identifying the request, given in the request stats command */
  5222. A_UINT32 request_id;
  5223. /** Number of radios*/
  5224. A_UINT32 num_radio;
  5225. /** more_data will be set depending on the number of radios */
  5226. A_UINT32 more_radio_events;
  5227. /*
  5228. * This TLV is followed by another TLV of array of bytes
  5229. * size of(struct wmi_radio_link_stats);
  5230. *
  5231. * This TLV is followed by another TLV of array of bytes
  5232. * num_channels * size of(struct wmi_channel_stats)
  5233. */
  5234. } wmi_radio_link_stats_event_fixed_param;
  5235. /* per rate statistics */
  5236. typedef struct {
  5237. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  5238. /** rate information
  5239. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  5240. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  5241. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  5242. * b'3-b'0 indicate the rate, which is indicated as follows:
  5243. * OFDM : 0: OFDM 48 Mbps
  5244. * 1: OFDM 24 Mbps
  5245. * 2: OFDM 12 Mbps
  5246. * 3: OFDM 6 Mbps
  5247. * 4: OFDM 54 Mbps
  5248. * 5: OFDM 36 Mbps
  5249. * 6: OFDM 18 Mbps
  5250. * 7: OFDM 9 Mbps
  5251. * CCK (pream == 1)
  5252. * 0: CCK 11 Mbps Long
  5253. * 1: CCK 5.5 Mbps Long
  5254. * 2: CCK 2 Mbps Long
  5255. * 3: CCK 1 Mbps Long
  5256. * 4: CCK 11 Mbps Short
  5257. * 5: CCK 5.5 Mbps Short
  5258. * 6: CCK 2 Mbps Short
  5259. * HT/VHT (pream == 2/3)
  5260. * 0..7: MCS0..MCS7 (HT)
  5261. * 0..9: MCS0..MCS9 (VHT)
  5262. */
  5263. A_UINT32 rate;
  5264. /** units of 100 Kbps */
  5265. A_UINT32 bitrate;
  5266. /** number of successfully transmitted data pkts (ACK rcvd) */
  5267. A_UINT32 tx_mpdu;
  5268. /** number of received data pkts */
  5269. A_UINT32 rx_mpdu;
  5270. /** number of data packet losses (no ACK) */
  5271. A_UINT32 mpdu_lost;
  5272. /** total number of data pkt retries */
  5273. A_UINT32 retries;
  5274. /** number of short data pkt retries */
  5275. A_UINT32 retries_short;
  5276. /** number of long data pkt retries */
  5277. A_UINT32 retries_long;
  5278. } wmi_rate_stats;
  5279. typedef struct {
  5280. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  5281. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  5282. A_UINT32 peer_type;
  5283. /** mac address */
  5284. wmi_mac_addr peer_mac_address;
  5285. /** peer wmi_CAPABILITY_XXX */
  5286. A_UINT32 capabilities;
  5287. /** number of rates */
  5288. A_UINT32 num_rates;
  5289. } wmi_peer_link_stats;
  5290. /** PEER statistics (once started) reset and start afresh after each connection */
  5291. typedef struct {
  5292. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  5293. /** unique id identifying the request, given in the request stats command */
  5294. A_UINT32 request_id;
  5295. /** number of peers accomidated in this particular event */
  5296. A_UINT32 num_peers;
  5297. /** Indicates the fragment number */
  5298. A_UINT32 peer_event_number;
  5299. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  5300. A_UINT32 more_data;
  5301. /**
  5302. * This TLV is followed by another TLV
  5303. * num_peers * size of(struct wmi_peer_stats)
  5304. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  5305. */
  5306. } wmi_peer_stats_event_fixed_param;
  5307. /* per access category statistics */
  5308. typedef struct {
  5309. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  5310. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  5311. A_UINT32 ac_type;
  5312. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  5313. A_UINT32 tx_mpdu;
  5314. /** number of received unicast mpdus */
  5315. A_UINT32 rx_mpdu;
  5316. /** number of succesfully transmitted multicast data packets */
  5317. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  5318. A_UINT32 tx_mcast;
  5319. /** number of received multicast data packets */
  5320. A_UINT32 rx_mcast;
  5321. /** number of received unicast a-mpdus */
  5322. A_UINT32 rx_ampdu;
  5323. /** number of transmitted unicast a-mpdus */
  5324. A_UINT32 tx_ampdu;
  5325. /** number of data pkt losses (no ACK) */
  5326. A_UINT32 mpdu_lost;
  5327. /** total number of data pkt retries */
  5328. A_UINT32 retries;
  5329. /** number of short data pkt retries */
  5330. A_UINT32 retries_short;
  5331. /** number of long data pkt retries */
  5332. A_UINT32 retries_long;
  5333. /** data pkt min contention time (usecs) */
  5334. A_UINT32 contention_time_min;
  5335. /** data pkt max contention time (usecs) */
  5336. A_UINT32 contention_time_max;
  5337. /** data pkt avg contention time (usecs) */
  5338. A_UINT32 contention_time_avg;
  5339. /** num of data pkts used for contention statistics */
  5340. A_UINT32 contention_num_samples;
  5341. /** number of pending pkts */
  5342. A_UINT32 tx_pending_msdu;
  5343. } wmi_wmm_ac_stats;
  5344. /* interface statistics */
  5345. typedef struct {
  5346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  5347. /** access point beacon received count from connected AP */
  5348. A_UINT32 beacon_rx;
  5349. /** access point mgmt frames received count from connected AP (including Beacon) */
  5350. A_UINT32 mgmt_rx;
  5351. /** action frames received count */
  5352. A_UINT32 mgmt_action_rx;
  5353. /** action frames transmit count */
  5354. A_UINT32 mgmt_action_tx;
  5355. /** access Point Beacon and Management frames RSSI (averaged) */
  5356. A_UINT32 rssi_mgmt;
  5357. /** access Point Data Frames RSSI (averaged) from connected AP */
  5358. A_UINT32 rssi_data;
  5359. /** access Point ACK RSSI (averaged) from connected AP */
  5360. A_UINT32 rssi_ack;
  5361. /** number of peers */
  5362. A_UINT32 num_peers;
  5363. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  5364. A_UINT32 num_peer_events;
  5365. /** number of ac */
  5366. A_UINT32 num_ac;
  5367. /** Roaming Stat */
  5368. A_UINT32 roam_state;
  5369. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  5370. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  5371. A_UINT32 avg_bcn_spread_offset_high;
  5372. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  5373. A_UINT32 avg_bcn_spread_offset_low;
  5374. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  5375. A_UINT32 is_leaky_ap;
  5376. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  5377. A_UINT32 avg_rx_frms_leaked;
  5378. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  5379. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  5380. a data frame with PM bit set) */
  5381. A_UINT32 rx_leak_window;
  5382. A_UINT32 tx_rts_succ_cnt;
  5383. A_UINT32 tx_rts_fail_cnt;
  5384. A_UINT32 tx_ppdu_succ_cnt;
  5385. A_UINT32 tx_ppdu_fail_cnt;
  5386. /** msecs the interface is in Connected state (accruing over time) */
  5387. A_UINT32 connected_duration;
  5388. /** msecs the interface is in DisConnected state (accruing over time) */
  5389. A_UINT32 disconnected_duration;
  5390. /** msecs the interface is doing RTT ranging (accruing over time) */
  5391. A_UINT32 rtt_ranging_duration;
  5392. /** msecs the interface is in RTT responder mode (accruing over time) */
  5393. A_UINT32 rtt_responder_duration;
  5394. /** Number of Probes (Tx) sent on the interface (accruing over time) */
  5395. A_UINT32 num_probes_tx;
  5396. /** Number of Beacon misses on this interface (accruing over time) */
  5397. A_UINT32 num_beacon_miss;
  5398. } wmi_iface_link_stats;
  5399. typedef enum {
  5400. WMI_OFFLOAD_STATS_TYPE_SOC_BCAST = 0,
  5401. WMI_OFFLOAD_STATS_TYPE_SOC_MCAST = 1,
  5402. WMI_OFFLOAD_STATS_TYPE_SOC_UCAST = 2,
  5403. WMI_OFFLOAD_STATS_TYPE_ARP = 3,
  5404. WMI_OFFLOAD_STATS_TYPE_NS = 4,
  5405. WMI_OFFLOAD_STATS_TYPE_APF_BCAST = 5,
  5406. WMI_OFFLOAD_STATS_TYPE_APF_MCAST = 6,
  5407. WMI_OFFLOAD_STATS_TYPE_APF_UCAST = 7,
  5408. /* Add New offload stat type here */
  5409. WMI_OFFLOAD_STATS_TYPE_MAX,
  5410. } wmi_offload_stats_type;
  5411. typedef struct {
  5412. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_offload_stats */
  5413. /** Type of offload stat. enum wmi_offload_stats_type **/
  5414. A_UINT32 type;
  5415. /** Number of (MSDUs) frames Received **/
  5416. A_UINT32 rx_count;
  5417. /** Number of frames Dropped **/
  5418. A_UINT32 drp_count;
  5419. /** Number of frames for which FW Responded (Valid for ARP and NS only). (or)
  5420. * Number of frames forwarded to Host (Valid for stats type except ARP and NS). **/
  5421. A_UINT32 fwd_count;
  5422. } wmi_iface_offload_stats;
  5423. /** Interface statistics (once started) reset and start afresh after each connection */
  5424. typedef struct {
  5425. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  5426. /** unique id identifying the request, given in the request stats command */
  5427. A_UINT32 request_id;
  5428. /** unique id identifying the VDEV, generated by the caller */
  5429. A_UINT32 vdev_id;
  5430. /** Number of offload stats **/
  5431. A_UINT32 num_offload_stats;
  5432. /*
  5433. * This TLV is followed by other TLVs:
  5434. * wmi_iface_link_stats iface_link_stats;
  5435. * num_ac * size of(struct wmi_wmm_ac_stats)
  5436. * wmi_iface_offload_stats iface_offload_stats[num_offload_stats]
  5437. */
  5438. } wmi_iface_link_stats_event_fixed_param;
  5439. /** Suspend option */
  5440. enum {
  5441. WMI_PDEV_SUSPEND, /* suspend */
  5442. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  5443. };
  5444. typedef struct {
  5445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  5446. /* suspend option sent to target */
  5447. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5448. A_UINT32 suspend_opt;
  5449. } wmi_pdev_suspend_cmd_fixed_param;
  5450. typedef struct {
  5451. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  5452. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  5453. } wmi_pdev_resume_cmd_fixed_param;
  5454. typedef struct {
  5455. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  5456. A_UINT32 num_vdev_stats; /* number of vdevs */
  5457. } wmi_vdev_rate_stats_event_fixed_param;
  5458. typedef struct {
  5459. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  5460. A_UINT32 vdevid; /* Id of the wlan vdev*/
  5461. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  5462. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  5463. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  5464. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  5465. } wmi_vdev_rate_ht_info;
  5466. typedef struct {
  5467. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param */
  5468. A_UINT32 num_failure_info; /* How many holes on rx aggregation */
  5469. } wmi_rx_aggr_failure_event_fixed_param;
  5470. typedef struct {
  5471. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_wmi_rx_aggr_failure_info */
  5472. A_UINT32 start_seq; /* start sequence number of the hole */
  5473. A_UINT32 end_seq; /* end sequence number of the hole */
  5474. } wmi_rx_aggr_failure_info;
  5475. typedef struct {
  5476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  5477. wmi_stats_id stats_id;
  5478. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  5479. A_UINT32 num_pdev_stats;
  5480. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  5481. A_UINT32 num_vdev_stats;
  5482. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  5483. A_UINT32 num_peer_stats;
  5484. A_UINT32 num_bcnflt_stats;
  5485. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  5486. A_UINT32 num_chan_stats;
  5487. /** number of MIB stats event structures (wmi_mib_stats) */
  5488. A_UINT32 num_mib_stats;
  5489. 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. */
  5490. /** number of beacon stats event structures (wmi_bcn_stats) */
  5491. A_UINT32 num_bcn_stats;
  5492. /* This TLV is followed by another TLV of array of bytes
  5493. * A_UINT8 data[];
  5494. * This data array contains
  5495. * num_pdev_stats * size of(struct wmi_pdev_stats)
  5496. * num_vdev_stats * size of(struct wmi_vdev_stats)
  5497. * num_peer_stats * size of(struct wmi_peer_stats)
  5498. * num_bcnflt_stats * size_of()
  5499. * num_chan_stats * size of(struct wmi_chan_stats)
  5500. * num_mib_stats * size of(struct wmi_mib_stats)
  5501. * num_bcn_stats * size of(struct wmi_bcn_stats)
  5502. */
  5503. /* If WMI_REQUEST_PEER_EXTD_STAT is set in stats_id,
  5504. * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats
  5505. * following the information elements listed above.
  5506. */
  5507. } wmi_stats_event_fixed_param;
  5508. /* WLAN channel CCA stats bitmap */
  5509. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  5510. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  5511. #define WLAN_STATS_TX_TIME_SHIFT 1
  5512. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  5513. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  5514. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  5515. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  5516. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  5517. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  5518. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  5519. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  5520. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  5521. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  5522. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  5523. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  5524. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  5525. /* WLAN peer signal stats bitmap */
  5526. #define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
  5527. #define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
  5528. #define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
  5529. #define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
  5530. /* WLAN TX stats bitmap */
  5531. #define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
  5532. #define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
  5533. #define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
  5534. #define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
  5535. #define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
  5536. #define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
  5537. #define WLAN_STATS_TX_BYTES_SHIFT 3
  5538. #define WLAN_STATS_TX_BYTES_MASK 0x00000008
  5539. #define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
  5540. #define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
  5541. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
  5542. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
  5543. #define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
  5544. #define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
  5545. #define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
  5546. #define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
  5547. #define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
  5548. #define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
  5549. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
  5550. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
  5551. #define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
  5552. #define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
  5553. #define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
  5554. #define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
  5555. #define WLAN_STATS_TX_PPDU_DELAY_SHIFT 12
  5556. #define WLAN_STATS_TX_PPDU_DELAY_MASK 0x00001000
  5557. /* WLAN RX stats bitmap */
  5558. #define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
  5559. #define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
  5560. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  5561. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  5562. #define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
  5563. #define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
  5564. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  5565. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  5566. #define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
  5567. #define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
  5568. #define WLAN_STATS_RX_MPDU_RETRY_CNT_SHIFT 5
  5569. #define WLAN_STATS_RX_MPDU_RETRY_CNT_MASK 0x00000020
  5570. #define WLAN_STATS_RX_MPDU_DUP_CNT_SHIFT 6
  5571. #define WLAN_STATS_RX_MPDU_DUP_CNT_MASK 0x00000040
  5572. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_SHIFT 7
  5573. #define WLAN_STATS_RX_MPDU_DISCARD_CNT_MASK 0x00000080
  5574. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
  5575. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
  5576. #define WLAN_STATS_RX_MCS_SHIFT 9
  5577. #define WLAN_STATS_RX_MCS_MASK 0x00000200
  5578. #define WLAN_STATS_STA_PS_INDS_SHIFT 10
  5579. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
  5580. #define WLAN_STATS_STA_PS_DURS_SHIFT 11
  5581. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
  5582. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
  5583. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
  5584. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
  5585. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
  5586. typedef struct
  5587. {
  5588. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  5589. A_UINT32 vdev_id;
  5590. /** Percentage of idle time, no TX, no RX, no interference */
  5591. A_UINT32 idle_time;
  5592. /** Percentage of time transmitting packets */
  5593. A_UINT32 tx_time;
  5594. /** Percentage of time receiving packets in current BSSs */
  5595. A_UINT32 rx_in_bss_time;
  5596. /** Percentage of time receiving packets not in current BSSs */
  5597. A_UINT32 rx_out_bss_time;
  5598. /** Percentage of time interference detected. */
  5599. A_UINT32 rx_busy_time;
  5600. /** Percentage of time receiving packets with errors
  5601. * or packets flagged as retransmission or seqnum discontinued. */
  5602. A_UINT32 rx_in_bad_cond_time;
  5603. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  5604. A_UINT32 tx_in_bad_cond_time;
  5605. /** Percentage of time the chip is unable to work in normal conditions. */
  5606. A_UINT32 wlan_not_avail_time;
  5607. } wmi_chan_cca_stats;
  5608. /** Thresholds of cca stats, stands for percentages of stats variation.
  5609. * Check wmi_chan_cca_stats for each stats's meaning.
  5610. */
  5611. typedef struct
  5612. {
  5613. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  5614. A_UINT32 idle_time; /* units = percent */
  5615. A_UINT32 tx_time; /* units = percent */
  5616. A_UINT32 rx_in_bss_time; /* units = percent */
  5617. A_UINT32 rx_out_bss_time; /* units = percent */
  5618. A_UINT32 rx_busy_time; /* units = percent */
  5619. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  5620. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  5621. A_UINT32 wlan_not_avail_time; /* units = percent */
  5622. } wmi_chan_cca_stats_thresh;
  5623. typedef struct
  5624. {
  5625. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  5626. A_UINT32 vdev_id;
  5627. A_UINT32 peer_id;
  5628. /** per chain SNR in current bss, units are dB */
  5629. A_INT32 per_chain_snr[WMI_MAX_CHAINS];
  5630. /** per chain background noise, units are dBm */
  5631. A_INT32 per_chain_nf[WMI_MAX_CHAINS];
  5632. /** per antenna rx MPDUs */
  5633. A_UINT32 per_antenna_rx_mpdus[WMI_MAX_CHAINS];
  5634. /** per antenna tx MPDUs */
  5635. A_UINT32 per_antenna_tx_mpdus[WMI_MAX_CHAINS];
  5636. /** num of valid chains for per antenna rx/tx MPDU cnts*/
  5637. A_UINT32 num_chains_valid;
  5638. } wmi_peer_signal_stats;
  5639. /** Thresholds of signal stats, stand for percentage of stats variation.
  5640. * Check wmi_peer_signal_stats for each stats's meaning.
  5641. */
  5642. typedef struct
  5643. {
  5644. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  5645. A_UINT32 per_chain_snr; /* units = dB */
  5646. A_UINT32 per_chain_nf; /* units = dBm */
  5647. } wmi_peer_signal_stats_thresh;
  5648. typedef struct
  5649. {
  5650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  5651. /** Number of total TX MSDUs on MAC layer in the period */
  5652. A_UINT32 tx_msdu_cnt;
  5653. /** Number of total TX MPDUs on MAC layer in the period */
  5654. A_UINT32 tx_mpdu_cnt;
  5655. /** Number of total TX PPDUs on MAC layer in the period */
  5656. A_UINT32 tx_ppdu_cnt;
  5657. /** Bytes of tx data on MAC layer in the period */
  5658. A_UINT32 tx_bytes;
  5659. /** Number of TX MSDUs cancelled due to any reason in the period,
  5660. * such as WMM limitation/bandwidth limitation/radio congestion */
  5661. A_UINT32 tx_msdu_drop_cnt;
  5662. /** Bytes of dropped TX packets in the period */
  5663. A_UINT32 tx_drop_bytes;
  5664. /** Number of unacked transmissions of MPDUs */
  5665. A_UINT32 tx_mpdu_retry_cnt;
  5666. /** Number of MPDUs have not been ACKed despite retried */
  5667. A_UINT32 tx_mpdu_fail_cnt;
  5668. /** Number of PPDUs which received no block ack */
  5669. A_UINT32 tx_ppdu_fail_cnt;
  5670. /* This TLV is followed by TLVs below: :
  5671. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
  5672. * A_UINT32 tx_succ_mcs[tx_succ_mcs_array_len];
  5673. * A_UINT32 tx_fail_mcs[tx_fail_mcs_array_len];
  5674. * A_UINT32 tx_ppdu_delay[tx_ppdu_delay_array_len];
  5675. */
  5676. } wmi_tx_stats;
  5677. /** Thresholds of tx stats, stand for percentage of stats variation.
  5678. * Check wmi_tx_stats for each stats's meaning.
  5679. */
  5680. typedef struct
  5681. {
  5682. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  5683. A_UINT32 tx_msdu_cnt;
  5684. A_UINT32 tx_mpdu_cnt;
  5685. A_UINT32 tx_ppdu_cnt;
  5686. A_UINT32 tx_bytes;
  5687. A_UINT32 tx_msdu_drop_cnt;
  5688. A_UINT32 tx_drop_bytes;
  5689. A_UINT32 tx_mpdu_retry_cnt;
  5690. A_UINT32 tx_mpdu_fail_cnt;
  5691. A_UINT32 tx_ppdu_fail_cnt;
  5692. A_UINT32 tx_mpdu_aggr;
  5693. A_UINT32 tx_succ_mcs;
  5694. A_UINT32 tx_fail_mcs;
  5695. A_UINT32 tx_ppdu_delay;
  5696. } wmi_tx_stats_thresh;
  5697. typedef struct
  5698. {
  5699. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  5700. A_UINT32 vdev_id;
  5701. A_UINT32 peer_id;
  5702. /* The TLVs for the 4 AC follows:
  5703. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  5704. */
  5705. } wmi_peer_ac_tx_stats;
  5706. typedef struct
  5707. {
  5708. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  5709. /** Number of RX MPDUs on MAC layer */
  5710. A_UINT32 mac_rx_mpdu_cnt;
  5711. /** Bytes of RX packets on MAC layer */
  5712. A_UINT32 mac_rx_bytes;
  5713. /** Number of RX PPDU on PHY layer */
  5714. A_UINT32 phy_rx_ppdu_cnt;
  5715. /** Bytes of RX packets on PHY layer */
  5716. A_UINT32 phy_rx_bytes;
  5717. /** Number of discontinuity in seqnum */
  5718. A_UINT32 rx_disorder_cnt;
  5719. /** Number of RX MPDUs flagged as retransmissions */
  5720. A_UINT32 rx_mpdu_retry_cnt;
  5721. /** Number of RX MPDUs identified as duplicates */
  5722. A_UINT32 rx_mpdu_dup_cnt;
  5723. /** Number of RX MPDUs discarded */
  5724. A_UINT32 rx_mpdu_discard_cnt;
  5725. /* This TLV is followed by TLVs below:
  5726. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
  5727. * A_UINT32 rx_mcs[rx_mcs_array_len];
  5728. */
  5729. } wmi_rx_stats;
  5730. /** Thresholds of rx stats, stands for percentage of stats variation.
  5731. * Check wmi_rx_stats for each stats's meaning.
  5732. */
  5733. typedef struct
  5734. {
  5735. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  5736. A_UINT32 mac_rx_mpdu_cnt;
  5737. A_UINT32 mac_rx_bytes;
  5738. A_UINT32 phy_rx_ppdu_cnt;
  5739. A_UINT32 phy_rx_bytes;
  5740. A_UINT32 rx_disorder_cnt;
  5741. A_UINT32 rx_mpdu_retry_cnt;
  5742. A_UINT32 rx_mpdu_dup_cnt;
  5743. A_UINT32 rx_mpdu_discard_cnt;
  5744. A_UINT32 rx_mpdu_aggr;
  5745. A_UINT32 rx_mcs;
  5746. A_UINT32 sta_ps_inds;
  5747. A_UINT32 sta_ps_durs;
  5748. A_UINT32 rx_probe_reqs;
  5749. A_UINT32 rx_oth_mgmts;
  5750. } wmi_rx_stats_thresh;
  5751. typedef struct
  5752. {
  5753. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  5754. A_UINT32 vdev_id;
  5755. A_UINT32 peer_id;
  5756. /** How many times STAs go to sleep */
  5757. A_UINT32 sta_ps_inds;
  5758. /** Total sleep time of STAs, milliseconds units */
  5759. A_UINT32 sta_ps_durs;
  5760. /** Number of probe requests received */
  5761. A_UINT32 rx_probe_reqs;
  5762. /** Number of other management frames received, not including probe requests */
  5763. A_UINT32 rx_oth_mgmts;
  5764. /* The TLVs for the 4 AC follows:
  5765. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  5766. */
  5767. } wmi_peer_ac_rx_stats;
  5768. typedef struct
  5769. {
  5770. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_period */
  5771. /*
  5772. * This struct provides the timestamps from a low-frequency timer
  5773. * for the start and end of a stats period.
  5774. * Each timestamp is reported twice, with different units.
  5775. * The _msec timestamp is in millisecond units.
  5776. * The _count timestamp is in clock tick units.
  5777. * The timestamp is reported in clock ticks as well as in milliseconds
  5778. * so that if the stats start and end times fall within the same
  5779. * millisecond, the clock tick timestamps can still be used to
  5780. * determine what fraction of a millisecond the stats period occupied.
  5781. */
  5782. A_UINT32 start_low_freq_msec;
  5783. A_UINT32 start_low_freq_count;
  5784. A_UINT32 end_low_freq_msec;
  5785. A_UINT32 end_low_freq_count;
  5786. } wmi_stats_period;
  5787. typedef enum {
  5788. /** Periodic timer timed out, based on the period specified
  5789. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  5790. */
  5791. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  5792. /** Any of the (enabled) stats thresholds specified
  5793. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  5794. * within the current stats period.
  5795. */
  5796. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  5797. /** In Response to the one-time wlan stats request of
  5798. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  5799. */
  5800. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  5801. } wmi_report_stats_event_trigger_cond_id;
  5802. typedef struct {
  5803. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  5804. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  5805. A_UINT32 trigger_cond_id;
  5806. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  5807. A_UINT32 cca_chgd_bitmap;
  5808. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  5809. A_UINT32 sig_chgd_bitmap;
  5810. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  5811. A_UINT32 tx_chgd_bitmap;
  5812. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  5813. A_UINT32 rx_chgd_bitmap;
  5814. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  5815. A_UINT32 num_chan_cca_stats;
  5816. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  5817. A_UINT32 num_peer_signal_stats;
  5818. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  5819. A_UINT32 num_peer_ac_tx_stats;
  5820. /** Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  5821. * The array indicates number of MPDUs sent on specified aggregation size
  5822. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  5823. * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN */
  5824. A_UINT32 tx_mpdu_aggr_array_len;
  5825. /** Array length of tx_succ_mcs[] which is histogram of encoding rate.
  5826. * The array indicates number of acked PPDUs sent at a specific rate */
  5827. A_UINT32 tx_succ_mcs_array_len;
  5828. /** Array length of tx_fail_mcs[] which is histogram of encoding rate.
  5829. * The array indicates number of unacked PPDUs sent at a specific rate */
  5830. A_UINT32 tx_fail_mcs_array_len;
  5831. /** tx_ppdu_delay[]is a histogram of delays on MAC layer.
  5832. * The array counts numbers of PPDUs encountering different TX time delays.
  5833. * TX delay here means time interval between the time a PPDU is queued
  5834. * to the MAC HW for transmission and the time the lower layers of
  5835. * tx FW return a tx status.
  5836. *
  5837. * The bin size tx_ppdu_delay_bin_size_ms specifies how many milliseconds
  5838. * each bin of the tx_ppdu_delay histogram represents.
  5839. * By default the bin size is 10ms.
  5840. * tx_ppdu_delay[0] -> delays between 0-9 ms
  5841. * tx_ppdu_delay[1] -> delays between 10-19 ms
  5842. * ...
  5843. * tx_ppdu_delay[9] -> delays between 90-99 ms
  5844. * tx_ppdu_delay[10] -> delays >= 100 ms
  5845. * Bin size can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_BIN_SIZE_MS.
  5846. */
  5847. A_UINT32 tx_ppdu_delay_bin_size_ms;
  5848. /** Array length of tx_ppdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_PPDU_DELAY_ARRAY_LEN */
  5849. A_UINT32 tx_ppdu_delay_array_len;
  5850. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  5851. A_UINT32 num_peer_ac_rx_stats;
  5852. /** Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  5853. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN */
  5854. A_UINT32 rx_mpdu_aggr_array_len;
  5855. /** Array size of rx_mcs[] which is histogram of encoding rate.
  5856. * The array indicates number of PPDUs received at a specific rate */
  5857. A_UINT32 rx_mcs_array_len;
  5858. /** Array size of stats_period[] which contains several stats periods. */
  5859. A_UINT32 stats_period_array_len;
  5860. /**
  5861. * This TLV is followed by TLVs below:
  5862. * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
  5863. * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
  5864. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
  5865. * 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)
  5866. * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
  5867. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
  5868. * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
  5869. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
  5870. * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
  5871. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
  5872. * A_UINT32 tx_ppdu_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_ppdu_delay_array_len,
  5873. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_ppdu_delay_array_len + tx delay index
  5874. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
  5875. * 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)
  5876. * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
  5877. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
  5878. * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
  5879. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
  5880. * wmi_stats_period stats_period[]; Array length is specified by stats_period_array_len
  5881. **/
  5882. } wmi_report_stats_event_fixed_param;
  5883. typedef struct {
  5884. /** TLV tag and len; tag equals
  5885. * WMITLV_TAG_STRUC_wmi_peer_stats_info */
  5886. A_UINT32 tlv_header;
  5887. /** peer MAC address */
  5888. wmi_mac_addr peer_macaddr;
  5889. /** bytes (size of MPDUs) transmitted to this peer */
  5890. struct {
  5891. /* lower 32 bits of the tx_bytes value */
  5892. A_UINT32 low_32;
  5893. /* upper 32 bits of the tx_bytes value */
  5894. A_UINT32 high_32;
  5895. } tx_bytes;
  5896. /** packets (MSDUs) transmitted to this peer */
  5897. struct {
  5898. /* lower 32 bits of the tx_packets value */
  5899. A_UINT32 low_32;
  5900. /* upper 32 bits of the tx_packets value */
  5901. A_UINT32 high_32;
  5902. } tx_packets;
  5903. /** bytes (size of MPDUs) received from this peer */
  5904. struct {
  5905. /* lower 32 bits of the rx_bytes value */
  5906. A_UINT32 low_32;
  5907. /* upper 32 bits of the rx_bytes value */
  5908. A_UINT32 high_32;
  5909. } rx_bytes;
  5910. /** packets (MSDUs) received from this peer */
  5911. struct {
  5912. /* lower 32 bits of the rx_packets value */
  5913. A_UINT32 low_32;
  5914. /* upper 32 bits of the rx_packets value */
  5915. A_UINT32 high_32;
  5916. } rx_packets;
  5917. /** cumulative retry counts (MPDUs) */
  5918. A_UINT32 tx_retries;
  5919. /** number of failed transmissions (MPDUs) (retries exceeded, no ACK) */
  5920. A_UINT32 tx_failed;
  5921. /** rate information, it is output of WMI_ASSEMBLE_RATECODE_V1
  5922. * (in format of 0x1000RRRR)
  5923. * The rate-code is a 4-bytes field in which,
  5924. * for given rate, nss and preamble
  5925. *
  5926. * b'31-b'29 unused / reserved
  5927. * b'28 indicate the version of rate-code (1 = RATECODE_V1)
  5928. * b'27-b'11 unused / reserved
  5929. * b'10-b'8 indicate the preamble (0 OFDM, 1 CCK, 2 HT, 3 VHT)
  5930. * b'7-b'5 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4)
  5931. * b'4-b'0 indicate the rate, which is indicated as follows:
  5932. * OFDM : 0: OFDM 48 Mbps
  5933. * 1: OFDM 24 Mbps
  5934. * 2: OFDM 12 Mbps
  5935. * 3: OFDM 6 Mbps
  5936. * 4: OFDM 54 Mbps
  5937. * 5: OFDM 36 Mbps
  5938. * 6: OFDM 18 Mbps
  5939. * 7: OFDM 9 Mbps
  5940. * CCK (pream == 1)
  5941. * 0: CCK 11 Mbps Long
  5942. * 1: CCK 5.5 Mbps Long
  5943. * 2: CCK 2 Mbps Long
  5944. * 3: CCK 1 Mbps Long
  5945. * 4: CCK 11 Mbps Short
  5946. * 5: CCK 5.5 Mbps Short
  5947. * 6: CCK 2 Mbps Short
  5948. * HT/VHT (pream == 2/3)
  5949. * 0..7: MCS0..MCS7 (HT)
  5950. * 0..9: MCS0..MCS9 (11AC VHT)
  5951. * 0..11: MCS0..MCS11 (11AX VHT)
  5952. */
  5953. /** rate-code of the last transmission */
  5954. A_UINT32 last_tx_rate_code;
  5955. /** rate-code of the last received PPDU */
  5956. A_UINT32 last_rx_rate_code;
  5957. /** bitrate of the last transmission, in units of kbps */
  5958. A_UINT32 last_tx_bitrate_kbps;
  5959. /** bitrate of the last received PPDU, in units of kbps */
  5960. A_UINT32 last_rx_bitrate_kbps;
  5961. /** combined RSSI of the last received PPDU, in unit of dBm */
  5962. A_INT32 peer_rssi;
  5963. } wmi_peer_stats_info;
  5964. typedef struct {
  5965. /** TLV tag and len; tag equals
  5966. * WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param */
  5967. A_UINT32 tlv_header;
  5968. /** VDEV to which the peers belong to */
  5969. A_UINT32 vdev_id;
  5970. /** number of peers in peer_stats_info[] */
  5971. A_UINT32 num_peers;
  5972. /** flag to indicate if there are more peers which will
  5973. * be sent a following seperate peer_stats_info event */
  5974. A_UINT32 more_data;
  5975. /* This TLV is followed by another TLV of array of structs
  5976. * wmi_peer_stats_info peer_stats_info[];
  5977. */
  5978. } wmi_peer_stats_info_event_fixed_param;
  5979. typedef struct {
  5980. /** TLV tag and len; tag equals
  5981. * WMITLV_TAG_STRUC_wmi_radio_chan_stats */
  5982. A_UINT32 tlv_header;
  5983. /** primary channel freq of the channel whose stats is sent */
  5984. A_UINT32 chan_mhz;
  5985. /** accumulation of time the radio is tuned to this channel,
  5986. * in units of microseconds */
  5987. A_UINT32 on_chan_us;
  5988. /** accumulation of the TX PPDU duration over the measurement period,
  5989. * in units of microseconds */
  5990. A_UINT32 tx_duration_us;
  5991. /** accumulation of the RX PPDU duration over the measurement period,
  5992. * in units of microseconds */
  5993. A_UINT32 rx_duration_us;
  5994. /** ratio of channel busy time to on_chan_us, in units of percent */
  5995. A_UINT32 chan_busy_ratio;
  5996. /** ratio of on_chan_us to the measurement period, in units of percent */
  5997. A_UINT32 on_chan_ratio;
  5998. /** measurement period, in units of microseconds */
  5999. A_UINT32 measurement_period_us;
  6000. /** MPDUs transmitted on this channel */
  6001. A_UINT32 tx_mpdus;
  6002. /** MSDUs transmitted on this channel */
  6003. A_UINT32 tx_msdus;
  6004. /** MPDUS successfully received on this channel */
  6005. A_UINT32 rx_succ_mpdus;
  6006. /** Failed MPDUs (CRC failures) received on this channel */
  6007. A_UINT32 rx_fail_mpdus;
  6008. } wmi_radio_chan_stats;
  6009. typedef struct {
  6010. /** TLV tag and len; tag equals
  6011. * WMITLV_TAG_STRUC_wmi_radio_chan_stats_event_fixed_param */
  6012. A_UINT32 tlv_header;
  6013. /** number of channel stats in radio_chan_stats[] */
  6014. A_UINT32 num_chans;
  6015. /* This TLV is followed by another TLV of array of structs
  6016. * wmi_radio_chan_stats radio_chan_stats[];
  6017. */
  6018. } wmi_radio_chan_stats_event_fixed_param;
  6019. /**
  6020. * PDEV statistics
  6021. * @todo
  6022. * add all PDEV stats here
  6023. */
  6024. typedef struct {
  6025. /** Channel noise floor */
  6026. A_INT32 chan_nf;
  6027. /** TX frame count */
  6028. A_UINT32 tx_frame_count;
  6029. /** RX frame count */
  6030. A_UINT32 rx_frame_count;
  6031. /** rx clear count */
  6032. A_UINT32 rx_clear_count;
  6033. /** cycle count */
  6034. A_UINT32 cycle_count;
  6035. /** Phy error count */
  6036. A_UINT32 phy_err_count;
  6037. /** Channel Tx Power */
  6038. A_UINT32 chan_tx_pwr;
  6039. /** WAL dbg stats */
  6040. struct wlan_dbg_stats pdev_stats;
  6041. } wmi_pdev_stats;
  6042. /**
  6043. * VDEV statistics
  6044. * @todo
  6045. * add all VDEV stats here
  6046. */
  6047. typedef struct {
  6048. A_INT32 bcn_snr;
  6049. A_INT32 dat_snr;
  6050. } wmi_snr_info;
  6051. typedef struct {
  6052. /** unique id identifying the VDEV, generated by the caller */
  6053. A_UINT32 vdev_id;
  6054. wmi_snr_info vdev_snr;
  6055. 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) */
  6056. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  6057. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  6058. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  6059. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  6060. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  6061. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  6062. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  6063. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  6064. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  6065. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  6066. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  6067. } wmi_vdev_stats;
  6068. /*
  6069. * vdev ext stats with additonal bcn stats
  6070. * (Due to backward compatiblity requirements, these new stats fields cannot be
  6071. * added inside wmi_vdev_stats.)
  6072. */
  6073. typedef struct {
  6074. A_UINT32 vdev_id;
  6075. A_UINT32 tx_bcn_succ_cnt; /* Total number of beacon frame transmitted successfully */
  6076. A_UINT32 tx_bcn_outage_cnt; /* Total number of failed beacons */
  6077. } wmi_bcn_stats;
  6078. /**
  6079. * peer statistics.
  6080. */
  6081. typedef struct {
  6082. /** peer MAC address */
  6083. wmi_mac_addr peer_macaddr;
  6084. /** rssi */
  6085. A_UINT32 peer_rssi;
  6086. /** last tx data rate used for peer */
  6087. A_UINT32 peer_tx_rate;
  6088. /** last rx data rate used for peer */
  6089. A_UINT32 peer_rx_rate;
  6090. } wmi_peer_stats;
  6091. /**
  6092. * Peer extension statistics
  6093. */
  6094. typedef struct {
  6095. /** peer MAC address */
  6096. wmi_mac_addr peer_macaddr;
  6097. /* rx duration in microseconds*/
  6098. A_UINT32 rx_duration;
  6099. /** Total TX bytes (including dot11 header) sent to peer */
  6100. A_UINT32 peer_tx_bytes;
  6101. /** Total RX bytes (including dot11 header) received from peer */
  6102. A_UINT32 peer_rx_bytes;
  6103. /** last TX ratecode */
  6104. A_UINT32 last_tx_rate_code;
  6105. /** TX power used by peer - units are 0.5 dBm */
  6106. A_INT32 last_tx_power;
  6107. A_UINT32 reserved[4]; /** for future use - add new peer stats here */
  6108. } wmi_peer_extd_stats;
  6109. typedef struct {
  6110. /** Primary channel freq of the channel for which stats are sent */
  6111. A_UINT32 chan_mhz;
  6112. /** Time spent on the channel */
  6113. A_UINT32 sampling_period_us;
  6114. /** Aggregate duration over a sampling period for which channel activity was observed */
  6115. A_UINT32 rx_clear_count;
  6116. /** Accumalation of the TX PPDU duration over a sampling period */
  6117. A_UINT32 tx_duration_us;
  6118. /** Accumalation of the RX PPDU duration over a sampling period */
  6119. A_UINT32 rx_duration_us;
  6120. } wmi_chan_stats;
  6121. typedef struct {
  6122. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  6123. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  6124. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  6125. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  6126. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  6127. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  6128. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  6129. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  6130. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  6131. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  6132. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  6133. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  6134. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  6135. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  6136. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  6137. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  6138. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  6139. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  6140. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  6141. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  6142. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  6143. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  6144. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  6145. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  6146. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  6147. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  6148. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  6149. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  6150. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  6151. union {
  6152. A_UINT64 counter; /* for use by target only */
  6153. struct {
  6154. A_UINT32 low;
  6155. A_UINT32 high;
  6156. } upload; /* for use by host */
  6157. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  6158. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  6159. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  6160. union {
  6161. A_UINT64 counter; /* for use by target only */
  6162. struct {
  6163. A_UINT32 rx_octets_in_ampdu_low;
  6164. A_UINT32 rx_octets_in_ampdu_high;
  6165. } upload; /* for use by host */
  6166. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  6167. A_UINT32 reserved_1;
  6168. A_UINT32 reserved_2;
  6169. A_UINT32 reserved_3;
  6170. A_UINT32 reserved_4;
  6171. } wmi_mib_stats;
  6172. typedef struct {
  6173. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  6174. A_UINT32 vdev_id;
  6175. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  6176. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  6177. wmi_mac_addr peer_macaddr;
  6178. } wmi_rssi_stats;
  6179. typedef struct {
  6180. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_congestion_stats */
  6181. A_UINT32 vdev_id;
  6182. /* congestion -
  6183. * This field holds the congestion percentage = (busy_time/total_time)*100
  6184. * for the interval from when the vdev was started to the current time
  6185. * (or the time at which the vdev was stopped).
  6186. */
  6187. A_UINT32 congestion;
  6188. } wmi_congestion_stats;
  6189. typedef struct {
  6190. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  6191. A_UINT32 num_per_chain_rssi_stats;
  6192. /* This TLV is followed by another TLV of array of structs:
  6193. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  6194. */
  6195. } wmi_per_chain_rssi_stats;
  6196. typedef struct {
  6197. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  6198. /** unique id identifying the VDEV, generated by the caller */
  6199. A_UINT32 vdev_id;
  6200. /** VDEV type (AP,STA,IBSS,MONITOR) */
  6201. A_UINT32 vdev_type;
  6202. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  6203. A_UINT32 vdev_subtype;
  6204. /** VDEV MAC address */
  6205. wmi_mac_addr vdev_macaddr;
  6206. /** Number of configured txrx streams */
  6207. A_UINT32 num_cfg_txrx_streams;
  6208. /**
  6209. * pdev_id for identifying the MAC,
  6210. * See macros starting with WMI_PDEV_ID_ for values.
  6211. */
  6212. A_UINT32 pdev_id;
  6213. /* This TLV is followed by another TLV of array of structures
  6214. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  6215. */
  6216. } wmi_vdev_create_cmd_fixed_param;
  6217. typedef struct {
  6218. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  6219. /* band - Should take values from wmi_channel_band_mask */
  6220. A_UINT32 band;
  6221. /* max supported tx streams per given band for this vdev */
  6222. A_UINT32 supported_tx_streams;
  6223. /* max supported rx streams per given band for this vdev */
  6224. A_UINT32 supported_rx_streams;
  6225. } wmi_vdev_txrx_streams;
  6226. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  6227. typedef struct {
  6228. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  6229. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  6230. A_UINT32 duration; /** Absent period duration in micro seconds */
  6231. A_UINT32 interval; /** Absent period interval in micro seconds */
  6232. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  6233. } wmi_p2p_noa_descriptor;
  6234. /** values for vdev_type */
  6235. #define WMI_VDEV_TYPE_AP 0x1
  6236. #define WMI_VDEV_TYPE_STA 0x2
  6237. #define WMI_VDEV_TYPE_IBSS 0x3
  6238. #define WMI_VDEV_TYPE_MONITOR 0x4
  6239. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  6240. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  6241. * operations like Network discovery, service provisioning and service
  6242. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  6243. * WMI command to create this VDEV once during initialization and host is not
  6244. * expected to use any VDEV specific WMI commands on this VDEV.
  6245. **/
  6246. #define WMI_VDEV_TYPE_NAN 0x5
  6247. #define WMI_VDEV_TYPE_OCB 0x6
  6248. /* NAN Data Interface */
  6249. #define WMI_VDEV_TYPE_NDI 0x7
  6250. /*
  6251. * Param values to be sent for WMI_VDEV_PARAM_SGI command
  6252. * which are used in 11ax systems
  6253. */
  6254. #define WMI_SGI_LEGACY 0x1 /* for HT and VHT */
  6255. #define WMI_SGI_HE_400_NS 0x2 /* for HE 400 nsec */
  6256. #define WMI_SGI_HE_800_NS 0x4 /* for HE 800 nsec */
  6257. #define WMI_SGI_HE_1600_NS 0x8 /* for HE 1600 nsec */
  6258. #define WMI_SGI_HE_3200_NS 0x10 /* for HE 3200 nsec */
  6259. /*
  6260. * Param values to be sent for WMI_VDEV_PARAM_HE_LTF command
  6261. * which are used in 11ax systems
  6262. */
  6263. #define WMI_HE_LTF_DEFAULT 0x0
  6264. #define WMI_HE_LTF_1X 0x1
  6265. #define WMI_HE_LTF_2X 0x2
  6266. #define WMI_HE_LTF_4X 0x3
  6267. /** values for vdev_subtype */
  6268. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  6269. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  6270. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  6271. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  6272. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  6273. /* new subtype for 11S mesh is required as 11S functionality differs
  6274. * in many ways from proprietary mesh
  6275. * 11S uses 6-addr frame format and supports peering between mesh
  6276. * stations and dynamic best path selection between mesh stations.
  6277. * While in proprietary mesh, neighboring mesh station MAC is manually
  6278. * added to AST table for traffic flow between mesh stations
  6279. */
  6280. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  6281. /** values for vdev_start_request flags */
  6282. /** Indicates that AP VDEV uses hidden ssid. only valid for
  6283. * AP/GO */
  6284. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  6285. /** Indicates if robust management frame/management frame
  6286. * protection is enabled. For GO/AP vdevs, it indicates that
  6287. * it may support station/client associations with RMF enabled.
  6288. * For STA/client vdevs, it indicates that sta will
  6289. * associate with AP with RMF enabled. */
  6290. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  6291. /*
  6292. * Host is sending bcn_tx_rate to override the beacon tx rates.
  6293. */
  6294. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  6295. /** Indicates if LDPC RX will be advertized inside HT/VHT Capabilities IE
  6296. * of assoc request/response
  6297. */
  6298. #define WMI_UNIFIED_VDEV_START_LDPC_RX_ENABLED (1<<3)
  6299. /* BSS color 0-6 */
  6300. #define WMI_HEOPS_COLOR_GET(he_ops) WMI_GET_BITS(he_ops, 0, 6)
  6301. #define WMI_HEOPS_COLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
  6302. /* Default PE Duration subfield indicates the PE duration in units of 4 us */
  6303. #define WMI_HEOPS_DEFPE_GET(he_ops) WMI_GET_BITS(he_ops, 6, 3)
  6304. #define WMI_HEOPS_DEFPE_SET(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
  6305. /* TWT required */
  6306. #define WMI_HEOPS_TWT_REQUIRED_GET(he_ops) WMI_GET_BITS(he_ops, 9, 1)
  6307. #define WMI_HEOPS_TWT_REQUIRED_SET(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
  6308. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_GET instead */
  6309. #define WMI_HEOPS_TWT_GET(he_ops) \
  6310. WMI_HEOPS_TWT_REQUIRED_GET(he_ops)
  6311. /* DEPRECATED, use WMI_HEOPS_TWT_REQUIRED_SET instead */
  6312. #define WMI_HEOPS_TWT_SET(he_ops, value) \
  6313. WMI_HEOPS_TWT_REQUIRED_SET(he_ops, value)
  6314. /* RTS threshold in units of 32 us,0 - always use RTS 1023 - this is disabled */
  6315. #define WMI_HEOPS_RTSTHLD_GET(he_ops) WMI_GET_BITS(he_ops, 10, 10)
  6316. #define WMI_HEOPS_RTSTHLD_SET(he_ops, value) WMI_SET_BITS(he_ops, 10, 10, value)
  6317. /* Partial BSS Color field indicates whether BSS applies an AID assignment rule using partial BSS color bits */
  6318. #define WMI_HEOPS_PARTBSSCOLOR_GET(he_ops) WMI_GET_BITS(he_ops, 20, 1)
  6319. #define WMI_HEOPS_PARTBSSCOLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 20, 1, value)
  6320. /* MAX BSS supported by MultiBSS element */
  6321. #define WMI_HEOPS_MAXBSSID_GET(he_ops) WMI_GET_BITS(he_ops, 21, 8)
  6322. #define WMI_HEOPS_MAXBSSID_SET(he_ops, value) WMI_SET_BITS(he_ops, 21, 8, value)
  6323. /* Tx BSSID Indicator indicates whether HE AP corresponds to transmitted BSSID */
  6324. #define WMI_HEOPS_TXBSSID_GET(he_ops) WMI_GET_BITS(he_ops, 29, 1)
  6325. #define WMI_HEOPS_TXBSSID_SET(he_ops, value) WMI_SET_BITS(he_ops, 29, 1, value)
  6326. /* when set to 1 disables use of BSS color */
  6327. #define WMI_HEOPS_BSSCOLORDISABLE_GET(he_ops) WMI_GET_BITS(he_ops, 30, 1)
  6328. #define WMI_HEOPS_BSSCOLORDISABLE_SET(he_ops, value) WMI_SET_BITS(he_ops, 30, 1, value)
  6329. /**--- HEOPS_DUALBEACON: DO NOT USE - DEPRECATED ---*/
  6330. /* When set to 1 HE AP transmits beacons using two PHY formats,
  6331. * one in non-HE format and other in an HE_EXT_SU PHY format
  6332. */
  6333. #define WMI_HEOPS_DUALBEACON_GET(he_ops) (0)
  6334. #define WMI_HEOPS_DUALBEACON_SET(he_ops, value) {;}
  6335. #define WMI_MAX_HECAP_PHY_SIZE (3)
  6336. /* Dual Band both 2.4 GHz and 5 GHz Supported */
  6337. #define WMI_HECAP_PHY_DB_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
  6338. #define WMI_HECAP_PHY_DB_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
  6339. /*
  6340. * B0: Indicates STA support 40 MHz channel width in 2.4 GHz
  6341. * B1: Indicates STA support 40 MHz and 80 MHz channel width in 5 GHz
  6342. * B2: Indicates STA supports 160 MHz channel width in 5 GHz
  6343. * B3: Indicates STA supports 160/80+80 MHz channel width in 5 GHz
  6344. * B4: If B1 is set to 0, then B5 indicates support of 242/106/52/26-tone
  6345. * RU mapping in 40 MHz channel width in 2.4 GHz. Otherwise Reserved.
  6346. * B5: If B2, B3, and B4 are set to 0, then B6 indicates support of
  6347. * 242-tone RU mapping in 40 MHz and 80
  6348. * MHz channel width in 5 GHz. Otherwise Reserved.
  6349. * B6: Reserved
  6350. */
  6351. #define WMI_HECAP_PHY_CBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 7)
  6352. #define WMI_HECAP_PHY_CBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 7, value)
  6353. /*
  6354. * B0: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6355. * where in the preamble only the secondary 20 MHz is punctured
  6356. * B1: Indicates STA supports reception of preamble puncturing in 80 MHz,
  6357. * where in the preamble only one of the two 20 MHz sub-channels in the
  6358. * secondary 40 MHz is punctured
  6359. * B2: Indicates STA supports reception of preamble puncturing in 160 MHz
  6360. * or 80+80 MHz, where in the primary 80 MHz of the preamble only the
  6361. * secondary 20 MHz is punctured
  6362. * B3: Indicates STA supports reception of preamble puncturing in 160 MHz
  6363. * or 80+80 MHz, where in the primary 80 MHz of the preamble, the
  6364. * primary 40 MHz is present
  6365. */
  6366. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 8, 4)
  6367. #define WMI_HECAP_PHY_PREAMBLEPUNCRX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 8, 4, value)
  6368. /* Indicates transmitting STA is a Class A (1) or a Class B (0) device */
  6369. #define WMI_HECAP_PHY_COD_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
  6370. #define WMI_HECAP_PHY_COD_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
  6371. /* Indicates support of transmission and reception of LDPC encoded packets */
  6372. #define WMI_HECAP_PHY_LDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
  6373. #define WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
  6374. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6375. #define WMI_HECAP_PHY_TXLDPC_GET(he_cap_phy) WMI_HECAP_PHY_LDPC_GET(he_cap_phy)
  6376. #define WMI_HECAP_PHY_TXLDPC_SET(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value)
  6377. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LDPC instead */
  6378. #define WMI_HECAP_PHY_RXLDPC_GET(he_cap_phy) WMI_HECAP_PHY_LDPC_GET(he_cap_phy)
  6379. #define WMI_HECAP_PHY_RXLDPC_SET(he_cap_phy, value) WMI_HECAP_PHY_LDPC_SET(he_cap_phy, value)
  6380. /*
  6381. * B0: Indicates support of reception of 1x LTF and 0.8us guard interval duration for HE SU PPDUs.
  6382. */
  6383. #define WMI_HECAP_PHY_LTFGIFORHE_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
  6384. #define WMI_HECAP_PHY_LTFGIFORHE_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
  6385. /*
  6386. * When the Doppler Rx subfield is 1, indicates the maximum number of space-
  6387. * time streams supported for reception when midamble is used in the Data field.
  6388. */
  6389. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 2)
  6390. #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 2, value)
  6391. /*
  6392. * B0: For a transmitting STA acting as beamformee, it indicates support of
  6393. * NDP reception using 4x LTF and 3.2 us guard interval duration
  6394. */
  6395. #define WMI_HECAP_PHY_LTFGIFORNDP_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1)
  6396. #define WMI_HECAP_PHY_LTFGIFORNDP_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value)
  6397. /* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  6398. #define WMI_HECAP_PHY_TXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1)
  6399. #define WMI_HECAP_PHY_TXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value)
  6400. /* indicates support for the reception of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx*/
  6401. #define WMI_HECAP_PHY_RXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 19, 1)
  6402. #define WMI_HECAP_PHY_RXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 19, 1, value)
  6403. /* indicates transmitting STA supports transmitting HE PPDUs with Doppler procedure */
  6404. #define WMI_HECAP_PHY_TXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 20, 1)
  6405. #define WMI_HECAP_PHY_TXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 20, 1, value)
  6406. /* indicates transmitting STA supports receiving HE PPDUs with Doppler procedure */
  6407. #define WMI_HECAP_PHY_RXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 21, 1)
  6408. #define WMI_HECAP_PHY_RXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 21, 1, value)
  6409. /*
  6410. * If the transmitting STA is an AP:
  6411. * indicates STA supports of reception of full bandwidth UL MU-MIMO
  6412. * transmission.
  6413. * If the transmitting STA is a non-AP STA:
  6414. * indicates STA supports of transmission of full bandwidth UL MU-MIMO
  6415. * transmission.
  6416. */
  6417. #define WMI_HECAP_PHY_UL_MU_MIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 22, 1)
  6418. #define WMI_HECAP_PHY_UL_MU_MIMO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 22, 1, value)
  6419. /*
  6420. * If the transmitting STA is an AP:
  6421. * indicates STA supports of reception of UL MUMIMO transmission on an
  6422. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6423. * If the transmitting STA is a non-AP STA:
  6424. * indicates STA supports of transmission of UL MU-MIMO transmission on an
  6425. * RU in an HE MU PPDU where the RU does not span the entire PPDU bandwidth.
  6426. */
  6427. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 23, 1)
  6428. #define WMI_HECAP_PHY_ULMUMIMOOFDMA_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 23, 1, value)
  6429. /* Tx DCM
  6430. * B0:B1
  6431. * 00: Does not support DCM
  6432. * 01: BPSK
  6433. * 10: QPSK
  6434. * 11: 16-QAM
  6435. * B2 signals maximum number of spatial streams with DCM
  6436. * 0: 1 spatial stream
  6437. * 1: 2 spatial streams
  6438. */
  6439. #define WMI_HECAP_PHY_DCMTX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 24, 3)
  6440. #define WMI_HECAP_PHY_DCMTX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 24, 3, value)
  6441. /* Rx DCM
  6442. * B0:B1
  6443. * 00: Does not support DCM
  6444. * 01: BPSK
  6445. * 10: QPSK
  6446. * 11: 16-QAM
  6447. * B2 signals maximum number of spatial streams with DCM
  6448. * 0: 1 spatial stream
  6449. * 1: 2 spatial streams
  6450. */
  6451. #define WMI_HECAP_PHY_DCMRX_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 27, 3)
  6452. #define WMI_HECAP_PHY_DCMRX_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 27, 3, value)
  6453. /*
  6454. * Indicates that the STA supports the reception of an HE MU PPDU payload
  6455. * over full bandwidth and partial bandwidth (106-tone RU within 20 MHz).
  6456. */
  6457. #define WMI_HECAP_PHY_ULHEMU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 30, 1)
  6458. #define WMI_HECAP_PHY_ULHEMU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 30, 1, value)
  6459. /* Indicates support for operation as an SU beamformer */
  6460. #define WMI_HECAP_PHY_SUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 31, 1)
  6461. #define WMI_HECAP_PHY_SUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 31, 1, value)
  6462. /* Indicates support for operation as an SU beamformee */
  6463. #define WMI_HECAP_PHY_SUBFME_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 1)
  6464. #define WMI_HECAP_PHY_SUBFME_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 1, value)
  6465. /* Indicates support for operation as an MU Beamformer */
  6466. #define WMI_HECAP_PHY_MUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 1, 1)
  6467. #define WMI_HECAP_PHY_MUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 1, 1, value)
  6468. /*
  6469. * Num STS -1 for <= 80MHz (min val 3)
  6470. * The maximum number of space-time streams minus 1 that the STA can
  6471. * receive in an HE NDP
  6472. */
  6473. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 2, 3)
  6474. #define WMI_HECAP_PHY_BFMESTSLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 2, 3, value)
  6475. /*
  6476. * Num STS -1 for > 80MHz (min val 3)
  6477. * The maximum number of space-time streams minus 1 that the STA can
  6478. * receive in an HE NDP
  6479. */
  6480. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  6481. #define WMI_HECAP_PHY_BFMESTSGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  6482. /*
  6483. * Number Of Sounding Dimensions For <= 80 MHz
  6484. * If SU beamformer capable, set to the maximum supported value of the
  6485. * TXVECTOR parameter NUM_STS minus 1.
  6486. * Otherwise, reserved.
  6487. */
  6488. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  6489. #define WMI_HECAP_PHY_NUMSOUNDLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  6490. /*
  6491. * Number Of Sounding Dimensions For > 80 MHz
  6492. * If SU beamformer capable, set to the maximum supported value of the
  6493. * TXVECTOR parameter NUM_STS minus 1.
  6494. * Otherwise, reserved.
  6495. */
  6496. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 11, 3)
  6497. #define WMI_HECAP_PHY_NUMSOUNDGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 11, 3, value)
  6498. /*
  6499. * Indicates if the HE beamformee is capable of feedback with tone
  6500. * grouping of 16 in the HE Compressed Beamforming Report field for
  6501. * a SU-type feedback.
  6502. */
  6503. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 14, 1)
  6504. #define WMI_HECAP_PHY_NG16SUFEEDBACKLT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 14, 1, value)
  6505. /*
  6506. * Indicates if the HE beamformee is capable of feedback with tone
  6507. * grouping of 16 in the HE Compressed Beamforming Report field for
  6508. * a MU-type feedback.
  6509. */
  6510. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 15, 1)
  6511. #define WMI_HECAP_PHY_NG16MUFEEDBACKGT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 15, 1, value)
  6512. /*
  6513. * Indicates if HE beamformee is capable of feedback with codebook
  6514. * size {4, 2} in the HECompressed Beamforming Report field for
  6515. * a SU-type feedback.
  6516. */
  6517. #define WMI_HECAP_PHY_CODBK42SU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 16, 1)
  6518. #define WMI_HECAP_PHY_CODBK42SU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 16, 1, value)
  6519. /*
  6520. * Indicates if HE beamformee is capable of feedback with codebook
  6521. * size {7, 5} in the HE Compressed Beamforming Report field for
  6522. * a MU-type feedback.
  6523. */
  6524. #define WMI_HECAP_PHY_CODBK75MU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 17, 1)
  6525. #define WMI_HECAP_PHY_CODBK75MU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 17, 1, value)
  6526. /*
  6527. * Beamforming Feedback With Trigger Frame
  6528. * If the transmitting STA is an AP STA:
  6529. * B0: indicates support of reception of SU-Type partial(1) and full bandwidth feedback(0)
  6530. * B1: indicates support of reception of MU-Type partial(1) bandwidth feedback
  6531. * B2: indicates support of reception of CQI-Only partial and full bandwidth feedback
  6532. * If the transmitting STA is a non-AP STA:
  6533. * B0: indicates support of transmission of SU-Type partial(1) and full bandwidth(0) feedback
  6534. * B1: indicates support of transmission of MU-Type partial(1) bandwidth feedback
  6535. * B2: indicates support of transmission of CQI-Onlypartial (1)and full bandwidth feedback
  6536. */
  6537. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 18, 3)
  6538. #define WMI_HECAP_PHY_BFFEEDBACKTRIG_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 18, 3, value)
  6539. /* Indicates the support of transmission and reception of an HE extended range SU PPDU payload transmitted
  6540. * over the right 106-tone RU or partial BW ER
  6541. */
  6542. #define WMI_HECAP_PHY_HEERSU_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 21, 1)
  6543. #define WMI_HECAP_PHY_HEERSU_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 21, 1, value)
  6544. /* Indicates that the non-AP STA supports reception of a DL MU-MIMO transmission on an RU in an HE MU PPDU
  6545. * where the RU does not span the entire PPDU bandwidth.
  6546. */
  6547. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 22, 1)
  6548. #define WMI_HECAP_PHY_DLMUMIMOPARTIALBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 22, 1, value)
  6549. /* Indicates whether or not the PPE Threshold field is present */
  6550. #define WMI_HECAP_PHY_PETHRESPRESENT_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 23, 1)
  6551. #define WMI_HECAP_PHY_PETHRESPRESENT_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 23, 1, value)
  6552. /* Indicates that the STA supports SRP-based SR operation */
  6553. #define WMI_HECAP_PHY_SRPSPRESENT_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 24, 1)
  6554. #define WMI_HECAP_PHY_SRPPRESENT_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 24, 1, value)
  6555. /* Indicates that the STA supports a power boost factor ar for the r-th RU in the range [0.5, 2] */
  6556. #define WMI_HECAP_PHY_PWRBOOSTAR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 25, 1)
  6557. #define WMI_HECAP_PHY_PWRBOOSTAR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 25, 1, value)
  6558. /* Indicates support for the reception of 4x LTF and 0.8us guard interval duration for HE SU PPDUs. */
  6559. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
  6560. #define WMI_HECAP_PHY_4XLTFAND800NSECSGI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
  6561. /* For a transmitting STA acting as a beamformee, it indicates the maximum Nc for beamforming sounding
  6562. * feedback supported If SU beamformee capable, then set to the maximum Nc for beamforming sounding feedback
  6563. * minus 1. Otherwise, reserved.
  6564. */
  6565. #define WMI_HECAP_PHY_MAXNC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 3)
  6566. #define WMI_HECAP_PHY_MAXNC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 3, value)
  6567. /* Indicates support for the transmission of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  6568. * STBC with one spatial stream
  6569. */
  6570. #define WMI_HECAP_PHY_STBCTXGT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 30, 1)
  6571. #define WMI_HECAP_PHY_STBCTXGT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 30, 1, value)
  6572. /* Indicates support for the reception of an HE PPDU that has a bandwidth greater than 80 MHz and is using
  6573. * STBC with one spatial stream
  6574. */
  6575. #define WMI_HECAP_PHY_STBCRXGT80_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 31, 1)
  6576. #define WMI_HECAP_PHY_STBCRXGT80_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 31, 1, value)
  6577. /* Indicates support for the reception of an HE ER SU PPDU with 4x LTF and 0.8 us guard interval duration */
  6578. #define WMI_HECAP_PHY_ERSU4X800NSECGI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 1)
  6579. #define WMI_HECAP_PHY_ERSU4X800NSECGI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 1, value)
  6580. /*
  6581. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  6582. * 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.
  6583. */
  6584. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 1, 1)
  6585. #define WMI_HECAP_PHY_HEPPDU20IN40MHZ2G_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 1, 1, value)
  6586. /*
  6587. * Indicates support of 26-, 52-, and 106-tone mapping for a 20 MHz operating non-AP HE STA that is the
  6588. * 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.
  6589. */
  6590. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 2, 1)
  6591. #define WMI_HECAP_PHY_HEPPDU20IN160OR80P80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 2, 1, value)
  6592. /*
  6593. * Indicates supports of 160 MHz OFDMA for a non-AP HE STA that sets bit B1 of Channel Width Set to 1, and
  6594. * sets B2 and B3 of Channel Width Set each to 0, when operating with 80 MHz channel width. The capability
  6595. * bit is applicable while receiving a 80+80 MHz or a 160 MHz HE MU PPDU, or transmitting a 80+80 MHz or a
  6596. * 160 MHz HE TB PPDU.
  6597. */
  6598. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
  6599. #define WMI_HECAP_PHY_HEPPDU80IN160OR80P80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
  6600. /* Indicates support for the reception of an HE ER SU PPDU with 1x LTF and 0.8 us guard interval duration */
  6601. #define WMI_HECAP_PHY_ERSU1X800NSECGI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 1)
  6602. #define WMI_HECAP_PHY_ERSU1X800NSECGI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 1, value)
  6603. /*
  6604. * When the Doppler Rx subfield is 1, indicates support for receiving midambles with 2x HE-LTF, 1x HE-LTF
  6605. * 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
  6606. * HE ER SU PPDU if the HE ER SU PPDU With 1x HELTF And 0.8 s GI subfield is set to 1.
  6607. */
  6608. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 5, 1)
  6609. #define WMI_HECAP_PHY_MIDAMBLERX2XAND1XHELTF_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 5, 1, value)
  6610. /*HTC + HE Support Set to 1 if STA supports reception of HE Variant HT control Field*/
  6611. #define WMI_HECAP_MAC_HECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 0, 1)
  6612. #define WMI_HECAP_MAC_HECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 0, 1, value)
  6613. /* set to 1 to for TWT Requestor support*/
  6614. #define WMI_HECAP_MAC_TWTREQ_GET(he_cap) WMI_GET_BITS(he_cap, 1, 1)
  6615. #define WMI_HECAP_MAC_TWTREQ_SET(he_cap, value) WMI_SET_BITS(he_cap, 1, 1, value)
  6616. /* set to 1 to for TWT Responder support*/
  6617. #define WMI_HECAP_MAC_TWTRSP_GET(he_cap) WMI_GET_BITS(he_cap, 2, 1)
  6618. #define WMI_HECAP_MAC_TWTRSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 2, 1, value)
  6619. /* Level of frag support
  6620. Set to 0 for no support for dynamic fragmentation.
  6621. Set to 1 for support for dynamic fragments that are contained within a S-MPDU
  6622. Set to 2 for support for dynamic fragments that are contained within a Single MPDU and support for up to
  6623. one dynamic fragment for each MSDU and each MMPDU within an A-MPDU or multi-TID A-MPDU.
  6624. Set to 3 for support for dynamic fragments that are contained within a Single MPDU and support for multiple
  6625. dynamic fragments for each MSDU within an AMPDU or multi-TID AMPDU and up to one dynamic fragment
  6626. for each MMPDU in a multi-TID A-MPDU that is not a Single MPDU
  6627. */
  6628. #define WMI_HECAP_MAC_HEFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 3, 2)
  6629. #define WMI_HECAP_MAC_HEFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 3, 2, value)
  6630. /* The maximum number of fragmented MSDUs, Nmax,defined by this field is Nmax = 2 Maximum Number Of FMPDUs*/
  6631. #define WMI_HECAP_MAC_MAXFRAGMSDU_GET(he_cap) WMI_GET_BITS(he_cap, 5, 3)
  6632. #define WMI_HECAP_MAC_MAXFRAGMSDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 5, 3, value)
  6633. /* 0 = no restriction on the minimum payload , 1 = 128 octets min, 2 = 256 octets min, 3 = 512 octets min */
  6634. #define WMI_HECAP_MAC_MINFRAGSZ_GET(he_cap) WMI_GET_BITS(he_cap, 8, 2)
  6635. #define WMI_HECAP_MAC_MINFRAGSZ_SET(he_cap, value) WMI_SET_BITS(he_cap, 8, 2, value)
  6636. /*0 = no additional processing time, 1 = 8us,2 = 16us */
  6637. #define WMI_HECAP_MAC_TRIGPADDUR_GET(he_cap) WMI_GET_BITS(he_cap, 10, 2)
  6638. #define WMI_HECAP_MAC_TRIGPADDUR_SET(he_cap, value) WMI_SET_BITS(he_cap, 10, 2, value)
  6639. /*number of TIDs minus 1 of QoS Data frames that HE STA can aggregate in multi-TID AMPDU*/
  6640. #define WMI_HECAP_MAC_MTID_GET(he_cap) WMI_GET_BITS(he_cap, 12, 3)
  6641. #define WMI_HECAP_MAC_MTID_SET(he_cap, value) WMI_SET_BITS(he_cap, 12, 3, value)
  6642. /*
  6643. * Indicates support by a STA to receive an ack-enabled A-MPDU in which an A-MSDU is carried in
  6644. * a QoS Data frame for which no block ack agreement exists.
  6645. */
  6646. #define WMI_HECAP_MAC_AMSDUINAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 15, 1)
  6647. #define WMI_HECAP_MAC_AMSDUINAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
  6648. /*--- HECAP_MAC_HELKAD: DO NOT USE - DEPRECATED ---*/
  6649. /*0=No Feedback,2=Unsolicited,3=Both*/
  6650. #define WMI_HECAP_MAC_HELKAD_GET(he_cap) (0)
  6651. #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) {;}
  6652. /* bit 16 reserved. */
  6653. /*Set to 1 for reception of AllAck support*/
  6654. #define WMI_HECAP_MAC_AACK_GET(he_cap) WMI_GET_BITS(he_cap, 17, 1)
  6655. #define WMI_HECAP_MAC_AACK_SET(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
  6656. /*Set to 1 if the STA supports reception of the UL MU Response Scheduling A-Control field*/
  6657. #define WMI_HECAP_MAC_ULMURSP_GET(he_cap) WMI_GET_BITS(he_cap, 18, 1)
  6658. #define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
  6659. /*Set to 1 if the STA supports the BSR A-Control field functionality.*/
  6660. #define WMI_HECAP_MAC_BSR_GET(he_cap) WMI_GET_BITS(he_cap, 19, 1)
  6661. #define WMI_HECAP_MAC_BSR_SET(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
  6662. /*Set to 1 when the STA supports broadcast TWT functionality.*/
  6663. #define WMI_HECAP_MAC_BCSTTWT_GET(he_cap) WMI_GET_BITS(he_cap, 20, 1)
  6664. #define WMI_HECAP_MAC_BCSTTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 20, 1, value)
  6665. /*Set to 1 if STA supports rx of Multi-STA BA that has 32-bit Block Ack Bitmap*/
  6666. #define WMI_HECAP_MAC_32BITBA_GET(he_cap) WMI_GET_BITS(he_cap, 21, 1)
  6667. #define WMI_HECAP_MAC_32BITBA_SET(he_cap, value) WMI_SET_BITS(he_cap, 21, 1, value)
  6668. /*Set to 1 if the STA supports MU cascading operation*/
  6669. #define WMI_HECAP_MAC_MUCASCADE_GET(he_cap) WMI_GET_BITS(he_cap, 22, 1)
  6670. #define WMI_HECAP_MAC_MUCASCADE_SET(he_cap, value) WMI_SET_BITS(he_cap, 22, 1, value)
  6671. /*Set to 1 when the STA supports reception of this multi-TID A-MPDU format*/
  6672. #define WMI_HECAP_MAC_ACKMTIDAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 23, 1)
  6673. #define WMI_HECAP_MAC_ACKMTIDAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 23, 1, value)
  6674. /*Set to 1 when the STA supports its reception*/
  6675. #define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) WMI_GET_BITS(he_cap, 24, 1)
  6676. #define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) WMI_SET_BITS(he_cap, 24, 1, value)
  6677. /*Set to 1 if the STA supports reception of the OMI A-Control field*/
  6678. #define WMI_HECAP_MAC_OMI_GET(he_cap) WMI_GET_BITS(he_cap, 25, 1)
  6679. #define WMI_HECAP_MAC_OMI_SET(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
  6680. /*1 if OFDMA Random Access Supported*/
  6681. #define WMI_HECAP_MAC_OFDMARA_GET(he_cap) WMI_GET_BITS(he_cap, 26, 1)
  6682. #define WMI_HECAP_MAC_OFDMARA_SET(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
  6683. /* Maximum AMPDU Length Exponent.
  6684. * If the HE STA includes a VHT Capabilities element, the Maximum A-MPDU Length Exponent subfield in
  6685. * HE Capabilities element combined with the Maximum A-MPDU Length Exponent subfield in VHT
  6686. * Capabilities element indicate the maximum length of A-MPDU that the STA can Receive where EOF
  6687. * padding is not included in this limit.
  6688. */
  6689. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_GET(he_cap) WMI_GET_BITS(he_cap, 27, 2)
  6690. #define WMI_HECAP_MAC_MAXAMPDULEN_EXP_SET(he_cap, value) WMI_SET_BITS(he_cap, 27, 2, value)
  6691. /*A-MSDU Fragmentation Support*/
  6692. #define WMI_HECAP_MAC_AMSDUFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 29, 1)
  6693. #define WMI_HECAP_MAC_AMSDUFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
  6694. /*Flexible TWT Schedule Support*/
  6695. #define WMI_HECAP_MAC_FLEXTWT_GET(he_cap) WMI_GET_BITS(he_cap, 30, 1)
  6696. #define WMI_HECAP_MAC_FLEXTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 30, 1, value)
  6697. /*Rx Control Frame to MultiBSS*/
  6698. #define WMI_HECAP_MAC_MBSS_GET(he_cap) WMI_GET_BITS(he_cap, 31, 1)
  6699. #define WMI_HECAP_MAC_MBSS_SET(he_cap, value) WMI_SET_BITS(he_cap, 31, 1, value)
  6700. /* BSRP A-MPDU Aggregation
  6701. * maintaining compatability since we dont support this now so not wasting memory
  6702. */
  6703. #define WMI_HECAP_MAC_BSRPAMPDU_GET(he_cap) (0)
  6704. #define WMI_HECAP_MAC_BSRPAMPDU_SET(he_cap, value) {;}
  6705. /* Quiet Time Period (QTP) operation
  6706. * maintaining compatability since we dont support this now so not wasting memory
  6707. */
  6708. #define WMI_HECAP_MAC_QTP_GET(he_cap) (0)
  6709. #define WMI_HECAP_MAC_QTP_SET(he_cap, value) {;}
  6710. /* support by an AP for receiving an (A-)MPDU that contains a BQR in the
  6711. * A-Control subfield and support by a non-AP STA for generating an (A-)MPDU
  6712. * that contains a BQR in the A-Control subfield
  6713. * maintaining compatability since we dont support this now so not wasting memory
  6714. */
  6715. #define WMI_HECAP_MAC_ABQR_GET(he_cap) (0)
  6716. #define WMI_HECAP_MAC_ABQR_SET(he_cap, value) {;}
  6717. /*Indicates support by the STA for the role of SR Responder.*/
  6718. #define WMI_HECAP_MAC_SRRESP_GET(he_cap) (0)
  6719. #define WMI_HECAP_MAC_SRRESP_SET(he_cap, value) {;}
  6720. /* Indicates support for an AP to encode OPS information to TIM element of the FILS Discovery
  6721. * frames or TIM frames as described in AP operation for opportunistic power save.
  6722. * Indicates support for a non-AP STA to receive the opportunistic power save encoded TIM elements
  6723. */
  6724. #define WMI_HECAP_MAC_OPS_GET(he_cap) (0)
  6725. #define WMI_HECAP_MAC_OPS_SET(he_cap, value) {;}
  6726. /* Indicates support for a non-AP STA to follow the NDP feedback report procedure and respond to
  6727. * the NDP Feedback Report Poll Trigger frame.
  6728. */
  6729. #define WMI_HECAP_MAC_NDPFDBKRPT_GET(he_cap) (0)
  6730. #define WMI_HECAP_MAC_NDPFDBKRPT_SET(he_cap, value) {;}
  6731. /* BELOW MACROS ARE DEPRECATED Also we are not defining bits for capabilities
  6732. * beyond bit 31 we donot support as it adds additional dword to our struct which may be later
  6733. * removed by standard
  6734. */
  6735. #define WMI_HECAP_MAC_MBAHECTRL_GET(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6736. #define WMI_HECAP_MAC_MBAHECTRL_SET(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6737. #define WMI_HECAP_MAC_MURTS_GET(he_cap) (0) /* DO NOT USE - DEPRECATED*/
  6738. #define WMI_HECAP_MAC_MURTS_SET(he_cap, value) {;} /* DO NOT USE - DEPRECATED*/
  6739. /*Deprecate use WMI_HECAP_PHY_PREAMBLEPUNCRX instead*/
  6740. #define WMI_HECAP_PHY_CBMODE_GET(he_cap_phy) WMI_HECAP_PHY_CBMODE_GET(he_cap_phy)
  6741. #define WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value) WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value)
  6742. /* Below 2 macros are for maintaining backward compatability - Deprecated use WMI_HECAP_PHY_LTFGIFORHE_GET instead */
  6743. #define WMI_HECAP_PHY_OLTF_GET(he_cap_phy) WMI_HECAP_PHY_LTFGIFORHE_GET(he_cap_phy)
  6744. #define WMI_HECAP_PHY_OLTF_SET(he_cap_phy, value) WMI_HECAP_PHY_LTFGIFORHE_SET(he_cap_phy, value)
  6745. /*DEPRECATED - USE WMI_HECAP_PHY_BFMENLTSGT80MHZ*/
  6746. #define WMI_HECAP_PHY_SUBFMESTS_GET(he_cap_phy) WMI_HECAP_PHY_BFMESTSLT80MHZ_GET(he_cap_phy)
  6747. #define WMI_HECAP_PHY_SUBFMESTS_SET(he_cap_phy, value) WMI_HECAP_PHY_BFMESTSLT80MHZ_SET(he_cap_phy, value)
  6748. /*DEPRECATED - use WMI_HECAP_PHY_PETHRESPRESENT**/
  6749. #define WMI_HECAP_PHY_PADDING_GET(he_cap_phy) WMI_HECAP_PHY_PETHRESPRESENT_GET(he_cap_phy)
  6750. #define WMI_HECAP_PHY_PADDING_SET(he_cap_phy, value) WMI_HECAP_PHY_PETHRESPRESENT_SET(he_cap_phy, value)
  6751. /**DO NOT USE - DEPRECATED*/
  6752. #define WMI_HECAP_PHY_DLOFMAMUMIMO_GET(he_cap_phy) (0)
  6753. #define WMI_HECAP_PHY_DLOFDMAMUMIO_SET(he_cap_phy, value) {;}
  6754. /*DO NOT USE - DEPRECATED**/
  6755. #define WMI_HECAP_PHY_32GI_GET(he_cap_phy) (0)
  6756. #define WMI_HECAP_PHY_32GI_SET(he_cap_phy, value) {;}
  6757. /*DO NOT USE - DEPRECATED**/
  6758. #define WMI_HECAP_PHY_NOSUNDIMENS_GET(he_cap_phy) (0)
  6759. #define WMI_HECAP_PHY_NOSUNDIMENS_SET(he_cap_phy, value) {;}
  6760. /*DO NOT USE - DEPRECATED**/
  6761. #define WMI_HECAP_PHY_40MHZNSS_GET(he_cap_phy)(0)
  6762. #define WMI_HECAP_PHY_40MHZNSS_SET(he_cap_phy, value) {;}
  6763. /* START TEMPORARY WORKAROUND -
  6764. * Leave legacy names as aliases for new names, until all references to the
  6765. * legacy names have been removed.
  6766. */
  6767. #define WMI_HECAP_PHY_ULOFDMA_GET WMI_HECAP_PHY_ULMUMIMOOFDMA_GET
  6768. #define WMI_HECAP_PHY_ULOFDMA_SET WMI_HECAP_PHY_ULMUMIMOOFDMA_SET
  6769. /* END TEMPORARY WORKAROUND */
  6770. /* DEPRECATED - use WMI_HECAP_PHY_DCMRX or WMI_HECAP_PHY_DCMTX */
  6771. #define WMI_HECAP_PHY_DCM_GET(he_cap_phy) WMI_HECAP_PHY_DCMRX_GET(he_cap_phy)
  6772. #define WMI_HECAP_PHY_DCM_SET(he_cap_phy, value) WMI_HECAP_PHY_DCMRX_SET(he_cap_phy, value)
  6773. /*
  6774. * The maximum value for NSTS-1<=80MHz,(min val 3)total that can be sent
  6775. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  6776. */
  6777. #define WMI_HECAP_PHY_NSTSLT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 5, 3)
  6778. #define WMI_HECAP_PHY_NSTSLT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 5, 3, value)
  6779. /*
  6780. * The maximum value for NSTS-1 > 80MHz (min val 3) total that can be sent
  6781. * to the STA in a DL MU-MIMO transmission on full or partial bandwidth
  6782. */
  6783. #define WMI_HECAP_PHY_NSTSGT80MHZ_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3)
  6784. #define WMI_HECAP_PHY_NSTSGT80MHZ_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value)
  6785. #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7)
  6786. #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7)
  6787. #define WMI_GET_HW_RATECODE_RATE_V1(_rcode) (((_rcode) >> 0) & 0x1F)
  6788. #define WMI_ASSEMBLE_RATECODE_V1(_rate, _nss, _pream) \
  6789. (((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
  6790. typedef struct {
  6791. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  6792. /** unique id identifying the VDEV, generated by the caller */
  6793. A_UINT32 vdev_id;
  6794. /** requestor id identifying the caller module */
  6795. A_UINT32 requestor_id;
  6796. /** beacon interval from received beacon */
  6797. A_UINT32 beacon_interval;
  6798. /** DTIM Period from the received beacon */
  6799. A_UINT32 dtim_period;
  6800. /** Flags */
  6801. A_UINT32 flags;
  6802. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  6803. wmi_ssid ssid;
  6804. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  6805. /** This field will be invalid and ignored unless the */
  6806. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  6807. /** When valid, this field contains the fixed tx rate for the beacon */
  6808. /** and probe response frames send by the GO or SoftAP */
  6809. A_UINT32 bcn_tx_rate;
  6810. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  6811. A_UINT32 bcn_txPower;
  6812. /** number of p2p NOA descriptor(s) from scan entry */
  6813. A_UINT32 num_noa_descriptors;
  6814. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  6815. During CAC, Our HW shouldn't ack ditected frames */
  6816. A_UINT32 disable_hw_ack;
  6817. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  6818. /** The DBS policy manager indicates the preferred number of transmit streams. */
  6819. A_UINT32 preferred_tx_streams;
  6820. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  6821. /** the DBS policy manager indicates the preferred number of receive streams. */
  6822. A_UINT32 preferred_rx_streams;
  6823. A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
  6824. A_UINT32 cac_duration_ms; /* in milliseconds */
  6825. A_UINT32 regdomain;
  6826. /* The TLVs follows this structure:
  6827. * wmi_channel chan; <-- WMI channel
  6828. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  6829. */
  6830. } wmi_vdev_start_request_cmd_fixed_param;
  6831. typedef struct {
  6832. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  6833. /** unique id identifying the VDEV, generated by the caller */
  6834. A_UINT32 vdev_id;
  6835. } wmi_vdev_delete_cmd_fixed_param;
  6836. typedef struct {
  6837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  6838. /** unique id identifying the VDEV, generated by the caller */
  6839. A_UINT32 vdev_id;
  6840. /** aid (assoc id) received in association response for STA VDEV */
  6841. A_UINT32 vdev_assoc_id;
  6842. /** bssid of the BSS the VDEV is joining */
  6843. wmi_mac_addr vdev_bssid;
  6844. /** bssid of transmitted AP (mbssid case) */
  6845. wmi_mac_addr trans_bssid;
  6846. /** the profile index of the connected non-trans ap (mbssid case). 0 means invalid */
  6847. A_UINT32 profile_idx;
  6848. /** the total profile numbers of non-trans aps (mbssid case). 0 means legacy AP */
  6849. A_UINT32 profile_num;
  6850. } wmi_vdev_up_cmd_fixed_param;
  6851. typedef struct {
  6852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  6853. /** unique id identifying the VDEV, generated by the caller */
  6854. A_UINT32 vdev_id;
  6855. } wmi_vdev_stop_cmd_fixed_param;
  6856. typedef struct {
  6857. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  6858. /** unique id identifying the VDEV, generated by the caller */
  6859. A_UINT32 vdev_id;
  6860. } wmi_vdev_down_cmd_fixed_param;
  6861. typedef struct {
  6862. /** unique id identifying the VDEV, generated by the caller */
  6863. A_UINT32 vdev_id;
  6864. } wmi_vdev_standby_response_cmd;
  6865. typedef struct {
  6866. /** unique id identifying the VDEV, generated by the caller */
  6867. A_UINT32 vdev_id;
  6868. } wmi_vdev_resume_response_cmd;
  6869. typedef struct {
  6870. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  6871. /** unique id identifying the VDEV, generated by the caller */
  6872. A_UINT32 vdev_id;
  6873. /** parameter id */
  6874. A_UINT32 param_id;
  6875. /** parameter value */
  6876. A_UINT32 param_value;
  6877. } wmi_vdev_set_param_cmd_fixed_param;
  6878. typedef struct {
  6879. A_UINT32 key_seq_counter_l;
  6880. A_UINT32 key_seq_counter_h;
  6881. } wmi_key_seq_counter;
  6882. #define WMI_CIPHER_NONE 0x0 /* clear key */
  6883. #define WMI_CIPHER_WEP 0x1
  6884. #define WMI_CIPHER_TKIP 0x2
  6885. #define WMI_CIPHER_AES_OCB 0x3
  6886. #define WMI_CIPHER_AES_CCM 0x4
  6887. #define WMI_CIPHER_WAPI 0x5
  6888. #define WMI_CIPHER_CKIP 0x6
  6889. #define WMI_CIPHER_AES_CMAC 0x7
  6890. #define WMI_CIPHER_ANY 0x8
  6891. #define WMI_CIPHER_AES_GCM 0x9
  6892. #define WMI_CIPHER_AES_GMAC 0xa
  6893. #define WMI_CIPHER_WAPI_GCM_SM4 0xb
  6894. typedef struct {
  6895. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  6896. /** unique id identifying the VDEV, generated by the caller */
  6897. A_UINT32 vdev_id;
  6898. /** MAC address used for installing */
  6899. wmi_mac_addr peer_macaddr;
  6900. /** key index */
  6901. A_UINT32 key_ix;
  6902. /** key flags */
  6903. A_UINT32 key_flags;
  6904. /** key cipher, defined above */
  6905. A_UINT32 key_cipher;
  6906. /** key rsc counter */
  6907. wmi_key_seq_counter key_rsc_counter;
  6908. /** global key rsc counter */
  6909. wmi_key_seq_counter key_global_rsc_counter;
  6910. /** global key tsc counter */
  6911. wmi_key_seq_counter key_tsc_counter;
  6912. /** WAPI key rsc counter */
  6913. A_UINT8 wpi_key_rsc_counter[16];
  6914. /** WAPI key tsc counter */
  6915. A_UINT8 wpi_key_tsc_counter[16];
  6916. /** key length */
  6917. A_UINT32 key_len;
  6918. /** key tx mic length */
  6919. A_UINT32 key_txmic_len;
  6920. /** key rx mic length */
  6921. A_UINT32 key_rxmic_len;
  6922. /** specifies if the group_key_ix is valid, filled by the sender */
  6923. A_UINT32 is_group_key_ix_valid;
  6924. /** Multi group key ID */
  6925. A_UINT32 group_key_ix;
  6926. /*
  6927. * Following this struct are this TLV.
  6928. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  6929. */
  6930. } wmi_vdev_install_key_cmd_fixed_param;
  6931. /** Preamble types to be used with VDEV fixed rate configuration */
  6932. typedef enum {
  6933. WMI_RATE_PREAMBLE_OFDM,
  6934. WMI_RATE_PREAMBLE_CCK,
  6935. WMI_RATE_PREAMBLE_HT,
  6936. WMI_RATE_PREAMBLE_VHT,
  6937. WMI_RATE_PREAMBLE_HE,
  6938. } WMI_RATE_PREAMBLE;
  6939. /** Value to disable fixed rate setting */
  6940. #define WMI_FIXED_RATE_NONE (0xff)
  6941. #define WMI_GI_400_NS 1
  6942. #define WMI_GI_800_NS 0
  6943. #define WMI_GI_1600_NS 2
  6944. #define WMI_GI_3200_NS 3
  6945. /** OCE(Optimized Connectivity_Experience) Feature flags */
  6946. #define WMI_VDEV_OCE_PROBE_REQUEST_RATE_FEATURE_BITMAP 0x1
  6947. #define WMI_VDEV_OCE_PROBE_RESPONSE_RATE_FEATURE_BITMAP 0x2
  6948. #define WMI_VDEV_OCE_BEACON_RATE_FEATURE_BITMAP 0x4
  6949. #define WMI_VDEV_OCE_PROBE_REQUEST_DEFERRAL_FEATURE_BITMAP 0x8
  6950. #define WMI_VDEV_OCE_FILS_DISCOVERY_FRAME_FEATURE_BITMAP 0x10
  6951. #define WMI_VDEV_OCE_ESP_FEATURE_BITMAP 0x20
  6952. #define WMI_VDEV_OCE_REASSOC_REJECT_FEATURE_BITMAP 0x40
  6953. /** the definition of different VDEV parameters */
  6954. typedef enum {
  6955. /** RTS Threshold */
  6956. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  6957. /** Fragmentation threshold */
  6958. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* 0x2 */
  6959. /** beacon interval in TUs */
  6960. WMI_VDEV_PARAM_BEACON_INTERVAL, /* 0x3 */
  6961. /** Listen interval in TUs */
  6962. WMI_VDEV_PARAM_LISTEN_INTERVAL, /* 0x4 */
  6963. /** muticast rate in Mbps */
  6964. WMI_VDEV_PARAM_MULTICAST_RATE, /* 0x5 */
  6965. /** management frame rate in Mbps */
  6966. WMI_VDEV_PARAM_MGMT_TX_RATE, /* 0x6 */
  6967. /** slot time (long vs short) */
  6968. WMI_VDEV_PARAM_SLOT_TIME, /* 0x7 */
  6969. /** preamble (long vs short) */
  6970. WMI_VDEV_PARAM_PREAMBLE, /* 0x8 */
  6971. /** SWBA time (time before tbtt in msec) */
  6972. WMI_VDEV_PARAM_SWBA_TIME, /* 0x9 */
  6973. /** time period for updating VDEV stats */
  6974. WMI_VDEV_STATS_UPDATE_PERIOD, /* 0xa */
  6975. /** age out time in msec for frames queued for station in power save*/
  6976. WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* 0xb */
  6977. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  6978. WMI_VDEV_HOST_SWBA_INTERVAL, /* 0xc */
  6979. /** DTIM period (specified in units of num beacon intervals) */
  6980. WMI_VDEV_PARAM_DTIM_PERIOD, /* 0xd */
  6981. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  6982. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* 0xe */
  6983. /** enable/dsiable WDS for this VDEV */
  6984. WMI_VDEV_PARAM_WDS, /* 0xf */
  6985. /** ATIM Window */
  6986. WMI_VDEV_PARAM_ATIM_WINDOW, /* 0x10 */
  6987. /** BMISS max */
  6988. WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* 0x11 */
  6989. /** BMISS first time */
  6990. WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* 0x12 */
  6991. /** BMISS final time */
  6992. WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* 0x13 */
  6993. /** WMM enables/disabled */
  6994. WMI_VDEV_PARAM_FEATURE_WMM, /* 0x14 */
  6995. /** Channel width */
  6996. WMI_VDEV_PARAM_CHWIDTH, /* 0x15 */
  6997. /** Channel Offset */
  6998. WMI_VDEV_PARAM_CHEXTOFFSET, /* 0x16 */
  6999. /** Disable HT Protection */
  7000. WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* 0x17 */
  7001. /** Quick STA Kickout */
  7002. WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* 0x18 */
  7003. /** Rate to be used with Management frames */
  7004. WMI_VDEV_PARAM_MGMT_RATE, /* 0x19 */
  7005. /** Protection Mode */
  7006. WMI_VDEV_PARAM_PROTECTION_MODE, /* 0x1a */
  7007. /** Fixed rate setting
  7008. * The top nibble is used to select which format to use for encoding
  7009. * the rate specification: 0xVXXXXXXX
  7010. * If V == 0b0000: format is same as before: 0x000000RR
  7011. * If V == 0b0001: format is: 0x1000RRRR.
  7012. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  7013. * The host shall use the new V1 format (and set V = 0x1) if the target
  7014. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  7015. * system is configured with Nss > 4 (either at compile time within the
  7016. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  7017. * by the target).
  7018. */
  7019. WMI_VDEV_PARAM_FIXED_RATE, /* 0x1b */
  7020. /**
  7021. * 11AX: GI =
  7022. * WMI_GI_400_NS, WMI_GI_800_NS, WMI_GI_1600_NS, or WMI_GI_3200_NS
  7023. * 11N: SGI=WMI_GI_400_NS
  7024. */
  7025. WMI_VDEV_PARAM_SGI, /* 0x1c */
  7026. /** Enable LDPC */
  7027. WMI_VDEV_PARAM_LDPC, /* 0x1d */
  7028. /** Enable Tx STBC */
  7029. WMI_VDEV_PARAM_TX_STBC, /* 0x1e */
  7030. /** Enable Rx STBC */
  7031. WMI_VDEV_PARAM_RX_STBC, /* 0x1f */
  7032. /** Intra BSS forwarding */
  7033. WMI_VDEV_PARAM_INTRA_BSS_FWD, /* 0x20 */
  7034. /** Setting Default xmit key for Vdev */
  7035. WMI_VDEV_PARAM_DEF_KEYID, /* 0x21 */
  7036. /** NSS width */
  7037. WMI_VDEV_PARAM_NSS, /* 0x22 */
  7038. /** Set the custom rate for the broadcast data frames */
  7039. WMI_VDEV_PARAM_BCAST_DATA_RATE, /* 0x23 */
  7040. /** Set the custom rate (rate-code) for multicast data frames */
  7041. WMI_VDEV_PARAM_MCAST_DATA_RATE, /* 0x24 */
  7042. /** Tx multicast packet indicate Enable/Disable */
  7043. WMI_VDEV_PARAM_MCAST_INDICATE, /* 0x25 */
  7044. /** Tx DHCP packet indicate Enable/Disable */
  7045. WMI_VDEV_PARAM_DHCP_INDICATE, /* 0x26 */
  7046. /** Enable host inspection of Tx unicast packet to unknown destination */
  7047. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, /* 0x27 */
  7048. /* The minimum amount of time AP begins to consider STA inactive */
  7049. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, /* 0x28 */
  7050. /* An associated STA is considered inactive when there is no recent TX/RX
  7051. * activity and no downlink frames are buffered for it. Once a STA exceeds
  7052. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  7053. * a keep alive to verify the STA is still associated. If the STA does ACK
  7054. * the data-null, or if the data-null is buffered and the STA does not
  7055. * retrieve it, the STA will be considered unresponsive (see
  7056. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  7057. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, /* 0x29 */
  7058. /* An associated STA is considered unresponsive if there is no recent
  7059. * TX/RX activity and downlink frames are buffered for it. Once a STA
  7060. * exceeds the maximum unresponsive time, the AP will send a
  7061. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  7062. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, /* 0x2a */
  7063. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  7064. WMI_VDEV_PARAM_AP_ENABLE_NAWDS, /* 0x2b */
  7065. /** Enable/Disable RTS-CTS */
  7066. WMI_VDEV_PARAM_ENABLE_RTSCTS, /* 0x2c */
  7067. /* Enable TXBFee/er */
  7068. WMI_VDEV_PARAM_TXBF, /* 0x2d */
  7069. /**Set packet power save */
  7070. WMI_VDEV_PARAM_PACKET_POWERSAVE, /* 0x2e */
  7071. /**Drops un-encrypted packets if any received in an encryted connection
  7072. * otherwise forwards to host
  7073. */
  7074. WMI_VDEV_PARAM_DROP_UNENCRY, /* 0x2f */
  7075. /*
  7076. * Set TX encap type.
  7077. *
  7078. * enum wmi_pkt_type is to be used as the parameter
  7079. * specifying the encap type.
  7080. */
  7081. WMI_VDEV_PARAM_TX_ENCAP_TYPE, /* 0x30 */
  7082. /*
  7083. * Try to detect stations that woke-up and exited power save but did not
  7084. * successfully transmit data-null with PM=0 to AP. When this happens,
  7085. * STA and AP power save state are out-of-sync. Use buffered but
  7086. * undelivered MSDU to the STA as a hint that the STA is really awake
  7087. * and expecting normal ASAP delivery, rather than retrieving BU with
  7088. * PS-Poll, U-APSD trigger, etc.
  7089. *
  7090. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  7091. */
  7092. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, /* 0x31 */
  7093. /* Enable/Disable early rx dynamic adjust feature.
  7094. * Early-rx dynamic adjust is a advance power save feature.
  7095. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  7096. * timing discrepancies in the system.
  7097. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  7098. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  7099. * properly to minimum the power consume.*/
  7100. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, /* 0x32 */
  7101. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  7102. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  7103. * which can be set by user through WMI command.
  7104. */
  7105. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, /* 0x33 */
  7106. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  7107. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, /* 0x34 */
  7108. /* set slop_step */
  7109. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, /* 0x35 */
  7110. /* set init slop */
  7111. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, /* 0x36 */
  7112. /* pause adjust enable/disable */
  7113. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, /* 0x37 */
  7114. /* Set channel pwr limit value of the vdev the minimal value of all
  7115. * vdevs operating on this channel will be set as channel tx power
  7116. * limit, which is used to configure ratearray
  7117. */
  7118. WMI_VDEV_PARAM_TX_PWRLIMIT, /* 0x38 */
  7119. /* set the count of snr value for calculation in snr monitor */
  7120. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, /* 0x39 */
  7121. /** Roaming offload */
  7122. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, /* 0x3a */
  7123. /** Enable Leader request RX functionality for RMC */
  7124. WMI_VDEV_PARAM_ENABLE_RMC, /* 0x3b */
  7125. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  7126. * by himself. If the beacon lost time exceed this threshold, the peer is
  7127. * thought to be gone. */
  7128. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, /* 0x3c */
  7129. /** max rate in kpbs, transmit rate can't go beyond it */
  7130. WMI_VDEV_PARAM_MAX_RATE, /* 0x3d */
  7131. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  7132. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, /* 0x3e */
  7133. /* set Tx failure count threshold for the vdev */
  7134. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, /* 0x3f */
  7135. /* set ebt resync timeout value, in the unit of TU */
  7136. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, /* 0x40 */
  7137. /* Enable Aggregation State Trigger Event */
  7138. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, /* 0x41 */
  7139. /* This parameter indicates whether IBSS station can enter into power save
  7140. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  7141. * awake all the time and should never set PM=1 in its transmitted frames.
  7142. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  7143. * is non-zero. */
  7144. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, /* 0x42 */
  7145. /* This parameter indicates if this station can enter into power collapse
  7146. * for the remaining beacon interval after the ATIM window.
  7147. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  7148. * is set to TRUE. */
  7149. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, /* 0x43 */
  7150. /* This parameter indicates whether IBSS station exit power save mode and
  7151. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  7152. * whenever there is a TX/RX activity. */
  7153. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, /* 0x44 */
  7154. /* If Awake on TX/RX activity is enabled, this parameter indicates
  7155. * the data inactivity time in number of beacon intervals after which
  7156. * IBSS station reenters power save by sending Null frame with PM=1. */
  7157. WMI_VDEV_PARAM_INACTIVITY_CNT, /* 0x45 */
  7158. /* Inactivity time in msec after which TX Service Period (SP) is
  7159. * terminated by sending a Qos Null frame with EOSP.
  7160. * If value is 0, TX SP is terminated with the last buffered packet itself
  7161. * instead of waiting for the inactivity timeout. */
  7162. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, /* 0x46 */
  7163. /** DTIM policy */
  7164. WMI_VDEV_PARAM_DTIM_POLICY, /* 0x47 */
  7165. /* When IBSS network is initialized, PS-supporting device
  7166. * does not enter protocol sleep state during first
  7167. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  7168. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, /* 0x48 */
  7169. /* Enable/Disable 1 RX chain usage during the ATIM window */
  7170. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, /* 0x49 */
  7171. /* RX Leak window is the time driver waits before shutting down
  7172. * the radio or switching the channel and after receiving an ACK
  7173. * for a data frame with PM bit set) */
  7174. WMI_VDEV_PARAM_RX_LEAK_WINDOW, /* 0x4a */
  7175. /** Averaging factor(16 bit value) is used in the calculations to
  7176. * perform averaging of different link level statistics like average
  7177. * beacon spread or average number of frames leaked */
  7178. WMI_VDEV_PARAM_STATS_AVG_FACTOR, /* 0x4b */
  7179. /** disconnect threshold, once the consecutive error for specific peer
  7180. * exceed this threhold, FW will send kickout event to host */
  7181. WMI_VDEV_PARAM_DISCONNECT_TH, /* 0x4c */
  7182. /** The rate_code of RTS_CTS changed by host. Now FW can support
  7183. * more non-HT rates rather than 1Mbps or 6Mbps */
  7184. WMI_VDEV_PARAM_RTSCTS_RATE, /* 0x4d */
  7185. /** This parameter indicates whether using a long duration RTS-CTS
  7186. * protection when a SAP goes off channel in MCC mode */
  7187. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, /* 0x4e */
  7188. /** This parameter indicates whether using a broadcast probe response
  7189. * to increase the detectability of SAP in MCC mode */
  7190. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, /* 0x4f */
  7191. /** This parameter indicates the power backoff in percentage
  7192. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  7193. * Host passes 0, 1, 2, 3, 4 to Firmware
  7194. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  7195. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  7196. */
  7197. WMI_VDEV_PARAM_TXPOWER_SCALE, /* 0x50 */
  7198. /** TX power backoff in dB: tx power -= param value
  7199. * Host passes values(DB) to Halphy, Halphy reduces the power table
  7200. * by the values. Safety check will happen in Halphy.
  7201. */
  7202. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, /* 0x51 */
  7203. /** Multicast to Unicast conversion setting */
  7204. WMI_VDEV_PARAM_MCAST2UCAST_SET, /* 0x52 */
  7205. /** Total number of HW retries */
  7206. WMI_VDEV_PARAM_RC_NUM_RETRIES, /* 0x53 */
  7207. /** Max tx percentage for cabq */
  7208. WMI_VDEV_PARAM_CABQ_MAXDUR, /* 0x54 */
  7209. /** MFPTEST settings */
  7210. WMI_VDEV_PARAM_MFPTEST_SET, /* 0x55 */
  7211. /** RTS Fixed rate setting */
  7212. WMI_VDEV_PARAM_RTS_FIXED_RATE, /* 0x56 */
  7213. /** VHT SGI MASK */
  7214. WMI_VDEV_PARAM_VHT_SGIMASK, /* 0x57 */
  7215. /** VHT80 Auto Rate MASK */
  7216. WMI_VDEV_PARAM_VHT80_RATEMASK, /* 0x58 */
  7217. /** set Proxy STA features for this vap */
  7218. WMI_VDEV_PARAM_PROXY_STA, /* 0x59 */
  7219. /** set virtual cell mode - enable/disable */
  7220. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, /* 0x5a */
  7221. /** Set receive packet type */
  7222. WMI_VDEV_PARAM_RX_DECAP_TYPE, /* 0x5b */
  7223. /** Set ratemask with specific Bandwidth and NSS */
  7224. WMI_VDEV_PARAM_BW_NSS_RATEMASK, /* 0x5c */
  7225. /** Set SENSOR Support */
  7226. WMI_VDEV_PARAM_SENSOR_AP, /* 0x5d */
  7227. /** Set beacon rate */
  7228. WMI_VDEV_PARAM_BEACON_RATE, /* 0x5e */
  7229. /** Enable CTS to self for DTIM beacon */
  7230. WMI_VDEV_PARAM_DTIM_ENABLE_CTS, /* 0x5f */
  7231. /** Disable station kickout at Vap level */
  7232. WMI_VDEV_PARAM_STA_KICKOUT, /* 0x60 */
  7233. /* VDEV capabilities */
  7234. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ /* 0x61 */
  7235. /**
  7236. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  7237. * The host must ensure that either no other vdevs share the TSF with
  7238. * this vdev, or else that it is acceptable to apply this TSF adjustment
  7239. * to all vdevs sharing the TSF.
  7240. */
  7241. WMI_VDEV_PARAM_TSF_INCREMENT, /* 0x62 */
  7242. /** Disable/Enable AMPDU of vdev per AC:
  7243. * bit | AC
  7244. * --------
  7245. * 0 | VO
  7246. * 1 | VI
  7247. * 2 | BE
  7248. * 3 | BK
  7249. * A value of 0 in a given bit disables A-MPDU aggregation for
  7250. * that AC; a value of 1 enables A-MPDU aggregation
  7251. */
  7252. WMI_VDEV_PARAM_AMPDU_PER_AC, /* 0x63 */
  7253. /**
  7254. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  7255. * Used mainly for mesh-vap.
  7256. * The parameter value delivered with the RX_FILTER vdev param contains
  7257. * a bit-or mask of wmi_vdev_param_filter enum values.
  7258. */
  7259. WMI_VDEV_PARAM_RX_FILTER, /* 0x64 */
  7260. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  7261. WMI_VDEV_PARAM_MGMT_TX_POWER, /* 0x65 */
  7262. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7263. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, /* 0x66 */
  7264. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  7265. WMI_VDEV_PARAM_AGG_SW_RETRY_TH, /* 0x67 */
  7266. /** disable dynamic bw RTS **/
  7267. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, /* 0x68 */
  7268. /** per ssid (vdev) based ATF strict/fair scheduling policy
  7269. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  7270. */
  7271. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, /* 0x69 */
  7272. /** Enable or disable Dual carrier modulation
  7273. * valid values: 0-Disable DCM, 1-Enable DCM.
  7274. */
  7275. WMI_VDEV_PARAM_HE_DCM, /* 0x6a */
  7276. /** Enable or disable Extended range
  7277. * valid values: 0-Disable ER, 1-Enable ER.
  7278. */
  7279. WMI_VDEV_PARAM_HE_RANGE_EXT, /* 0x6b */
  7280. /* enable or disable BCAST probe response feature */
  7281. WMI_VDEV_PARAM_ENABLE_BCAST_PROBE_RESPONSE, /* 0x6c */
  7282. /* param to specify probe request Tx delay during Fast Initial Link Setup */
  7283. WMI_VDEV_PARAM_FILS_MAX_CHANNEL_GUARD_TIME, /* units = milliseconds */ /* 0x6d */
  7284. /* enable or disable NOA for P2P GO */
  7285. WMI_VDEV_PARAM_DISABLE_NOA_P2P_GO, /* 0x6e */
  7286. /** Per band user management frame fix rate setting
  7287. * BIT 31: enable (1) or disable (0) mgmt fix rate for 5G
  7288. * BIT 30: enable (1) or disable (0) mgmt fix rate for 2G
  7289. *
  7290. * BIT 23: 11ax (1) or legacy (0) rate code
  7291. * BITS [22..12]: rate code for 5G
  7292. *
  7293. * BIT 11: 11ax (1) or legacy (0) rate code
  7294. * BITS [10..0]: rate code for 2G
  7295. */
  7296. WMI_VDEV_PARAM_PER_BAND_MGMT_TX_RATE, /* 0x6f */
  7297. /* This should be called before WMI_VDEV_PARAM_TXBF */
  7298. WMI_VDEV_PARAM_11AX_TXBF, /* 0x70 */
  7299. /** This parameter indicates whether VDEV is SMPS intolerant.
  7300. * I.e. - SMPS action frame cannot be transmitted by the VDEV to
  7301. * dynamically change the RX NSS.
  7302. *
  7303. * valid values: 1 - VDEV is SMPS intolerant, 0 - VDEV is SMPS tolerant
  7304. */
  7305. WMI_VDEV_PARAM_SMPS_INTOLERANT, /* 0x71 */
  7306. /** specify probe request Tx delay for scans triggered on this VDEV */
  7307. WMI_VDEV_PARAM_PROBE_DELAY, /* units = milliseconds */ /* 0x72 */
  7308. /** specify the time gap between each set of probe request transmissions.
  7309. * The number of probe requests in each set depends on the ssid_list and
  7310. * bssid_list in the scan request.
  7311. * This parameter will be applied only for scans triggered on this VDEV.
  7312. */
  7313. WMI_VDEV_PARAM_REPEAT_PROBE_TIME, /* units = milliseconds */ /* 0x73 */
  7314. /** specify the HE LTF setting that should be used for fixed rate
  7315. * transmissions.
  7316. *
  7317. * Expects values of WMI_HE_LTF_DEFAULT, WMI_HE_LTF_1X, WMI_HE_LTF_2X,
  7318. * or WMI_HE_LTF_4X.
  7319. */
  7320. WMI_VDEV_PARAM_HE_LTF, /* 0x74 */
  7321. /** VDEV parameter to configure the number of TX chains to use for
  7322. * a/b/g rates.
  7323. * bit 0~15 : 11b mode TX chain number.
  7324. * bit 16~31 : 11ag mode TX chain number.
  7325. *
  7326. * valid values:
  7327. * Should not exceed the maximum number of supported TX Chains
  7328. * 0 - Used to reset the vote. Acts as Don't Care
  7329. */
  7330. WMI_VDEV_PARAM_ABG_MODE_TX_CHAIN_NUM, /* 0x75 */
  7331. /**
  7332. * Enable or disable the multi group key feature on this VDEV.
  7333. * used for NAN APP and VLAN Tagging
  7334. */
  7335. WMI_VDEV_PARAM_ENABLE_MULTI_GROUP_KEY, /* 0x76 */
  7336. /*
  7337. * Specify the total number of multi group key on this VDEV.
  7338. */
  7339. WMI_VDEV_PARAM_NUM_GROUP_KEYS, /* 0x77 */
  7340. /** VDEV parameter to enable or disable various OCE features */
  7341. WMI_VDEV_PARAM_ENABLE_DISABLE_OCE_FEATURES, /* 0x78 */
  7342. /*
  7343. * Set/Clear 3 least-significant bits to
  7344. * Disable or Enable rate drop down for MGMT, SU data and MU data pkts
  7345. *
  7346. * bit 0 -> If set MGMT Pkt rate drop down is enabled else disabled
  7347. * bit 1 -> If set SU data Pkt rate drop down is enabled else disabled
  7348. * bit 2 -> If set MU data Pkt rate drop down is enabled else disabled
  7349. * bits 31:3 -> Reserved bits. should be set to zero.
  7350. */
  7351. WMI_VDEV_PARAM_RATE_DROPDOWN_BMAP, /* 0x79 */
  7352. /** VDEV parameter to config modulated DTIM count */
  7353. WMI_VDEV_PARAM_MODDTIM_CNT, /* 0x7a */
  7354. /**
  7355. * VDEV parameter to config max listen interval,
  7356. * when modulated DTIM is enabled.
  7357. * Units are 100TU.
  7358. */
  7359. WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM, /* 0x7b */
  7360. /** VDEV parameter to config dynamic DTIM count */
  7361. WMI_VDEV_PARAM_DYNDTIM_CNT, /* 0x7c */
  7362. /** VDEV parameter to enable or disable RTT responder role
  7363. * valid values: 0-Disable responder role 1-Enable responder role
  7364. */
  7365. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE, /* 0x7d */
  7366. /** Parameter to configure BA mode.
  7367. * Valid values: 0- Auto mode,
  7368. * 1- Manual mode(addba req not sent).
  7369. * 2- buffer size 64
  7370. * 3- buffer size 256
  7371. */
  7372. WMI_VDEV_PARAM_BA_MODE, /* 0x7e */
  7373. /**
  7374. * VDEV parameter to force to set modulate DTIM count as listen interval,
  7375. * no matter whether WoW is enabled
  7376. * Default: Disabled.
  7377. * Valid values: 0- Disabled,
  7378. * 1- Enabled.
  7379. */
  7380. WMI_VDEV_PARAM_FORCED_MODDTIM_ENABLE, /* 0x7f */
  7381. /** specify the setting that are valid for auto rate transmissions.
  7382. * bits 7:0 (LTF): When bitmask is set, then corresponding LTF value is
  7383. * used for auto rate.
  7384. * BIT0 = 1 (WMI_HE_LTF_1X)
  7385. * BIT1 = 1 (WMI_HE_LTF_2X)
  7386. * BIT2 = 1 (WMI_HE_LTF_4X)
  7387. * BIT3-7 = Reserved bits.
  7388. * bits 15:8 (SGI): When bitmask is set, then corresponding SGI value is
  7389. * used for auto rate.
  7390. * BIT8 = 1 (400 NS)
  7391. * BIT9 = 1 (800 NS)
  7392. * BIT10 = 1 (1600 NS)
  7393. * BIT11 = 1 (3200 NS)
  7394. * BIT12-15 = Reserved bits.
  7395. * bits 31:16: Reserved bits. should be set to zero.
  7396. */
  7397. WMI_VDEV_PARAM_AUTORATE_MISC_CFG, /* 0x80 */
  7398. /** VDEV parameter to enable or disable RTT initiator mac address
  7399. * randomization.
  7400. * Default: Disabled.
  7401. * valid values: 0-Disable random mac 1-Enable random mac
  7402. */
  7403. WMI_VDEV_PARAM_ENABLE_DISABLE_RTT_INITIATOR_RANDOM_MAC, /* 0x81 */
  7404. /**
  7405. * For each AC, configure how many tx retries to send without RTS
  7406. * before enabling RTS
  7407. * bits 0:7 :BE
  7408. * bits 8:15 :BK
  7409. * bits 16:23 :VI
  7410. * bits 24:31 :VO
  7411. * A value of 0 in specific AC means default configuration for that AC.
  7412. */
  7413. WMI_VDEV_PARAM_TX_RETRIES_BEFORE_RTS_PER_AC, /* 0x82 */
  7414. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  7415. * The below vdev param types are used for prototyping, and are
  7416. * prone to change.
  7417. */
  7418. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  7419. /* 11AX SPECIFIC defines */
  7420. /* USE this for BSS color change */
  7421. WMI_VDEV_PARAM_BSS_COLOR, /* 0x8001 */
  7422. /*
  7423. * Enable / disable trigger access for a AP vdev's peers.
  7424. * For a STA mode vdev this will enable/disable triggered access
  7425. * and enable/disable Multi User mode of operation.
  7426. * A value of 0 in a given bit disables corresponding mode.
  7427. * bit | hemu mode
  7428. * ---------------
  7429. * 0 | HE SUBFEE
  7430. * 1 | HE SUBFER
  7431. * 2 | HE MUBFEE
  7432. * 3 | HE MUBFER
  7433. * 4 | DL OFDMA, for AP its DL Tx OFDMA for Sta its Rx OFDMA
  7434. * 5 | UL OFDMA, for AP its Tx OFDMA trigger for Sta its Rx OFDMA
  7435. * | trigger receive & UL response
  7436. * 6 | UL MUMIMO
  7437. */
  7438. WMI_VDEV_PARAM_SET_HEMU_MODE, /* 0x8002 */
  7439. WMI_VDEV_PARAM_HEOPS_0_31, /* 0x8003 */
  7440. WMI_VDEV_PARAM_OBSSPD, /* 0x8004 */
  7441. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  7442. } WMI_VDEV_PARAM;
  7443. #define WMI_VDEV_HE_SUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 0, 1)
  7444. #define WMI_VDEV_HE_SUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 1)
  7445. #define WMI_VDEV_HE_SUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 0, 1, 0)
  7446. #define WMI_VDEV_HE_SUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 1, 1)
  7447. #define WMI_VDEV_HE_SUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 1)
  7448. #define WMI_VDEV_HE_SUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 1, 1, 0)
  7449. #define WMI_VDEV_HE_MUBFEE_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 2, 1)
  7450. #define WMI_VDEV_HE_MUBFEE_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 1)
  7451. #define WMI_VDEV_HE_MUBFEE_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 2, 1, 0)
  7452. #define WMI_VDEV_HE_MUBFER_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 3, 1)
  7453. #define WMI_VDEV_HE_MUBFER_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 1)
  7454. #define WMI_VDEV_HE_MUBFER_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 3, 1, 0)
  7455. #define WMI_VDEV_HE_DLOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 4, 1)
  7456. #define WMI_VDEV_HE_DLOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 1)
  7457. #define WMI_VDEV_HE_DLOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 4, 1, 0)
  7458. #define WMI_VDEV_HE_ULOFDMA_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 5, 1)
  7459. #define WMI_VDEV_HE_ULOFDMA_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 1)
  7460. #define WMI_VDEV_HE_ULOFDMA_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 5, 1, 0)
  7461. #define WMI_VDEV_HE_ULMUMIMO_IS_ENABLED(hemu_mode) WMI_GET_BITS(hemu_mode, 6, 1)
  7462. #define WMI_VDEV_HE_ULMUMIMO_ENABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 1)
  7463. #define WMI_VDEV_HE_ULMUMIMO_DISABLE(hemu_mode) WMI_SET_BITS(hemu_mode, 6, 1, 0)
  7464. /* vdev capabilities bit mask */
  7465. #define WMI_VDEV_BEACON_SUPPORT 0x1
  7466. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  7467. #define WMI_VDEV_VOW_ENABLED 0x4
  7468. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  7469. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  7470. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  7471. /* Per VAP rate dropdown masks */
  7472. #define WMI_VDEV_MGMT_RATE_DROPDOWN_M 0x01
  7473. #define WMI_VDEV_MGMT_RATE_DROPDOWN_S 0
  7474. #define WMI_VDEV_MGMT_RATE_DROPDOWN (WMI_VDEV_MGMT_RATE_DROPDOWN_M << WMI_VDEV_MGMT_RATE_DROPDOWN_S)
  7475. #define WMI_VDEV_MGMT_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MGMT_RATE_DROPDOWN)
  7476. #define WMI_VDEV_MGMT_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MGMT_RATE_DROPDOWN)
  7477. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_M 0x01
  7478. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_S 1
  7479. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN (WMI_VDEV_SU_DATA_RATE_DROPDOWN_M << WMI_VDEV_SU_DATA_RATE_DROPDOWN_S)
  7480. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  7481. #define WMI_VDEV_SU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_SU_DATA_RATE_DROPDOWN)
  7482. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_M 0x01
  7483. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_S 2
  7484. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN (WMI_VDEV_MU_DATA_RATE_DROPDOWN_M << WMI_VDEV_MU_DATA_RATE_DROPDOWN_S)
  7485. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_GET(x) WMI_F_MS(x, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  7486. #define WMI_VDEV_MU_DATA_RATE_DROPDOWN_SET(x,z) WMI_F_RMW(x, z, WMI_VDEV_MU_DATA_RATE_DROPDOWN)
  7487. /* TXBF capabilities masks */
  7488. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  7489. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  7490. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  7491. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  7492. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  7493. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  7494. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  7495. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  7496. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  7497. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  7498. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  7499. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  7500. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  7501. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  7502. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  7503. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  7504. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  7505. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  7506. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  7507. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  7508. #define WMI_TXBF_CONF_STS_CAP_S 4
  7509. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  7510. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  7511. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  7512. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  7513. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  7514. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  7515. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  7516. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  7517. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  7518. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  7519. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  7520. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  7521. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  7522. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  7523. /* commands for 11ax TXBF capabilities */
  7524. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_GET(x) WMI_GET_BITS((x,0,1)
  7525. #define WMI_TXBF_CONF_11AX_SU_TX_BFER_SET(x,z) WMI_SET_BITS(x,0,1,z)
  7526. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_GET(x) WMI_GET_BITS((x,1,1)
  7527. #define WMI_TXBF_CONF_11AX_SU_TX_BFEE_SET(x,z) WMI_SET_BITS(x,1,1,z)
  7528. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_GET(x) WMI_GET_BITS((x,2,1)
  7529. #define WMI_TXBF_CONF_11AX_MU_TX_BFER_SET(x,z) WMI_SET_BITS(x,2,1,z)
  7530. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_GET(x) WMI_GET_BITS((x,3,3)
  7531. #define WMI_TXBF_CONF_11AX_BFEE_NDP_STS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,3,3,z)
  7532. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_GET(x) WMI_GET_BITS((x,6,3)
  7533. #define WMI_TXBF_CONF_11AX_NSTS_LT_EQ_80_SET(x,z) WMI_SET_BITS(x,6,3,z)
  7534. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_GET(x) WMI_GET_BITS((x,9,3)
  7535. #define WMI_TXBF_CONF_11AX_TX_BFEE_NDP_STS_GT_80_SET(x,z) WMI_SET_BITS(x,9,3,z)
  7536. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_GET(x) WMI_GET_BITS((x,12,3)
  7537. #define WMI_TXBF_CONF_11AX_NSTS_GT_80_SET(x,z) WMI_SET_BITS(x,12,3,z)
  7538. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_GET(x) WMI_GET_BITS((x,15,3)
  7539. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_LT_EQ_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,15,3,z)
  7540. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_GET(x) WMI_GET_BITS((x,18,3)
  7541. #define WMI_TXBF_CONF_AX_BFER_SND_DIM_GT_80_SND_DIM_SET(x,z) WMI_SET_BITS(x,18,3,z)
  7542. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,21,1)
  7543. #define WMI_TXBF_CONF_AX_SU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,21,1,z)
  7544. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_GET(x) WMI_GET_BITS((x,22,1)
  7545. #define WMI_TXBF_CONF_AX_MU_BFEE_NG16_FDBK_SET(x,z) WMI_SET_BITS(x,22,1,z)
  7546. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_GET(x) WMI_GET_BITS((x,23,1)
  7547. #define WMI_TXBF_CONF_AX_SU_BFEE_CDBK_4_2_SET(x,z) WMI_SET_BITS(x,23,1,z)
  7548. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_GET(x) WMI_GET_BITS((x,24,1)
  7549. #define WMI_TXBF_CONF_AX_MU_BFEE_CDBK_7_5_SET(x,z) WMI_SET_BITS(x,24,1,z)
  7550. #define WMI_TXBF_CONF_AX_FDBK_TRIG_GET(x) WMI_GET_BITS((x,25,1)
  7551. #define WMI_TXBF_CONF_AX_FDBK_TRIG_SET(x,z) WMI_SET_BITS(x,25,1,z)
  7552. /* TXBF capabilities */
  7553. typedef struct {
  7554. A_UINT32 txbf_cap;
  7555. } wmi_vdev_txbf_cap;
  7556. /* vdev rx filters (for mesh) */
  7557. typedef enum {
  7558. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  7559. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  7560. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  7561. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  7562. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  7563. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  7564. } wmi_vdev_param_filter;
  7565. /* Length of ATIM Window in TU */
  7566. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  7567. enum wmi_pkt_type {
  7568. WMI_PKT_TYPE_RAW = 0,
  7569. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  7570. WMI_PKT_TYPE_ETHERNET = 2,
  7571. };
  7572. /*******************************************************************
  7573. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  7574. * Do not use it!
  7575. *******************************************************************/
  7576. typedef struct {
  7577. A_UINT8 sutxbfee : 1,
  7578. mutxbfee : 1,
  7579. sutxbfer : 1,
  7580. mutxbfer : 1,
  7581. txb_sts_cap : 3,
  7582. implicit_bf : 1;
  7583. } wmi_vdev_txbf_en;
  7584. /** Upto 8 bits are available for Roaming module to be sent along with
  7585. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  7586. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  7587. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  7588. /* Enable Roaming module in FW to do scan based on Final BMISS */
  7589. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  7590. /** slot time long */
  7591. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  7592. /** slot time short */
  7593. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  7594. /** preablbe long */
  7595. #define WMI_VDEV_PREAMBLE_LONG 0x1
  7596. /** preablbe short */
  7597. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  7598. /** the definition of different START/RESTART Event response */
  7599. typedef enum {
  7600. /* Event respose of START CMD */
  7601. WMI_VDEV_START_RESP_EVENT = 0,
  7602. /* Event respose of RESTART CMD */
  7603. WMI_VDEV_RESTART_RESP_EVENT,
  7604. } WMI_START_EVENT_PARAM;
  7605. typedef struct {
  7606. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  7607. /** unique id identifying the VDEV, generated by the caller */
  7608. A_UINT32 vdev_id;
  7609. /** requestor id that requested the VDEV start request */
  7610. A_UINT32 requestor_id;
  7611. /* Respose of Event type START/RESTART */
  7612. WMI_START_EVENT_PARAM resp_type;
  7613. /** status of the response */
  7614. A_UINT32 status;
  7615. /** Vdev chain mask */
  7616. A_UINT32 chain_mask;
  7617. /** Vdev mimo power save mode */
  7618. A_UINT32 smps_mode;
  7619. union {
  7620. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  7621. /** pdev_id for identifying the MAC
  7622. * See macros starting with WMI_PDEV_ID_ for values.
  7623. */
  7624. A_UINT32 pdev_id;
  7625. };
  7626. /** Configured Transmit Streams **/
  7627. A_UINT32 cfgd_tx_streams;
  7628. /** Configured Receive Streams **/
  7629. A_UINT32 cfgd_rx_streams;
  7630. } wmi_vdev_start_response_event_fixed_param;
  7631. typedef struct {
  7632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  7633. /** unique id identifying the VDEV, generated by the caller */
  7634. A_UINT32 vdev_id;
  7635. } wmi_vdev_stopped_event_fixed_param;
  7636. typedef struct {
  7637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  7638. /** unique id identifying the VDEV, generated by the caller */
  7639. A_UINT32 vdev_id;
  7640. } wmi_vdev_delete_resp_event_fixed_param;
  7641. /** common structure used for simple events (stopped, resume_req, standby response) */
  7642. typedef struct {
  7643. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  7644. /** unique id identifying the VDEV, generated by the caller */
  7645. A_UINT32 vdev_id;
  7646. } wmi_vdev_simple_event_fixed_param;
  7647. /** VDEV start response status codes */
  7648. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  7649. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  7650. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  7651. /** Beacon processing related command and event structures */
  7652. typedef struct {
  7653. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  7654. /** unique id identifying the VDEV, generated by the caller */
  7655. A_UINT32 vdev_id;
  7656. /** xmit rate */
  7657. A_UINT32 tx_rate;
  7658. /** xmit power */
  7659. A_UINT32 txPower;
  7660. /** beacon buffer length in bytes */
  7661. A_UINT32 buf_len;
  7662. /* This TLV is followed by array of bytes:
  7663. * A_UINT8 bufp[]; <-- beacon frame buffer
  7664. */
  7665. } wmi_bcn_tx_hdr;
  7666. /* Beacon filter */
  7667. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  7668. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  7669. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  7670. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  7671. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  7672. typedef struct {
  7673. /** Filter ID */
  7674. A_UINT32 bcn_filter_id;
  7675. /** Filter type - wmi_bcn_filter */
  7676. A_UINT32 bcn_filter;
  7677. /** Buffer len */
  7678. A_UINT32 bcn_filter_len;
  7679. /** Filter info (threshold, BSSID, RSSI) */
  7680. A_UINT8 *bcn_filter_buf;
  7681. } wmi_bcn_filter_rx_cmd;
  7682. /** Capabilities and IEs to be passed to firmware */
  7683. typedef struct {
  7684. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  7685. /** Capabilities */
  7686. A_UINT32 caps;
  7687. /** ERP info */
  7688. A_UINT32 erp;
  7689. /** Advanced capabilities */
  7690. /** HT capabilities */
  7691. /** HT Info */
  7692. /** ibss_dfs */
  7693. /** wpa Info */
  7694. /** rsn Info */
  7695. /** rrm info */
  7696. /** ath_ext */
  7697. /** app IE */
  7698. } wmi_bcn_prb_info;
  7699. typedef struct {
  7700. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  7701. /** unique id identifying the VDEV, generated by the caller */
  7702. A_UINT32 vdev_id;
  7703. /** TIM IE offset from the beginning of the template. */
  7704. A_UINT32 tim_ie_offset;
  7705. /** beacon buffer length. data is in TLV data[] */
  7706. A_UINT32 buf_len;
  7707. /** CSA IE switch count offset from the beginning of data[]
  7708. * Value 0 indicates CSA IE is not present in beacon template.
  7709. */
  7710. A_UINT32 csa_switch_count_offset; /* units = bytes */
  7711. /** Extended CSA IE switch count offset from the beginning of data[]
  7712. * Value 0 indicates CSA IE is not present in beacon template.
  7713. */
  7714. A_UINT32 ext_csa_switch_count_offset; /* units = bytes */
  7715. /** Specify when to send the CSA switch count status from FW to host.
  7716. * See WMI_CSA_EVENT_BMAP* below for more information.
  7717. * E.g. if CSA switch count event is needed to be sent when the switch count
  7718. * is 0, 1, 4 and 5, set the bitmap to (0X80000033)
  7719. */
  7720. A_UINT32 csa_event_bitmap;
  7721. /*
  7722. * The TLVs follows:
  7723. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  7724. * A_UINT8 data[]; <-- Variable length data
  7725. */
  7726. } wmi_bcn_tmpl_cmd_fixed_param;
  7727. #define WMI_CSA_EVENT_BMAP_VALID_MASK 0X80000000 /* Follow bitmap for sending the CSA switch count event */
  7728. #define WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO 0 /* Send only when the switch count becomes zero, added for backward compatibility
  7729. Same can also be achieved by setting bitmap to 0X80000001 */
  7730. #define WMI_CSA_EVENT_BMAP_ALL 0XFFFFFFFF /* Send CSA switch count event for every update to switch count */
  7731. typedef struct {
  7732. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  7733. /** unique id identifying the VDEV, generated by the caller */
  7734. A_UINT32 vdev_id;
  7735. /** beacon buffer length. data is in TLV data[] */
  7736. A_UINT32 buf_len;
  7737. /*
  7738. * The TLVs follows:
  7739. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  7740. * A_UINT8 data[]; <-- Variable length data
  7741. */
  7742. } wmi_prb_tmpl_cmd_fixed_param;
  7743. typedef struct {
  7744. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  7745. A_UINT32 tlv_header;
  7746. /** unique id identifying the VDEV */
  7747. A_UINT32 vdev_id;
  7748. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  7749. A_UINT32 tx_status;
  7750. } wmi_offload_bcn_tx_status_event_fixed_param;
  7751. enum wmi_sta_ps_mode {
  7752. /** enable power save for the given STA VDEV */
  7753. WMI_STA_PS_MODE_DISABLED = 0,
  7754. /** disable power save for a given STA VDEV */
  7755. WMI_STA_PS_MODE_ENABLED = 1,
  7756. };
  7757. typedef struct {
  7758. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  7759. /** unique id identifying the VDEV, generated by the caller */
  7760. A_UINT32 vdev_id;
  7761. /** Power save mode
  7762. *
  7763. * (see enum wmi_sta_ps_mode)
  7764. */
  7765. A_UINT32 sta_ps_mode;
  7766. } wmi_sta_powersave_mode_cmd_fixed_param;
  7767. enum wmi_csa_offload_en {
  7768. WMI_CSA_OFFLOAD_DISABLE = 0,
  7769. WMI_CSA_OFFLOAD_ENABLE = 1,
  7770. };
  7771. typedef struct {
  7772. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  7773. A_UINT32 vdev_id;
  7774. A_UINT32 csa_offload_enable;
  7775. } wmi_csa_offload_enable_cmd_fixed_param;
  7776. typedef struct {
  7777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  7778. A_UINT32 vdev_id;
  7779. /*
  7780. * The TLVs follows:
  7781. * wmi_channel chan;
  7782. */
  7783. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  7784. /**
  7785. * This parameter controls the policy for retrieving frames from AP while the
  7786. * STA is in sleep state.
  7787. *
  7788. * Only takes affect if the sta_ps_mode is enabled
  7789. */
  7790. enum wmi_sta_ps_param_rx_wake_policy {
  7791. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  7792. * the Power save SM(state machine) will come out of sleep by either
  7793. * sending null frame (or) a data frame (with PS==0) in response to TIM
  7794. * bit set in the received beacon frame from AP.
  7795. */
  7796. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  7797. /* Here the power save state machine will not wakeup in response to TIM
  7798. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  7799. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  7800. * access categories are delivery-enabled, the station will send a UAPSD
  7801. * trigger frame, otherwise it will send a PS-Poll.
  7802. */
  7803. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  7804. };
  7805. /** Number of tx frames/beacon that cause the power save SM to wake up.
  7806. *
  7807. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  7808. * meaning, It will cause the SM to never wake up. This is useful if you want
  7809. * to keep the system to sleep all the time for some kind of test mode . host
  7810. * can change this parameter any time. It will affect at the next tx frame.
  7811. */
  7812. enum wmi_sta_ps_param_tx_wake_threshold {
  7813. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  7814. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  7815. /* Values greater than one indicate that many TX attempts per beacon
  7816. * interval before the STA will wake up
  7817. */
  7818. };
  7819. /**
  7820. * The maximum number of PS-Poll frames the FW will send in response to
  7821. * traffic advertised in TIM before waking up (by sending a null frame with PS
  7822. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  7823. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  7824. * parameter is used when the RX wake policy is
  7825. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  7826. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  7827. */
  7828. enum wmi_sta_ps_param_pspoll_count {
  7829. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  7830. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  7831. * will send before waking up.
  7832. */
  7833. };
  7834. /*
  7835. * This will include the delivery and trigger enabled state for every AC.
  7836. * This is the negotiated state with AP. The host MLME needs to set this based
  7837. * on AP capability and the state Set in the association request by the
  7838. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  7839. */
  7840. #define WMI_UAPSD_AC_TYPE_DELI 0
  7841. #define WMI_UAPSD_AC_TYPE_TRIG 1
  7842. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  7843. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  7844. (1 << (ac<<1)) : \
  7845. (1 << ((ac<<1)+1)))
  7846. enum wmi_sta_ps_param_uapsd {
  7847. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  7848. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  7849. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  7850. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  7851. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  7852. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  7853. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  7854. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  7855. };
  7856. enum wmi_sta_powersave_param {
  7857. /**
  7858. * Controls how frames are retrievd from AP while STA is sleeping
  7859. *
  7860. * (see enum wmi_sta_ps_param_rx_wake_policy)
  7861. */
  7862. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  7863. /**
  7864. * The STA will go active after this many TX
  7865. *
  7866. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  7867. */
  7868. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  7869. /**
  7870. * Number of PS-Poll to send before STA wakes up
  7871. *
  7872. * (see enum wmi_sta_ps_param_pspoll_count)
  7873. *
  7874. */
  7875. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  7876. /**
  7877. * TX/RX inactivity time in msec before going to sleep.
  7878. *
  7879. * The power save SM will monitor tx/rx activity on the VDEV, if no
  7880. * activity for the specified msec of the parameter the Power save SM will
  7881. * go to sleep.
  7882. */
  7883. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  7884. /**
  7885. * Set uapsd configuration.
  7886. *
  7887. * (see enum wmi_sta_ps_param_uapsd)
  7888. */
  7889. WMI_STA_PS_PARAM_UAPSD = 4,
  7890. /**
  7891. * Number of PS-Poll to send before STA wakes up in QPower Mode
  7892. */
  7893. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  7894. /**
  7895. * Enable QPower
  7896. */
  7897. WMI_STA_PS_ENABLE_QPOWER = 6,
  7898. /**
  7899. * Number of TX frames before the entering the Active state
  7900. */
  7901. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  7902. /**
  7903. * QPower SPEC PSPOLL interval
  7904. */
  7905. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  7906. /**
  7907. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  7908. * no-data bit set
  7909. */
  7910. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  7911. /**
  7912. * Max value of ITO reset when there is no tx-rx
  7913. * after AP has set the TIM bit
  7914. */
  7915. WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX = 10,
  7916. };
  7917. typedef struct {
  7918. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  7919. /** unique id identifying the VDEV, generated by the caller */
  7920. A_UINT32 vdev_id;
  7921. /** station power save parameter (see enum wmi_sta_powersave_param) */
  7922. A_UINT32 param;
  7923. A_UINT32 value;
  7924. } wmi_sta_powersave_param_cmd_fixed_param;
  7925. /** No MIMO power save */
  7926. #define WMI_STA_MIMO_PS_MODE_DISABLE
  7927. /** mimo powersave mode static*/
  7928. #define WMI_STA_MIMO_PS_MODE_STATIC
  7929. /** mimo powersave mode dynamic */
  7930. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  7931. typedef struct {
  7932. /** unique id identifying the VDEV, generated by the caller */
  7933. A_UINT32 vdev_id;
  7934. /** mimo powersave mode as defined above */
  7935. A_UINT32 mimo_pwrsave_mode;
  7936. } wmi_sta_mimo_ps_mode_cmd;
  7937. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  7938. enum wmi_ap_ps_param_uapsd {
  7939. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  7940. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  7941. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  7942. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  7943. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  7944. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  7945. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  7946. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  7947. };
  7948. /** U-APSD maximum service period of peer station */
  7949. enum wmi_ap_ps_peer_param_max_sp {
  7950. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  7951. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  7952. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  7953. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  7954. /* keep last! */
  7955. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  7956. };
  7957. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  7958. enum wmi_ap_ps_param_sifs_resp_frmtype {
  7959. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  7960. WMI_SIFS_RESP_UAPSD = (1 << 1),
  7961. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  7962. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  7963. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  7964. };
  7965. /**
  7966. * AP power save parameter
  7967. * Set a power save specific parameter for a peer station
  7968. */
  7969. enum wmi_ap_ps_peer_param {
  7970. /** Set uapsd configuration for a given peer.
  7971. *
  7972. * This will include the delivery and trigger enabled state for every AC.
  7973. * The host MLME needs to set this based on AP capability and stations
  7974. * request Set in the association request received from the station.
  7975. *
  7976. * Lower 8 bits of the value specify the UAPSD configuration.
  7977. *
  7978. * (see enum wmi_ap_ps_param_uapsd)
  7979. * The default value is 0.
  7980. */
  7981. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  7982. /**
  7983. * Set the service period for a UAPSD capable station
  7984. *
  7985. * The service period from wme ie in the (re)assoc request frame.
  7986. *
  7987. * (see enum wmi_ap_ps_peer_param_max_sp)
  7988. */
  7989. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  7990. /** Time in seconds for aging out buffered frames for STA in power save */
  7991. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  7992. /**
  7993. * Specify frame types that are considered SIFS RESP trigger frame
  7994. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  7995. */
  7996. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  7997. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  7998. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  7999. /** Specifies the WNM sleep state of a STA */
  8000. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  8001. };
  8002. typedef struct {
  8003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  8004. /** unique id identifying the VDEV, generated by the caller */
  8005. A_UINT32 vdev_id;
  8006. /** peer MAC address */
  8007. wmi_mac_addr peer_macaddr;
  8008. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  8009. A_UINT32 param;
  8010. /** AP powersave param value (see defines) */
  8011. A_UINT32 value;
  8012. } wmi_ap_ps_peer_cmd_fixed_param;
  8013. /** Configure peer station 11v U-APSD coexistance
  8014. *
  8015. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  8016. * sent down to FW along with this command.
  8017. *
  8018. * The semantics of these fields are described in the following text extracted
  8019. * from 802.11v.
  8020. *
  8021. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  8022. * U-APSD Coexistence element, the AP should not transmit frames to the
  8023. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  8024. * begins when the AP receives the U-APSD trigger frame and ends after
  8025. * the transmission period specified by the result of the following
  8026. * calculation:
  8027. *
  8028. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  8029. *
  8030. * Where T is the time the U-APSD trigger frame was received at the AP
  8031. * Interval is the UAPSD Coexistence element Duration/Interval field
  8032. * value (see 7.3.2.91) or upon the successful transmission of a frame
  8033. * with EOSP bit set to 1, whichever is earlier.
  8034. *
  8035. *
  8036. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  8037. * Coexistence element, the AP should not transmit frames to the non-AP
  8038. * STA outside of the U-APSD Coexistence Service Period, which begins
  8039. * when the AP receives a U-APSD trigger frame and ends after the
  8040. * transmission period specified by the result of the following
  8041. * calculation: End of transmission period = T + Duration
  8042. */
  8043. typedef struct {
  8044. /** unique id identifying the VDEV, generated by the caller */
  8045. A_UINT32 vdev_id;
  8046. /** peer MAC address */
  8047. wmi_mac_addr peer_macaddr;
  8048. /** Enable U-APSD coexistence support for this peer
  8049. *
  8050. * 0 -> disabled (default)
  8051. * 1 -> enabled
  8052. */
  8053. A_UINT32 enabled;
  8054. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  8055. A_UINT32 duration_interval;
  8056. /** Upper 32 bits of 64-bit TSF offset */
  8057. A_UINT32 tsf_offset_high;
  8058. /** Lower 32 bits of 64-bit TSF offset */
  8059. A_UINT32 tsf_offset_low;
  8060. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  8061. typedef enum {
  8062. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  8063. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  8064. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  8065. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  8066. } wmi_ap_ps_egap_flag_type;
  8067. /**
  8068. * configure ehanced green ap parameters
  8069. */
  8070. typedef struct {
  8071. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8072. /** Enable enhanced green ap
  8073. * 0 -> disabled
  8074. * 1 -> enabled
  8075. */
  8076. A_UINT32 enable;
  8077. /** The param indicates a duration that all STAs connected
  8078. * to S-AP have no traffic.
  8079. */
  8080. A_UINT32 inactivity_time; /* in unit of milliseconds */
  8081. /** The param indicates a duration that all STAs connected
  8082. * to S-AP have no traffic, after all STAs have entered powersave.
  8083. */
  8084. A_UINT32 wait_time; /* in unit of milliseconds */
  8085. /** The param is used to turn on/off some functions within E-GAP.
  8086. */
  8087. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  8088. } wmi_ap_ps_egap_param_cmd_fixed_param;
  8089. typedef enum {
  8090. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  8091. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  8092. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  8093. WMI_AP_PS_EGAP_STATUS_MAX = 15
  8094. } wmi_ap_ps_egap_status_type;
  8095. /**
  8096. * send ehanced green ap status to host
  8097. */
  8098. typedef struct
  8099. {
  8100. /** TLV tag and len; tag equals
  8101. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  8102. A_UINT32 tlv_header;
  8103. union {
  8104. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  8105. /** pdev_id for identifying the MAC
  8106. * See macros starting with WMI_PDEV_ID_ for values.
  8107. */
  8108. A_UINT32 pdev_id;
  8109. };
  8110. /** The param indicates the current tx chainmask with the mac id. */
  8111. A_UINT32 tx_chainmask;
  8112. /** The param indicates the current rx chainmask with the mac id. */
  8113. A_UINT32 rx_chainmask;
  8114. } wmi_ap_ps_egap_info_chainmask_list;
  8115. typedef struct {
  8116. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  8117. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  8118. A_UINT32 status;
  8119. /* This TLV is followed by
  8120. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  8121. */
  8122. } wmi_ap_ps_egap_info_event_fixed_param;
  8123. /* 128 clients = 4 words */
  8124. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  8125. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  8126. typedef struct {
  8127. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  8128. /** TIM bitmap len (in bytes) */
  8129. A_UINT32 tim_len;
  8130. /** TIM Partial Virtual Bitmap */
  8131. A_UINT32 tim_mcast;
  8132. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  8133. A_UINT32 tim_changed;
  8134. A_UINT32 tim_num_ps_pending;
  8135. /** Use the vdev_id only if vdev_id_valid is set */
  8136. A_UINT32 vdev_id_valid;
  8137. /** unique id identifying the VDEV */
  8138. A_UINT32 vdev_id;
  8139. } wmi_tim_info;
  8140. typedef struct {
  8141. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  8142. /** TIM Partial Virtual Bitmap */
  8143. A_UINT32 tim_mcast;
  8144. A_UINT32 tim_changed;
  8145. A_UINT32 tim_num_ps_pending;
  8146. /** Use the vdev_id only if vdev_id_valid is set */
  8147. A_UINT32 vdev_id_valid;
  8148. /** unique id identifying the VDEV */
  8149. A_UINT32 vdev_id;
  8150. /** TIM bitmap len (in bytes) */
  8151. A_UINT32 tim_len;
  8152. /* followed by WMITLV_TAG_ARRAY_BYTE holding the TIM bitmap */
  8153. } wmi_tim_info_v2;
  8154. typedef struct {
  8155. /** Flag to enable quiet period IE support */
  8156. A_UINT32 is_enabled;
  8157. /** Quiet start */
  8158. A_UINT32 tbttcount;
  8159. /** Beacon intervals between quiets*/
  8160. A_UINT32 period;
  8161. /** TUs of each quiet*/
  8162. A_UINT32 duration;
  8163. /** TUs of from TBTT of quiet start*/
  8164. A_UINT32 offset;
  8165. } wmi_quiet_info;
  8166. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  8167. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  8168. typedef struct {
  8169. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  8170. /** Bit 0: Flag to indicate an update in NOA schedule
  8171. * Bits 7-1: Reserved
  8172. * Bits 15-8: Index (identifies the instance of NOA sub element)
  8173. * Bit 16: Opp PS state of the AP
  8174. * Bits 23-17: Ctwindow in TUs
  8175. * Bits 31-24: Number of NOA descriptors
  8176. */
  8177. A_UINT32 noa_attributes;
  8178. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  8179. /** Use the vdev_id only if vdev_id_valid is set */
  8180. A_UINT32 vdev_id_valid;
  8181. /** unique id identifying the VDEV */
  8182. A_UINT32 vdev_id;
  8183. } wmi_p2p_noa_info;
  8184. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  8185. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  8186. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  8187. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  8188. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  8189. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8190. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  8191. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  8192. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  8193. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  8194. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  8195. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  8196. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8197. WMI_UNIFIED_NOA_ATTR_INDEX);
  8198. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  8199. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  8200. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  8201. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  8202. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  8203. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  8204. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  8205. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  8206. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  8207. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  8208. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  8209. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  8210. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  8211. WMI_UNIFIED_NOA_ATTR_CTWIN);
  8212. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  8213. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  8214. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  8215. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  8216. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  8217. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  8218. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  8219. typedef struct {
  8220. /** TIM info */
  8221. wmi_tim_info tim_info;
  8222. /** P2P NOA info */
  8223. wmi_p2p_noa_info p2p_noa_info;
  8224. /* TBD: More info elements to be added later */
  8225. } wmi_bcn_info;
  8226. typedef struct {
  8227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  8228. /** bitmap identifying the VDEVs, generated by the caller */
  8229. A_UINT32 vdev_map;
  8230. /** how many vdev's info is included in this message
  8231. * If this field is zero, then the number of vdevs is specified by
  8232. * the number of bits set in the vdev_map bitmap.
  8233. */
  8234. A_UINT32 num_vdevs;
  8235. /* This TLV is followed by tim_info and p2p_noa_info for each vdev:
  8236. * wmi_tim_info tim_info[];
  8237. * wmi_p2p_noa_info p2p_noa_info[];
  8238. *
  8239. */
  8240. } wmi_host_swba_event_fixed_param;
  8241. #define WMI_MAX_AP_VDEV 16
  8242. typedef struct {
  8243. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swfda_event_fixed_param */
  8244. /** vdev_id identifying the VDEV for which FILS should be generated */
  8245. A_UINT32 vdev_id;
  8246. /** time (in TU) at which current FILS Discovery frame is scheduled for Tx */
  8247. A_UINT32 fils_tt;
  8248. /** next TBTT time (in TU) for this vdev */
  8249. A_UINT32 tbtt;
  8250. } wmi_host_swfda_event_fixed_param;
  8251. typedef struct {
  8252. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  8253. /** bimtap of VDEVs that has tbtt offset updated */
  8254. A_UINT32 vdev_map;
  8255. /* The TLVs for tbttoffset_list will follow this TLV.
  8256. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  8257. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  8258. */
  8259. } wmi_tbtt_offset_event_fixed_param;
  8260. typedef struct {
  8261. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_info */
  8262. /** unique id identifying the VDEV */
  8263. A_UINT32 vdev_id;
  8264. /** tbttoffset in TUs */
  8265. A_UINT32 tbttoffset;
  8266. } wmi_tbtt_offset_info;
  8267. /** Use this event if number of vdevs > 32 */
  8268. typedef struct {
  8269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param */
  8270. A_UINT32 num_vdevs;
  8271. /*
  8272. * The TLVs for tbttoffset will follow this TLV.
  8273. * Of size num_vdevs * wmi_tbtt_offset_info
  8274. */
  8275. } wmi_tbtt_offset_ext_event_fixed_param;
  8276. /* Peer Specific commands and events */
  8277. typedef struct {
  8278. A_UINT32 percentage; /* in unit of 12.5% */
  8279. A_UINT32 min_delta; /* in unit of Mbps */
  8280. } rate_delta_t;
  8281. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  8282. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  8283. #define MAX_NUM_OF_RATE_THRESH 4
  8284. typedef struct {
  8285. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  8286. Any of these two conditions or both of them can be set. */
  8287. rate_delta_t rate_delta;
  8288. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  8289. If the threshold count is less than 4, set zero to
  8290. the one following the last threshold */
  8291. } report_cond_per_phy_t;
  8292. enum peer_rate_report_cond_phy_type {
  8293. PEER_RATE_REPORT_COND_11B = 0,
  8294. PEER_RATE_REPORT_COND_11A_G,
  8295. PEER_RATE_REPORT_COND_11N,
  8296. PEER_RATE_REPORT_COND_11AC,
  8297. PEER_RATE_REPORT_COND_MAX_NUM
  8298. };
  8299. typedef struct {
  8300. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  8301. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  8302. A_UINT32 report_backoff_time; /* in unit of msecond */
  8303. A_UINT32 report_timer_period; /* in unit of msecond */
  8304. /* In the following field, the array index means the phy type,
  8305. * please see enum peer_rate_report_cond_phy_type for detail */
  8306. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  8307. } wmi_peer_set_rate_report_condition_fixed_param;
  8308. /* Peer Type:
  8309. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  8310. * on address and vdev opmode. This is largely here to allow host to indicate that
  8311. * peer is explicitly a TDLS peer
  8312. */
  8313. enum wmi_peer_type {
  8314. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  8315. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  8316. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  8317. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  8318. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  8319. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  8320. /* Reserved from 128 - 255 for target internal use.*/
  8321. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  8322. };
  8323. typedef struct {
  8324. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  8325. /** unique id identifying the VDEV, generated by the caller */
  8326. A_UINT32 vdev_id;
  8327. /** peer MAC address */
  8328. wmi_mac_addr peer_macaddr;
  8329. /** peer type: see enum values above */
  8330. A_UINT32 peer_type;
  8331. } wmi_peer_create_cmd_fixed_param;
  8332. typedef struct {
  8333. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  8334. /** unique id identifying the VDEV, generated by the caller */
  8335. A_UINT32 vdev_id;
  8336. /** peer MAC address */
  8337. wmi_mac_addr peer_macaddr;
  8338. } wmi_peer_delete_cmd_fixed_param;
  8339. typedef struct {
  8340. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  8341. /** unique id identifying the VDEV, generated by the caller */
  8342. A_UINT32 vdev_id;
  8343. /** peer MAC address */
  8344. wmi_mac_addr peer_macaddr;
  8345. /**
  8346. * maximum block ack window size to use during a rx block ack negotiation,
  8347. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  8348. */
  8349. A_UINT32 rx_block_ack_win_limit;
  8350. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  8351. typedef struct {
  8352. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  8353. /** unique id identifying the VDEV, generated by the caller */
  8354. A_UINT32 vdev_id;
  8355. /** peer MAC address */
  8356. wmi_mac_addr peer_macaddr;
  8357. /** tid bitmap identifying the tids to flush */
  8358. A_UINT32 peer_tid_bitmap;
  8359. } wmi_peer_flush_tids_cmd_fixed_param;
  8360. typedef struct {
  8361. /** rate mode . 0: disable fixed rate (auto rate)
  8362. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  8363. * 2: ht20 11n rate specified as mcs index
  8364. * 3: ht40 11n rate specified as mcs index
  8365. */
  8366. A_UINT32 rate_mode;
  8367. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  8368. * and series 3 is stored at byte 3 (MSB) */
  8369. A_UINT32 rate_series;
  8370. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  8371. * and retry count for rate 3 is stored at byte 3 (MSB) */
  8372. A_UINT32 rate_retries;
  8373. } wmi_fixed_rate;
  8374. typedef struct {
  8375. /** unique id identifying the VDEV, generated by the caller */
  8376. A_UINT32 vdev_id;
  8377. /** peer MAC address */
  8378. wmi_mac_addr peer_macaddr;
  8379. /** fixed rate */
  8380. wmi_fixed_rate peer_fixed_rate;
  8381. } wmi_peer_fixed_rate_cmd;
  8382. #define WMI_MGMT_TID 17
  8383. typedef struct {
  8384. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  8385. /** unique id identifying the VDEV, generated by the caller */
  8386. A_UINT32 vdev_id;
  8387. /** peer MAC address */
  8388. wmi_mac_addr peer_macaddr;
  8389. } wmi_addba_clear_resp_cmd_fixed_param;
  8390. typedef struct {
  8391. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  8392. /** unique id identifying the VDEV, generated by the caller */
  8393. A_UINT32 vdev_id;
  8394. /** peer MAC address */
  8395. wmi_mac_addr peer_macaddr;
  8396. /** Tid number */
  8397. A_UINT32 tid;
  8398. /** Buffer/Window size*/
  8399. A_UINT32 buffersize;
  8400. } wmi_addba_send_cmd_fixed_param;
  8401. typedef struct {
  8402. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  8403. /** unique id identifying the VDEV, generated by the caller */
  8404. A_UINT32 vdev_id;
  8405. /** peer MAC address */
  8406. wmi_mac_addr peer_macaddr;
  8407. /** Tid number */
  8408. A_UINT32 tid;
  8409. /** Is Initiator */
  8410. A_UINT32 initiator;
  8411. /** Reason code */
  8412. A_UINT32 reasoncode;
  8413. } wmi_delba_send_cmd_fixed_param;
  8414. typedef struct {
  8415. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  8416. /** unique id identifying the vdev, generated by the caller */
  8417. A_UINT32 vdev_id;
  8418. /** peer mac address */
  8419. wmi_mac_addr peer_macaddr;
  8420. /** Tid number */
  8421. A_UINT32 tid;
  8422. /** status code */
  8423. A_UINT32 statuscode;
  8424. } wmi_addba_setresponse_cmd_fixed_param;
  8425. typedef struct {
  8426. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  8427. /** unique id identifying the vdev, generated by the caller */
  8428. A_UINT32 vdev_id;
  8429. /** peer mac address */
  8430. wmi_mac_addr peer_macaddr;
  8431. /** Tid number */
  8432. A_UINT32 tid;
  8433. } wmi_send_singleamsdu_cmd_fixed_param;
  8434. /* Type of Station DTIM Power Save method */
  8435. enum {
  8436. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  8437. * also the same value as the listen interval. For this method, the
  8438. * station will wake up based on the listen interval. If this
  8439. * listen interval is not equal to DTIM, then the station may
  8440. * miss certain DTIM beacons. If this value is 1, then the
  8441. * station will wake up for every beacon.
  8442. */
  8443. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  8444. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  8445. * When this value is 1, then the station will wake at every DTIM beacon.
  8446. * If this value is >1, then the station will skip certain DTIM beacons.
  8447. * This value is the multiple of DTIM intervals that the station will
  8448. * wake up to receive the DTIM beacons.
  8449. */
  8450. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  8451. };
  8452. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  8453. typedef struct {
  8454. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  8455. /** unique id identifying the VDEV, generated by the caller */
  8456. A_UINT32 vdev_id;
  8457. /** Station DTIM Power Save method as defined above */
  8458. A_UINT32 dtim_pwrsave_method;
  8459. /** DTIM PS value. Contents depends on the method */
  8460. A_UINT32 value;
  8461. /** Modulated DTIM value */
  8462. A_UINT32 MaxLIModulatedDTIM;
  8463. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  8464. /*
  8465. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  8466. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  8467. * If there is no uplink/download for the specified service interval (field service_interval),
  8468. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  8469. * specified in the UP (field user_priority).
  8470. * Firmware also monitors the responses for these QOS-NULL triggers.
  8471. * If the peer does not have any delivery frames, it will respond with
  8472. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  8473. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  8474. * are unused and should be set to 0.
  8475. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  8476. * certain host-based implementations that don't want this firmware offload.
  8477. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  8478. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  8479. * and rest of the AC default to 300 ms.
  8480. *
  8481. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  8482. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  8483. * the more advanced monitoring method.
  8484. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  8485. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  8486. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  8487. * will save more power by waking up less and sending less trigger frames.
  8488. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  8489. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  8490. * should be 0.
  8491. */
  8492. typedef struct {
  8493. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  8494. /** WMM Access category from 0 to 3 */
  8495. A_UINT32 wmm_ac;
  8496. /** User priority to use in trigger frames. It is the TID
  8497. * value. This field needs to be specified and may not be
  8498. * equivalent to AC since some implementation may use the TSPEC
  8499. * to enable UAPSD and negotiate a particular user priority. */
  8500. A_UINT32 user_priority;
  8501. /** service interval in ms */
  8502. A_UINT32 service_interval;
  8503. /** Suspend interval in ms */
  8504. A_UINT32 suspend_interval;
  8505. /** delay interval in ms */
  8506. A_UINT32 delay_interval;
  8507. } wmi_sta_uapsd_auto_trig_param;
  8508. typedef struct {
  8509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  8510. /** unique id identifying the VDEV, generated by the caller */
  8511. A_UINT32 vdev_id;
  8512. /** peer mac address */
  8513. wmi_mac_addr peer_macaddr;
  8514. /** Number of AC to specify */
  8515. A_UINT32 num_ac;
  8516. /*
  8517. * Following this struc is the TLV:
  8518. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  8519. */
  8520. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  8521. /** mimo powersave state */
  8522. #define WMI_PEER_MIMO_PS_STATE 0x1
  8523. /** enable/disable AMPDU . initial value (enabled) */
  8524. #define WMI_PEER_AMPDU 0x2
  8525. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  8526. #define WMI_PEER_AUTHORIZE 0x3
  8527. /** peer channel bandwidth */
  8528. #define WMI_PEER_CHWIDTH 0x4
  8529. /** peer NSS */
  8530. #define WMI_PEER_NSS 0x5
  8531. /** USE 4 ADDR */
  8532. #define WMI_PEER_USE_4ADDR 0x6
  8533. /* set group membership status */
  8534. #define WMI_PEER_MEMBERSHIP 0x7
  8535. #define WMI_PEER_USERPOS 0x8
  8536. /*
  8537. * A critical high-level protocol is being used with this peer. Target
  8538. * should take appropriate measures (if possible) to ensure more
  8539. * reliable link with minimal latency. This *may* include modifying the
  8540. * station power save policy, enabling more RX chains, increased
  8541. * priority of channel scheduling, etc.
  8542. *
  8543. * NOTE: This parameter should only be considered a hint as specific
  8544. * behavior will depend on many factors including current network load
  8545. * and vdev/peer configuration.
  8546. *
  8547. * For STA VDEV this peer corresponds to the AP's BSS peer.
  8548. * For AP VDEV this peer corresponds to the remote peer STA.
  8549. */
  8550. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  8551. /* set Tx failure count threshold for the peer - Currently unused */
  8552. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  8553. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  8554. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  8555. /* Set peer advertised IBSS atim window length */
  8556. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  8557. /** peer phy mode */
  8558. #define WMI_PEER_PHYMODE 0xD
  8559. /** Use FIXED Pwr */
  8560. #define WMI_PEER_USE_FIXED_PWR 0xE
  8561. /** Set peer fixed rate
  8562. * The top nibble is used to select which format to use for encoding
  8563. * the rate specification: 0xVXXXXXXX
  8564. * If V == 0b0000: format is same as before: 0x000000RR
  8565. * If V == 0b0001: format is: 0x1000RRRR.
  8566. * This will be output of WMI_ASSEMBLE_RATECODE_V1
  8567. * The host shall use the new V1 format (and set V = 0x1) if the target
  8568. * indicates 802.11ax support via the WMI_SERVICE_11AX flag, or if the
  8569. * system is configured with Nss > 4 (either at compile time within the
  8570. * host driver, or through WMI_SERVICE_READY PHY capabilities provided
  8571. * by the target).
  8572. */
  8573. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  8574. /** Whitelist peer TIDs */
  8575. #define WMI_PEER_SET_MU_WHITELIST 0x10
  8576. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  8577. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  8578. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  8579. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  8580. /**
  8581. * default ring routing for peer data packets,
  8582. * param_value = bit 0 for hash based routing enabled or not
  8583. * (value 1 is enabled, value 0 is disabled)
  8584. * bits 1:5 are for ring 32 (i.e. ring id value
  8585. * selected from 0 to 31 values)
  8586. */
  8587. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  8588. /* peer NSS for VHT160 - Extended NSS support */
  8589. #define WMI_PEER_NSS_VHT160 0x14
  8590. /* peer NSS for VHT160 - Extended NSS support */
  8591. #define WMI_PEER_NSS_VHT80_80 0x15
  8592. /* Peer SU TXBF sounding interval */
  8593. #define WMI_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL 0x16
  8594. /* Peer MU TXBF sounding interval */
  8595. #define WMI_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL 0x17
  8596. /* Peer TXBF sounding enable or disable */
  8597. #define WMI_PEER_PARAM_TXBF_SOUNDING_ENABLE 0x18
  8598. /* Per peer 11ax OFDMA enable or disable */
  8599. #define WMI_PEER_PARAM_OFDMA_ENABLE 0x19
  8600. /* Per peer 11ax/11ac MU enable or disable */
  8601. #define WMI_PEER_PARAM_MU_ENABLE 0x1a
  8602. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  8603. #define WMI_PEER_MIMO_PS_NONE 0x0
  8604. #define WMI_PEER_MIMO_PS_STATIC 0x1
  8605. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  8606. typedef struct {
  8607. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  8608. /** unique id identifying the VDEV, generated by the caller */
  8609. A_UINT32 vdev_id;
  8610. /** peer MAC address */
  8611. wmi_mac_addr peer_macaddr;
  8612. /** parameter id */
  8613. A_UINT32 param_id;
  8614. /** parametr value */
  8615. A_UINT32 param_value;
  8616. } wmi_peer_set_param_cmd_fixed_param;
  8617. typedef union {
  8618. /*
  8619. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  8620. * by the target or a little-endian host.
  8621. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  8622. * macros on the A_UINT32 "value" field.
  8623. */
  8624. struct {
  8625. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  8626. A_UINT16 tx_rate; /* see per-mode specs below */
  8627. };
  8628. A_UINT32 value; /* for use by big-endian host */
  8629. } wmi_peer_max_min_tx_rate;
  8630. /*
  8631. * Any access to the mode/tx_rate in an big endian system should use
  8632. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  8633. */
  8634. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  8635. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  8636. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  8637. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  8638. /* CCK max/min tx Rate description
  8639. * tx_rate = 0: 1 Mbps
  8640. * tx_rate = 1: 2 Mbps
  8641. * tx_rate = 2: 5.5 Mbps
  8642. * tx_rate = 3: 11 Mbps
  8643. * tx_rate = else: invalid
  8644. */
  8645. enum {
  8646. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  8647. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  8648. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  8649. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  8650. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  8651. };
  8652. /* OFDM max/min tx Rate description
  8653. * tx_rate = 0: 6 Mbps
  8654. * tx_rate = 1: 9 Mbps
  8655. * tx_rate = 2: 12 Mbps
  8656. * tx_rate = 3: 18 Mbps
  8657. * tx_rate = 4: 24 Mbps
  8658. * tx_rate = 5: 32 Mbps
  8659. * tx_rate = 6: 48 Mbps
  8660. * tx_rate = 7: 54 Mbps
  8661. * tx_rate = else: invalid
  8662. */
  8663. enum {
  8664. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  8665. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  8666. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  8667. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  8668. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  8669. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  8670. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  8671. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  8672. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  8673. };
  8674. /* HT max/min tx rate description
  8675. * tx_rate = 0~7 : MCS Rate 0~7
  8676. * tx_rate=else : invalid.
  8677. */
  8678. #define WMI_MAX_HT_TX_MCS 0x07
  8679. /* VHT max/min tx rate description
  8680. * tx_rate = 0~9 : MCS Rate 0~9
  8681. * tx_rate=else : invalid.
  8682. */
  8683. #define WMI_MAX_VHT_TX_MCS 0x09
  8684. #define MAX_SUPPORTED_RATES 128
  8685. typedef struct {
  8686. /** total number of rates */
  8687. A_UINT32 num_rates;
  8688. /**
  8689. * rates (each 8bit value) packed into a 32 bit word.
  8690. * the rates are filled from least significant byte to most
  8691. * significant byte.
  8692. */
  8693. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  8694. } wmi_rate_set;
  8695. /* NOTE: It would bea good idea to represent the Tx MCS
  8696. * info in one word and Rx in another word. This is split
  8697. * into multiple words for convenience
  8698. */
  8699. typedef struct {
  8700. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  8701. A_UINT32 rx_max_rate; /* Max Rx data rate */
  8702. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  8703. A_UINT32 tx_max_rate; /* Max Tx data rate */
  8704. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  8705. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  8706. } wmi_vht_rate_set;
  8707. /* NOTE: It would bea good idea to represent the Tx MCS
  8708. * info in one word and Rx in another word. This is split
  8709. * into multiple words for convenience
  8710. * 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
  8711. */
  8712. typedef struct {
  8713. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_he_rate_set */
  8714. /* HE Supported MCS Set field Rx
  8715. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  8716. * value 0 - MCS 0-7 enabled for this NSS
  8717. * value 1 - MCS 0-9 enabled for this NSS
  8718. * value 2 - MCS 0-11 enabled for this NSS
  8719. * value 3 - NSS disabled
  8720. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  8721. */
  8722. A_UINT32 rx_mcs_set; /* Negotiated RX HE rates (i.e. rate this node can RX from peer)*/
  8723. /* HE Supported MCS Set field Tx
  8724. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  8725. * value 0 - MCS 0-7 enabled for this NSS
  8726. * value 1 - MCS 0-9 enabled for this NSS
  8727. * value 2 - MCS 0-11 enabled for this NSS
  8728. * value 3 - NSS disabled
  8729. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  8730. */
  8731. A_UINT32 tx_mcs_set; /* Negotiated TX HE rates(i.e. rate this node can TX to peer) */
  8732. } wmi_he_rate_set;
  8733. /*
  8734. * IMPORTANT: Make sure the bit definitions here are consistent
  8735. * with the ni_flags definitions in wlan_peer.h
  8736. */
  8737. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  8738. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  8739. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  8740. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  8741. #define WMI_PEER_HE 0x00000400 /* HE Enabled */
  8742. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  8743. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  8744. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  8745. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  8746. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  8747. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  8748. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  8749. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  8750. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  8751. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  8752. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  8753. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  8754. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  8755. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  8756. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  8757. /**
  8758. * Peer rate capabilities.
  8759. *
  8760. * This is of interest to the ratecontrol
  8761. * module which resides in the firmware. The bit definitions are
  8762. * consistent with that defined in if_athrate.c.
  8763. *
  8764. * @todo
  8765. * Move this to a common header file later so there is no need to
  8766. * duplicate the definitions or maintain consistency.
  8767. */
  8768. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  8769. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  8770. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  8771. #define WMI_RC_HT_FLAG 0x08 /* HT */
  8772. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  8773. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  8774. #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
  8775. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  8776. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  8777. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  8778. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  8779. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  8780. typedef struct {
  8781. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  8782. /** peer MAC address */
  8783. wmi_mac_addr peer_macaddr;
  8784. /** VDEV id */
  8785. A_UINT32 vdev_id;
  8786. /** assoc = 1 reassoc = 0 */
  8787. A_UINT32 peer_new_assoc;
  8788. /** peer associd (16 bits) */
  8789. A_UINT32 peer_associd;
  8790. /** peer station flags: see definition above */
  8791. A_UINT32 peer_flags;
  8792. /** negotiated capabilities (lower 16 bits)*/
  8793. A_UINT32 peer_caps;
  8794. /** Listen interval */
  8795. A_UINT32 peer_listen_intval;
  8796. /** HT capabilties of the peer */
  8797. A_UINT32 peer_ht_caps;
  8798. /** maximum rx A-MPDU length */
  8799. A_UINT32 peer_max_mpdu;
  8800. /** mpdu density of the peer in usec(0 to 16) */
  8801. A_UINT32 peer_mpdu_density;
  8802. /** peer rate capabilties see flags above */
  8803. A_UINT32 peer_rate_caps;
  8804. /** num spatial streams */
  8805. A_UINT32 peer_nss;
  8806. /** VHT capabilties of the peer */
  8807. A_UINT32 peer_vht_caps;
  8808. /** phy mode */
  8809. A_UINT32 peer_phymode;
  8810. /** HT Operation Element of the peer. Five bytes packed in 2
  8811. * INT32 array and filled from lsb to msb.
  8812. * Note that the size of array peer_ht_info[] cannotbe changed
  8813. * without breaking WMI Compatibility. */
  8814. A_UINT32 peer_ht_info[2];
  8815. /** total number of negotiated legacy rate set. Also the sizeof
  8816. * peer_legacy_rates[] */
  8817. A_UINT32 num_peer_legacy_rates;
  8818. /** total number of negotiated ht rate set. Also the sizeof
  8819. * peer_ht_rates[] */
  8820. A_UINT32 num_peer_ht_rates;
  8821. /**
  8822. * Bitmap providing the mapping of bandwidths to max Rx NSS for this peer
  8823. * in VHT160 / VHT80+80 Mode.
  8824. * As per the New IEEE 802.11 Update, the AP & Peer could advertise and
  8825. * handshake with the Max Rx NSS differing for different bandwidths
  8826. * instead of a single max Rx NSS Value.
  8827. * Some QCA chipsets have to advertise a different max Rx NSS value for
  8828. * 160 MHz and 80MHz.
  8829. *
  8830. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  8831. * bit[5:3] : Represents value of Rx NSS for VHT 80_80 MHz -
  8832. * Extended NSS support
  8833. * bit[30:6]: Reserved
  8834. * bit[31] : MSB(0/1): 1 in case of valid data sent from Host
  8835. */
  8836. A_UINT32 peer_bw_rxnss_override;
  8837. /* 802.11ax capabilities */
  8838. wmi_ppe_threshold peer_ppet;
  8839. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  8840. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  8841. A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
  8842. A_UINT32 peer_he_mcs; /* Indicates number of HE MCS TLV present */
  8843. /* Following this struct are the TLV's:
  8844. * A_UINT8 peer_legacy_rates[];
  8845. * A_UINT8 peer_ht_rates[];
  8846. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  8847. * WMI_he_rate_set_peer_he_rates; <-- HE capabilities of the peer
  8848. */
  8849. } wmi_peer_assoc_complete_cmd_fixed_param;
  8850. /* WDS Entry Flags */
  8851. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  8852. typedef struct {
  8853. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  8854. /** peer MAC address */
  8855. wmi_mac_addr peer_macaddr;
  8856. /** wds MAC addr */
  8857. wmi_mac_addr wds_macaddr;
  8858. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  8859. A_UINT32 flags;
  8860. A_UINT32 vdev_id;
  8861. } wmi_peer_add_wds_entry_cmd_fixed_param;
  8862. #define WMI_CHAN_InFO_START_RESP 0
  8863. #define WMI_CHAN_InFO_END_RESP 1
  8864. typedef struct {
  8865. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  8866. /** wds MAC addr */
  8867. wmi_mac_addr wds_macaddr;
  8868. A_UINT32 vdev_id;
  8869. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  8870. typedef struct {
  8871. /** peer MAC address */
  8872. wmi_mac_addr peer_macaddr;
  8873. } wmi_peer_q_empty_callback_event;
  8874. /*
  8875. * Command to update an already existing WDS entry. Different address setting
  8876. * combinations are possible.
  8877. *
  8878. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  8879. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  8880. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  8881. * Null wds and peer -> Flags will be updated for all WDS entries.
  8882. */
  8883. typedef struct {
  8884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  8885. /** peer MAC address */
  8886. wmi_mac_addr peer_macaddr;
  8887. /** wds MAC addr */
  8888. wmi_mac_addr wds_macaddr;
  8889. /* Flags associated with WDS entry */
  8890. A_UINT32 flags;
  8891. A_UINT32 vdev_id;
  8892. } wmi_peer_update_wds_entry_cmd_fixed_param;
  8893. /**
  8894. * Channel info WMI event
  8895. */
  8896. typedef struct {
  8897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  8898. /** Error code */
  8899. A_UINT32 err_code;
  8900. /** Channel freq */
  8901. A_UINT32 freq;
  8902. /** Read flags */
  8903. A_UINT32 cmd_flags;
  8904. /** Noise Floor value */
  8905. A_UINT32 noise_floor;
  8906. /** rx clear count */
  8907. A_UINT32 rx_clear_count;
  8908. /** cycle count */
  8909. A_UINT32 cycle_count;
  8910. /** channel tx power per range in 0.5dBm steps */
  8911. A_UINT32 chan_tx_pwr_range;
  8912. /** channel tx power per throughput */
  8913. A_UINT32 chan_tx_pwr_tp;
  8914. /** rx frame count (cumulative) */
  8915. A_UINT32 rx_frame_count;
  8916. /** BSS rx cycle count */
  8917. A_UINT32 my_bss_rx_cycle_count;
  8918. /** b-mode data rx time (units are microseconds) */
  8919. A_UINT32 rx_11b_mode_data_duration;
  8920. /** tx frame count */
  8921. A_UINT32 tx_frame_cnt;
  8922. /** mac clock */
  8923. A_UINT32 mac_clk_mhz;
  8924. /** unique id identifying the VDEV */
  8925. A_UINT32 vdev_id;
  8926. } wmi_chan_info_event_fixed_param;
  8927. /**
  8928. * Non wlan interference event
  8929. */
  8930. typedef struct {
  8931. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  8932. A_UINT32 channel; /* either number or freq in mhz*/
  8933. } wlan_dcs_cw_int;
  8934. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  8935. /**
  8936. * wlan_dcs_im_tgt_stats
  8937. *
  8938. */
  8939. typedef struct _wlan_dcs_im_tgt_stats {
  8940. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  8941. /** current running TSF from the TSF-1 */
  8942. A_UINT32 reg_tsf32;
  8943. /** Known last frame rssi, in case of multiple stations, if
  8944. * and at different ranges, this would not gaurantee that
  8945. * this is the least rssi.
  8946. */
  8947. A_UINT32 last_ack_rssi;
  8948. /** Sum of all the failed durations in the last one second interval.
  8949. */
  8950. A_UINT32 tx_waste_time;
  8951. /** count how many times the hal_rxerr_phy is marked, in this
  8952. * time period
  8953. */
  8954. A_UINT32 rx_time;
  8955. A_UINT32 phyerr_cnt;
  8956. /**
  8957. * WLAN IM stats from target to host
  8958. *
  8959. * Below statistics are sent from target to host periodically.
  8960. * These are collected at target as long as target is running
  8961. * and target chip is not in sleep.
  8962. *
  8963. */
  8964. /** listen time from ANI */
  8965. A_INT32 listen_time;
  8966. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  8967. A_UINT32 reg_tx_frame_cnt;
  8968. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  8969. A_UINT32 reg_rx_frame_cnt;
  8970. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  8971. A_UINT32 reg_rxclr_cnt;
  8972. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  8973. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  8974. /** extenstion channel rx clear count */
  8975. A_UINT32 reg_rxclr_ext_cnt;
  8976. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  8977. A_UINT32 reg_ofdm_phyerr_cnt;
  8978. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  8979. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  8980. /** Channel noise floor (units are dBm) */
  8981. A_INT32 chan_nf;
  8982. /** BSS rx cycle count */
  8983. A_UINT32 my_bss_rx_cycle_count;
  8984. } wlan_dcs_im_tgt_stats_t;
  8985. /**
  8986. * wmi_dcs_interference_event_t
  8987. *
  8988. * Right now this is event and stats together. Partly this is
  8989. * because cw interference is handled in target now. This
  8990. * can be done at host itself, if we can carry the NF alone
  8991. * as a stats event. In future this would be done and this
  8992. * event would carry only stats.
  8993. */
  8994. typedef struct {
  8995. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  8996. /**
  8997. * Type of the event present, either the cw interference event, or the wlan_im stats
  8998. */
  8999. A_UINT32 interference_type; /* type of interference, wlan or cw */
  9000. /** pdev_id for identifying the MAC
  9001. * See macros starting with WMI_PDEV_ID_ for values.
  9002. */
  9003. A_UINT32 pdev_id;
  9004. /*
  9005. * Following this struct are these TLVs. Note that they are both array of structures
  9006. * but can have at most one element. Which TLV is empty or has one element depends
  9007. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  9008. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  9009. *
  9010. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  9011. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  9012. */
  9013. } wmi_dcs_interference_event_fixed_param;
  9014. enum wmi_peer_mcast_group_action {
  9015. wmi_peer_mcast_group_action_add = 0,
  9016. wmi_peer_mcast_group_action_del = 1
  9017. };
  9018. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  9019. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  9020. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  9021. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  9022. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  9023. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  9024. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  9025. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  9026. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  9027. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  9028. /* multicast group membership commands */
  9029. /* TODO: Converting this will be tricky since it uses an union.
  9030. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  9031. typedef struct {
  9032. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  9033. A_UINT32 flags;
  9034. wmi_mac_addr ucast_mac_addr;
  9035. /* in network byte order */
  9036. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  9037. A_UINT8 mcast_ip_addr[16];
  9038. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  9039. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  9040. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  9041. A_UINT32 num_filter_addr;
  9042. /* this array should contain the src IPs that are to be filtered during find
  9043. The array should be packed.
  9044. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  9045. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  9046. A_UINT8 vdev_id; /* vdev of this mcast group */
  9047. } wmi_peer_mcast_group_cmd_fixed_param;
  9048. /** Offload Scan and Roaming related commands */
  9049. /** The FW performs 2 different kinds of offload scans independent
  9050. * of host. One is Roam scan which is primarily performed on a
  9051. * station VDEV after association to look for a better AP that
  9052. * the station VDEV can roam to. The second scan is connect scan
  9053. * which is mainly performed when the station is not associated
  9054. * and to look for a matching AP profile from a list of
  9055. * configured profiles. */
  9056. /* flags for roam_scan_mode_cmd
  9057. * indicate the status (success/fail) of wmi_roam_scan_mode cmd through WMI_ROAM_EVENTID */
  9058. #define WMI_ROAM_SCAN_MODE_FLAG_REPORT_STATUS 0x1
  9059. /**
  9060. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  9061. * the roam scan mode is one of the periodic, rssi change, both, none.
  9062. * None : Disable Roam scan. No Roam scan at all.
  9063. * Periodic : Scan periodically with a configurable period.
  9064. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  9065. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  9066. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  9067. *
  9068. */
  9069. typedef struct {
  9070. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  9071. A_UINT32 roam_scan_mode;
  9072. A_UINT32 vdev_id;
  9073. A_UINT32 flags; /* see WMI_ROAM_SCAN_MODE_FLAG defs */
  9074. /*
  9075. * Minimum duration allowed between two consecutive roam scans.
  9076. * Roam scan is not allowed, if duration between two consecutive
  9077. * roam scans is less than this time.
  9078. */
  9079. A_UINT32 min_delay_btw_scans; /* In msec */
  9080. /*
  9081. * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit
  9082. * positions) showing for which roam_trigger_reasons the
  9083. * min_delay_btw_scans constraint should be applied.
  9084. * 0x0 means there is no time restrictions between successive roam scans.
  9085. */
  9086. A_UINT32 min_delay_roam_trigger_reason_bitmask;
  9087. } wmi_roam_scan_mode_fixed_param;
  9088. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  9089. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  9090. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  9091. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  9092. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  9093. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  9094. typedef struct {
  9095. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  9096. A_UINT32 vdev_id;
  9097. A_UINT32 command_arg;
  9098. } wmi_roam_scan_cmd_fixed_param;
  9099. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  9100. /**
  9101. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  9102. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  9103. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  9104. */
  9105. typedef struct {
  9106. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  9107. /** unique id identifying the VDEV, generated by the caller */
  9108. A_UINT32 vdev_id;
  9109. /** roam scan rssi threshold */
  9110. A_UINT32 roam_scan_rssi_thresh;
  9111. /** When using Hw generated beacon RSSI interrupts */
  9112. A_UINT32 roam_rssi_thresh_diff;
  9113. /** 5G scan max count */
  9114. A_UINT32 hirssi_scan_max_count;
  9115. /** 5G scan rssi change threshold value */
  9116. A_UINT32 hirssi_scan_delta;
  9117. /** 5G scan upper bound */
  9118. A_UINT32 hirssi_upper_bound;
  9119. /** roam scan rssi threshold for 5G band.
  9120. * offset from roam_scan_rssi_thres, in dB units
  9121. */
  9122. A_INT32 rssi_thresh_offset_5g;
  9123. /* The TLVs will follow.
  9124. * wmi_roam_scan_extended_threshold_param extended_param;
  9125. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  9126. * wmi_roam_dense_thres_param dense_param;
  9127. * wmi_roam_bg_scan_roaming_param bg_scan_param;
  9128. */
  9129. } wmi_roam_scan_rssi_threshold_fixed_param;
  9130. /**
  9131. * WMI_ROAM_BTM_CONFIG_CMDID : set BTM (BSS Transition Management. 802.11v) offload config
  9132. * Applicable only when WMI_ROAM_SCAN_MODE is enabled with WMI_ROAM_SCAN_MODE_ROAMOFFLOAD
  9133. */
  9134. /**
  9135. * btm_config.flags
  9136. * BIT 0 : Enable/Disable the BTM offload.
  9137. * BIT 1-2 : Action on non matching candidate with cache. Used WMI_ROAM_BTM_OFLD_NON_MATCHING_CND_XXX
  9138. * BIT 3-5 : Roaming handoff decisions. Use WMI_ROAM_BTM_OFLD_CNDS_MATCH_XXX
  9139. * BIT 6 : Enable/Disable solicited BTM
  9140. * BIT 7-31 : Reserved
  9141. */
  9142. #define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val)
  9143. #define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1)
  9144. #define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val)
  9145. #define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2)
  9146. #define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val)
  9147. #define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3)
  9148. #define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val)
  9149. #define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1)
  9150. /** 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 */
  9151. #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 */
  9152. #define WMI_ROAM_BTM_NON_MATCHING_CNDS_NO_SCAN_FORWARD 1 /** Does not allow roam scan and forward BTM frame to host */
  9153. /** reserved upto 3 */
  9154. /** 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 */
  9155. #define WMI_ROAM_BTM_CNDS_MATCH_EXACT 0 /** Exactly matched with roam candidate list to BTM candidates */
  9156. #define WMI_ROAM_BTM_CNDS_MATCH_AT_LEAST_TOP 1 /** At least one or more top priority bssid matched */
  9157. /** reserved upto 7 */
  9158. typedef struct {
  9159. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_btm_config_fixed_param */
  9160. A_UINT32 tlv_header;
  9161. /** unique id identifying the VDEV on which BTM is enabled/disabled */
  9162. A_UINT32 vdev_id;
  9163. /** BTM configuration control flags */
  9164. A_UINT32 flags;
  9165. /* BTM query timeout, unit: milliseconds
  9166. * valid value range: 1-10000,
  9167. * default value: 100 will be set if invalid value is given
  9168. */
  9169. A_UINT32 solicited_timeout_ms;
  9170. /* Maximum attempt of solicited BTM
  9171. * If continuous failure reach to this value, solicited BTM to current
  9172. * ESS will be disabled.
  9173. * valid value range: 1 - (2^32-1). (2^32)-1 means sending forever
  9174. * Default value: 3 will be set if invalid value is given
  9175. */
  9176. A_UINT32 max_attempt_cnt;
  9177. /* Time to stick to current AP after BTM, unit: seconds
  9178. * valid value range: 0 -(2^16-1).
  9179. * Either 0 or (2^16)-1 means stick to AP forever.
  9180. * Default value: 300 will be set if invalid value is given
  9181. */
  9182. A_UINT32 stick_time_seconds;
  9183. } wmi_btm_config_fixed_param;
  9184. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  9185. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  9186. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  9187. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  9188. typedef struct {
  9189. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  9190. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  9191. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  9192. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9193. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  9194. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  9195. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  9196. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  9197. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  9198. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  9199. } wmi_roam_scan_extended_threshold_param;
  9200. /**
  9201. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  9202. * Applicable when the scan mode is Periodic or both.
  9203. */
  9204. typedef struct {
  9205. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  9206. /** unique id identifying the VDEV, generated by the caller */
  9207. A_UINT32 vdev_id;
  9208. /** roam scan period value */
  9209. A_UINT32 roam_scan_period;
  9210. /** Aging for Roam scans */
  9211. A_UINT32 roam_scan_age;
  9212. } wmi_roam_scan_period_fixed_param;
  9213. /**
  9214. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  9215. * Rssi change threshold used when mode is Rssi change (or) Both.
  9216. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  9217. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  9218. */
  9219. typedef struct {
  9220. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  9221. /** unique id identifying the VDEV, generated by the caller */
  9222. A_UINT32 vdev_id;
  9223. /** roam scan rssi change threshold value */
  9224. A_UINT32 roam_scan_rssi_change_thresh;
  9225. /** When using Hw generated beacon RSSI interrupts */
  9226. A_UINT32 bcn_rssi_weight;
  9227. /** Minimum delay between two 5G scans */
  9228. A_UINT32 hirssi_delay_btw_scans;
  9229. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  9230. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  9231. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  9232. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  9233. /**
  9234. * TLV for roaming channel list
  9235. */
  9236. typedef struct {
  9237. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  9238. /** unique id identifying the VDEV, generated by the caller */
  9239. A_UINT32 vdev_id;
  9240. /** WMI_CHAN_LIST_TAG */
  9241. A_UINT32 chan_list_type;
  9242. /** # if channels to scan */
  9243. A_UINT32 num_chan;
  9244. /**
  9245. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  9246. * structure. The TLV's are:
  9247. * A_UINT32 channel_list[];
  9248. **/
  9249. } wmi_roam_chan_list_fixed_param;
  9250. /** Authentication modes */
  9251. enum {
  9252. WMI_AUTH_NONE, /* no upper level auth */
  9253. WMI_AUTH_OPEN, /* open */
  9254. WMI_AUTH_SHARED, /* shared-key */
  9255. WMI_AUTH_8021X, /* 802.1x */
  9256. WMI_AUTH_AUTO, /* Auto */
  9257. WMI_AUTH_WPA, /* WPA */
  9258. WMI_AUTH_RSNA, /* WPA2/RSNA */
  9259. WMI_AUTH_CCKM, /* CCKM */
  9260. WMI_AUTH_WAPI, /* WAPI */
  9261. WMI_AUTH_AUTO_PSK,
  9262. WMI_AUTH_WPA_PSK,
  9263. WMI_AUTH_RSNA_PSK,
  9264. WMI_AUTH_WAPI_PSK,
  9265. WMI_AUTH_FT_RSNA, /* 11r FT */
  9266. WMI_AUTH_FT_RSNA_PSK,
  9267. WMI_AUTH_RSNA_PSK_SHA256,
  9268. WMI_AUTH_RSNA_8021X_SHA256,
  9269. WMI_AUTH_CCKM_WPA,
  9270. WMI_AUTH_CCKM_RSNA,
  9271. WMI_AUTH_RSNA_FILS_SHA256,
  9272. WMI_AUTH_RSNA_FILS_SHA384,
  9273. WMI_AUTH_RSNA_SUITE_B_8021X_SHA256,
  9274. WMI_AUTH_RSNA_SUITE_B_8021X_SHA384,
  9275. };
  9276. typedef enum {
  9277. WMI_SCAN_CLIENT_NLO = 0x1, /* 1 */
  9278. WMI_SCAN_CLIENT_EXTSCAN, /* 2 */
  9279. WMI_SCAN_CLIENT_ROAM, /* 3 */
  9280. WMI_SCAN_CLIENT_P2P, /* 4 */
  9281. WMI_SCAN_CLIENT_LPI, /* 5 */
  9282. WMI_SCAN_CLIENT_NAN, /* 6 */
  9283. WMI_SCAN_CLIENT_ANQP, /* 7 */
  9284. WMI_SCAN_CLIENT_OBSS, /* 8 */
  9285. WMI_SCAN_CLIENT_PLM, /* 9 */
  9286. WMI_SCAN_CLIENT_HOST, /* 10 */
  9287. } WMI_SCAN_CLIENT_ID;
  9288. typedef struct {
  9289. /** authentication mode (defined above) */
  9290. A_UINT32 rsn_authmode;
  9291. /** unicast cipher set */
  9292. A_UINT32 rsn_ucastcipherset;
  9293. /** mcast/group cipher set */
  9294. A_UINT32 rsn_mcastcipherset;
  9295. /** mcast/group management frames cipher set */
  9296. A_UINT32 rsn_mcastmgmtcipherset;
  9297. } wmi_rsn_params;
  9298. /** looking for a wps enabled AP */
  9299. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  9300. /** looking for a secure AP */
  9301. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  9302. /** looking for a PMF enabled AP */
  9303. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  9304. /* the value used in wmi_roam_cnd_scoring_param->disable_bitmap */
  9305. #define WLAN_ROAM_SCORING_RSSI_DISABLE 0x00000001
  9306. #define WLAN_ROAM_SCORING_HT_DISABLE 0x00000002
  9307. #define WLAN_ROAM_SCORING_VHT_DISABLE 0x00000004
  9308. #define WLAN_ROAM_SCORING_BW_DISABLE 0x00000008
  9309. #define WLAN_ROAM_SCORING_BAND_DISABLE 0x00000010
  9310. #define WLAN_ROAM_SCORING_NSS_DISABLE 0x00000020
  9311. #define WLAN_ROAM_SCORING_CHAN_CONGESTION_DISABLE 0x00000040
  9312. #define WLAN_ROAM_SCORING_BEAMFORMING_DISABLE 0x00000080
  9313. #define WLAN_ROAM_SCORING_PCL_DISABLE 0x00000100
  9314. #define WLAN_ROAM_SCORING_HE_DISABLE 0x00000200
  9315. #define WLAN_ROAM_SCORING_OCE_WAN_DISABLE 0x00000400
  9316. #define WLAN_ROAM_SCORING_DISABLE_ALL 0xFFFFFFFF
  9317. #define WLAN_ROAM_SCORING_DEFAULT_PARAM_ALLOW 0x0
  9318. #define WLAN_ROAM_MAX_SELECTION_SCORE 10000
  9319. #define WLAN_ROAM_SCORE_20MHZ_BW_INDEX 0
  9320. #define WLAN_ROAM_SCORE_40MHZ_BW_INDEX 1
  9321. #define WLAN_ROAM_SCORE_80MHZ_BW_INDEX 2
  9322. #define WLAN_ROAM_SCORE_160MHZ_BW_INDEX 3
  9323. #define WLAN_ROAM_SCORE_MAX_BW_INDEX 4
  9324. #define WMI_ROAM_GET_BW_SCORE_PERCENTAGE(value32, bw_index) WMI_GET_BITS(value32, (8 * (bw_index)), 8)
  9325. #define WMI_ROAM_SET_BW_SCORE_PERCENTAGE(value32, score_pcnt, bw_index) WMI_SET_BITS(value32, (8 * (bw_index)), 8, score_pcnt)
  9326. #define WLAN_ROAM_SCORE_NSS_1x1_INDEX 0
  9327. #define WLAN_ROAM_SCORE_NSS_2x2_INDEX 1
  9328. #define WLAN_ROAM_SCORE_NSS_3x3_INDEX 2
  9329. #define WLAN_ROAM_SCORE_NSS_4x4_INDEX 3
  9330. #define WLAN_ROAM_SCORE_MAX_NSS_INDEX 4
  9331. #define WMI_ROAM_GET_NSS_SCORE_PERCENTAGE(value32, nss_index) WMI_GET_BITS(value32, (8 * (nss_index)), 8)
  9332. #define WMI_ROAM_SET_NSS_SCORE_PERCENTAGE(value32, score_pcnt, nss_index) WMI_SET_BITS(value32, (8 * (nss_index)), 8, score_pcnt)
  9333. #define WLAN_ROAM_SCORE_BAND_2G_INDEX 0
  9334. #define WLAN_ROAM_SCORE_BAND_5G_INDEX 1
  9335. /* 2 and 3 are reserved */
  9336. #define WLAN_ROAM_SCORE_MAX_BAND_INDEX 4
  9337. #define WMI_ROAM_GET_BAND_SCORE_PERCENTAGE(value32, band_index) WMI_GET_BITS(value32, (8 * (band_index)), 8)
  9338. #define WMI_ROAM_SET_BAND_SCORE_PERCENTAGE(value32, score_pcnt, band_index) WMI_SET_BITS(value32, (8 * (band_index)), 8, score_pcnt)
  9339. #define WLAN_ROAM_SCORE_MAX_CHAN_CONGESTION_SLOT 16
  9340. #define WLAN_ROAM_SCORE_DEFAULT_CONGESTION_SLOT 0
  9341. #define WLAN_ROAM_SCORE_MAX_OCE_WAN_SLOT 16
  9342. #define WLAN_ROAM_SCORE_DEFAULT_OCE_WAN_SLOT 0
  9343. /**
  9344. best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, full rssi score 100. Units in dBm.
  9345. good_rssi_threshold: Below this threshold, scoring linear percentage between rssi_good_pcnt and 100. Units in dBm.
  9346. bad_rssi_threshold: Between good and bad rssi threshold, scoring linear percentage between rssi_bad_pcnt and rssi_good_pcnt. Units in dBm.
  9347. good_rssi_pcnt: Used to assigned scoring percentage of each slot between best to good rssi threshold. Units in percentage.
  9348. bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good to bad rssi threshold. Units in percentage.
  9349. good_bucket_size : bucket size of slot in good zone. Units in dB.
  9350. bad_bucket_size : bucket size of slot in bad zone. Units in dB.
  9351. rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference of band percentage. Units in dBm.
  9352. */
  9353. /**
  9354. The graph below explains how RSSI scoring percentage is calculated
  9355. as the RSSI improves. In the graph, the derived parameters good_buckets
  9356. and bad_buckets are used. These derived parameters are related to the
  9357. specified parameters as follows:
  9358. good_buckets =
  9359. (best_rssi_threshold - good_rssi_threshold) / good_bucket_size
  9360. bad_buckets =
  9361. (good_rssi_threshold - bad_rssi_threshold) / bad_bucket_size
  9362. | (x0,y0) (x0 = best_rssi, y0 = 100)
  9363. p 100 |-------o
  9364. e | |<--------- (100 - good_rssi_pct)/good_buckets
  9365. r | |___ ,---- good_bucket_size
  9366. c | | |
  9367. e | |_V_
  9368. n | |
  9369. t | |___o (x1,y1) (x1 = good_rssi, y1 = good_rssi_pcnt)
  9370. 80 | |
  9371. % | |<------ (good_rssi_pcnt - bad_rssi_pcnt)/bad_buckets
  9372. | |_____
  9373. | | ,-- bad_bucket_size
  9374. | | |
  9375. | |__v__
  9376. | |
  9377. | |
  9378. 40 | o------------
  9379. | (x2,y2) (x2 = bad_rssi, y2 = bad_rssi_pcnt)
  9380. +------o------------o-----------o------------->
  9381. -50 -70 -80 rssi dBm
  9382. | excellent | good | bad | poor
  9383. | zone | zone | zone | zone
  9384. V V V
  9385. BEST_THRES GOOD_THRES BAD_THRES
  9386. */
  9387. typedef struct {
  9388. A_INT32 best_rssi_threshold;
  9389. A_INT32 good_rssi_threshold;
  9390. A_INT32 bad_rssi_threshold;
  9391. A_UINT32 good_rssi_pcnt;
  9392. A_UINT32 bad_rssi_pcnt;
  9393. A_UINT32 good_bucket_size;
  9394. A_UINT32 bad_bucket_size;
  9395. A_INT32 rssi_pref_5g_rssi_thresh;
  9396. } wmi_roam_cnd_rssi_scoring;
  9397. /**
  9398. Use macro WMI_ROAM_CND_GET/SET_BW_SCORE_PERCENTAGE to get and set the value respectively.
  9399. BITS 0-7 :- It contains scoring percentage of 20MHz BW
  9400. BITS 8-15 :- It contains scoring percentage of 40MHz BW
  9401. BITS 16-23 :- It contains scoring percentage of 80MHz BW
  9402. BITS 24-31 :- It contains scoring percentage of 1600MHz BW
  9403. The value of each index must be 0-100
  9404. */
  9405. typedef struct {
  9406. A_UINT32 score_pcnt;
  9407. } wmi_roam_cnd_bw_scoring;
  9408. /**
  9409. Use macro WMI_ROAM_CND_GET/SET_BAND_SCORE_PERCENTAGE to get and set the value respectively.
  9410. BITS 0-7 :- It contains scoring percentage of 2G
  9411. BITS 8-15 :- It contains scoring percentage of 5G
  9412. BITS 16-23 :- reserved
  9413. BITS 24-31 :- reserved
  9414. The value of each index must be 0-100
  9415. */
  9416. typedef struct {
  9417. A_UINT32 score_pcnt;
  9418. } wmi_roam_cnd_band_scoring;
  9419. /**
  9420. Use macro WMI_ROAM_CND_GET/SET_NSS_SCORE_PERCENTAGE to get and set the value respectively.
  9421. BITS 0-7 :- It contains scoring percentage of 1x1
  9422. BITS 8-15 :- It contains scoring percentage of 2x2
  9423. BITS 16-23 :- It contains scoring percentage of 3x3
  9424. BITS 24-31 :- It contains scoring percentage of 4x4
  9425. The value of each index must be 0-100
  9426. */
  9427. typedef struct {
  9428. A_UINT32 score_pcnt;
  9429. } wmi_roam_cnd_nss_scoring;
  9430. /**
  9431. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  9432. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  9433. BITS 8-15 :- SLOT_1
  9434. BITS 16-23 :- SLOT_2
  9435. BITS 24-31 :- SLOT_3
  9436. BITS 32- ...
  9437. num_slot will equally divide 100. e.g, if num_slot = 4
  9438. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  9439. */
  9440. typedef struct {
  9441. A_UINT32 num_slot; /* max 15 */
  9442. A_UINT32 score_pcnt3_to_0;
  9443. A_UINT32 score_pcnt7_to_4;
  9444. A_UINT32 score_pcnt11_to_8;
  9445. A_UINT32 score_pcnt15_to_12;
  9446. } wmi_roam_cnd_esp_qbss_scoring;
  9447. /**
  9448. score_pcnt: Contains roam score percentage of each slot of respective channel_congestion_pcnt.It is also used same BITS for slot(0-3)
  9449. BITS 0-7 :- the scoring pcnt when AP is not advertise QBSS/ESP info
  9450. BITS 8-15 :- SLOT_1
  9451. BITS 16-23 :- SLOT_2
  9452. BITS 24-31 :- SLOT_3
  9453. BITS 32- ...
  9454. num_slot will equally divide 100. e.g, if num_slot = 4
  9455. slot 0 = 0-25%, slot 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  9456. */
  9457. typedef struct {
  9458. A_UINT32 num_slot; /* max 15 */
  9459. A_UINT32 score_pcnt3_to_0;
  9460. A_UINT32 score_pcnt7_to_4;
  9461. A_UINT32 score_pcnt11_to_8;
  9462. A_UINT32 score_pcnt15_to_12;
  9463. } wmi_roam_cnd_oce_wan_scoring;
  9464. /**
  9465. disable_bitmap :- Each bit will be either allow(0)/disallow(1) to considered the roam score param.
  9466. rssi_weightage_pcnt :- RSSI weightage out of total score in percentage
  9467. ht_weightage_pcnt :- HT weightage out of total score in percentage.
  9468. vht_weightage_pcnt :- VHT weightage out of total score in percentage.
  9469. he_weightage_pcnt :- 11ax weightage out of total score in percentage.
  9470. bw_weightage_pcnt :- Bandwidth weightage out of total score in percentage.
  9471. band_weightage_pcnt :- Band(2G/5G) weightage out of total score in percentage.
  9472. nss_weightage_pcnt:- NSS(1x1 / 2x2) weightage out of total score in percentage.
  9473. esp_qbss_weightage_pcnt: ESP/QBSS weightage out of total score in percentage.
  9474. beamforming_weightage_pcnt :- Beamforming weightage out of total score in percentage.
  9475. pcl_weightage_pcnt :- PCL weightage out of total score in percentage.
  9476. oce_wan_weightage_pcnt :- OCE WAN metrics weightage out of total score in percentage.
  9477. rssi_scoring :- RSSI scoring information.
  9478. bw_scoring :- channel BW scoring percentage information.
  9479. band_scoring : - band scording percentage information.
  9480. nss_scoring :- NSS scoring percentage information.
  9481. esp_qbss_scoring :- ESP/QBSS scoring percentage information
  9482. oce_wan_scoring : OCE WAN metrics percentage information
  9483. */
  9484. typedef struct {
  9485. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_cnd_scoring_param */
  9486. A_UINT32 disable_bitmap;
  9487. A_INT32 rssi_weightage_pcnt;
  9488. A_INT32 ht_weightage_pcnt;
  9489. A_INT32 vht_weightage_pcnt;
  9490. A_INT32 he_weightage_pcnt;
  9491. A_INT32 bw_weightage_pcnt;
  9492. A_INT32 band_weightage_pcnt;
  9493. A_INT32 nss_weightage_pcnt;
  9494. A_INT32 esp_qbss_weightage_pcnt;
  9495. A_INT32 beamforming_weightage_pcnt;
  9496. A_INT32 pcl_weightage_pcnt;
  9497. A_INT32 oce_wan_weightage_pcnt;
  9498. wmi_roam_cnd_rssi_scoring rssi_scoring;
  9499. wmi_roam_cnd_bw_scoring bw_scoring;
  9500. wmi_roam_cnd_band_scoring band_scoring;
  9501. wmi_roam_cnd_nss_scoring nss_scoring;
  9502. wmi_roam_cnd_esp_qbss_scoring esp_qbss_scoring;
  9503. wmi_roam_cnd_oce_wan_scoring oce_wan_scoring;
  9504. } wmi_roam_cnd_scoring_param;
  9505. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  9506. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  9507. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  9508. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  9509. */
  9510. typedef struct {
  9511. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  9512. /** flags as defined above */
  9513. A_UINT32 flags;
  9514. /**
  9515. * rssi threshold value in dB: the value of the candidate AP should
  9516. * higher by this threshold than the rssi of the currrently associated AP.
  9517. */
  9518. A_UINT32 rssi_threshold;
  9519. /**
  9520. * ssid vlaue to be matched.
  9521. */
  9522. wmi_ssid ssid;
  9523. /**
  9524. * security params to be matched.
  9525. */
  9526. /** authentication mode (defined above) */
  9527. A_UINT32 rsn_authmode;
  9528. /** unicast cipher set */
  9529. A_UINT32 rsn_ucastcipherset;
  9530. /** mcast/group cipher set */
  9531. A_UINT32 rsn_mcastcipherset;
  9532. /** mcast/group management frames cipher set */
  9533. A_UINT32 rsn_mcastmgmtcipherset;
  9534. /**
  9535. * rssi_abs_threshold value: the value of the candidate AP should
  9536. * higher than this absolute RSSI threshold.
  9537. * Zero means no absolute minimum RSSI is required.
  9538. * units are the offset from the noise floor in dB.
  9539. */
  9540. A_UINT32 rssi_abs_thresh;
  9541. /**
  9542. * bg_rssi_threshold value in dB: For background scan the value of
  9543. * the candidate AP should be higher by this threshold than the rssi
  9544. * of the currrently associated AP.
  9545. */
  9546. A_UINT32 bg_rssi_threshold;
  9547. } wmi_ap_profile;
  9548. /** Support early stop roaming scanning when finding a strong candidate AP
  9549. * A 'strong' candidate is
  9550. * 1) Is eligible candidate
  9551. * (all conditions are met in existing candidate selection).
  9552. * 2) Its rssi is better than earlystop threshold.
  9553. * Earlystop threshold will be relaxed as each channel is scanned.
  9554. */
  9555. typedef struct {
  9556. A_UINT32 tlv_header;
  9557. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  9558. A_UINT32 roam_earlystop_thres_min;
  9559. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  9560. A_UINT32 roam_earlystop_thres_max;
  9561. } wmi_roam_earlystop_rssi_thres_param;
  9562. typedef struct {
  9563. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  9564. A_UINT32 tlv_header;
  9565. /** rssi threshold offset under trffic and dense env */
  9566. A_UINT32 roam_dense_rssi_thres_offset;
  9567. /** minimum number of APs to determine dense env */
  9568. A_UINT32 roam_dense_min_aps;
  9569. /** initial dense status detected by host at the time of initial connection */
  9570. A_UINT32 roam_dense_status;
  9571. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  9572. A_UINT32 roam_dense_traffic_thres;
  9573. } wmi_roam_dense_thres_param;
  9574. /* Definition for flags in wmi_roam_bg_scan_roaming_param
  9575. * Bit 0: BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
  9576. * Bit 1-31: Reserved
  9577. */
  9578. #define WMI_ROAM_BG_SCAN_FLAGS_2G_TO_5G_ONLY 1
  9579. typedef struct {
  9580. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bg_scan_roaming_param */
  9581. A_UINT32 tlv_header;
  9582. /** rssi threshold in dBm below which roaming will be triggered during background scan(non-roam scan). 0 will disable this threshold */
  9583. A_UINT32 roam_bg_scan_bad_rssi_thresh;
  9584. /** 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 */
  9585. A_UINT32 roam_bg_scan_client_bitmap;
  9586. /** roam scan rssi threshold for 2G band.
  9587. * offset from roam_bg_scan_bad_rssi_thresh, in dB units
  9588. */
  9589. A_INT32 bad_rssi_thresh_offset_2g;
  9590. /* flags for background roaming */
  9591. A_UINT32 flags;
  9592. } wmi_roam_bg_scan_roaming_param;
  9593. /** Beacon filter wmi command info */
  9594. #define BCN_FLT_MAX_SUPPORTED_IES 256
  9595. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  9596. typedef struct bss_bcn_stats {
  9597. A_UINT32 vdev_id;
  9598. A_UINT32 bss_bcnsdropped;
  9599. A_UINT32 bss_bcnsdelivered;
  9600. } wmi_bss_bcn_stats_t;
  9601. typedef struct bcn_filter_stats {
  9602. A_UINT32 bcns_dropped;
  9603. A_UINT32 bcns_delivered;
  9604. A_UINT32 activefilters;
  9605. wmi_bss_bcn_stats_t bss_stats;
  9606. } wmi_bcnfilter_stats_t;
  9607. typedef struct wmi_add_bcn_filter_cmd {
  9608. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  9609. A_UINT32 vdev_id;
  9610. /*
  9611. * Following this structure is the TLV:
  9612. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  9613. */
  9614. } wmi_add_bcn_filter_cmd_fixed_param;
  9615. typedef struct wmi_rmv_bcn_filter_cmd {
  9616. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  9617. A_UINT32 vdev_id;
  9618. } wmi_rmv_bcn_filter_cmd_fixed_param;
  9619. #define WMI_BCN_SEND_DTIM_ZERO 1
  9620. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  9621. typedef struct wmi_bcn_send_from_host {
  9622. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  9623. A_UINT32 vdev_id;
  9624. A_UINT32 data_len;
  9625. union {
  9626. A_UINT32 frag_ptr; /* Physical address of the frame */
  9627. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  9628. };
  9629. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  9630. A_UINT32 dtim_flag; /* to control CABQ traffic */
  9631. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  9632. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  9633. } wmi_bcn_send_from_host_cmd_fixed_param;
  9634. /* cmd to support bcn snd for all vaps at once */
  9635. typedef struct wmi_pdev_send_bcn {
  9636. A_UINT32 num_vdevs;
  9637. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  9638. } wmi_pdev_send_bcn_cmd_t;
  9639. typedef struct wmi_fd_send_from_host {
  9640. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fd_send_from_host_cmd_fixed_param */
  9641. A_UINT32 vdev_id;
  9642. A_UINT32 data_len;
  9643. union {
  9644. A_UINT32 frag_ptr; /* Physical address of the frame */
  9645. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  9646. };
  9647. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  9648. A_UINT32 frame_ctrl; /* frame ctrl to setup PPDU desc */
  9649. } wmi_fd_send_from_host_cmd_fixed_param;
  9650. /*
  9651. * WMI command structure for FILS feature enable/disable
  9652. */
  9653. typedef struct {
  9654. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enable_fils_cmd_fixed_param */
  9655. /* VDEV identifier */
  9656. A_UINT32 vdev_id;
  9657. A_UINT32 fd_period; /* non-zero - enable Fils Discovery frames with this period (in TU), 0 - disable FD frames */
  9658. } wmi_enable_fils_cmd_fixed_param;
  9659. /*
  9660. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  9661. */
  9662. typedef struct {
  9663. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  9664. /** id of AP criteria */
  9665. A_UINT32 id;
  9666. /** unique id identifying the VDEV, generated by the caller */
  9667. A_UINT32 vdev_id;
  9668. /*
  9669. * Following this structure is the TLV:
  9670. * wmi_ap_profile ap_profile; <-- AP profile info
  9671. * wmi_roam_cnd_scoring_param roam_cnd_scoring_param
  9672. */
  9673. } wmi_roam_ap_profile_fixed_param;
  9674. /**
  9675. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  9676. */
  9677. typedef struct {
  9678. /** id of AP criteria */
  9679. A_UINT32 id;
  9680. /** unique id identifying the VDEV, generated by the caller */
  9681. A_UINT32 vdev_id;
  9682. /** AP profile info */
  9683. wmi_ap_profile ap_profile;
  9684. } wmi_ofl_scan_add_ap_profile;
  9685. /**
  9686. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  9687. */
  9688. typedef struct {
  9689. /** id of AP criteria */
  9690. A_UINT32 id;
  9691. /** unique id identifying the VDEV, generated by the caller */
  9692. A_UINT32 vdev_id;
  9693. } wmi_ofl_scan_remove_ap_profile;
  9694. /**
  9695. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  9696. * 0 will disable ofload scan and a very low value will perform a continous
  9697. * scan.
  9698. */
  9699. typedef struct {
  9700. /** offload scan period value, used for scans used when not connected */
  9701. A_UINT32 ofl_scan_period;
  9702. } wmi_ofl_scan_period;
  9703. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  9704. #define ROAM_OFFLOAD_PMK_BYTES (32)
  9705. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  9706. #define ROAM_OFFLOAD_KRK_BYTES (16)
  9707. #define ROAM_OFFLOAD_BTK_BYTES (32)
  9708. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  9709. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  9710. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  9711. typedef struct {
  9712. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  9713. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  9714. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  9715. A_UINT32 select_5g_margin;
  9716. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  9717. A_UINT32 capability;
  9718. A_UINT32 ht_caps_info;
  9719. A_UINT32 ampdu_param;
  9720. A_UINT32 ht_ext_cap;
  9721. A_UINT32 ht_txbf;
  9722. A_UINT32 asel_cap;
  9723. A_UINT32 qos_enabled;
  9724. A_UINT32 qos_caps;
  9725. A_UINT32 wmm_caps;
  9726. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  9727. A_UINT32 handoff_delay_for_rx; /* In msec. Delay Hand-Off by this duration to receive pending Rx frames from current BSS */
  9728. } wmi_roam_offload_tlv_param;
  9729. /* flags for 11i offload */
  9730. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  9731. #define WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED 1 /* pmk caching is disabled */
  9732. /* from bit 2 to bit 31 are reserved */
  9733. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  9734. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  9735. } while (0)
  9736. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  9737. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  9738. } while (0)
  9739. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  9740. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  9741. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_ENABLED(flag) \
  9742. do { \
  9743. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  9744. } while (0)
  9745. #define WMI_SET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  9746. do { \
  9747. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED); \
  9748. } while (0)
  9749. #define WMI_GET_ROAM_OFFLOAD_PMK_CACHE_DISABLED(flag) \
  9750. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_PMK_CACHE_DISABLED))
  9751. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  9752. typedef struct {
  9753. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  9754. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  9755. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  9756. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  9757. } wmi_roam_11i_offload_tlv_param;
  9758. /* This TLV will be filled only in case of 11R*/
  9759. typedef struct {
  9760. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  9761. A_UINT32 mdie_present;
  9762. A_UINT32 mdid;
  9763. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  9764. A_UINT32 r0kh_id_len;
  9765. 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 */
  9766. A_UINT32 psk_msk_len; /**length of psk_msk*/
  9767. } wmi_roam_11r_offload_tlv_param;
  9768. /* This TLV will be filled only in case of ESE */
  9769. typedef struct {
  9770. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  9771. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  9772. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  9773. } wmi_roam_ese_offload_tlv_param;
  9774. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  9775. * generated when ever a better AP is found in the recent roam scan (or)
  9776. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  9777. * from the current AP.
  9778. */
  9779. typedef struct {
  9780. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  9781. /** unique id identifying the VDEV, generated by the caller */
  9782. A_UINT32 vdev_id;
  9783. /** reason for roam event */
  9784. A_UINT32 reason;
  9785. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  9786. A_UINT32 rssi;
  9787. /** roam notification */
  9788. A_UINT32 notif;
  9789. } wmi_roam_event_fixed_param;
  9790. /* roam_reason: bits 0-3 */
  9791. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  9792. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  9793. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  9794. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  9795. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  9796. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  9797. SSID and Security profile in
  9798. WMI_ROAM_AP_PROFILE, found during scan
  9799. triggered upon FINAL_BMISS **/
  9800. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  9801. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  9802. * Result code of WMI_ROAM_INVOKE_CMDID.
  9803. * Any roaming failure before reassociation will be indicated to host
  9804. * with this reason.
  9805. * Any roaming failure after reassociation will be indicated to host with
  9806. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  9807. */
  9808. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  9809. #define WMI_ROAM_REASON_RSO_STATUS 0x7
  9810. #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */
  9811. /* reserved up through 0xF */
  9812. /* subnet status: bits 4-5 */
  9813. typedef enum
  9814. {
  9815. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  9816. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  9817. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  9818. } wmi_roam_subnet_change_status;
  9819. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  9820. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  9821. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  9822. do { \
  9823. (roam_reason) |= \
  9824. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  9825. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  9826. } while (0)
  9827. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  9828. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  9829. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  9830. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK 0x40
  9831. #define WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT 6
  9832. #define WMI_SET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason, status) \
  9833. do { \
  9834. (roam_reason) |= \
  9835. (((status) << WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT) & \
  9836. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK); \
  9837. } while (0)
  9838. #define WMI_GET_ROAM_REQUEST_HOST_HW_MODE_CHANGE(roam_reason) \
  9839. (((roam_reason) & WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_MASK) >> \
  9840. WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE_SHIFT)
  9841. /* roaming notification */
  9842. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  9843. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  9844. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  9845. #define WMI_ROAM_NOTIF_ROAM_REASSOC 0x3 /** indicate that reassociation is done. sent only in non WOW state */
  9846. #define WMI_ROAM_NOTIF_SCAN_MODE_SUCCESS 0x4 /** indicate that roaming scan mode is successful */
  9847. #define WMI_ROAM_NOTIF_SCAN_MODE_FAIL 0x5 /** indicate that roaming scan mode is failed due to internal roaming state */
  9848. #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */
  9849. #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */
  9850. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  9851. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  9852. */
  9853. typedef struct
  9854. {
  9855. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  9856. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  9857. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  9858. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  9859. } wmi_ric_request_fixed_param;
  9860. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  9861. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  9862. */
  9863. typedef struct{
  9864. A_UINT32 tlv_header;
  9865. A_UINT32 ts_info; /** bits value of TS Info field.*/
  9866. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  9867. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  9868. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  9869. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  9870. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  9871. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  9872. A_UINT32 svc_start_time; /**The Service Start Time field*/
  9873. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  9874. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  9875. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  9876. A_UINT32 max_burst_size; /**The Burst Size field*/
  9877. A_UINT32 delay_bound; /**The Delay Bound field*/
  9878. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  9879. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  9880. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  9881. } wmi_ric_tspec;
  9882. /* flags for roam_invoke_cmd */
  9883. /* add this channel into roam cache channel list after this command is finished */
  9884. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  9885. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  9886. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  9887. /* during host-invoked roaming, don't send null data frame to AP */
  9888. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  9889. /* from bit 3 to bit 31 are reserved */
  9890. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  9891. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  9892. } while (0)
  9893. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  9894. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  9895. } while (0)
  9896. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  9897. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  9898. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  9899. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  9900. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  9901. #define WMI_ROAM_INVOKE_SCAN_MODE_SKIP 3 /* no scan is performed. use beacon/probe resp given by the host */
  9902. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  9903. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  9904. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  9905. *
  9906. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  9907. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  9908. This command can be used to add specific channel into roam cached channel list by following
  9909. <roam_scan_ch_mode> = 0
  9910. <roam_ap_sel_mode> = 0
  9911. <roam_delay> = 0
  9912. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  9913. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  9914. <channel_no> = channel list to be added
  9915. */
  9916. typedef struct {
  9917. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  9918. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  9919. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  9920. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  9921. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  9922. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  9923. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  9924. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  9925. A_UINT32 num_buf; /** number of buffers In the TLV bcn_prb_buf_list[] */
  9926. /**
  9927. * TLV (tag length value) parameters follows roam_invoke_req
  9928. * The TLV's are:
  9929. * A_UINT32 channel_list[];
  9930. * wmi_mac_addr bssid_list[];
  9931. * wmi_tlv_buf_len_param bcn_prb_buf_list[];
  9932. * A_UINT8 bcn_prb_frm[];
  9933. */
  9934. } wmi_roam_invoke_cmd_fixed_param;
  9935. /* Definition for op_bitmap */
  9936. enum {
  9937. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  9938. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  9939. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  9940. ROAM_FILTER_OP_BITMAP_LCA_DISALLOW = 0x8,
  9941. ROAM_FILTER_OP_BITMAP_RSSI_REJECTION_OCE = 0x10,
  9942. };
  9943. /** lca_enable_source_bitmap */
  9944. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PER 0x1
  9945. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BMISS 0x2
  9946. #define WMI_ROAM_LCA_DISALLOW_SOURCE_LOW_RSSI 0x4
  9947. #define WMI_ROAM_LCA_DISALLOW_SOURCE_HIGH_RSSI 0x8
  9948. #define WMI_ROAM_LCA_DISALLOW_SOURCE_PERIODIC 0x10
  9949. #define WMI_ROAM_LCA_DISALLOW_SOURCE_MAWC 0x20 /* MAWC = Motion Aided Wifi connectivity */
  9950. #define WMI_ROAM_LCA_DISALLOW_SOURCE_DENSE 0x40
  9951. #define WMI_ROAM_LCA_DISALLOW_SOURCE_BACKGROUND 0x80
  9952. #define WMI_ROAM_LCA_DISALLOW_SOURCE_FORCED 0x100
  9953. typedef struct {
  9954. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_rssi_rejection_oce_config_param */
  9955. A_UINT32 tlv_header;
  9956. /** BSSID of AP, who reject (re-)assoc due to low RSSI */
  9957. wmi_mac_addr bssid;
  9958. /** Disallowed AP for certain duration, in units of milliseconds */
  9959. A_UINT32 remaining_disallow_duration;
  9960. /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */
  9961. A_INT32 requested_rssi;
  9962. } wmi_roam_rssi_rejection_oce_config_param;
  9963. typedef struct {
  9964. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  9965. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  9966. A_UINT32 flags; /** flags for filter */
  9967. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  9968. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  9969. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  9970. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  9971. A_UINT32 num_rssi_rejection_ap; /** number of list of AP who rejected STA due to low RSSI */
  9972. /**
  9973. * TLV (tag length value) parameters follows roam_filter_list_cmd
  9974. * The TLV's are:
  9975. * wmi_mac_addr bssid_black_list[];
  9976. * wmi_ssid ssid_white_list[];
  9977. * wmi_mac_addr bssid_preferred_list[];
  9978. * A_UINT32 bssid_preferred_factor[];
  9979. * wmi_roam_lca_disallow_config_tlv_param lca_disallow_param[0/1] (opt)
  9980. * wmi_roam_rssi_rejection_oce_config_param rssi_rejection_list[]
  9981. */
  9982. } wmi_roam_filter_fixed_param;
  9983. typedef struct {
  9984. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_lca_disallow_config_tlv_param */
  9985. A_UINT32 disallow_duration; /** How long LCA AP will be disallowed before it can be a roaming candidate again, in units of seconds */
  9986. 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 */
  9987. A_UINT32 num_disallowed_aps; /** How many APs the target should maintain in its LCA (Last Connected AP) list */
  9988. 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) */
  9989. } wmi_roam_lca_disallow_config_tlv_param;
  9990. typedef struct {
  9991. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  9992. } WMI_IPV4_ADDR;
  9993. typedef struct _WMI_IPV6_ADDR {
  9994. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  9995. } WMI_IPV6_ADDR;
  9996. /* flags for subnet change detection */
  9997. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  9998. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  9999. /* bit 2 to bit 31 are reserved */
  10000. /* set IPv4 enabled/disabled flag and get the flag */
  10001. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  10002. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  10003. } while (0)
  10004. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  10005. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  10006. } while (0)
  10007. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  10008. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  10009. /* set IPv6 enabled flag, disabled and get the flag */
  10010. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  10011. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  10012. } while (0)
  10013. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  10014. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  10015. } while (0)
  10016. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  10017. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  10018. /**
  10019. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  10020. * to FW. FW uses these parameters for subnet change detection.
  10021. */
  10022. typedef struct {
  10023. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  10024. /** unique id identifying the VDEV, generated by the caller */
  10025. A_UINT32 vdev_id;
  10026. /** IPv4/IPv6 enabled/disabled */
  10027. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  10028. A_UINT32 flag;
  10029. /** Gateway MAC address */
  10030. wmi_mac_addr inet_gw_mac_addr;
  10031. /** IP addresses */
  10032. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  10033. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  10034. /** Number of software retries for ARP/Neighbor solicitation request */
  10035. A_UINT32 max_retries;
  10036. /** timeout in milliseconds for each ARP request*/
  10037. A_UINT32 timeout;
  10038. /** number of skipped aps **/
  10039. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  10040. /**
  10041. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  10042. * structure. The TLV's are:
  10043. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  10044. **/
  10045. } wmi_roam_subnet_change_config_fixed_param;
  10046. /** WMI_PROFILE_MATCH_EVENT: offload scan
  10047. * generated when ever atleast one of the matching profiles is found
  10048. * in recent NLO scan. no data is carried with the event.
  10049. */
  10050. /** P2P specific commands */
  10051. /**
  10052. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  10053. * FW to generate P2P IE tobe carried in probe response frames.
  10054. * FW will respond to probe requests while in listen state.
  10055. */
  10056. typedef struct {
  10057. /* number of secondary device types,supported */
  10058. A_UINT32 num_secondary_dev_types;
  10059. /**
  10060. * followed by 8 bytes of primary device id and
  10061. * num_secondary_dev_types * 8 bytes of secondary device
  10062. * id.
  10063. */
  10064. } wmi_p2p_dev_set_device_info;
  10065. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  10066. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  10067. * the operating channel of the VDEV.
  10068. */
  10069. typedef struct {
  10070. /* 1:enable disoverability, 0:disable discoverability */
  10071. A_UINT32 enable_discoverability;
  10072. } wmi_p2p_set_discoverability;
  10073. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  10074. * beacons generated by FW. used in FW beacon mode.
  10075. * the FW will add this IE to beacon in addition to the beacon
  10076. * template set by WMI_BCN_TMPL_CMDID command.
  10077. */
  10078. typedef struct {
  10079. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  10080. /** unique id identifying the VDEV, generated by the caller */
  10081. A_UINT32 vdev_id;
  10082. /* ie length */
  10083. A_UINT32 ie_buf_len;
  10084. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  10085. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  10086. */
  10087. } wmi_p2p_go_set_beacon_ie_fixed_param;
  10088. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  10089. * probe response generated by FW. used in FW beacon mode.
  10090. * the FW will add this IE to probe response in addition to the probe response
  10091. * template set by WMI_PRB_TMPL_CMDID command.
  10092. */
  10093. typedef struct {
  10094. /** unique id identifying the VDEV, generated by the caller */
  10095. A_UINT32 vdev_id;
  10096. /* ie length */
  10097. A_UINT32 ie_buf_len;
  10098. /*followed by byte stream of ie data of length ie_buf_len */
  10099. } wmi_p2p_go_set_probe_resp_ie;
  10100. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  10101. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  10102. * and action frames received by the P2P Client.
  10103. * Note: This command is currently used only for Apple P2P implementation.
  10104. */
  10105. typedef struct {
  10106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  10107. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  10108. A_UINT32 p2p_ie_oui_type;
  10109. /** OS specific NoA Attribute ID */
  10110. A_UINT32 p2p_noa_attribute;
  10111. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  10112. /*----P2P disc offload definition ----*/
  10113. typedef struct {
  10114. A_UINT32 pattern_type;
  10115. /**
  10116. * TLV (tag length value) paramerters follow the pattern structure.
  10117. * TLV can contain bssid list, ssid list and
  10118. * ie. the TLV tags are defined above;
  10119. */
  10120. } wmi_p2p_disc_offload_pattern_cmd;
  10121. typedef struct {
  10122. /* unique id identifying the VDEV, generated by the caller */
  10123. A_UINT32 vdev_id;
  10124. /* mgmt type of the ie*/
  10125. A_UINT32 mgmt_type;
  10126. /* ie length */
  10127. A_UINT32 ie_buf_len;
  10128. /*followed by byte stream of ie data of length ie_buf_len */
  10129. } wmi_p2p_disc_offload_appie_cmd;
  10130. typedef struct {
  10131. /* enable/disable p2p find offload*/
  10132. A_UINT32 enable;
  10133. /* unique id identifying the VDEV, generated by the caller */
  10134. A_UINT32 vdev_id;
  10135. /* p2p find type */
  10136. A_UINT32 disc_type;
  10137. /* p2p find perodic */
  10138. A_UINT32 perodic;
  10139. /* p2p find listen channel */
  10140. A_UINT32 listen_channel;
  10141. /* p2p find full channel number */
  10142. A_UINT32 num_scan_chans;
  10143. /**
  10144. * TLV (tag length value) paramerters follow the pattern structure.
  10145. * TLV contain channel list
  10146. */
  10147. } wmi_p2p_disc_offload_config_cmd;
  10148. /*----P2P OppPS definition ----*/
  10149. typedef struct {
  10150. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  10151. A_UINT32 tlv_header;
  10152. /* unique id identifying the VDEV, generated by the caller */
  10153. A_UINT32 vdev_id;
  10154. /* OppPS attributes */
  10155. /** Bit 0: Indicate enable/disable of OppPS
  10156. * Bits 7-1: Ctwindow in TUs
  10157. * Bits 31-8: Reserved
  10158. */
  10159. A_UINT32 oppps_attr;
  10160. } wmi_p2p_set_oppps_cmd_fixed_param;
  10161. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  10162. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  10163. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  10164. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  10165. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  10166. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  10167. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  10168. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  10169. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  10170. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  10171. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  10172. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  10173. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  10174. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  10175. typedef enum p2p_lo_start_ctrl_flags_e {
  10176. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  10177. } p2p_lo_start_ctrl_flags;
  10178. #define P2P_LO_PER_DEV_TYPE_LEN 8
  10179. #define P2P_LO_DEV_TYPES_COUNT_MAX 10
  10180. #define P2P_LO_DEV_TYPES_LEN_MAX (P2P_LO_PER_DEV_TYPE_LEN * P2P_LO_DEV_TYPES_COUNT_MAX)
  10181. #define P2P_LO_PROB_RESP_MAX_LEN 512
  10182. typedef struct {
  10183. A_UINT32 tlv_header;
  10184. A_UINT32 vdev_id;
  10185. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  10186. A_UINT32 channel; /* MHz */
  10187. A_UINT32 period; /* ms */
  10188. A_UINT32 interval; /* ms, interval should be larger than period */
  10189. A_UINT32 count; /* 0 means forever */
  10190. /*
  10191. * device_types_len specifies the number of bytes in the
  10192. * device_types_data[] byte-array TLV that follows this TLV.
  10193. * The data in device_types_data[] is in 8-byte elements, so
  10194. * device_types_len will be a multiple of 8.
  10195. * Refer to P2P_LO_DEV_TYPES_LEN_MAX
  10196. */
  10197. A_UINT32 device_types_len;
  10198. /*
  10199. * prob_resp_len specifies the number of bytes in the
  10200. * prob_resp_data[] byte-array TLV that follows this TLV.
  10201. * Refer to P2P_LO_PROB_RESP_MAX_LEN
  10202. */
  10203. A_UINT32 prob_resp_len;
  10204. /*
  10205. * Two other TLVs follow this TLV:
  10206. * A_UINT8 device_types_data[device_types_len];
  10207. * A_UINT8 prob_resp_data[prob_resp_len];
  10208. * The information in device_types_data[] and prob_resp_data[]
  10209. * needs to be provided to the target in over-the-air byte order.
  10210. * On a big-endian host, if device_types_data and prob_resp_data
  10211. * are initially in the correct over-the-air byte order,
  10212. * the automatic byteswap for endianness-correction during WMI
  10213. * message download will mess up the byte order.
  10214. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  10215. * within each quad-byte segment of device_types_data[] and
  10216. * prob_resp_data[], so that the automatic byte-swap applied during
  10217. * WMI download from a big-endian host to the little-endian target
  10218. * will restore device_types_data and prob_resp_data into the
  10219. * correct byte ordering.
  10220. */
  10221. } wmi_p2p_lo_start_cmd_fixed_param;
  10222. typedef struct {
  10223. A_UINT32 tlv_header;
  10224. A_UINT32 vdev_id;
  10225. } wmi_p2p_lo_stop_cmd_fixed_param;
  10226. typedef enum p2p_lo_stopped_reason_e {
  10227. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  10228. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  10229. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  10230. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  10231. } p2p_lo_stopped_reason;
  10232. typedef struct {
  10233. A_UINT32 tlv_header;
  10234. A_UINT32 vdev_id;
  10235. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  10236. } wmi_p2p_lo_stopped_event_fixed_param;
  10237. typedef enum {
  10238. WMI_MNT_FILTER_CONFIG_MANAGER,
  10239. WMI_MNT_FILTER_CONFIG_CONTROL,
  10240. WMI_MNT_FILTER_CONFIG_DATA,
  10241. WMI_MNT_FILTER_CONFIG_ALL,
  10242. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  10243. } WMI_MNT_FILTER_CONFIG_TYPE;
  10244. typedef struct {
  10245. A_UINT32 tlv_header;
  10246. A_UINT32 vdev_id;
  10247. A_UINT32 clear_or_set;
  10248. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  10249. } wmi_mnt_filter_cmd_fixed_param;
  10250. typedef struct {
  10251. A_UINT32 time32; /* upper 32 bits of time stamp */
  10252. A_UINT32 time0; /* lower 32 bits of time stamp */
  10253. } A_TIME64;
  10254. typedef enum wmi_peer_sta_kickout_reason {
  10255. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  10256. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  10257. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  10258. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  10259. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  10260. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  10261. } PEER_KICKOUT_REASON;
  10262. typedef struct {
  10263. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  10264. /** peer mac address */
  10265. wmi_mac_addr peer_macaddr;
  10266. /** Reason code, defined as above */
  10267. A_UINT32 reason;
  10268. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  10269. A_UINT32 rssi;
  10270. } wmi_peer_sta_kickout_event_fixed_param;
  10271. #define WMI_WLAN_PROFILE_MAX_HIST 3
  10272. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  10273. typedef struct _wmi_wlan_profile_t {
  10274. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  10275. A_UINT32 id;
  10276. A_UINT32 cnt;
  10277. A_UINT32 tot;
  10278. A_UINT32 min;
  10279. A_UINT32 max;
  10280. A_UINT32 hist_intvl;
  10281. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  10282. } wmi_wlan_profile_t;
  10283. typedef struct _wmi_wlan_profile_ctx_t {
  10284. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  10285. A_UINT32 tot; /* time in us */
  10286. A_UINT32 tx_msdu_cnt;
  10287. A_UINT32 tx_mpdu_cnt;
  10288. A_UINT32 tx_ppdu_cnt;
  10289. A_UINT32 rx_msdu_cnt;
  10290. A_UINT32 rx_mpdu_cnt;
  10291. A_UINT32 bin_count;
  10292. } wmi_wlan_profile_ctx_t;
  10293. typedef struct {
  10294. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  10295. A_UINT32 enable;
  10296. } wmi_wlan_profile_trigger_cmd_fixed_param;
  10297. typedef struct {
  10298. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  10299. A_UINT32 value;
  10300. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  10301. typedef struct {
  10302. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  10303. A_UINT32 profile_id;
  10304. A_UINT32 value;
  10305. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  10306. typedef struct {
  10307. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  10308. A_UINT32 profile_id;
  10309. A_UINT32 enable;
  10310. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  10311. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  10312. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  10313. when comparing wifi header.*/
  10314. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  10315. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  10316. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  10317. #define WOW_DEFAULT_BITMASK_SIZE 146
  10318. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  10319. #define WOW_MAX_BITMAP_FILTERS 32
  10320. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  10321. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  10322. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  10323. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  10324. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  10325. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  10326. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  10327. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  10328. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  10329. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  10330. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  10331. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  10332. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  10333. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  10334. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  10335. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  10336. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  10337. typedef enum pattern_type_e {
  10338. WOW_PATTERN_MIN = 0,
  10339. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  10340. WOW_IPV4_SYNC_PATTERN,
  10341. WOW_IPV6_SYNC_PATTERN,
  10342. WOW_WILD_CARD_PATTERN,
  10343. WOW_TIMER_PATTERN,
  10344. WOW_MAGIC_PATTERN,
  10345. WOW_IPV6_RA_PATTERN,
  10346. WOW_IOAC_PKT_PATTERN,
  10347. WOW_IOAC_TMR_PATTERN,
  10348. WOW_IOAC_SOCK_PATTERN,
  10349. WOW_PATTERN_MAX
  10350. } WOW_PATTERN_TYPE;
  10351. typedef enum event_type_e {
  10352. WOW_BMISS_EVENT = 0,
  10353. WOW_BETTER_AP_EVENT,
  10354. WOW_DEAUTH_RECVD_EVENT,
  10355. WOW_MAGIC_PKT_RECVD_EVENT,
  10356. WOW_GTK_ERR_EVENT,
  10357. WOW_FOURWAY_HSHAKE_EVENT,
  10358. WOW_EAPOL_RECVD_EVENT,
  10359. WOW_NLO_DETECTED_EVENT,
  10360. WOW_DISASSOC_RECVD_EVENT,
  10361. WOW_PATTERN_MATCH_EVENT,
  10362. WOW_CSA_IE_EVENT,
  10363. WOW_PROBE_REQ_WPS_IE_EVENT,
  10364. WOW_AUTH_REQ_EVENT,
  10365. WOW_ASSOC_REQ_EVENT,
  10366. WOW_HTT_EVENT,
  10367. WOW_RA_MATCH_EVENT,
  10368. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  10369. WOW_IOAC_MAGIC_EVENT,
  10370. WOW_IOAC_SHORT_EVENT,
  10371. WOW_IOAC_EXTEND_EVENT,
  10372. WOW_IOAC_TIMER_EVENT,
  10373. WOW_DFS_PHYERR_RADAR_EVENT,
  10374. WOW_BEACON_EVENT,
  10375. WOW_CLIENT_KICKOUT_EVENT,
  10376. WOW_NAN_EVENT,
  10377. WOW_EXTSCAN_EVENT,
  10378. WOW_IOAC_REV_KA_FAIL_EVENT,
  10379. WOW_IOAC_SOCK_EVENT,
  10380. WOW_NLO_SCAN_COMPLETE_EVENT,
  10381. WOW_NAN_DATA_EVENT,
  10382. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  10383. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  10384. WOW_TDLS_CONN_TRACKER_EVENT,
  10385. WOW_CRITICAL_LOG_EVENT,
  10386. WOW_CHIP_POWER_FAILURE_DETECT_EVENT,
  10387. WOW_11D_SCAN_EVENT,
  10388. WOW_SAP_OBSS_DETECTION_EVENT,
  10389. WOW_BSS_COLOR_COLLISION_DETECT_EVENT,
  10390. WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT,
  10391. } WOW_WAKE_EVENT_TYPE;
  10392. typedef enum wake_reason_e {
  10393. WOW_REASON_UNSPECIFIED = -1,
  10394. WOW_REASON_NLOD = 0,
  10395. WOW_REASON_AP_ASSOC_LOST,
  10396. WOW_REASON_LOW_RSSI,
  10397. WOW_REASON_DEAUTH_RECVD,
  10398. WOW_REASON_DISASSOC_RECVD,
  10399. WOW_REASON_GTK_HS_ERR,
  10400. WOW_REASON_EAP_REQ,
  10401. WOW_REASON_FOURWAY_HS_RECV,
  10402. WOW_REASON_TIMER_INTR_RECV,
  10403. WOW_REASON_PATTERN_MATCH_FOUND,
  10404. WOW_REASON_RECV_MAGIC_PATTERN,
  10405. WOW_REASON_P2P_DISC,
  10406. WOW_REASON_WLAN_HB,
  10407. WOW_REASON_CSA_EVENT,
  10408. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  10409. WOW_REASON_AUTH_REQ_RECV,
  10410. WOW_REASON_ASSOC_REQ_RECV,
  10411. WOW_REASON_HTT_EVENT,
  10412. WOW_REASON_RA_MATCH,
  10413. WOW_REASON_HOST_AUTO_SHUTDOWN,
  10414. WOW_REASON_IOAC_MAGIC_EVENT,
  10415. WOW_REASON_IOAC_SHORT_EVENT,
  10416. WOW_REASON_IOAC_EXTEND_EVENT,
  10417. WOW_REASON_IOAC_TIMER_EVENT,
  10418. WOW_REASON_ROAM_HO,
  10419. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  10420. WOW_REASON_BEACON_RECV,
  10421. WOW_REASON_CLIENT_KICKOUT_EVENT,
  10422. WOW_REASON_NAN_EVENT,
  10423. WOW_REASON_EXTSCAN,
  10424. WOW_REASON_RSSI_BREACH_EVENT,
  10425. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  10426. WOW_REASON_IOAC_SOCK_EVENT,
  10427. WOW_REASON_NLO_SCAN_COMPLETE,
  10428. WOW_REASON_PACKET_FILTER_MATCH,
  10429. WOW_REASON_ASSOC_RES_RECV,
  10430. WOW_REASON_REASSOC_REQ_RECV,
  10431. WOW_REASON_REASSOC_RES_RECV,
  10432. WOW_REASON_ACTION_FRAME_RECV,
  10433. WOW_REASON_BPF_ALLOW,
  10434. WOW_REASON_NAN_DATA,
  10435. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  10436. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  10437. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  10438. WOW_REASON_CRITICAL_LOG,
  10439. WOW_REASON_P2P_LISTEN_OFFLOAD,
  10440. WOW_REASON_NAN_EVENT_WAKE_HOST,
  10441. WOW_REASON_CHIP_POWER_FAILURE_DETECT,
  10442. WOW_REASON_11D_SCAN,
  10443. WOW_REASON_THERMAL_CHANGE,
  10444. WOW_REASON_OIC_PING_OFFLOAD,
  10445. WOW_REASON_WLAN_DHCP_RENEW,
  10446. WOW_REASON_SAP_OBSS_DETECTION,
  10447. WOW_REASON_BSS_COLOR_COLLISION_DETECT,
  10448. WOW_REASON_TKIP_MIC_ERR_FRAME_RECVD_DETECT,
  10449. WOW_REASON_DEBUG_TEST = 0xFF,
  10450. } WOW_WAKE_REASON_TYPE;
  10451. typedef enum {
  10452. WOW_IFACE_PAUSE_ENABLED,
  10453. WOW_IFACE_PAUSE_DISABLED
  10454. } WOW_IFACE_STATUS;
  10455. enum {
  10456. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  10457. /* WMI_WOW_FLAG_SEND_PM_PME
  10458. * Some platforms have issues if the PM_PME message is sent after WoW,
  10459. * so don't send PM_PME after WoW unless the host uses this flag
  10460. * to request it.
  10461. */
  10462. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  10463. /* Flag to indicate unit test */
  10464. WMI_WOW_FLAG_UNIT_TEST_ENABLE = 0x00000004,
  10465. /* Force HTC wakeup */
  10466. WMI_WOW_FLAG_DO_HTC_WAKEUP = 0x00000008,
  10467. /* Enable L1SS sleep for PCIE DRV case */
  10468. WMI_WOW_FLAG_ENABLE_DRV_PCIE_L1SS_SLEEP = 0x00000010,
  10469. };
  10470. typedef struct {
  10471. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  10472. A_UINT32 enable;
  10473. A_UINT32 pause_iface_config;
  10474. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  10475. } wmi_wow_enable_cmd_fixed_param;
  10476. typedef struct {
  10477. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  10478. /** Reserved for future use */
  10479. A_UINT32 reserved0;
  10480. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  10481. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  10482. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  10483. typedef struct {
  10484. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  10485. A_UINT32 vdev_id;
  10486. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  10487. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  10488. typedef struct bitmap_pattern_s {
  10489. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  10490. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  10491. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  10492. A_UINT32 pattern_offset;
  10493. A_UINT32 pattern_len;
  10494. A_UINT32 bitmask_len;
  10495. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  10496. } WOW_BITMAP_PATTERN_T;
  10497. typedef struct ipv4_sync_s {
  10498. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  10499. A_UINT32 ipv4_src_addr;
  10500. A_UINT32 ipv4_dst_addr;
  10501. A_UINT32 tcp_src_prt;
  10502. A_UINT32 tcp_dst_prt;
  10503. } WOW_IPV4_SYNC_PATTERN_T;
  10504. typedef struct ipv6_sync_s {
  10505. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  10506. A_UINT32 ipv6_src_addr[4];
  10507. A_UINT32 ipv6_dst_addr[4];
  10508. A_UINT32 tcp_src_prt;
  10509. A_UINT32 tcp_dst_prt;
  10510. } WOW_IPV6_SYNC_PATTERN_T;
  10511. typedef struct WOW_MAGIC_PATTERN_CMD
  10512. {
  10513. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  10514. wmi_mac_addr macaddr;
  10515. } WOW_MAGIC_PATTERN_CMD;
  10516. typedef enum wow_ioac_pattern_type {
  10517. WOW_IOAC_MAGIC_PATTERN = 1,
  10518. WOW_IOAC_SHORT_PATTERN,
  10519. WOW_IOAC_EXTEND_PATTERN,
  10520. } WOW_IOAC_PATTERN_TYPE;
  10521. typedef struct ioac_sock_pattern_s {
  10522. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  10523. A_UINT32 id;
  10524. A_UINT32 local_ipv4;
  10525. A_UINT32 remote_ipv4;
  10526. A_UINT32 local_port;
  10527. A_UINT32 remote_port;
  10528. A_UINT32 pattern_len; /* units = bytes */
  10529. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  10530. WMI_IPV6_ADDR local_ipv6;
  10531. WMI_IPV6_ADDR remote_ipv6;
  10532. A_UINT32 ack_nak_len;
  10533. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10534. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  10535. } WOW_IOAC_SOCK_PATTERN_T;
  10536. typedef struct ioac_pkt_pattern_s {
  10537. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  10538. A_UINT32 pattern_type;
  10539. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  10540. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  10541. A_UINT32 pattern_len;
  10542. A_UINT32 random_len;
  10543. } WOW_IOAC_PKT_PATTERN_T;
  10544. typedef struct ioac_tmr_pattern_s {
  10545. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  10546. A_UINT32 wake_in_s;
  10547. A_UINT32 vdev_id;
  10548. } WOW_IOAC_TMR_PATTERN_T;
  10549. typedef struct {
  10550. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  10551. A_UINT32 nID;
  10552. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  10553. typedef struct {
  10554. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  10555. A_UINT32 nID;
  10556. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  10557. typedef struct ioac_keepalive_s {
  10558. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  10559. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  10560. A_UINT32 keepalive_pkt_len;
  10561. A_UINT32 period_in_ms;
  10562. A_UINT32 vdev_id;
  10563. A_UINT32 max_loss_cnt;
  10564. A_UINT32 local_ipv4;
  10565. A_UINT32 remote_ipv4;
  10566. A_UINT32 local_port;
  10567. A_UINT32 remote_port;
  10568. A_UINT32 recv_period_in_ms;
  10569. A_UINT32 rev_ka_size;
  10570. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  10571. WMI_IPV6_ADDR local_ipv6;
  10572. WMI_IPV6_ADDR remote_ipv6;
  10573. } WMI_WOW_IOAC_KEEPALIVE_T;
  10574. typedef struct {
  10575. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  10576. A_UINT32 vdev_id;
  10577. A_UINT32 pattern_type;
  10578. /*
  10579. * Following this struct are these TLVs. Note that they are all array of structures
  10580. * but can have at most one element. Which TLV is empty or has one element depends
  10581. * on the field pattern_type. This is to emulate an union.
  10582. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  10583. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  10584. */
  10585. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  10586. typedef struct {
  10587. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  10588. A_UINT32 vdev_id;
  10589. A_UINT32 pattern_type;
  10590. A_UINT32 pattern_id;
  10591. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  10592. typedef struct {
  10593. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  10594. A_UINT32 vdev_id;
  10595. A_UINT32 pattern_id;
  10596. A_UINT32 pattern_type;
  10597. /*
  10598. * Following this struct are these TLVs. Note that they are all array of structures
  10599. * but can have at most one element. Which TLV is empty or has one element depends
  10600. * on the field pattern_type. This is to emulate an union.
  10601. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  10602. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  10603. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  10604. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  10605. * A_UINT32 pattern_info_timeout[];
  10606. * A_UINT32 ra_ratelimit_interval;
  10607. */
  10608. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  10609. typedef struct {
  10610. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  10611. A_UINT32 vdev_id;
  10612. A_UINT32 pattern_id;
  10613. A_UINT32 pattern_type;
  10614. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  10615. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  10616. typedef struct {
  10617. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  10618. A_UINT32 vdev_id;
  10619. A_UINT32 is_add;
  10620. union {
  10621. A_UINT32 event_bitmap;
  10622. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  10623. };
  10624. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  10625. /*
  10626. * This structure is used to set the pattern to check UDP packet in WOW mode.
  10627. * If match, construct a tx frame in a local buffer to send through the peer
  10628. * AP to the entity in the IP network that sent the UDP packet to this STA.
  10629. */
  10630. typedef struct {
  10631. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  10632. A_UINT32 vdev_id;
  10633. A_UINT32 enable; /* 1: enable, 0: disable*/
  10634. /* dest_port -
  10635. * bits 7:0 contain the LSB of the UDP dest port,
  10636. * bits 15:8 contain the MSB of the UDP dest port
  10637. */
  10638. A_UINT32 dest_port;
  10639. A_UINT32 pattern_len; /* length in byte of pattern[] */
  10640. A_UINT32 response_len; /* length in byte of response[] */
  10641. /* Following this struct are the TLV's:
  10642. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  10643. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  10644. */
  10645. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  10646. /*
  10647. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  10648. */
  10649. typedef struct {
  10650. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  10651. A_UINT32 enable; /* 1: enable, 0: disable */
  10652. A_UINT32 pin; /* pin for host wakeup */
  10653. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  10654. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  10655. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  10656. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  10657. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  10658. #define MAX_SUPPORTED_ACTION_SUBCATEGORY 32
  10659. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  10660. typedef enum {
  10661. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  10662. WOW_ACTION_WAKEUP_OPERATION_SET,
  10663. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  10664. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  10665. } WOW_ACTION_WAKEUP_OPERATION;
  10666. typedef struct {
  10667. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  10668. A_UINT32 vdev_id;
  10669. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  10670. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  10671. /* This fixed_param TLV is followed by these additional TLV's
  10672. * action_bitmaps_per_category -
  10673. * Each element is a 32-bit bitmap indicating which subcategories
  10674. * for that particular action category are considered for WoW wakeup
  10675. * (if the subcategory's bit is 0) or ignored for WoW wakeup (if the
  10676. * subcategory's bit is 1).
  10677. *
  10678. * A_UINT32 action_bitmaps_per_category[]; <-- variable length array
  10679. */
  10680. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  10681. typedef struct wow_event_info_s {
  10682. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  10683. A_UINT32 vdev_id;
  10684. A_UINT32 flag; /*This is current reserved.*/
  10685. A_INT32 wake_reason;
  10686. A_UINT32 data_len;
  10687. } WOW_EVENT_INFO_fixed_param;
  10688. typedef struct wow_initial_wakeup_event_s {
  10689. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  10690. A_UINT32 vdev_id;
  10691. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  10692. typedef enum {
  10693. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  10694. WOW_EVENT_INFO_TYPE_BITMAP,
  10695. WOW_EVENT_INFO_TYPE_GTKIGTK,
  10696. } WOW_EVENT_INFO_TYPE;
  10697. typedef struct wow_event_info_section_s {
  10698. A_UINT32 data_type;
  10699. A_UINT32 data_len;
  10700. } WOW_EVENT_INFO_SECTION;
  10701. typedef struct wow_event_info_section_packet_s {
  10702. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  10703. } WOW_EVENT_INFO_SECTION_PACKET;
  10704. typedef struct wow_event_info_section_bitmap_s {
  10705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  10706. A_UINT32 flag; /*This is current reserved.*/
  10707. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  10708. A_UINT32 org_len; /*The length of the orginal packet.*/
  10709. } WOW_EVENT_INFO_SECTION_BITMAP;
  10710. /**
  10711. * This command is sent from WLAN host driver to firmware to
  10712. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  10713. * PCIe link and DDR being active.
  10714. *
  10715. *
  10716. * Entering D0-WOW Mode (based on kernel suspend request):
  10717. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  10718. * target: Take action (e.g. dbglog suspend)
  10719. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  10720. *
  10721. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  10722. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  10723. * target: Take action (e.g. dbglog resume)
  10724. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  10725. *
  10726. * This command is applicable only on the PCIE LL systems
  10727. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  10728. * Decision to enter D0-WOW or WOW is based on active interfaces
  10729. *
  10730. */
  10731. typedef struct {
  10732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  10733. A_UINT32 enable; /* 1 = enable, 0 = disable */
  10734. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  10735. typedef enum extend_wow_type_e {
  10736. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  10737. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  10738. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  10739. EXTWOW_TYPE_APP_PULSETEST,
  10740. EXTWOW_DISABLED = 255,
  10741. } EXTWOW_TYPE;
  10742. typedef struct {
  10743. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  10744. A_UINT32 vdev_id;
  10745. A_UINT32 type;
  10746. A_UINT32 wakeup_pin_num;
  10747. A_UINT32 swol_pulsetest_type;
  10748. A_UINT32 swol_pulsetest_application;
  10749. } wmi_extwow_enable_cmd_fixed_param;
  10750. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  10751. #define SWOL_INDOOR_KEY_LEN 16
  10752. typedef struct {
  10753. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  10754. A_UINT32 vdev_id;
  10755. wmi_mac_addr wakee_mac;
  10756. A_UINT8 ident[8];
  10757. A_UINT8 passwd[16];
  10758. A_UINT32 ident_len;
  10759. A_UINT32 passwd_len;
  10760. /* indoor check parameters */
  10761. /* key for mac addresses specified in swol_indoor_key_mac
  10762. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  10763. * segment of this array, so the bytes will return to their original
  10764. * order when the entire WMI message contents are byte-swapped to
  10765. * convert from big-endian to little-endian format.
  10766. */
  10767. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  10768. /* key length for specified mac address index
  10769. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  10770. * segment of this array, so the bytes will return to their original
  10771. * order when the entire WMI message contents are byte-swapped to
  10772. * convert from big-endian to little-endian format.
  10773. */
  10774. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10775. /* mac address array allowed to wakeup host*/
  10776. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10777. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  10778. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  10779. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  10780. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  10781. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  10782. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  10783. A_UINT32 swol_indoor_exception_app;
  10784. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  10785. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  10786. typedef struct {
  10787. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  10788. A_UINT32 vdev_id;
  10789. A_UINT8 rc4_key[16];
  10790. A_UINT32 rc4_key_len;
  10791. /** ip header parameter */
  10792. A_UINT32 ip_id; /* NC id */
  10793. A_UINT32 ip_device_ip; /* NC IP address */
  10794. A_UINT32 ip_server_ip; /* Push server IP address */
  10795. /** tcp header parameter */
  10796. A_UINT16 tcp_src_port; /* NC TCP port */
  10797. A_UINT16 tcp_dst_port; /* Push server TCP port */
  10798. A_UINT32 tcp_seq;
  10799. A_UINT32 tcp_ack_seq;
  10800. A_UINT32 keepalive_init; /* Initial ping interval */
  10801. A_UINT32 keepalive_min; /* Minimum ping interval */
  10802. A_UINT32 keepalive_max; /* Maximum ping interval */
  10803. A_UINT32 keepalive_inc; /* Increment of ping interval */
  10804. wmi_mac_addr gateway_mac;
  10805. A_UINT32 tcp_tx_timeout_val;
  10806. A_UINT32 tcp_rx_timeout_val;
  10807. /** add extra parameter for backward-compatible */
  10808. /*
  10809. * For all byte arrays, natural order is used. E.g.
  10810. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  10811. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  10812. */
  10813. /* used to encrypt transmit packet such as keep-alive */
  10814. A_UINT8 rc4_write_sandbox[256];
  10815. A_UINT32 rc4_write_x;
  10816. A_UINT32 rc4_write_y;
  10817. /* used to decrypt received packet such as wow data */
  10818. A_UINT8 rc4_read_sandbox[256];
  10819. A_UINT32 rc4_read_x;
  10820. A_UINT32 rc4_read_y;
  10821. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  10822. A_UINT8 ssl_write_seq[8];
  10823. A_UINT8 ssl_sha1_write_key[64];
  10824. A_UINT32 ssl_sha1_write_key_len;
  10825. /* used to calculate HAMC hash for receive packet such as wow data */
  10826. A_UINT8 ssl_read_seq[8];
  10827. A_UINT8 ssl_sha1_read_key[64];
  10828. A_UINT32 ssl_sha1_read_key_len;
  10829. /* optional element for specifying TCP options data to include in
  10830. * transmit packets such as keep-alive
  10831. */
  10832. A_UINT32 tcp_options_len;
  10833. A_UINT8 tcp_options[40];
  10834. A_UINT32 async_id; /* keep-alive request id */
  10835. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  10836. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  10837. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  10838. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  10839. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  10840. typedef enum {
  10841. PKT_PWR_SAVE_PAID_MATCH = 0x00000001,
  10842. PKT_PWR_SAVE_GID_MATCH = 0x00000002,
  10843. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x00000004,
  10844. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x00000008,
  10845. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x00000010,
  10846. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x00000020,
  10847. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x00000040,
  10848. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x00000080,
  10849. PKT_PWR_SAVE_RSSI_CHECK = 0x00000100,
  10850. PKT_PWR_SAVE_5G_EBT = 0x00000200,
  10851. PKT_PWR_SAVE_2G_EBT = 0x00000400,
  10852. PKT_PWR_SAVE_BSS_COLOR_MISMATCH = 0x00000800,
  10853. PKT_PWR_SAVE_UL_FLAG = 0x00001000,
  10854. PKT_PWR_SAVE_STA_ID_MISMATCH = 0x00002000,
  10855. PKT_PWR_SAVE_MACADDR_MISMATCH_FCS = 0x00004000,
  10856. PKT_PWR_SAVE_ENABLE = 0x80000000,
  10857. } WMI_PKT_PWR_SAVE_TYPE;
  10858. typedef struct {
  10859. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  10860. A_UINT32 num_data; /** length in byte of data[]. */
  10861. /** pdev_id for identifying the MAC
  10862. * See macros starting with WMI_PDEV_ID_ for values.
  10863. */
  10864. A_UINT32 pdev_id;
  10865. /* This structure is used to send Factory Test Mode [FTM] command
  10866. * from host to firmware for integrated chips which are binary blobs.
  10867. * Following this structure is the TLV:
  10868. * A_UINT8 data[]; <-- length in byte given by field num_data.
  10869. */
  10870. } wmi_ftm_intg_cmd_fixed_param;
  10871. typedef struct {
  10872. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  10873. A_UINT32 num_data; /** length in byte of data[]. */
  10874. /* This structure is used to receive Factory Test Mode [FTM] event
  10875. * from firmware to host for integrated chips which are binary blobs.
  10876. * Following this structure is the TLV:
  10877. * A_UINT8 data[]; <-- length in byte given by field num_data.
  10878. */
  10879. } wmi_ftm_intg_event_fixed_param;
  10880. #define WMI_MAX_NS_OFFLOADS 2
  10881. #define WMI_MAX_ARP_OFFLOADS 2
  10882. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  10883. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  10884. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  10885. typedef struct {
  10886. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  10887. A_UINT32 flags; /* flags */
  10888. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  10889. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  10890. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  10891. } WMI_ARP_OFFLOAD_TUPLE;
  10892. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  10893. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  10894. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  10895. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  10896. #define WMI_NSOFF_MAX_TARGET_IPS 2
  10897. typedef struct {
  10898. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  10899. A_UINT32 flags; /* flags */
  10900. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  10901. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  10902. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  10903. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  10904. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  10905. } WMI_NS_OFFLOAD_TUPLE;
  10906. typedef struct {
  10907. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  10908. A_UINT32 flags;
  10909. A_UINT32 vdev_id;
  10910. A_UINT32 num_ns_ext_tuples;
  10911. /* Following this structure are the TLVs:
  10912. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  10913. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  10914. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  10915. */
  10916. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  10917. typedef struct {
  10918. A_UINT32 tlv_header;
  10919. A_UINT32 vdev_id;
  10920. A_UINT32 pattern_id;
  10921. A_UINT32 timeout;
  10922. A_UINT32 length;
  10923. /*Following this would be the pattern
  10924. A_UINT8 pattern[] of length specifed by length
  10925. field in the structure.*/
  10926. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  10927. typedef struct {
  10928. A_UINT32 tlv_header;
  10929. A_UINT32 vdev_id;
  10930. A_UINT32 pattern_id;
  10931. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  10932. typedef struct {
  10933. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  10934. /** unique id identifying the VDEV, generated by the caller */
  10935. A_UINT32 vdev_id;
  10936. /** peer MAC address */
  10937. wmi_mac_addr peer_macaddr;
  10938. /** Tid number */
  10939. A_UINT32 tid;
  10940. /** Initiator (1) or Responder (0) for this aggregation */
  10941. A_UINT32 initiator;
  10942. /** size of the negotiated window */
  10943. A_UINT32 window_size;
  10944. /** starting sequence number (only valid for initiator) */
  10945. A_UINT32 ssn;
  10946. /** timeout field represents the time to wait for Block Ack in
  10947. * initiator case and the time to wait for BAR in responder
  10948. * case. 0 represents no timeout. */
  10949. A_UINT32 timeout;
  10950. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  10951. A_UINT32 policy;
  10952. } wmi_peer_tid_addba_cmd_fixed_param;
  10953. typedef struct {
  10954. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  10955. /** unique id identifying the VDEV, generated by the caller */
  10956. A_UINT32 vdev_id;
  10957. /** peer MAC address */
  10958. wmi_mac_addr peer_macaddr;
  10959. /** Tid number */
  10960. A_UINT32 tid;
  10961. /** Initiator (1) or Responder (0) for this aggregation */
  10962. A_UINT32 initiator;
  10963. } wmi_peer_tid_delba_cmd_fixed_param;
  10964. typedef struct {
  10965. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  10966. /** unique id identifying the VDEV, generated by the caller */
  10967. A_UINT32 vdev_id;
  10968. /** peer MAC address */
  10969. wmi_mac_addr peer_macaddr;
  10970. /** Tid number */
  10971. A_UINT32 tid;
  10972. /** Event status */
  10973. A_UINT32 status;
  10974. } wmi_tx_addba_complete_event_fixed_param;
  10975. typedef struct {
  10976. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  10977. /** unique id identifying the VDEV, generated by the caller */
  10978. A_UINT32 vdev_id;
  10979. /** peer MAC address */
  10980. wmi_mac_addr peer_macaddr;
  10981. /** Tid number */
  10982. A_UINT32 tid;
  10983. /** Event status */
  10984. A_UINT32 status;
  10985. } wmi_tx_delba_complete_event_fixed_param;
  10986. /*
  10987. * Structure to request sequence numbers for a given
  10988. * peer station on different TIDs. The TIDs are
  10989. * indicated in the tidBitMap, tid 0 would
  10990. * be represented by LSB bit 0. tid 1 would be
  10991. * represented by LSB bit 1 etc.
  10992. * The target will retrieve the current sequence
  10993. * numbers for the peer on all the TIDs requested
  10994. * and send back a response in a WMI event.
  10995. */
  10996. typedef struct
  10997. {
  10998. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  10999. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  11000. wmi_mac_addr peer_macaddr;
  11001. A_UINT32 tidBitmap;
  11002. } wmi_ba_req_ssn;
  11003. typedef struct {
  11004. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11005. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  11006. /** unique id identifying the VDEV, generated by the caller */
  11007. A_UINT32 vdev_id;
  11008. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  11009. A_UINT32 num_ba_req_ssn;
  11010. /* Following this struc are the TLV's:
  11011. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  11012. */
  11013. } wmi_ba_req_ssn_cmd_fixed_param;
  11014. /*
  11015. * Max transmit categories
  11016. *
  11017. * Note: In future if we need to increase WMI_MAX_TC definition
  11018. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  11019. */
  11020. #define WMI_MAX_TC 8
  11021. /*
  11022. * Structure to send response sequence numbers
  11023. * for a give peer and tidmap.
  11024. */
  11025. typedef struct
  11026. {
  11027. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11028. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  11029. wmi_mac_addr peer_macaddr;
  11030. /* A boolean to indicate if ssn is present */
  11031. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  11032. /* The ssn from target, valid only if
  11033. * ssn_present_for_tid[tidn] equals 1
  11034. */
  11035. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  11036. } wmi_ba_event_ssn;
  11037. typedef struct {
  11038. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  11039. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  11040. /** unique id identifying the VDEV, generated by the caller */
  11041. A_UINT32 vdev_id;
  11042. /** Event status, success or failure of the overall operation */
  11043. A_UINT32 status;
  11044. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  11045. A_UINT32 num_ba_event_ssn;
  11046. /* Following this struc are the TLV's:
  11047. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  11048. */
  11049. } wmi_ba_rsp_ssn_event_fixed_param;
  11050. enum wmi_aggr_state_req_type {
  11051. WMI_DISABLE_AGGREGATION,
  11052. WMI_ENABLE_AGGREGATION
  11053. };
  11054. /*
  11055. * This event is generated by the COEX module
  11056. * when esco call is begins the coex module in fw genrated this event to host to
  11057. * disable the RX aggregation and after completion of the esco call fw will indicate to
  11058. * enable back the Rx aggregation .
  11059. */
  11060. typedef struct {
  11061. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  11062. /** unique id identifying the VDEV, generated by the caller */
  11063. A_UINT32 vdev_id;
  11064. /** req_type contains values from enum
  11065. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  11066. A_UINT32 req_type;
  11067. } wmi_aggr_state_trig_event_fixed_param;
  11068. typedef struct {
  11069. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  11070. /** unique id identifying the VDEV, generated by the caller */
  11071. A_UINT32 vdev_id;
  11072. /** MAC address used for installing */
  11073. wmi_mac_addr peer_macaddr;
  11074. /** key index */
  11075. A_UINT32 key_ix;
  11076. /** key flags */
  11077. A_UINT32 key_flags;
  11078. /** Event status */
  11079. A_UINT32 status;
  11080. } wmi_vdev_install_key_complete_event_fixed_param;
  11081. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  11082. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  11083. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  11084. WMI_NLO_AUTH_ALGO_WPA = 3,
  11085. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  11086. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  11087. WMI_NLO_AUTH_ALGO_RSNA = 6,
  11088. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  11089. } WMI_NLO_AUTH_ALGORITHM;
  11090. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  11091. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  11092. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  11093. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  11094. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  11095. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  11096. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  11097. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  11098. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  11099. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  11100. } WMI_NLO_CIPHER_ALGORITHM;
  11101. /* SSID broadcast type passed in NLO params */
  11102. typedef enum _WMI_NLO_SSID_BcastNwType
  11103. {
  11104. WMI_NLO_BCAST_UNKNOWN = 0,
  11105. WMI_NLO_BCAST_NORMAL = 1,
  11106. WMI_NLO_BCAST_HIDDEN = 2,
  11107. } WMI_NLO_SSID_BcastNwType;
  11108. #define WMI_NLO_MAX_SSIDS 16
  11109. #define WMI_NLO_MAX_CHAN 48
  11110. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  11111. #define WMI_NLO_CONFIG_START (0x1 << 1)
  11112. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  11113. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  11114. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  11115. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  11116. /* This bit is used to indicate if EPNO Profile is enabled */
  11117. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  11118. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  11119. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  11120. #define WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ (0x1 << 10)
  11121. #define WMI_NLO_CONFIG_RANDOM_SEQ_NO_IN_PROBE_REQ (0x1 << 11)
  11122. #define WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ (0x1 << 12)
  11123. #define WMI_NLO_CONFIG_ENABLE_CNLO_RSSI_CONFIG (0x1 << 13)
  11124. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  11125. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  11126. /* Whether PNO event shall be triggered if the network is found on A band */
  11127. #define WMI_ENLO_FLAG_A_BAND 2
  11128. /* Whether PNO event shall be triggered if the network is found on G band */
  11129. #define WMI_ENLO_FLAG_G_BAND 4
  11130. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  11131. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  11132. /* Code for matching the beacon AUTH IE - additional codes TBD */
  11133. /* open */
  11134. #define WMI_ENLO_AUTH_CODE_OPEN 1
  11135. /* WPA_PSK or WPA2PSK */
  11136. #define WMI_ENLO_AUTH_CODE_PSK 2
  11137. /* any EAPOL */
  11138. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  11139. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  11140. typedef struct wmi_nlo_ssid_param
  11141. {
  11142. A_UINT32 valid;
  11143. wmi_ssid ssid;
  11144. } wmi_nlo_ssid_param;
  11145. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  11146. typedef struct wmi_nlo_enc_param
  11147. {
  11148. A_UINT32 valid;
  11149. A_UINT32 enc_type;
  11150. } wmi_nlo_enc_param;
  11151. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  11152. typedef struct wmi_nlo_auth_param
  11153. {
  11154. A_UINT32 valid;
  11155. A_UINT32 auth_type;
  11156. } wmi_nlo_auth_param;
  11157. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  11158. typedef struct wmi_nlo_bcast_nw_param
  11159. {
  11160. A_UINT32 valid;
  11161. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  11162. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  11163. A_UINT32 bcast_nw_type;
  11164. } wmi_nlo_bcast_nw_param;
  11165. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  11166. typedef struct wmi_nlo_rssi_param
  11167. {
  11168. A_UINT32 valid;
  11169. A_INT32 rssi;
  11170. } wmi_nlo_rssi_param;
  11171. typedef struct nlo_configured_parameters {
  11172. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  11173. wmi_nlo_ssid_param ssid;
  11174. wmi_nlo_enc_param enc_type;
  11175. wmi_nlo_auth_param auth_type;
  11176. wmi_nlo_rssi_param rssi_cond;
  11177. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  11178. } nlo_configured_parameters;
  11179. /* Support channel prediction for PNO scan after scanning top_k_num channels
  11180. * if stationary_threshold is met.
  11181. */
  11182. typedef struct nlo_channel_prediction_cfg {
  11183. A_UINT32 tlv_header;
  11184. /* Enable or disable this feature. */
  11185. A_UINT32 enable;
  11186. /* Top K channels will be scanned before deciding whether to further scan
  11187. * or stop. Minimum value is 3 and maximum is 5. */
  11188. A_UINT32 top_k_num;
  11189. /* Preconfigured stationary threshold.
  11190. * Lesser value means more conservative. Bigger value means more aggressive.
  11191. * Maximum is 100 and mininum is 0. */
  11192. A_UINT32 stationary_threshold;
  11193. /* Periodic full channel scan in milliseconds unit.
  11194. * After full_scan_period_ms since last full scan, channel prediction
  11195. * scan is suppressed and will do full scan.
  11196. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  11197. * full scan at all (not recommended).
  11198. */
  11199. A_UINT32 full_scan_period_ms;
  11200. } nlo_channel_prediction_cfg;
  11201. typedef struct enlo_candidate_score_params_t {
  11202. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  11203. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  11204. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  11205. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  11206. /* current_connection_bonus:
  11207. * only report when there is a network's score this much higher
  11208. * than the current connection
  11209. */
  11210. A_UINT32 current_connection_bonus;
  11211. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  11212. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  11213. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  11214. } enlo_candidate_score_params;
  11215. typedef struct connected_nlo_bss_band_rssi_pref_t {
  11216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_bss_band_rssi_pref */
  11217. /** band which needs to get preference over other band - see wmi_set_vdev_ie_band enum */
  11218. A_UINT32 band;
  11219. /* Amount of RSSI preference (in dB) that can be given to band (mentioned above) over other band */
  11220. A_INT32 rssi_pref;
  11221. } connected_nlo_bss_band_rssi_pref;
  11222. typedef struct connected_nlo_rssi_params_t {
  11223. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params */
  11224. /* Relative rssi threshold (in dB) by which new BSS should have better rssi than
  11225. * the current connected BSS.
  11226. */
  11227. A_INT32 relative_rssi;
  11228. /* The amount of rssi preference (in dB) that can be given to a 5G BSS over 2.4G BSS. */
  11229. A_INT32 relative_rssi_5g_pref;
  11230. } connected_nlo_rssi_params;
  11231. typedef struct wmi_nlo_config {
  11232. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  11233. A_UINT32 flags;
  11234. A_UINT32 vdev_id;
  11235. A_UINT32 fast_scan_max_cycles;
  11236. A_UINT32 active_dwell_time;
  11237. A_UINT32 passive_dwell_time; /* PDT in msecs */
  11238. A_UINT32 probe_bundle_size;
  11239. A_UINT32 rest_time; /* ART = IRT */
  11240. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  11241. A_UINT32 scan_backoff_multiplier; /* SBM */
  11242. A_UINT32 fast_scan_period; /* SCBM */
  11243. A_UINT32 slow_scan_period; /* specific to windows */
  11244. A_UINT32 no_of_ssids;
  11245. A_UINT32 num_of_channels;
  11246. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  11247. /** MAC Address to use in Probe Req as SA **/
  11248. wmi_mac_addr mac_addr;
  11249. /** Mask on which MAC has to be randomized **/
  11250. wmi_mac_addr mac_mask;
  11251. /** IE bitmap to use in Probe Req **/
  11252. A_UINT32 ie_bitmap[WMI_IE_BITMAP_SIZE];
  11253. /** Number of vendor OUIs. In the TLV vendor_oui[] **/
  11254. A_UINT32 num_vendor_oui;
  11255. /** Number of connected NLO band preferences **/
  11256. A_UINT32 num_cnlo_band_pref;
  11257. /* The TLVs will follow.
  11258. * nlo_configured_parameters nlo_list[];
  11259. * A_UINT32 channel_list[num_of_channels];
  11260. * nlo_channel_prediction_cfg ch_prediction_cfg;
  11261. * enlo_candidate_score_params candidate_score_params;
  11262. * wmi_vendor_oui vendor_oui[num_vendor_oui];
  11263. * connected_nlo_rssi_params cnlo_rssi_params;
  11264. * connected_nlo_bss_band_rssi_pref cnlo_bss_band_rssi_pref[num_cnlo_band_pref];
  11265. */
  11266. } wmi_nlo_config_cmd_fixed_param;
  11267. typedef struct wmi_nlo_event
  11268. {
  11269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  11270. A_UINT32 vdev_id;
  11271. } wmi_nlo_event;
  11272. /* WMI_PASSPOINT_CONFIG_SET
  11273. * Sets a list for passpoint networks for PNO purposes;
  11274. * it should be matched against any passpoint networks found
  11275. * during regular PNO scan.
  11276. */
  11277. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  11278. /* WMI_PASSPOINT_CONFIG_RESET
  11279. * Reset passpoint network list -
  11280. * no Passpoint networks should be matched after this.
  11281. */
  11282. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  11283. #define PASSPOINT_REALM_LEN 256
  11284. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  11285. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  11286. #define PASSPOINT_PLMN_ID_LEN 3
  11287. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  11288. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  11289. /*
  11290. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  11291. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  11292. * array will end on a 4-byte boundary.
  11293. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11294. */
  11295. A_COMPILE_TIME_ASSERT(
  11296. check_passpoint_realm_size,
  11297. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  11298. /*
  11299. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  11300. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  11301. * roaming_consortium_ids array below will end on a 4-byte boundary.
  11302. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  11303. */
  11304. A_COMPILE_TIME_ASSERT(
  11305. check_passpoint_roaming_consortium_ids_size,
  11306. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  11307. /* wildcard ID to allow an action (reset) to apply to all networks */
  11308. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  11309. typedef struct wmi_passpoint_config {
  11310. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  11311. /* (network) id
  11312. * identifier of the matched network, report this in event
  11313. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  11314. * that indicates the action should be applied to all networks.
  11315. * Currently, the only action that is applied to all networks is "reset".
  11316. * If a non-wildcard ID is specified, that particular network is configured.
  11317. * If a wildcard ID is specified, all networks are reset.
  11318. */
  11319. A_UINT32 id;
  11320. A_UINT32 req_id;
  11321. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  11322. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  11323. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  11324. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  11325. } wmi_passpoint_config_cmd_fixed_param;
  11326. typedef struct {
  11327. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  11328. A_UINT32 id; /* identifier of the matched network */
  11329. A_UINT32 vdev_id;
  11330. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  11331. wmi_ssid ssid;
  11332. wmi_mac_addr bssid; /* bssid of the network */
  11333. A_UINT32 channel_mhz; /* channel frequency in MHz */
  11334. A_UINT32 rssi; /* rssi value */
  11335. A_UINT32 rtt; /* timestamp in nanoseconds*/
  11336. A_UINT32 rtt_sd; /* standard deviation in rtt */
  11337. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  11338. A_UINT32 capability; /* capabilities advertised in the beacon */
  11339. A_UINT32 ie_length; /* size of the ie_data blob */
  11340. A_UINT32 anqp_length; /* length of ANQP blob */
  11341. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  11342. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  11343. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  11344. * 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.
  11345. */
  11346. } wmi_passpoint_event_hdr;
  11347. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  11348. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  11349. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  11350. /** Disable GTK offload */
  11351. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  11352. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  11353. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  11354. enum wmi_chatter_mode {
  11355. /* Chatter enter/exit happens
  11356. * automatically based on preset
  11357. * params
  11358. */
  11359. WMI_CHATTER_MODE_AUTO,
  11360. /* Chatter enter is triggered
  11361. * manually by the user
  11362. */
  11363. WMI_CHATTER_MODE_MANUAL_ENTER,
  11364. /* Chatter exit is triggered
  11365. * manually by the user
  11366. */
  11367. WMI_CHATTER_MODE_MANUAL_EXIT,
  11368. /* Placeholder max value, always last*/
  11369. WMI_CHATTER_MODE_MAX
  11370. };
  11371. enum wmi_chatter_query_type {
  11372. /*query coalescing filter match counter*/
  11373. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  11374. WMI_CHATTER_QUERY_MAX
  11375. };
  11376. typedef struct {
  11377. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  11378. A_UINT32 chatter_mode;
  11379. } wmi_chatter_set_mode_cmd_fixed_param;
  11380. /** maximum number of filter supported*/
  11381. #define CHATTER_MAX_COALESCING_RULES 11
  11382. /** maximum number of field tests per filter*/
  11383. #define CHATTER_MAX_FIELD_TEST 5
  11384. /** maximum field length in number of DWORDS*/
  11385. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  11386. /** field test kinds*/
  11387. #define CHATTER_COALESCING_TEST_EQUAL 1
  11388. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  11389. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  11390. /** packet type*/
  11391. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  11392. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  11393. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  11394. /** coalescing field test*/
  11395. typedef struct _chatter_pkt_coalescing_hdr_test {
  11396. /** offset from start of mac header, for windows native wifi host driver
  11397. * should assume standard 802.11 frame format without QoS info and address4
  11398. * FW would account for any non-stand fields for final offset value.
  11399. */
  11400. A_UINT32 offset;
  11401. A_UINT32 length; /* length of test field*/
  11402. A_UINT32 test; /*equal, not equal or masked equal*/
  11403. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  11404. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  11405. } chatter_pkt_coalescing_hdr_test;
  11406. /** packet coalescing filter*/
  11407. typedef struct _chatter_pkt_coalescing_filter {
  11408. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  11409. A_UINT32 filter_id; /*unique id assigned by OS*/
  11410. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  11411. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  11412. A_UINT32 num_of_test_field; /*number of field test in table*/
  11413. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  11414. } chatter_pkt_coalescing_filter;
  11415. /** packet coalescing filter add command*/
  11416. typedef struct {
  11417. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  11418. A_UINT32 num_of_filters;
  11419. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  11420. chatter_pkt_coalescing_filter rx_filter[1];*/
  11421. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  11422. /** packet coalescing filter delete command*/
  11423. typedef struct {
  11424. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  11425. A_UINT32 filter_id; /*filter id which will be deleted*/
  11426. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  11427. /** packet coalescing query command*/
  11428. typedef struct {
  11429. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  11430. A_UINT32 type; /*type of query*/
  11431. } wmi_chatter_coalescing_query_cmd_fixed_param;
  11432. /** chatter query reply event*/
  11433. typedef struct {
  11434. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  11435. A_UINT32 type; /*query type*/
  11436. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  11437. } wmi_chatter_query_reply_event_fixed_param;
  11438. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  11439. * cannot be changed without breaking WMI compatibility. */
  11440. #define GTK_OFFLOAD_KEK_BYTES 16
  11441. #define GTK_OFFLOAD_KCK_BYTES 16
  11442. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  11443. #define GTK_REPLAY_COUNTER_BYTES 8
  11444. #define WMI_MAX_KEY_LEN 32
  11445. #define IGTK_PN_SIZE 6
  11446. typedef struct {
  11447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  11448. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11449. A_UINT32 flags; /* status flags */
  11450. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  11451. /*
  11452. * As with all WMI messages, this message uses little-endian byte
  11453. * ordering within each A_UINT32 field.
  11454. * If a big-endian host is using automatic swapping of the bytes within
  11455. * each 4-byte A_UINT32 to automatically correct the endianness of the
  11456. * A_UINT32 fields as the message is uploaded from target --> host, the
  11457. * big-endian host will have to undo the automatic byte swapping for the
  11458. * below A_UINT8 fields, to restore them to their original order.
  11459. */
  11460. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  11461. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  11462. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  11463. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  11464. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  11465. A_UINT8 gtk_keyIndex; /* GTK key index */
  11466. A_UINT8 gtk_keyLength; /* GTK key length */
  11467. A_UINT8 gtk_keyRSC[GTK_REPLAY_COUNTER_BYTES]; /* GTK key replay sequence counter */
  11468. A_UINT8 gtk_key[WMI_MAX_KEY_LEN]; /* GTK key data */
  11469. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  11470. typedef struct {
  11471. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  11472. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11473. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  11474. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  11475. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  11476. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  11477. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  11478. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  11479. typedef struct {
  11480. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_offload_extended_tlv_param */
  11481. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  11482. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  11483. A_UINT32 kek_len;
  11484. A_UINT8 KEK[GTK_OFFLOAD_KEK_EXTENDED_BYTES]; /* key encryption key */
  11485. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  11486. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  11487. } wmi_gtk_offload_fils_tlv_param;
  11488. typedef struct {
  11489. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  11490. A_UINT32 vdev_id;
  11491. A_UINT32 sa_query_retry_interval; /* in msec */
  11492. A_UINT32 sa_query_max_retry_count;
  11493. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  11494. typedef enum {
  11495. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  11496. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  11497. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  11498. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  11499. } WMI_STA_KEEPALIVE_METHOD;
  11500. typedef struct {
  11501. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  11502. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  11503. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  11504. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  11505. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  11506. typedef struct {
  11507. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  11508. A_UINT32 vdev_id;
  11509. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  11510. A_UINT32 method; /* keep alive method */
  11511. A_UINT32 interval; /* time interval in seconds */
  11512. /*
  11513. * NOTE: following this structure is the TLV for ARP Resonse:
  11514. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  11515. */
  11516. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  11517. typedef struct {
  11518. A_UINT32 tlv_header;
  11519. A_UINT32 vdev_id;
  11520. A_UINT32 action;
  11521. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  11522. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  11523. typedef struct {
  11524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  11525. A_UINT32 vdev_id;
  11526. A_UINT32 keepaliveInterval; /* seconds */
  11527. A_UINT32 keepaliveMethod;
  11528. } wmi_vdev_set_keepalive_cmd_fixed_param;
  11529. typedef struct {
  11530. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  11531. A_UINT32 vdev_id;
  11532. } wmi_vdev_get_keepalive_cmd_fixed_param;
  11533. typedef struct {
  11534. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  11535. A_UINT32 vdev_id;
  11536. A_UINT32 keepaliveInterval; /* seconds */
  11537. A_UINT32 keepaliveMethod; /* seconds */
  11538. } wmi_vdev_get_keepalive_event_fixed_param;
  11539. typedef enum {
  11540. WMI_CLEAR_ARP_STATS_COLLECTED = 0x0,
  11541. WMI_START_ARP_STATS_COLLECTION,
  11542. } WMI_ARP_STATS_ACTION;
  11543. typedef enum {
  11544. WMI_ARP_STATS_RX_PKT_TYPE_ARP = 0x1,
  11545. } WMI_ARP_STATS_RX_PKT_TYPE;
  11546. typedef enum {
  11547. WMI_BA_SESSION_ESTABLISHMENT_STATUS_SUCCESS = 0x0,
  11548. WMI_BA_SESSION_ESTABLISHMENT_STATUS_FAILURE,
  11549. } WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS;
  11550. typedef enum {
  11551. WMI_CONNECTION_STATUS_FAILURE = 0x0,
  11552. WMI_CONNECTION_STATUS_SUCCESS,
  11553. } WMI_ARP_STATS_CONNECTION_STATUS;
  11554. /* ARP stats set (configure) req */
  11555. typedef struct {
  11556. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_arp_stats_cmd_fixed_param */
  11557. A_UINT32 vdev_id;
  11558. A_UINT32 set_clr; /* WMI_ARP_STATS_ACTION */
  11559. A_UINT32 pkt_type; /* WMI_ARP_STATS_RX_PKT_TYPE */
  11560. A_UINT32 ipv4; /* target will maintain ARP stats (only) for frames containing this IP address */
  11561. } wmi_vdev_set_arp_stats_cmd_fixed_param;
  11562. /* ARP stats get req */
  11563. typedef struct {
  11564. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_cmd_fixed_param */
  11565. A_UINT32 vdev_id;
  11566. } wmi_vdev_get_arp_stats_cmd_fixed_param;
  11567. /* per vdev based ARP stats */
  11568. typedef struct {
  11569. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_arp_stats_event_fixed_param */
  11570. A_UINT32 vdev_id;
  11571. A_UINT32 arp_req_enqueue;
  11572. A_UINT32 arp_req_tx_success;
  11573. A_UINT32 arp_req_tx_failure; /* number of times a tx MPDU containing a unicast ARP request went unacked */
  11574. A_UINT32 arp_rsp_recvd;
  11575. A_UINT32 out_of_order_arp_rsp_drop_cnt;
  11576. A_UINT32 dad_detected; /* duplicate address detection */
  11577. A_UINT32 connect_status; /* WMI_ARP_STATS_CONNECTION_STATUS */
  11578. A_UINT32 ba_session_establishment_status; /* WMI_ARP_STATS_BA_SESSION_ESTABLISH_STATUS */
  11579. } wmi_vdev_get_arp_stats_event_fixed_param;
  11580. typedef struct {
  11581. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_connectivity_check_stats */
  11582. A_UINT32 pkt_type_bitmap; /* WMI_IP_CONNECTIVITY_STATS_RX_PKT_TYPE_BITMAP - only for DNS, TCP and ICMP */
  11583. A_UINT32 tcp_src_port; /* target will maintain TCP stats (only) for frames with this src port */
  11584. A_UINT32 tcp_dst_port; /* target will maintain TCP stats (only) for frames with this dst port */
  11585. A_UINT32 icmp_ipv4; /* target will maintain ICMPv4 stats (only) for frames containing this IP address */
  11586. } wmi_vdev_set_connectivity_check_stats;
  11587. /* per vdev dns/icmp/tcp based stats*/
  11588. typedef struct {
  11589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_connectivity_check_stats */
  11590. A_UINT32 tcp_ack_recvd; /* number of tcp syn ack's received by FW */
  11591. A_UINT32 icmpv4_rsp_recvd; /* number of icmpv4 responses received by FW */
  11592. } wmi_vdev_get_connectivity_check_stats;
  11593. typedef struct {
  11594. A_UINT32 tlv_header;
  11595. A_UINT32 vdev_id;
  11596. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  11597. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  11598. A_UINT32 action;
  11599. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  11600. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  11601. typedef struct {
  11602. A_UINT32 tlv_header;
  11603. A_UINT32 vdev_id;
  11604. A_UINT32 mcc_tbttmode;
  11605. wmi_mac_addr mcc_bssid;
  11606. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  11607. #define WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION 10
  11608. #define WMI_MAX_VENDOR_OUI_DATA_LENGTH 20
  11609. typedef enum
  11610. {
  11611. WMI_VENDOR_OUI_ACTION_CONNECTION_1X1 = 0, /* Connect in 1X1 only */
  11612. 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 */
  11613. WMI_VENDOR_OUI_ACTION_CCKM_1X1 = 2, /* TX (only) CCKM rates with 1 chain only */
  11614. WMI_VENDOR_OUI_ACTION_ALT_ITO = 3, /* inactivity time-out */
  11615. WMI_VENDOR_OUI_ACTION_SWITCH_TO_11N_MODE = 4, /* Switch from 11ac to 11n mode to avoid IOT issues with ONM frame */
  11616. /* Add any action before this line */
  11617. WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID
  11618. } wmi_vendor_oui_action_id;
  11619. typedef struct {
  11620. A_UINT32 tlv_header;
  11621. /** vendor OUI actions */
  11622. A_UINT32 action_id; /* enum wmi_vendor_oui_action_id */
  11623. A_UINT32 total_num_vendor_oui; /* total number of OUI present in ini for all actions.
  11624. ** For first command, this value will be used for allocating memory in FW accordingly */
  11625. A_UINT32 num_vendor_oui_ext; /* the number of wmi_vendor_oui_ext for action_id */
  11626. /* followed by TLVs, an array of structure of type wmi_vendor_oui_ext
  11627. ** wmi_vendor_oui_ext vendor_oui_ext[num_vendor_oui_ext];
  11628. */
  11629. /* followed by A_UINT8 data[] of concatenated data for each vendor_oui_ext[] element
  11630. ** first byte contains the index i of structure vendor_oui_ext[]
  11631. ** for which data is coming and length of the data is extracted as
  11632. ** wmi_vendor_oui_ext[i].buf_data_length. No padding between data of
  11633. ** N th OUI and (N+1) th OUI.
  11634. ** For example, if vendor_oui_ext[0].buf_data_length is 18, then
  11635. ** data[0] will hold the index value 0, data[1] through data[17]
  11636. ** will hold the OUI data for this first OUI, data[18] will hold
  11637. ** the index value 1, and the OUI data for the second OUI will
  11638. ** begin at data[19].
  11639. */
  11640. } wmi_pdev_config_vendor_oui_action_fixed_param;
  11641. typedef struct {
  11642. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param */
  11643. /** pdev_id for identifying the MAC
  11644. * See macros starting with WMI_PDEV_ID_ for values.
  11645. */
  11646. A_UINT32 pdev_id;
  11647. /** AC number */
  11648. A_UINT32 ac; /* refer to wmi_traffic_ac */
  11649. /**
  11650. * Enable/disable tx queue optimizations (such as dropping stale tx frms)
  11651. * for the specified AC.
  11652. */
  11653. A_UINT32 ac_tx_queue_optimize_enable;
  11654. } wmi_pdev_set_ac_tx_queue_optimized_cmd_fixed_param;
  11655. typedef struct {
  11656. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param */
  11657. /** pdev_id for identifying the MAC
  11658. * See macros starting with WMI_PDEV_ID_ for values.
  11659. */
  11660. A_UINT32 pdev_id;
  11661. /** Enable/disable rx filter promiscuous */
  11662. A_UINT32 rx_filter_promiscuous_enable;
  11663. } wmi_pdev_set_rx_filter_promiscuous_cmd_fixed_param;
  11664. typedef enum {
  11665. WMI_BEACON_INFO_PRESENCE_OUI_EXT = 1 << 0,
  11666. WMI_BEACON_INFO_PRESENCE_MAC_ADDRESS = 1 << 1,
  11667. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_NSS = 1 << 2,
  11668. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_HT = 1 << 3,
  11669. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_VHT = 1 << 4,
  11670. WMI_BEACON_INFO_PRESENCE_AP_CAPABILITY_BAND = 1 << 5,
  11671. } wmi_beacon_info_presence_items;
  11672. typedef struct _wmi_vendor_oui_ext {
  11673. A_UINT32 tlv_header;
  11674. A_UINT32 buf_data_length; /* length of data in bytes for this OUI including index byte */
  11675. A_UINT32 info_presence_bit_mask; /* see enum wmi_beacon_info_presence_items */
  11676. A_UINT32 oui_header_length; /* either 3 or 5 bytes */
  11677. 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 */
  11678. A_UINT32 mac_address_length; /* MAC address length in bytes
  11679. ** (This value will always be 6,
  11680. ** but is explicitly specified for sake
  11681. ** of uniformity and completeness).
  11682. */
  11683. A_UINT32 capability_data_length; /* length of capability in bytes */
  11684. } wmi_vendor_oui_ext;
  11685. #define WMI_INFO_CAPABILITY_NSS_MASK 0x0f
  11686. #define WMI_INFO_CAPABILITY_NSS_OFFSET 0
  11687. #define WMI_INFO_CAPABILITY_HT_ENABLE_MASK 0x10
  11688. #define WMI_INFO_CAPABILITY_HT_ENABLE_OFFSET 4
  11689. #define WMI_INFO_CAPABILITY_VHT_ENABLE_MASK 0x20
  11690. #define WMI_INFO_CAPABILITY_VHT_ENABLE_OFFSET 5
  11691. #define WMI_INFO_CAPABILITY_BAND_MASK 0xc0
  11692. #define WMI_INFO_CAPABILITY_BAND_OFFSET 6
  11693. /* definition of WMI_INFO_CAPABILITY_NSS_MASK */
  11694. #define WMI_INFO_CAPABILITY_NSS_1X1 1
  11695. #define WMI_INFO_CAPABILITY_NSS_2X2 2
  11696. #define WMI_INFO_CAPABILITY_NSS_3X3 3
  11697. #define WMI_INFO_CAPABILITY_NSS_4X4 4
  11698. /* definition of WMI_INFO_CAPABILITY_BAND_MASK */
  11699. #define WMI_INFO_CAPABILITY_2G_BAND_MASK (1 << 0)
  11700. #define WMI_INFO_CAPABILITY_5G_BAND_MASK (1 << 1)
  11701. typedef struct {
  11702. A_UINT32 tlv_header;
  11703. A_UINT32 vdev_id; /* home vdev id */
  11704. A_UINT32 meas_token; /* from measure request frame */
  11705. A_UINT32 dialog_token;
  11706. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  11707. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  11708. A_UINT32 burst_cycle; /* times cycle through within one burst */
  11709. A_UINT32 tx_power; /* for path frame */
  11710. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  11711. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  11712. A_UINT32 num_chans;
  11713. } wmi_vdev_plmreq_start_cmd_fixed_param;
  11714. typedef struct {
  11715. A_UINT32 tlv_header;
  11716. A_UINT32 vdev_id;
  11717. A_UINT32 meas_token; /* same value from req*/
  11718. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  11719. typedef struct {
  11720. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  11721. A_UINT32 tlv_header;
  11722. /* unique id identifying the VDEV, generated by the caller */
  11723. A_UINT32 vdev_id;
  11724. /* enable/disable NoA */
  11725. A_UINT32 enable;
  11726. /** number of NoA desc. In the TLV noa_descriptor[] */
  11727. A_UINT32 num_noa;
  11728. /**
  11729. * TLV (tag length value) paramerters follow the pattern structure.
  11730. * TLV contain NoA desc with num of num_noa
  11731. */
  11732. } wmi_p2p_set_noa_cmd_fixed_param;
  11733. typedef struct {
  11734. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  11735. A_UINT32 tlv_header;
  11736. /* unique id identifying the VDEV, generated by the caller */
  11737. A_UINT32 vdev_id;
  11738. /* Identify the wlan module */
  11739. A_UINT32 module_id;
  11740. /* Num of test arguments passed */
  11741. A_UINT32 num_args;
  11742. /* unique id identifying the unit test cmd, generated by the caller */
  11743. A_UINT32 diag_token;
  11744. /**
  11745. * TLV (tag length value) parameters follow the wmi_unit_test_cmd_fixed_param
  11746. * structure. The TLV's are:
  11747. * A_UINT32 args[];
  11748. **/
  11749. } wmi_unit_test_cmd_fixed_param;
  11750. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  11751. * after it received WMI_ROAM_SYNCH_EVENTID.
  11752. */
  11753. typedef struct {
  11754. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  11755. /** unique id identifying the VDEV, generated by the caller */
  11756. A_UINT32 vdev_id;
  11757. } wmi_roam_synch_complete_fixed_param;
  11758. typedef enum {
  11759. RECOVERY_SIM_ASSERT = 0x01,
  11760. RECOVERY_SIM_NO_DETECT = 0x02,
  11761. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  11762. RECOVERY_SIM_EMPTY_POINT = 0x04,
  11763. RECOVERY_SIM_STACK_OV = 0x05,
  11764. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  11765. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  11766. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  11767. } RECOVERY_SIM_TYPE;
  11768. /* WMI_FORCE_FW_HANG_CMDID */
  11769. typedef struct {
  11770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  11771. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  11772. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  11773. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  11774. typedef enum {
  11775. WMI_MCAST_FILTER_SET = 1,
  11776. WMI_MCAST_FILTER_DELETE
  11777. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  11778. typedef struct {
  11779. A_UINT32 tlv_header;
  11780. A_UINT32 vdev_id;
  11781. A_UINT32 index;
  11782. A_UINT32 action;
  11783. wmi_mac_addr mcastbdcastaddr;
  11784. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  11785. typedef enum {
  11786. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  11787. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  11788. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  11789. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  11790. } WMI_MULTIPLE_MCAST_FILTER_OP;
  11791. typedef struct {
  11792. A_UINT32 tlv_header;
  11793. A_UINT32 vdev_id;
  11794. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  11795. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  11796. /**
  11797. * TLV (tag length value) parameters follow the
  11798. * structure. The TLV's are:
  11799. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  11800. */
  11801. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  11802. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  11803. typedef enum {
  11804. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  11805. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  11806. } WMI_TIME_STAMP_SYNC_MODE;
  11807. typedef struct {
  11808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  11809. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  11810. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  11811. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  11812. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  11813. /* GPIO Command and Event data structures */
  11814. /* WMI_GPIO_CONFIG_CMDID */
  11815. enum {
  11816. WMI_GPIO_PULL_NONE,
  11817. WMI_GPIO_PULL_UP,
  11818. WMI_GPIO_PULL_DOWN,
  11819. };
  11820. enum {
  11821. WMI_GPIO_INTTYPE_DISABLE,
  11822. WMI_GPIO_INTTYPE_RISING_EDGE,
  11823. WMI_GPIO_INTTYPE_FALLING_EDGE,
  11824. WMI_GPIO_INTTYPE_BOTH_EDGE,
  11825. WMI_GPIO_INTTYPE_LEVEL_LOW,
  11826. WMI_GPIO_INTTYPE_LEVEL_HIGH
  11827. };
  11828. typedef struct {
  11829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  11830. A_UINT32 gpio_num; /* GPIO number to be setup */
  11831. A_UINT32 input; /* 0 - Output/ 1 - Input */
  11832. A_UINT32 pull_type; /* Pull type defined above */
  11833. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  11834. /* mux_config_val - configure pin MUX
  11835. * A value of 0x0 for this field means to use the default MUX configuration.
  11836. * Valid non-zero values are as follows:
  11837. * Rome:
  11838. * 0x4 - use the pin as GPIO (rather than UART)
  11839. */
  11840. A_UINT32 mux_config_val;
  11841. } wmi_gpio_config_cmd_fixed_param;
  11842. /* WMI_GPIO_OUTPUT_CMDID */
  11843. typedef struct {
  11844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  11845. A_UINT32 gpio_num; /* GPIO number to be setup */
  11846. A_UINT32 set; /* Set the GPIO pin*/
  11847. } wmi_gpio_output_cmd_fixed_param;
  11848. /* WMI_GPIO_INPUT_EVENTID */
  11849. typedef struct {
  11850. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  11851. A_UINT32 gpio_num; /* GPIO number which changed state */
  11852. } wmi_gpio_input_event_fixed_param;
  11853. /* WMI_P2P_DISC_EVENTID */
  11854. enum {
  11855. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  11856. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  11857. };
  11858. enum {
  11859. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  11860. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  11861. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  11862. };
  11863. enum {
  11864. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  11865. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  11866. };
  11867. typedef struct {
  11868. A_UINT32 vdev_id;
  11869. A_UINT32 reason; /* P2P DISC wake up reason*/
  11870. } wmi_p2p_disc_event;
  11871. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  11872. typedef enum {
  11873. WMI_FAKE_TXBFER_SEND_NDPA,
  11874. WMI_FAKE_TXBFER_SEND_MU,
  11875. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  11876. WMI_FAKE_TXBFER_NDPA_NCIDX,
  11877. WMI_FAKE_TXBFER_NDPA_POLL,
  11878. WMI_FAKE_TXBFER_NDPA_BW,
  11879. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  11880. WMI_FAKE_TXBFER_NDPA_RATE,
  11881. WMI_FAKE_TXBFER_NDP_BW,
  11882. WMI_FAKE_TXBFER_NDP_NSS,
  11883. WMI_TXBFEE_ENABLE_UPLOAD_H,
  11884. WMI_TXBFEE_ENABLE_CAPTURE_H,
  11885. WMI_TXBFEE_SET_CBF_TBL,
  11886. WMI_TXBFEE_CBF_TBL_LSIG,
  11887. WMI_TXBFEE_CBF_TBL_SIGA1,
  11888. WMI_TXBFEE_CBF_TBL_SIGA2,
  11889. WMI_TXBFEE_CBF_TBL_SIGB,
  11890. WMI_TXBFEE_CBF_TBL_PAD,
  11891. WMI_TXBFEE_CBF_TBL_DUR,
  11892. WMI_TXBFEE_SU_NCIDX,
  11893. WMI_TXBFEE_CBIDX,
  11894. WMI_TXBFEE_NGIDX,
  11895. } WMI_TXBF_PARAM_ID;
  11896. typedef struct {
  11897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  11898. /** parameter id */
  11899. A_UINT32 param_id;
  11900. /** parameter value */
  11901. A_UINT32 param_value;
  11902. } wmi_txbf_cmd_fixed_param;
  11903. typedef struct {
  11904. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  11905. A_UINT32 h_length;
  11906. A_UINT32 cv_length;
  11907. /* This TLV is followed by array of bytes:
  11908. * A_UINT8 bufp[]; <-- h_cv info buffer
  11909. */
  11910. } wmi_upload_h_hdr;
  11911. typedef struct {
  11912. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  11913. A_UINT32 svd_num;
  11914. A_UINT32 tone_num;
  11915. A_UINT32 reserved;
  11916. } wmi_capture_h_event_hdr;
  11917. typedef struct {
  11918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  11919. A_UINT32 start_freq; /* start frequency, not channel center freq */
  11920. A_UINT32 end_freq; /* end frequency */
  11921. } wmi_avoid_freq_range_desc;
  11922. typedef struct {
  11923. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  11924. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  11925. A_UINT32 num_freq_ranges;
  11926. /* The TLVs will follow.
  11927. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  11928. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  11929. */
  11930. } wmi_avoid_freq_ranges_event_fixed_param;
  11931. enum {
  11932. WMI_SAR2_SUCCESS = 0,
  11933. WMI_SAR2_INVALID_ANTENNA_INDEX = 1,
  11934. WMI_SAR2_INVALID_TABLE_INDEX = 2,
  11935. WMI_SAR2_STATE_ERROR = 4,
  11936. WMI_SAR2_BDF_NO_TABLE = 8,
  11937. };
  11938. typedef struct {
  11939. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar2_result_event_fixed_param */
  11940. A_UINT32 result; /* refer to the above WMI_SAR2_ result definitions */
  11941. } wmi_sar2_result_event_fixed_param;
  11942. typedef struct {
  11943. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  11944. /** Reserved for future use */
  11945. A_UINT32 reserved0;
  11946. A_UINT32 vdev_id;
  11947. } wmi_gtk_rekey_fail_event_fixed_param;
  11948. typedef enum WLAN_COEX_EVENT {
  11949. WLAN_COEX_EVENT_BT_NONE = 0,
  11950. WLAN_COEX_EVENT_BT_A2DP_PROFILE_ADD = 1,
  11951. WLAN_COEX_EVENT_BT_A2DP_PROFILE_REMOVE = 2,
  11952. WLAN_COEX_EVENT_BT_VOICE_PROFILE_ADD = 3,
  11953. WLAN_COEX_EVENT_BT_VOICE_PROFILE_REMOVE = 4,
  11954. WLAN_COEX_EVENT_BT_SCAN_START = 5,
  11955. WLAN_COEX_EVENT_BT_SCAN_STOP = 6,
  11956. }WLAN_COEX_EVENT;
  11957. typedef struct {
  11958. A_UINT32 tlv_header;
  11959. A_UINT32 coex_profile_evt; //uses the enum values form WLAN_COEX_EVENT
  11960. } wmi_coex_bt_activity_event_fixed_param;
  11961. enum wmm_ac_downgrade_policy {
  11962. WMM_AC_DOWNGRADE_DEPRIO,
  11963. WMM_AC_DOWNGRADE_DROP,
  11964. WMM_AC_DOWNGRADE_INVALID,
  11965. };
  11966. /* WMM EDCA Params type */
  11967. #define WMM_PARAM_TYPE_LEGACY 0
  11968. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  11969. #define WMM_PARAM_TYPE_11AX_EDCA 1
  11970. typedef struct {
  11971. A_UINT32 tlv_header;
  11972. A_UINT32 cwmin;
  11973. A_UINT32 cwmax;
  11974. A_UINT32 aifs;
  11975. union {
  11976. A_UINT32 txoplimit;
  11977. A_UINT32 mu_edca_timer;
  11978. };
  11979. A_UINT32 acm;
  11980. A_UINT32 no_ack;
  11981. } wmi_wmm_vparams;
  11982. typedef struct {
  11983. A_UINT32 tlv_header;
  11984. A_UINT32 vdev_id;
  11985. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  11986. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  11987. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  11988. typedef struct {
  11989. A_UINT32 tlv_header;
  11990. A_UINT32 vdev_id;
  11991. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  11992. A_UINT32 userGtxMask; /* host request for GTX mask */
  11993. A_UINT32 gtxPERThreshold; /* default: 10% */
  11994. A_UINT32 gtxPERMargin; /* default: 2% */
  11995. A_UINT32 gtxTPCstep; /* default: 1 */
  11996. A_UINT32 gtxTPCMin; /* default: 5 */
  11997. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  11998. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  11999. typedef struct
  12000. {
  12001. A_UINT32 tlv_header;
  12002. A_UINT32 vdev_id;
  12003. A_UINT32 ac;
  12004. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  12005. A_UINT32 downgrade_type;
  12006. } wmi_vdev_wmm_addts_cmd_fixed_param;
  12007. typedef struct
  12008. {
  12009. A_UINT32 tlv_header;
  12010. A_UINT32 vdev_id;
  12011. A_UINT32 ac;
  12012. } wmi_vdev_wmm_delts_cmd_fixed_param;
  12013. /* DEPRECATED */
  12014. typedef struct {
  12015. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  12016. /** Reserved for future use */
  12017. A_UINT32 reserved0;
  12018. } wmi_pdev_dfs_enable_cmd_fixed_param;
  12019. /* DEPRECATED */
  12020. typedef struct {
  12021. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  12022. /** pdev_id for identifying the MAC
  12023. * See macros starting with WMI_PDEV_ID_ for values.
  12024. */
  12025. A_UINT32 pdev_id;
  12026. } wmi_pdev_dfs_disable_cmd_fixed_param;
  12027. typedef struct {
  12028. /** TLV tag and len; tag equals
  12029. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  12030. */
  12031. A_UINT32 tlv_header;
  12032. /** pdev_id for identifying the MAC
  12033. * See macros starting with WMI_PDEV_ID_ for values.
  12034. */
  12035. A_UINT32 pdev_id;
  12036. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  12037. typedef struct {
  12038. /** TLV tag and len; tag equals
  12039. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  12040. */
  12041. A_UINT32 tlv_header;
  12042. /** pdev_id for identifying the MAC
  12043. * See macros starting with WMI_PDEV_ID_ for values.
  12044. */
  12045. A_UINT32 pdev_id;
  12046. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  12047. typedef struct {
  12048. A_UINT32 tlv_header;
  12049. A_UINT32 pdev_id;
  12050. } wmi_pdev_dfs_phyerr_offload_enable_cmd_fixed_param;
  12051. typedef struct {
  12052. A_UINT32 tlv_header;
  12053. A_UINT32 pdev_id;
  12054. } wmi_pdev_dfs_phyerr_offload_disable_cmd_fixed_param;
  12055. typedef enum {
  12056. QUICK_OCAC = 0,
  12057. EXTENSIVE_OCAC,
  12058. } WMI_ADFS_OCAC_MODE;
  12059. typedef struct {
  12060. A_UINT32 tlv_header;
  12061. A_UINT32 vdev_id;
  12062. A_UINT32 ocac_mode; /* WMI_ADFS_OCAC_MODE */
  12063. A_UINT32 min_duration_ms; /* in milliseconds */
  12064. A_UINT32 max_duration_ms; /* in milliseconds */
  12065. A_UINT32 chan_freq; /* in MHz */
  12066. A_UINT32 chan_width; /* in MHz */
  12067. A_UINT32 center_freq; /* in MHz */
  12068. } wmi_vdev_adfs_ch_cfg_cmd_fixed_param;
  12069. typedef struct {
  12070. A_UINT32 tlv_header;
  12071. A_UINT32 vdev_id;
  12072. } wmi_vdev_adfs_ocac_abort_cmd_fixed_param;
  12073. typedef enum {
  12074. IN_SERVICE_MODE = 0,
  12075. OCAC_MODE,
  12076. } WMI_DFS_RADAR_DETECTION_MODE;
  12077. typedef struct {
  12078. A_UINT32 tlv_header;
  12079. A_UINT32 pdev_id;
  12080. /* In-service mode or O-CAC mode */
  12081. A_UINT32 detection_mode; /* WMI_DFS_RADAR_DETECTION_MODE */
  12082. A_UINT32 chan_freq; /* in MHz */
  12083. A_UINT32 chan_width; /* in MHz */
  12084. A_UINT32 detector_id;
  12085. A_UINT32 segment_id;
  12086. A_UINT32 timestamp;
  12087. A_UINT32 is_chirp;
  12088. A_INT32 freq_offset; /* in MHz */
  12089. A_INT32 sidx; /* segment index (where was the radar within the channel) */
  12090. } wmi_pdev_dfs_radar_detection_event_fixed_param;
  12091. typedef enum {
  12092. OCAC_COMPLETE = 0,
  12093. OCAC_ABORT,
  12094. } WMI_VDEV_OCAC_COMPLETE_STATUS;
  12095. typedef struct {
  12096. A_UINT32 tlv_header;
  12097. A_UINT32 vdev_id;
  12098. A_UINT32 chan_freq; /* in MHz */
  12099. A_UINT32 chan_width; /* in MHz */
  12100. A_UINT32 center_freq; /* in MHz */
  12101. A_UINT32 status; /* WMI_VDEV_OCAC_COMPLETE_STATUS */
  12102. } wmi_vdev_adfs_ocac_complete_event_fixed_param;
  12103. typedef struct {
  12104. A_UINT32 tlv_header;
  12105. A_UINT32 vdev_id;
  12106. } wmi_vdev_dfs_cac_complete_event_fixed_param;
  12107. /** TDLS COMMANDS */
  12108. /* WMI_TDLS_SET_STATE_CMDID */
  12109. /* TDLS State */
  12110. enum wmi_tdls_state {
  12111. /** TDLS disable */
  12112. WMI_TDLS_DISABLE,
  12113. /** TDLS enabled - no firmware connection tracking/notifications */
  12114. WMI_TDLS_ENABLE_PASSIVE,
  12115. /** TDLS enabled - with firmware connection tracking/notifications */
  12116. WMI_TDLS_ENABLE_ACTIVE,
  12117. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  12118. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  12119. /** TDLS enabled - TDLS connection tracking is done in host */
  12120. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  12121. };
  12122. /* TDLS Options */
  12123. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  12124. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  12125. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  12126. typedef struct {
  12127. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  12128. A_UINT32 tlv_header;
  12129. /** unique id identifying the VDEV */
  12130. A_UINT32 vdev_id;
  12131. /** Enable/Disable TDLS (wmi_tdls_state) */
  12132. A_UINT32 state;
  12133. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  12134. A_UINT32 notification_interval_ms;
  12135. /** number of packets OVER which notify/suggest TDLS Discovery:
  12136. * if current tx pps counter / notification interval >= threshold
  12137. * then a notification will be sent to host to advise TDLS Discovery */
  12138. A_UINT32 tx_discovery_threshold;
  12139. /** number of packets UNDER which notify/suggest TDLS Teardown:
  12140. * if current tx pps counter / notification interval < threshold
  12141. * then a notification will be sent to host to advise TDLS Tear down */
  12142. A_UINT32 tx_teardown_threshold;
  12143. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  12144. A_INT32 rssi_teardown_threshold;
  12145. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  12146. A_INT32 rssi_delta;
  12147. /** TDLS Option Control
  12148. * Off-Channel, Buffer STA, (later)Sleep STA support */
  12149. A_UINT32 tdls_options;
  12150. /* Buffering time in number of beacon intervals */
  12151. A_UINT32 tdls_peer_traffic_ind_window;
  12152. /* Wait time for PTR frame */
  12153. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  12154. /* Self PUAPSD mask */
  12155. A_UINT32 tdls_puapsd_mask;
  12156. /* Inactivity timeout */
  12157. A_UINT32 tdls_puapsd_inactivity_time_ms;
  12158. /* Max of rx frame during SP */
  12159. A_UINT32 tdls_puapsd_rx_frame_threshold;
  12160. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  12161. A_UINT32 teardown_notification_ms;
  12162. /** STA kickout threshold for TDLS peer */
  12163. A_UINT32 tdls_peer_kickout_threshold;
  12164. /* TDLS discovery WAKE timeout in ms.
  12165. * DUT will wake until this timeout to receive TDLS discovery response
  12166. * from peer.
  12167. * If tdls_discovery_wake_timeout is 0x0, the DUT will choose autonomously
  12168. * what wake timeout value to use.
  12169. */
  12170. A_UINT32 tdls_discovery_wake_timeout;
  12171. } wmi_tdls_set_state_cmd_fixed_param;
  12172. /* WMI_TDLS_PEER_UPDATE_CMDID */
  12173. enum wmi_tdls_peer_state {
  12174. /** tx peer TDLS link setup now starting, traffic to DA should be
  12175. * paused (except TDLS frames) until state is moved to CONNECTED (or
  12176. * TEARDOWN on setup failure) */
  12177. WMI_TDLS_PEER_STATE_PEERING,
  12178. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  12179. WMI_TDLS_PEER_STATE_CONNECTED,
  12180. /** tx peer TDLS link tear down started (link paused, any frames
  12181. * queued for DA will be requeued back through the AP)*/
  12182. WMI_TDLS_PEER_STATE_TEARDOWN,
  12183. /** Add peer mac into connection table */
  12184. WMI_TDLS_PEER_ADD_MAC_ADDR,
  12185. /** Remove peer mac from connection table */
  12186. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  12187. };
  12188. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  12189. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  12190. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  12191. typedef struct {
  12192. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  12193. A_UINT32 tlv_header;
  12194. /* Peer's QoS Info - for U-APSD */
  12195. /* AC FLAGS - accessed through macros below */
  12196. /* Ack, SP, More Data Ack - accessed through macros below */
  12197. A_UINT32 peer_qos;
  12198. /*TDLS Peer's U-APSD Buffer STA Support*/
  12199. A_UINT32 buff_sta_support;
  12200. /*TDLS off channel related params */
  12201. A_UINT32 off_chan_support;
  12202. A_UINT32 peer_curr_operclass;
  12203. A_UINT32 self_curr_operclass;
  12204. /* Number of channels available for off channel operation */
  12205. A_UINT32 peer_chan_len;
  12206. A_UINT32 peer_operclass_len;
  12207. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  12208. /* Is peer initiator or responder of TDLS setup request */
  12209. A_UINT32 is_peer_responder;
  12210. /* Preferred off channel number as configured by user */
  12211. A_UINT32 pref_offchan_num;
  12212. /* Preferred off channel bandwidth as configured by user */
  12213. A_UINT32 pref_offchan_bw;
  12214. /** Followed by the variable length TLV peer_chan_list:
  12215. * wmi_channel peer_chan_list[].
  12216. * Array size would be peer_chan_len.
  12217. * This array is intersected channels which is supported by both peer
  12218. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  12219. * FW shall compute BW for an offchan based on peer's ht/vht cap
  12220. * received in peer_assoc cmd during change STA operation
  12221. */
  12222. } wmi_tdls_peer_capabilities;
  12223. #define WMI_TDLS_QOS_VO_FLAG 0
  12224. #define WMI_TDLS_QOS_VI_FLAG 1
  12225. #define WMI_TDLS_QOS_BK_FLAG 2
  12226. #define WMI_TDLS_QOS_BE_FLAG 3
  12227. #define WMI_TDLS_QOS_ACK_FLAG 4
  12228. #define WMI_TDLS_QOS_SP_FLAG 5
  12229. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  12230. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  12231. (ppeer_caps)->peer_qos |= (1 << flag); \
  12232. } while (0)
  12233. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  12234. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  12235. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12236. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12237. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  12238. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  12239. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12240. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12241. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  12242. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  12243. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12244. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12245. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  12246. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  12247. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12248. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12249. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  12250. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  12251. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12252. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12253. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  12254. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  12255. /* SP has 2 bits */
  12256. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  12257. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12258. } while (0)
  12259. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  12260. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12261. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12262. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12263. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  12264. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  12265. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  12266. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  12267. } while (0)
  12268. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  12269. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  12270. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12271. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12272. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  12273. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  12274. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12275. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12276. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  12277. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  12278. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  12279. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12280. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  12281. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  12282. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12283. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12284. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  12285. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  12286. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12287. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12288. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  12289. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  12290. /* SP has 2 bits */
  12291. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  12292. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  12293. } while (0)
  12294. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  12295. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  12296. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12297. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12298. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  12299. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  12300. typedef struct {
  12301. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  12302. A_UINT32 tlv_header;
  12303. /** unique id identifying the VDEV */
  12304. A_UINT32 vdev_id;
  12305. /** peer MAC address */
  12306. wmi_mac_addr peer_macaddr;
  12307. /** new TDLS state for peer (wmi_tdls_peer_state) */
  12308. A_UINT32 peer_state;
  12309. /* The TLV for wmi_tdls_peer_capabilities will follow.
  12310. * wmi_tdls_peer_capabilities peer_caps;
  12311. */
  12312. /** Followed by the variable length TLV chan_info:
  12313. * wmi_channel chan_info[] */
  12314. } wmi_tdls_peer_update_cmd_fixed_param;
  12315. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  12316. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  12317. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  12318. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  12319. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  12320. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  12321. enum wmi_tdls_offchan_mode {
  12322. WMI_TDLS_ENABLE_OFFCHANNEL,
  12323. WMI_TDLS_DISABLE_OFFCHANNEL
  12324. };
  12325. typedef struct {
  12326. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  12327. A_UINT32 tlv_header;
  12328. /** unique id identifying the VDEV */
  12329. A_UINT32 vdev_id;
  12330. /** Enable/Disable TDLS offchannel */
  12331. A_UINT32 offchan_mode;
  12332. /** peer MAC address */
  12333. wmi_mac_addr peer_macaddr;
  12334. /* Is peer initiator or responder of TDLS setup request */
  12335. A_UINT32 is_peer_responder;
  12336. /* off channel number*/
  12337. A_UINT32 offchan_num;
  12338. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  12339. A_UINT32 offchan_bw_bitmap;
  12340. /* operating class for offchan */
  12341. A_UINT32 offchan_oper_class;
  12342. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  12343. /** TDLS EVENTS */
  12344. enum wmi_tdls_peer_notification {
  12345. /** tdls discovery recommended for peer (based
  12346. * on tx bytes per second > tx_discover threshold) */
  12347. WMI_TDLS_SHOULD_DISCOVER,
  12348. /** tdls link tear down recommended for peer
  12349. * due to tx bytes per second below tx_teardown_threshold
  12350. * NB: this notification sent once */
  12351. WMI_TDLS_SHOULD_TEARDOWN,
  12352. /** tx peer TDLS link tear down complete */
  12353. WMI_TDLS_PEER_DISCONNECTED,
  12354. /** TDLS/BT role change notification for connection tracker */
  12355. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  12356. };
  12357. enum wmi_tdls_peer_reason {
  12358. /** tdls teardown recommended due to low transmits */
  12359. WMI_TDLS_TEARDOWN_REASON_TX,
  12360. /** tdls link tear down recommended due to poor RSSI */
  12361. WMI_TDLS_TEARDOWN_REASON_RSSI,
  12362. /** tdls link tear down recommended due to offchannel scan */
  12363. WMI_TDLS_TEARDOWN_REASON_SCAN,
  12364. /** tdls peer disconnected due to peer deletion */
  12365. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  12366. /** tdls peer disconnected due to PTR timeout */
  12367. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  12368. /** tdls peer disconnected due wrong PTR format */
  12369. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  12370. /** tdls peer not responding */
  12371. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  12372. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  12373. WMI_TDLS_ENTER_BUF_STA,
  12374. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  12375. WMI_TDLS_EXIT_BUF_STA,
  12376. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  12377. WMI_TDLS_ENTER_BT_BUSY_MODE,
  12378. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  12379. WMI_TDLS_EXIT_BT_BUSY_MODE,
  12380. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  12381. WMI_TDLS_SCAN_STARTED_EVENT,
  12382. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  12383. WMI_TDLS_SCAN_COMPLETED_EVENT,
  12384. };
  12385. /* WMI_TDLS_PEER_EVENTID */
  12386. typedef struct {
  12387. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  12388. A_UINT32 tlv_header;
  12389. /** peer MAC address */
  12390. wmi_mac_addr peer_macaddr;
  12391. /** TDLS peer status (wmi_tdls_peer_notification)*/
  12392. A_UINT32 peer_status;
  12393. /** TDLS peer reason (wmi_tdls_peer_reason) */
  12394. A_UINT32 peer_reason;
  12395. /** unique id identifying the VDEV */
  12396. A_UINT32 vdev_id;
  12397. } wmi_tdls_peer_event_fixed_param;
  12398. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  12399. don't use this for any new implementations */
  12400. typedef struct {
  12401. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  12402. /** unique id identifying the VDEV, generated by the caller */
  12403. A_UINT32 vdev_id;
  12404. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  12405. A_UINT32 new_bcn_intvl;
  12406. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  12407. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  12408. typedef struct {
  12409. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  12410. A_UINT32 tlv_header;
  12411. /** 1: enable fw based adaptive ocs,
  12412. * 0: disable fw based adaptive ocs
  12413. */
  12414. A_UINT32 enable;
  12415. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  12416. union {
  12417. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  12418. /** pdev_id for identifying the MAC
  12419. * See macros starting with WMI_PDEV_ID_ for values.
  12420. */
  12421. A_UINT32 pdev_id;
  12422. };
  12423. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  12424. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  12425. typedef struct {
  12426. /* Frequency of the channel for which the quota is set */
  12427. A_UINT32 chan_mhz;
  12428. /* Requested channel time quota expressed as percentage */
  12429. A_UINT32 channel_time_quota;
  12430. } wmi_resmgr_chan_time_quota;
  12431. typedef struct {
  12432. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  12433. A_UINT32 tlv_header;
  12434. /** number of channel time quota command structures
  12435. * (wmi_resmgr_chan_time_quota) 1 or 2
  12436. */
  12437. A_UINT32 num_chans;
  12438. /* This TLV is followed by another TLV of array of bytes
  12439. * A_UINT8 data[];
  12440. * This data array contains
  12441. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  12442. */
  12443. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  12444. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  12445. typedef struct {
  12446. /* Frequency of the channel for which the latency is set */
  12447. A_UINT32 chan_mhz;
  12448. /* Requested channel latency in milliseconds */
  12449. A_UINT32 latency;
  12450. } wmi_resmgr_chan_latency;
  12451. typedef struct {
  12452. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  12453. A_UINT32 tlv_header;
  12454. /** number of channel latency command structures
  12455. * (wmi_resmgr_chan_latency) 1 or 2
  12456. */
  12457. A_UINT32 num_chans;
  12458. /* This TLV is followed by another TLV of array of bytes
  12459. * A_UINT8 data[];
  12460. * This data array contains
  12461. * num_chans * size of(struct wmi_resmgr_chan_latency)
  12462. */
  12463. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  12464. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  12465. /** STA SMPS Forced Mode */
  12466. typedef enum {
  12467. WMI_SMPS_FORCED_MODE_NONE = 0,
  12468. WMI_SMPS_FORCED_MODE_DISABLED,
  12469. WMI_SMPS_FORCED_MODE_STATIC,
  12470. WMI_SMPS_FORCED_MODE_DYNAMIC
  12471. } wmi_sta_smps_forced_mode;
  12472. typedef struct {
  12473. /** TLV tag and len; tag equals
  12474. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  12475. A_UINT32 tlv_header;
  12476. /** Unique id identifying the VDEV */
  12477. A_UINT32 vdev_id;
  12478. /** The mode of SMPS that is to be forced in the FW. */
  12479. A_UINT32 forced_mode;
  12480. } wmi_sta_smps_force_mode_cmd_fixed_param;
  12481. /** wlan HB commands */
  12482. #define WMI_WLAN_HB_ITEM_UDP 0x1
  12483. #define WMI_WLAN_HB_ITEM_TCP 0x2
  12484. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  12485. must be a multiple of 4 bytes */
  12486. typedef struct {
  12487. /** TLV tag and len; tag equals
  12488. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  12489. A_UINT32 tlv_header; /** TLV header*/
  12490. A_UINT32 vdev_id; /** Vdev ID */
  12491. A_UINT32 enable; /** 1: Enable, 0: Disable`*/
  12492. A_UINT32 item; /** 1: UDP, 2: TCP */
  12493. A_UINT32 session; /** Session ID from HOST */
  12494. } wmi_hb_set_enable_cmd_fixed_param;
  12495. typedef struct {
  12496. /** TLV tag and len; tag equals
  12497. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  12498. A_UINT32 tlv_header; /** TLV header*/
  12499. A_UINT32 vdev_id; /** Vdev ID */
  12500. A_UINT32 srv_ip; /** Server IP address (IPv4) */
  12501. A_UINT32 dev_ip; /** Device IP address (IPv4) */
  12502. A_UINT32 seq; /** TCP Sequence no */
  12503. A_UINT32 src_port; /** Source port */
  12504. A_UINT32 dst_port; /** Destination port */
  12505. A_UINT32 interval; /** Keep alive interval */
  12506. A_UINT32 timeout; /** Timeout if keep alive fails */
  12507. A_UINT32 session; /** Session ID from HOST */
  12508. wmi_mac_addr gateway_mac; /** Server Mac Address */
  12509. } wmi_hb_set_tcp_params_cmd_fixed_param;
  12510. typedef struct {
  12511. /** TLV tag and len; tag equals
  12512. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  12513. A_UINT32 tlv_header;
  12514. A_UINT32 vdev_id;
  12515. A_UINT32 length;
  12516. A_UINT32 offset;
  12517. A_UINT32 session;
  12518. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12519. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  12520. typedef struct {
  12521. /** TLV tag and len; tag equals
  12522. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  12523. A_UINT32 tlv_header;
  12524. A_UINT32 vdev_id;
  12525. A_UINT32 srv_ip;
  12526. A_UINT32 dev_ip;
  12527. A_UINT32 src_port;
  12528. A_UINT32 dst_port;
  12529. A_UINT32 interval;
  12530. A_UINT32 timeout;
  12531. A_UINT32 session;
  12532. wmi_mac_addr gateway_mac;
  12533. } wmi_hb_set_udp_params_cmd_fixed_param;
  12534. typedef struct {
  12535. /** TLV tag and len; tag equals
  12536. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  12537. A_UINT32 tlv_header;
  12538. A_UINT32 vdev_id;
  12539. A_UINT32 length;
  12540. A_UINT32 offset;
  12541. A_UINT32 session;
  12542. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  12543. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  12544. /** wlan HB events */
  12545. typedef enum {
  12546. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  12547. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  12548. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  12549. } WMI_HB_WAKEUP_REASON;
  12550. typedef struct {
  12551. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  12552. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12553. A_UINT32 session; /** Session ID from HOST */
  12554. A_UINT32 reason; /** wakeup reason */
  12555. } wmi_hb_ind_event_fixed_param;
  12556. typedef struct {
  12557. /** TLV tag and len; tag equals
  12558. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  12559. A_UINT32 tlv_header; /** TLV Header */
  12560. A_UINT32 vdev_id; /** Vdev ID */
  12561. A_UINT32 session; /** Session number from the HOST */
  12562. A_UINT32 srv_ip; /** IPv4 address of the OCF server */
  12563. A_UINT32 dev_ip; /** IPv4 address of the device */
  12564. A_UINT32 tcp_tx_seq; /** TCP sequence number */
  12565. A_UINT32 src_port; /** Source port */
  12566. A_UINT32 dst_port; /** Destination port */
  12567. A_UINT32 protocol; /** Protocol used: TCP:0, UDP:1 */
  12568. 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 */
  12569. A_UINT32 timeout_retries; /** timeout[31:16]: TCP ACK timeout, time to wait for a TCP ACK in ms
  12570. retries[15:0]: Number of TCP level retries of OIC ping request */
  12571. wmi_mac_addr peer_macaddr; /** MAC address of the OCF server */
  12572. A_UINT32 oic_ping_pkt0; /** OIC ping packet content [Byte03:Byte00] */
  12573. A_UINT32 oic_ping_pkt1; /** OIC ping packet content [Byte07:Byte04] */
  12574. A_UINT32 oic_ping_pkt2; /** OIC ping packet content [Byte11:Byte08] */
  12575. A_UINT32 oic_ping_pkt3; /** OIC ping packet content [Byte15:Byte12] */
  12576. A_UINT32 tls_cipher_suite_version; /** Cipher suite [31:16] as defined in https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml
  12577. TLS version [15:00] */
  12578. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  12579. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  12580. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  12581. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  12582. A_UINT32 tls_tx_key0; /** client_write_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12583. A_UINT32 tls_tx_key1; /** client_write_key[Byte07:Byte04] */
  12584. A_UINT32 tls_tx_key2; /** client_write_key[Byte11:Byte08] */
  12585. A_UINT32 tls_tx_key3; /** client_write_key[Byte15:Byte12] */
  12586. A_UINT32 tls_rx_key0; /** server_write_key[Byte03:Byte00] */
  12587. A_UINT32 tls_rx_key1; /** server_write_key[Byte07:Byte04] */
  12588. A_UINT32 tls_rx_key2; /** server_write_key[Byte11:Byte08] */
  12589. A_UINT32 tls_rx_key3; /** server_write_key[Byte15:Byte12] */
  12590. A_UINT32 tls_MAC_write_key0; /** client_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12591. A_UINT32 tls_MAC_write_key1; /** client_write_MAC_key[Byte07:Byte04] */
  12592. A_UINT32 tls_MAC_write_key2; /** client_write_MAC_key[Byte11:Byte08] */
  12593. A_UINT32 tls_MAC_write_key3; /** client_write_MAC_key[Byte15:Byte12] */
  12594. A_UINT32 tls_MAC_write_key4; /** client_write_MAC_key[Byte19:Byte16] */
  12595. A_UINT32 tls_MAC_write_key5; /** client_write_MAC_key[Byte23:Byte20] */
  12596. A_UINT32 tls_MAC_write_key6; /** client_write_MAC_key[Byte27:Byte24] */
  12597. A_UINT32 tls_MAC_write_key7; /** client_write_MAC_key[Byte31:Byte28] */
  12598. A_UINT32 tls_MAC_read_key0; /** server_write_MAC_key[Byte03:Byte00] refer Section 6.3 RFC 5246 */
  12599. A_UINT32 tls_MAC_read_key1; /** server_write_MAC_key[Byte07:Byte04] */
  12600. A_UINT32 tls_MAC_read_key2; /** server_write_MAC_key[Byte11:Byte08] */
  12601. A_UINT32 tls_MAC_read_key3; /** server_write_MAC_key[Byte15:Byte12] */
  12602. A_UINT32 tls_MAC_read_key4; /** server_write_MAC_key[Byte19:Byte16] */
  12603. A_UINT32 tls_MAC_read_key5; /** server_write_MAC_key[Byte23:Byte20] */
  12604. A_UINT32 tls_MAC_read_key6; /** server_write_MAC_key[Byte27:Byte24] */
  12605. A_UINT32 tls_MAC_read_key7; /** server_write_MAC_key[Byte31:Byte28] */
  12606. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  12607. GCM Mode: GCMNonce.salt [Byte03:Byte00] refer Section 3 of RFC 5288 */
  12608. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12609. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12610. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12611. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246
  12612. GCM Mode: GCMNonce.salt [Byte4: Byte0] refer Section 3 of RFC 5288 */
  12613. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12614. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12615. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12616. } wmi_oic_ping_offload_params_cmd_fixed_param;
  12617. typedef struct {
  12618. /** TLV tag and len; tag equals
  12619. * WMITLV_TAG_STRUC_wmi_oic_set_enable_cmd_fixed_param */
  12620. A_UINT32 tlv_header; /** TLV Header*/
  12621. A_UINT32 vdev_id; /** Interface number */
  12622. A_UINT32 session; /** Session ID*/
  12623. A_UINT32 enable; /** 1: Enable , 0: Disable */
  12624. } wmi_oic_ping_offload_set_enable_cmd_fixed_param;
  12625. /** wlan OIC events */
  12626. typedef enum {
  12627. WMI_WLAN_OIC_REASON_UNKNOWN = 0, /** Unknown */
  12628. WMI_WLAN_OIC_REASON_HOST_WAKE = 1, /** No error , but host is woken up due to other reasons */
  12629. WMI_WLAN_OIC_REASON_TCP_TIMEOUT = 2, /** TCP Timeout */
  12630. WMI_WLAN_OIC_REASON_PING_TIMEOUT = 3, /** OIC Ping resposnse timeout */
  12631. WMI_WLAN_OIC_REASON_TLS_ERROR = 4, /** TLS decryption error */
  12632. } WMI_OIC_WAKEUP_REASON;
  12633. typedef struct {
  12634. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oic_ind_event_fixed_param */
  12635. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12636. A_UINT32 session; /** Session ID from driver */
  12637. A_UINT32 reason; /** wakeup reason as per WMI_OIC_WAKEUP_REASON */
  12638. A_UINT32 tcp_tx_seq; /** Current TCP sequence number */
  12639. A_UINT32 tcp_ack_num; /** Current TCP Acknowledgement number */
  12640. A_UINT32 tls_tx_seq0; /** Tx sequence number [31:00], incremented after every TLS packet transmission */
  12641. A_UINT32 tls_tx_seq1; /** Tx sequence number [63:32] */
  12642. A_UINT32 tls_rx_seq0; /** Rx sequence number [31:00], incremented after every TLS packet reception */
  12643. A_UINT32 tls_rx_seq1; /** Rx sequence number [63:32] */
  12644. A_UINT32 tls_client_IV0; /** CBC Mode: CBC_residue [Byte03:Byte00] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  12645. A_UINT32 tls_client_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12646. A_UINT32 tls_client_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12647. A_UINT32 tls_client_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12648. A_UINT32 tls_server_IV0; /** CBC Mode: CBC_residue [Byte3:Byte0] refer section 6.2.3.2. CBC Block Cipher in RFC 5246 */
  12649. A_UINT32 tls_server_IV1; /** CBC Mode: CBC_residue [Byte7:Byte4] */
  12650. A_UINT32 tls_server_IV2; /** CBC Mode: CBC_residue [Byte11:Byte8] */
  12651. A_UINT32 tls_server_IV3; /** CBC Mode: CBC_residue [Byte15:Byte12] */
  12652. } wmi_oic_ping_handoff_event;
  12653. typedef struct {
  12654. /** TLV tag and len; tag equals
  12655. * WMITLV_TAG_STRUC_wmi_dhcp_lease_renew_offload_fixed_param */
  12656. A_UINT32 tlv_header; /** TLV Header*/
  12657. A_UINT32 vdev_id; /** Vdev ID */
  12658. A_UINT32 enable; /** 1: Enable 0: Disable*/
  12659. A_UINT32 srv_ip; /** DHCP Server IP address (IPv4) */
  12660. A_UINT32 client_ip; /** Device IP address (IPv4) */
  12661. wmi_mac_addr srv_mac; /** DHCP Server MAC address */
  12662. A_UINT32 parameter_list; /** Optional Parameter list. RFC 1533 gives the complete set of options defined for use with DHCP */
  12663. } wmi_dhcp_lease_renew_offload_cmd_fixed_param;
  12664. /** WLAN DHCP Lease Renew Events */
  12665. typedef enum {
  12666. WMI_WLAN_DHCP_RENEW_REASON_UNKNOWN = 0, /** Unknown */
  12667. WMI_WLAN_DHCP_RENEW_REASON_ACK_TIMEOUT = 1, /** DHCP ACK Timeout */
  12668. WMI_WLAN_DHCP_RENEW_REASON_NACK = 2, /** DHCP error */
  12669. } WMI_DHCP_RENEW_WAKEUP_REASON;
  12670. typedef struct {
  12671. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dhcp_renew_ind_event_fixed_param */
  12672. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  12673. A_UINT32 reason; /** wakeup reason as per enum WMI_DHCP_RENEW_WAKEUP_REASON*/
  12674. } wmi_dhcp_lease_renew_event;
  12675. /** WMI_STA_SMPS_PARAM_CMDID */
  12676. typedef enum {
  12677. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  12678. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  12679. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  12680. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  12681. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  12682. /** RSSI threshold to disable SMPS modes */
  12683. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  12684. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  12685. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  12686. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  12687. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  12688. /** Enable/Disable DTIM 1chRx feature */
  12689. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  12690. } wmi_sta_smps_param;
  12691. typedef struct {
  12692. /** TLV tag and len; tag equals
  12693. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  12694. A_UINT32 tlv_header;
  12695. /** Unique id identifying the VDEV */
  12696. A_UINT32 vdev_id;
  12697. /** SMPS parameter (see wmi_sta_smps_param) */
  12698. A_UINT32 param;
  12699. /** Value of SMPS parameter */
  12700. A_UINT32 value;
  12701. } wmi_sta_smps_param_cmd_fixed_param;
  12702. typedef struct {
  12703. /** TLV tag and len; tag equals
  12704. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  12705. A_UINT32 tlv_header;
  12706. /* TX stats */
  12707. A_UINT32 txBytesPushed;
  12708. A_UINT32 txPacketsPushed;
  12709. /* RX stats */
  12710. A_UINT32 rxBytesRcvd;
  12711. A_UINT32 rxPacketsRcvd;
  12712. A_UINT32 rxTimeTotal;
  12713. /** peer MAC address */
  12714. wmi_mac_addr peer_macaddr;
  12715. } wmi_mcc_sched_sta_traffic_stats;
  12716. typedef struct {
  12717. /** TLV tag and len; tag equals
  12718. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  12719. A_UINT32 tlv_header;
  12720. /** Duration over which the host stats were collected */
  12721. A_UINT32 duration;
  12722. /** Number of stations filled in following stats array */
  12723. A_UINT32 num_sta;
  12724. /* Following this struct are the TLVs:
  12725. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  12726. */
  12727. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  12728. typedef struct
  12729. {
  12730. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  12731. /* unique id identifying the VDEV, generated by the caller */
  12732. A_UINT32 vdev_id;
  12733. /*Batch scan enable command parameters*/
  12734. A_UINT32 scanInterval;
  12735. A_UINT32 numScan2Batch;
  12736. A_UINT32 bestNetworks;
  12737. A_UINT32 rfBand;
  12738. A_UINT32 rtt;
  12739. } wmi_batch_scan_enable_cmd_fixed_param;
  12740. typedef struct
  12741. {
  12742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  12743. A_UINT32 supportedMscan;
  12744. } wmi_batch_scan_enabled_event_fixed_param;
  12745. typedef struct
  12746. {
  12747. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  12748. /* unique id identifying the VDEV, generated by the caller */
  12749. A_UINT32 vdev_id;
  12750. A_UINT32 param;
  12751. } wmi_batch_scan_disable_cmd_fixed_param;
  12752. typedef struct
  12753. {
  12754. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  12755. /** unique id identifying the VDEV, generated by the caller */
  12756. A_UINT32 vdev_id;
  12757. A_UINT32 param;
  12758. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  12759. typedef struct
  12760. {
  12761. A_UINT32 tlv_header;
  12762. wmi_mac_addr bssid; /* BSSID */
  12763. wmi_ssid ssid; /* SSID */
  12764. A_UINT32 ch; /* Channel */
  12765. A_UINT32 rssi; /* RSSI or Level */
  12766. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  12767. A_UINT32 timestamp;
  12768. } wmi_batch_scan_result_network_info;
  12769. typedef struct
  12770. {
  12771. A_UINT32 tlv_header;
  12772. A_UINT32 scanId; /* Scan List ID. */
  12773. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  12774. A_UINT32 numNetworksInScanList;
  12775. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  12776. } wmi_batch_scan_result_scan_list;
  12777. #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. */
  12778. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  12779. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  12780. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  12781. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  12782. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  12783. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  12784. #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. */
  12785. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  12786. #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. */
  12787. /*
  12788. * TEMPORARY alias of incorrect old name the correct name.
  12789. * This alias will be removed once all references to the old name have been fixed.
  12790. */
  12791. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  12792. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  12793. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  12794. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  12795. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  12796. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  12797. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  12798. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  12799. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  12800. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  12801. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  12802. #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. */
  12803. #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 */
  12804. #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 */
  12805. #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. */
  12806. #define LPI_IE_BITMAP_CHRE_RADIO_CHAIN 0x01000000 /* include radio chain and rssi per chain information if this bit is set - for CHRE */
  12807. /* 0x02000000, 0x04000000, and 0x08000000 are unused / available */
  12808. #define LPI_IE_BITMAP_CHRE_ESS 0x10000000 /* ESS capability info for CHRE */
  12809. #define LPI_IE_BITMAP_CHRE_SEC_MODE 0x20000000 /* Security capability info for CHRE */
  12810. #define LPI_IE_BITMAP_CHRE_SUPPORTED_RATE 0x40000000 /* Highest MCS corresponding NCC for TX and RX */
  12811. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  12812. typedef struct {
  12813. A_UINT32 tlv_header;
  12814. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  12815. A_UINT32 enable;
  12816. /**LPI snooping mode*/
  12817. A_UINT32 snooping_mode;
  12818. /** LPI interested IEs in snooping context */
  12819. A_UINT32 ie_bitmap;
  12820. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  12821. typedef struct {
  12822. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  12823. /** Scan ID */
  12824. A_UINT32 scan_id;
  12825. /** Scan requestor ID */
  12826. A_UINT32 scan_req_id;
  12827. /** VDEV id(interface) that is requesting scan */
  12828. A_UINT32 vdev_id;
  12829. /** LPI interested IEs in scan context */
  12830. A_UINT32 ie_bitmap;
  12831. /** Scan Priority, input to scan scheduler */
  12832. A_UINT32 scan_priority;
  12833. /** dwell time in msec on active channels */
  12834. A_UINT32 dwell_time_active;
  12835. /** dwell time in msec on passive channels */
  12836. A_UINT32 dwell_time_passive;
  12837. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  12838. A_UINT32 min_rest_time;
  12839. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  12840. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  12841. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  12842. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  12843. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  12844. * irrespective of activity. activity is determined by the idle_time parameter.
  12845. */
  12846. A_UINT32 max_rest_time;
  12847. /** time before sending next set of probe requests.
  12848. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  12849. * The number of probe requests specified depends on the ssid_list and bssid_list
  12850. */
  12851. A_UINT32 repeat_probe_time;
  12852. /** time in msec between 2 consequetive probe requests with in a set. */
  12853. A_UINT32 probe_spacing_time;
  12854. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  12855. A_UINT32 idle_time;
  12856. /** maximum time in msec allowed for scan */
  12857. A_UINT32 max_scan_time;
  12858. /** delay in msec before sending first probe request after switching to a channel */
  12859. A_UINT32 probe_delay;
  12860. /** Scan control flags */
  12861. A_UINT32 scan_ctrl_flags;
  12862. /** Burst duration time in msec*/
  12863. A_UINT32 burst_duration;
  12864. /** # if channels to scan. In the TLV channel_list[] */
  12865. A_UINT32 num_chan;
  12866. /** number of bssids. In the TLV bssid_list[] */
  12867. A_UINT32 num_bssid;
  12868. /** number of ssid. In the TLV ssid_list[] */
  12869. A_UINT32 num_ssids;
  12870. /** number of bytes in ie data. In the TLV ie_data[] */
  12871. A_UINT32 ie_len;
  12872. /** Scan control flags extended (see WMI_SCAN_FLAG_EXT_xxx) */
  12873. A_UINT32 scan_ctrl_flags_ext;
  12874. /**
  12875. * TLV (tag length value) parameters follow the scan_cmd
  12876. * structure. The TLV's are:
  12877. * A_UINT32 channel_list[];
  12878. * wmi_ssid ssid_list[];
  12879. * wmi_mac_addr bssid_list[];
  12880. * A_UINT8 ie_data[];
  12881. */
  12882. } wmi_lpi_start_scan_cmd_fixed_param;
  12883. typedef struct {
  12884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  12885. /** Scan requestor ID */
  12886. A_UINT32 scan_req_id;
  12887. /** Scan ID */
  12888. A_UINT32 scan_id;
  12889. /**
  12890. * Req Type
  12891. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  12892. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  12893. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  12894. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  12895. */
  12896. A_UINT32 req_type;
  12897. /**
  12898. * vDev ID
  12899. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  12900. */
  12901. A_UINT32 vdev_id;
  12902. } wmi_lpi_stop_scan_cmd_fixed_param;
  12903. typedef enum {
  12904. WMI_LPI_DEVICE_TYPE_AP = 1,
  12905. WMI_LPI_DEVICE_TYPE_P2P = 2,
  12906. WMI_LPI_DEVICE_TYPE_NAN = 3,
  12907. } wmi_lpi_device_type;
  12908. typedef struct
  12909. {
  12910. A_UINT32 tlv_header;
  12911. /** Scan requestor ID */
  12912. A_UINT32 scan_req_id;
  12913. A_UINT32 ie_bitmap;
  12914. A_UINT32 data_len;
  12915. } wmi_lpi_result_event_fixed_param;
  12916. typedef enum {
  12917. /** User scan Request completed */
  12918. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  12919. /** User Request was never serviced */
  12920. WMI_LPI_STATUS_DROPPED_REQ = 1,
  12921. /** Illegal channel Req */
  12922. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  12923. /** Illegal Operation Req */
  12924. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  12925. /** Request Aborted */
  12926. WMI_LPI_STATUS_REQ_ABORTED = 4,
  12927. /** Request Timed Out */
  12928. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  12929. /** Medium Busy, already there
  12930. * is a scan is going on */
  12931. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  12932. /** Extscan is the scan client whose scan complete event is triggered */
  12933. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  12934. } wmi_lpi_staus;
  12935. typedef struct
  12936. {
  12937. A_UINT32 tlv_header;
  12938. wmi_lpi_staus status;
  12939. /** Scan requestor ID */
  12940. A_UINT32 scan_req_id;
  12941. } wmi_lpi_status_event_fixed_param;
  12942. typedef struct
  12943. {
  12944. A_UINT32 tlv_header;
  12945. wmi_mac_addr bssid;
  12946. wmi_ssid ssid;
  12947. A_UINT32 freq;
  12948. A_UINT32 rssi;
  12949. A_UINT32 vdev_id;
  12950. } wmi_lpi_handoff_event_fixed_param;
  12951. typedef struct
  12952. {
  12953. A_UINT32 tlv_header;
  12954. A_UINT32 timestamp; /*timestamp of batch scan event*/
  12955. A_UINT32 numScanLists; /*number of scan in this event*/
  12956. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  12957. } wmi_batch_scan_result_event_fixed_param;
  12958. typedef struct {
  12959. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  12960. A_UINT32 vdev_id;
  12961. /* This TLV is followed by p2p_noa_info for vdev :
  12962. * wmi_p2p_noa_info p2p_noa_info;
  12963. */
  12964. } wmi_p2p_noa_event_fixed_param;
  12965. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  12966. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  12967. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  12968. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  12969. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  12970. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  12971. typedef struct {
  12972. /** TLV tag and len; tag equals
  12973. * */
  12974. A_UINT32 tlv_header;
  12975. /** gpip pin number */
  12976. A_UINT32 gpio_pin_num;
  12977. /** gpio interupt type */
  12978. A_UINT32 int_type;
  12979. /** RF radio status */
  12980. A_UINT32 radio_state;
  12981. } wmi_rfkill_mode_param;
  12982. typedef enum {
  12983. WMI_SET_LED_SYS_POWEROFF,
  12984. WMI_SET_LED_SYS_S3_SUSPEND,
  12985. WMI_SET_LED_SYS_S4_S5,
  12986. WMI_SET_LED_SYS_DRIVER_DISABLE,
  12987. WMI_SET_LED_SYS_WAKEUP,
  12988. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  12989. WMI_SET_LED_SYS_POWERON,
  12990. } wmi_led_sys_state_param;
  12991. typedef enum {
  12992. WMI_CONFIG_LED_TO_VDD = 0,
  12993. WMI_CONFIG_LED_TO_GND = 1,
  12994. } wmi_config_led_connect_type;
  12995. typedef enum {
  12996. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  12997. WMI_CONFIG_LED_WITH_BT = 1,
  12998. } wmi_config_led_with_bt_flag;
  12999. typedef enum {
  13000. WMI_CONFIG_LED_DISABLE = 0,
  13001. WMI_CONFIG_LED_ENABLE = 1,
  13002. } wmi_config_led_enable_flag;
  13003. typedef enum {
  13004. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  13005. WMI_CONFIG_LED_HIGH_OFF = 1,
  13006. WMI_CONFIG_LED_HIGH_ON = 2,
  13007. } wmi_config_led_on_flag;
  13008. typedef enum {
  13009. WMI_CONFIG_LED_UNSPECIFIED = 0,
  13010. WMI_CONFIG_LED_ON = 1,
  13011. WMI_CONFIG_LED_OFF = 2,
  13012. WMI_CONFIG_LED_DIM = 3,
  13013. WMI_CONFIG_LED_BLINK = 4,
  13014. WMI_CONFIG_LED_TXRX = 5,
  13015. } wmi_config_led_operation_type;
  13016. typedef struct {
  13017. /** TLV tag and len; tag equals
  13018. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  13019. A_UINT32 tlv_header;
  13020. /* Set GPIO pin */
  13021. A_UINT32 led_gpio_pin;
  13022. /* Set connect type defined in wmi_config_led_connect_type */
  13023. A_UINT32 connect_type;
  13024. /* Set flag defined in wmi_config_led_with_bt_flag*/
  13025. A_UINT32 with_bt;
  13026. /* Set LED enablement defined in wmi_config_led_enable_flag */
  13027. A_UINT32 led_enable;
  13028. /** pdev_id for identifying the MAC
  13029. * See macros starting with WMI_PDEV_ID_ for values.
  13030. */
  13031. A_UINT32 pdev_id;
  13032. /* see wmi_config_led_operation_type enum */
  13033. A_UINT32 led_operation_type;
  13034. /* see wmi_config_led_on_flag enum */
  13035. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  13036. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  13037. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  13038. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  13039. } wmi_pdev_set_led_config_cmd_fixed_param;
  13040. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  13041. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  13042. /** WMI_PEER_INFO_REQ_CMDID
  13043. * Request FW to provide peer info */
  13044. typedef struct {
  13045. /** TLV tag and len; tag equals
  13046. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  13047. A_UINT32 tlv_header;
  13048. /** In order to get the peer info for a single peer, host shall
  13049. * issue the peer_mac_address of that peer. For getting the
  13050. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  13051. * address. The firmware will return the peer info for all the
  13052. * peers on the specified vdev_id */
  13053. wmi_mac_addr peer_mac_address;
  13054. /** vdev id */
  13055. A_UINT32 vdev_id;
  13056. } wmi_peer_info_req_cmd_fixed_param;
  13057. typedef struct {
  13058. /** TLV tag and len; tag equals
  13059. * WMITLV_TAG_STRUC_wmi_peer_info */
  13060. A_UINT32 tlv_header;
  13061. /** mac addr of the peer */
  13062. wmi_mac_addr peer_mac_address;
  13063. /** data_rate of the peer */
  13064. A_UINT32 data_rate;
  13065. /** rssi of the peer */
  13066. A_UINT32 rssi;
  13067. /** tx fail count */
  13068. A_UINT32 tx_fail_cnt;
  13069. } wmi_peer_info;
  13070. /** FW response with the peer info */
  13071. typedef struct {
  13072. /** TLV tag and len; tag equals
  13073. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  13074. A_UINT32 tlv_header;
  13075. /** number of peers in peer_info */
  13076. A_UINT32 num_peers;
  13077. /* Set to 1 only if vdev_id field is valid */
  13078. A_UINT32 valid_vdev_id;
  13079. /* VDEV to which the peer belongs to */
  13080. A_UINT32 vdev_id;
  13081. /* This TLV is followed by another TLV of array of structs
  13082. * wmi_peer_info peer_info[];
  13083. */
  13084. } wmi_peer_info_event_fixed_param;
  13085. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  13086. * Request FW to provide peer info */
  13087. typedef struct {
  13088. /** TLV tag and len; tag equals
  13089. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  13090. A_UINT32 tlv_header;
  13091. /** In order to get the peer antdiv info for a single peer, host shall
  13092. * issue the peer_mac_address of that peer. For getting the
  13093. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  13094. * address. The firmware will return the peer info for all the
  13095. * peers on the specified vdev_id */
  13096. wmi_mac_addr peer_mac_address;
  13097. /** vdev id */
  13098. A_UINT32 vdev_id;
  13099. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  13100. /** FW response with the peer antdiv info */
  13101. typedef struct {
  13102. /** TLV tag and len; tag equals
  13103. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  13104. A_UINT32 tlv_header;
  13105. /** number of peers in peer_info */
  13106. A_UINT32 num_peers;
  13107. /* VDEV to which the peer belongs to */
  13108. A_UINT32 vdev_id;
  13109. /* This TLV is followed by another TLV of array of structs
  13110. * wmi_peer_antdiv_info peer_antdiv_info[];
  13111. */
  13112. } wmi_peer_antdiv_info_event_fixed_param;
  13113. typedef struct {
  13114. /** TLV tag and len; tag equals
  13115. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  13116. A_UINT32 tlv_header;
  13117. /** mac addr of the peer */
  13118. wmi_mac_addr peer_mac_address;
  13119. /** per chain rssi of the peer, for up to 8 chains.
  13120. * Each chain's entry reports the RSSI for different bandwidths:
  13121. * bits 7:0 -> primary 20 MHz
  13122. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  13123. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  13124. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  13125. * Each of these 8-bit RSSI reports is in dB units, with respect to
  13126. * the noise floor.
  13127. * 0x80 means invalid.
  13128. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  13129. * All unused chain_rssi indices shall be set to 0x80808080.
  13130. */
  13131. A_INT32 chain_rssi[8];
  13132. } wmi_peer_antdiv_info;
  13133. typedef struct {
  13134. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_msduq_qdepth_thresh_update */
  13135. /** tid_number */
  13136. A_UINT32 tid_num;
  13137. /** msduq_mask to set the value
  13138. * bit 0 - HI-PRI msdu flowq qdepth threshold need to update if set
  13139. * bit 1 - LOW-PRI msdu flowq qdepth threshold need to update if set
  13140. * bit 2 - UDP msdu flowq qdepth threshold need to update if set
  13141. * bit 3 - NON-UDP msdu flowq qdepth threshold need to update if set
  13142. * rest of bits are reserved and set to 0.
  13143. */
  13144. A_UINT32 msduq_update_mask;
  13145. /** Qdepth threshold value
  13146. * If number of msdus in a queue excess over qdepth_thresh_value value
  13147. * while queuing msdu's then we drop new msdus.
  13148. * (Though dropping older (stale) data rather than newer data might be
  13149. * preferable, the dropping is performed by MAC HW, and theres no option
  13150. * to configure the HW to do head dropping rather than tail dropping.)
  13151. */
  13152. A_UINT32 qdepth_thresh_value;
  13153. } wmi_msduq_qdepth_thresh_update;
  13154. /** WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID
  13155. * Request FW to update msduq qdepth threshold per TID per peer */
  13156. typedef struct {
  13157. /** TLV tag and len; tag equals
  13158. * WMITLV_TAG_STRUC_wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param
  13159. */
  13160. A_UINT32 tlv_header;
  13161. /** pdev id
  13162. * The pdev_id can be determined from the vdev_id, but the pdev_id
  13163. * is explicitly provided so it can be used for sanity checking.
  13164. */
  13165. A_UINT32 pdev_id;
  13166. /** vdev id */
  13167. A_UINT32 vdev_id;
  13168. /**
  13169. * To set the peer msduq qdepth threshold update for a single peer,
  13170. * the host shall send mac address for which peer need to be updated.
  13171. */
  13172. wmi_mac_addr peer_mac_address;
  13173. /** number of payload update tlvs */
  13174. A_UINT32 num_of_msduq_updates;
  13175. /** Followed by the variable length TLV msduq_qdepth_updates:
  13176. * wmi_msduq_qdepth_th_update msduq_qdepth_thshd_update_list[]
  13177. */
  13178. } wmi_peer_tid_msduq_qdepth_thresh_update_cmd_fixed_param;
  13179. /**
  13180. * ACK policy to be followed for the TID
  13181. */
  13182. typedef enum {
  13183. /** Used when the host does not want to configure the ACK policy */
  13184. WMI_PEER_TID_CONFIG_ACK_POLICY_IGNORE,
  13185. /** Allow ACK for the TID */
  13186. WMI_PEER_TID_CONFIG_ACK,
  13187. /** Do not expect ACK for the TID */
  13188. WMI_PEER_TID_CONFIG_NOACK,
  13189. } WMI_PEER_TID_CONFIG_ACK_POLICY;
  13190. /**
  13191. * Aggregation control policy for the TID
  13192. */
  13193. typedef enum {
  13194. /** Used when the host does not want to configure the aggregation policy */
  13195. WMI_PEER_TID_CONFIG_AGGR_CONTROL_IGNORE,
  13196. /** Enable aggregation for the TID */
  13197. WMI_PEER_TID_CONFIG_AGGR_CONTROL_ENABLE,
  13198. /** Disable aggregation for the TID */
  13199. WMI_PEER_TID_CONFIG_AGGR_CONTROL_DISABLE,
  13200. } WMI_PEER_TID_CONFIG_AGGR_CONTROL;
  13201. /**
  13202. * Rate control policy for the TID
  13203. */
  13204. typedef enum {
  13205. /** Used when the host does not want to configure the rate control policy */
  13206. WMI_PEER_TID_CONFIG_RATE_CONTROL_IGNORE,
  13207. /** Auto rate control */
  13208. WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO,
  13209. /** Fixed rate control */
  13210. WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
  13211. } WMI_PEER_TID_CONFIG_RATE_CONTROL;
  13212. /**
  13213. * SW retry threshold for the TID
  13214. */
  13215. typedef enum {
  13216. /** Used when the host does not want to configure the SW retry threshold */
  13217. WMI_PEER_TID_SW_RETRY_IGNORE = 0,
  13218. WMI_PEER_TID_SW_RETRY_MIN = 1,
  13219. WMI_PEER_TID_SW_RETRY_MAX = 30,
  13220. /** No SW retry for the TID */
  13221. WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF,
  13222. } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD;
  13223. /**
  13224. * Command format for the TID configuration
  13225. */
  13226. typedef struct {
  13227. /** TLV tag and len; tag equals
  13228. * WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param
  13229. */
  13230. A_UINT32 tlv_header;
  13231. /** vdev id */
  13232. A_UINT32 vdev_id;
  13233. /** peer MAC address */
  13234. wmi_mac_addr peer_mac_address;
  13235. /** TID number, generated by the caller.
  13236. * Valid range for QoS TID : 0-15
  13237. * Valid range for non QOS/Mgmt TID: 16-19
  13238. * Any other TID number is invalid.
  13239. */
  13240. A_UINT32 tid_num;
  13241. /** ACK policy - of type WMI_PEER_TID_CONFIG_ACK_POLICY */
  13242. A_UINT32 ack_policy;
  13243. /** Aggregation control - of type WMI_PEER_TID_CONFIG_AGGR_CONTROL */
  13244. A_UINT32 aggr_control;
  13245. /** Rate control - of type WMI_PEER_TID_CONFIG_RATE_CONTROL */
  13246. A_UINT32 rate_control;
  13247. /** Fixed rate control parameters - of type WMI_PEER_PARAM_FIXED_RATE.
  13248. * This is applicable only when rate_control is
  13249. * WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE
  13250. */
  13251. A_UINT32 rcode_rcflags;
  13252. /** MPDU SW retry threshold - of type WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD
  13253. * This SW retry threshold limits the total number of retransmits of
  13254. * nacked or unacked MPDUs, but it is up to the FW to decide what
  13255. * tx rate to use during each retransmission.
  13256. */
  13257. A_UINT32 sw_retry_threshold;
  13258. } wmi_peer_tid_configurations_cmd_fixed_param;
  13259. typedef enum {
  13260. WMI_PEER_IND_SMPS = 0x0, /* spatial multiplexing power save */
  13261. WMI_PEER_IND_OMN, /* operating mode notification */
  13262. WMI_PEER_IND_OMI, /* operating mode indication */
  13263. } WMI_PEER_OPER_MODE_IND;
  13264. typedef struct {
  13265. /** TLV tag and len; tag equals
  13266. * WMITLV_TAG_STRUC_wmi_peer_oper_mode_change */
  13267. A_UINT32 tlv_header;
  13268. /** mac addr of the peer */
  13269. wmi_mac_addr peer_mac_address;
  13270. /** Peer type indication WMI_PEER_OPER_MODE_IND. */
  13271. A_UINT32 ind_type;
  13272. /** new_rxnss valid for all peer_operating mode ind. */
  13273. A_UINT32 new_rxnss;
  13274. /** new_bw valid for peer_operating mode ind. OMN/OMI
  13275. * value of this bw is as per 11ax/ac standard:
  13276. * 0 = 20MHz,1 = 40MHz, 2= 80MHz, 3 = 160MHz
  13277. */
  13278. A_UINT32 new_bw;
  13279. /** new_txnss valid for peer_operating mode ind. OMI */
  13280. A_UINT32 new_txnss;
  13281. /** new_disablemu: disable mu mode
  13282. * valid for peer_operating mode ind. OMI
  13283. */
  13284. A_UINT32 new_disablemu;
  13285. } wmi_peer_oper_mode_change_event_fixed_param;
  13286. /** FW response when tx failure count has reached threshold
  13287. * for a peer */
  13288. typedef struct {
  13289. /** TLV tag and len; tag equals
  13290. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  13291. A_UINT32 tlv_header;
  13292. /** vdev id*/
  13293. A_UINT32 vdev_id;
  13294. /** mac address */
  13295. wmi_mac_addr peer_mac_address;
  13296. /** tx failure count - will eventually be removed and not used */
  13297. A_UINT32 tx_fail_cnt;
  13298. /** seq number of the nth tx_fail_event */
  13299. A_UINT32 seq_no;
  13300. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  13301. enum wmi_rmc_mode {
  13302. /** Disable RMC */
  13303. WMI_RMC_MODE_DISABLED = 0,
  13304. /** Enable RMC */
  13305. WMI_RMC_MODE_ENABLED = 1,
  13306. };
  13307. /** Enable RMC transmitter functionality. Upon
  13308. * receiving this, the FW shall mutlicast frames with
  13309. * reliablity. This is a vendor
  13310. * proprietary feature. */
  13311. typedef struct {
  13312. /** TLV tag and len; tag equals
  13313. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  13314. A_UINT32 tlv_header;
  13315. /** vdev id*/
  13316. A_UINT32 vdev_id;
  13317. /** enable_rmc contains values from enum wmi_rmc_mode;
  13318. * Default value: 0 (disabled) */
  13319. A_UINT32 enable_rmc;
  13320. } wmi_rmc_set_mode_cmd_fixed_param;
  13321. /** Configure transmission periodicity of action frames in a
  13322. * RMC network for the multicast transmitter */
  13323. typedef struct {
  13324. /** TLV tag and len; tag equals
  13325. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  13326. A_UINT32 tlv_header;
  13327. /** vdev id */
  13328. A_UINT32 vdev_id;
  13329. /** time period in milliseconds. Default: 300 ms.
  13330. An action frame indicating the current leader is transmitted by the
  13331. RMC transmitter once every 'periodity_msec' */
  13332. A_UINT32 periodicity_msec;
  13333. } wmi_rmc_set_action_period_cmd_fixed_param;
  13334. /** Optimise Leader selection process in RMC functionality. For
  13335. * Enhancement/Debug purposes only */
  13336. typedef struct {
  13337. /** TLV tag and len; tag equals
  13338. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  13339. A_UINT32 tlv_header;
  13340. /** vdev id */
  13341. A_UINT32 vdev_id;
  13342. /** flags ::
  13343. * 0x0001 - Enable beacon averaging
  13344. * 0x0002 - Force leader selection
  13345. * 0x0004 - Enable Timer based leader switch
  13346. * 0x0008 - Use qos/NULL based for multicast reliability */
  13347. A_UINT32 flags;
  13348. /** control leader change timeperiod (in seconds) */
  13349. A_UINT32 peridocity_leader_switch;
  13350. /** control activity timeout value for data rx (in seconds) */
  13351. A_UINT32 data_activity_timeout;
  13352. /** mac address of leader */
  13353. wmi_mac_addr forced_leader_mac_addr;
  13354. } wmi_rmc_config_cmd_fixed_param;
  13355. /** MHF is generally implemented in
  13356. * the kernel. To decrease system power consumption, the
  13357. * driver can enable offloading this to the chipset. In
  13358. * order for the offload, the firmware needs the routing table.
  13359. * The host shall plumb the routing table into FW. The firmware
  13360. * shall perform an IP address lookup and forward the packet to
  13361. * the next hop using next hop's mac address. This is a vendor
  13362. * proprietary feature. */
  13363. enum wmi_mhf_ofl_mode {
  13364. /** Disable MHF offload */
  13365. WMI_MHF_OFL_MODE_DISABLED = 0,
  13366. /** Enable MHF offload */
  13367. WMI_MHF_OFL_MODE_ENABLED = 1,
  13368. };
  13369. typedef struct {
  13370. /** TLV tag and len; tag equals
  13371. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  13372. A_UINT32 tlv_header;
  13373. /** vdev id*/
  13374. A_UINT32 vdev_id;
  13375. /** enable_mhf_ofl contains values from enum
  13376. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  13377. A_UINT32 enable_mhf_ofl;
  13378. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  13379. enum wmi_mhf_ofl_table_action {
  13380. /** Create MHF offload table in FW */
  13381. WMI_MHF_OFL_TBL_CREATE = 0,
  13382. /** Append to existing MHF offload table */
  13383. WMI_MHF_OFL_TBL_APPEND = 1,
  13384. /** Flush entire MHF offload table in FW */
  13385. WMI_MHF_OFL_TBL_FLUSH = 2,
  13386. };
  13387. typedef struct {
  13388. /** TLV tag and len; tag equals
  13389. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  13390. A_UINT32 tlv_header;
  13391. /** vdev id*/
  13392. A_UINT32 vdev_id;
  13393. /** action corresponds to values from enum
  13394. * wmi_mhf_ofl_table_action */
  13395. A_UINT32 action;
  13396. /** number of entries in the table */
  13397. A_UINT32 num_entries;
  13398. /** Followed by the variable length TLV
  13399. * wmi_mhf_offload_routing_table_entry entries[] */
  13400. } wmi_mhf_offload_plumb_routing_table_cmd;
  13401. typedef struct {
  13402. /** TLV tag and len; tag equals
  13403. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  13404. A_UINT32 tlv_header;
  13405. /** Destination node's IP address */
  13406. WMI_IPV4_ADDR dest_ipv4_addr;
  13407. /** Next hop node's MAC address */
  13408. wmi_mac_addr next_hop_mac_addr;
  13409. } wmi_mhf_offload_routing_table_entry;
  13410. typedef struct {
  13411. /** tlv tag and len, tag equals
  13412. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  13413. A_UINT32 tlv_header;
  13414. /** full 64 tsf timestamp get from MAC tsf timer indicates
  13415. * the time that the radar event uploading to host, split
  13416. * it to high 32 bit and lower 32 bit in fulltsf_high and
  13417. * full_tsf_low
  13418. */
  13419. A_UINT32 upload_fullts_low;
  13420. A_UINT32 upload_fullts_high;
  13421. /** timestamp indicates the time when DFS pulse is detected
  13422. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  13423. */
  13424. A_UINT32 pulse_detect_ts;
  13425. /** the duaration of the pulse in us */
  13426. A_UINT32 pulse_duration;
  13427. /** the center frequency of the radar pulse detected, KHz */
  13428. A_UINT32 pulse_center_freq;
  13429. /** bandwidth of current DFS channel, MHz */
  13430. A_UINT32 ch_bandwidth;
  13431. /** center channel frequency1 of current DFS channel, MHz */
  13432. A_UINT16 ch_center_freq1;
  13433. /** center channel frequency2 of current DFS channel, MHz,
  13434. * reserved for 160 BW mode
  13435. */
  13436. A_UINT16 ch_center_freq2;
  13437. /** flag to indicate if this pulse is chirp */
  13438. A_UINT8 pulse_is_chirp;
  13439. /** RSSI recorded in the ppdu */
  13440. A_UINT8 rssi;
  13441. /** extened RSSI info */
  13442. A_UINT8 rssi_ext;
  13443. union {
  13444. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  13445. /** pdev_id for identifying the MAC
  13446. * See macros starting with WMI_PDEV_ID_ for values.
  13447. */
  13448. A_UINT8 pdev_id;
  13449. };
  13450. /** index of peak magnitude bin (signed) */
  13451. A_INT32 peak_sidx;
  13452. /** Max pulse chirp velocity in delta bins over chirp FFT interval */
  13453. A_INT32 pulse_delta_peak;
  13454. /** Max pulse chirp velocity variance in delta bins */
  13455. A_INT32 pulse_delta_diff;
  13456. } wmi_dfs_radar_event_fixed_param;
  13457. enum {
  13458. /* DEFAULT - target chooses what action to take, based on its thermal
  13459. * management policy
  13460. * Targets which throttle tx (and potentially rx) based on thermal
  13461. * management thresholds specified by the host will shut down tx
  13462. * if the temperature exceeds upper_thresh_degreeC.
  13463. * Targets which simply inform the host about threshold breaches will
  13464. * send a notification message to the host if the temperature exceeds
  13465. * upper_thresh_degreeC.
  13466. * Conversely, if the temperature was above upper_thresh_degreeC but
  13467. * then drops to below lower_threshold_degreeC, the target will either
  13468. * resume tx, or notify the host.
  13469. */
  13470. WMI_THERMAL_MGMT_ACTION_DEFAULT = 0,
  13471. /* HALT_TRAFFIC -
  13472. * If the temperature rises above upper_thresh_degreeC, the target will
  13473. * halt tx.
  13474. * If the temperature falls back below lower_thresh_degreeC, the target
  13475. * will resume tx.
  13476. */
  13477. WMI_THERMAL_MGMT_ACTION_HALT_TRAFFIC = 1,
  13478. /* NOTIFY_HOST - the target will notify the host if the temperature
  13479. * either rises above upper_thresh_degreeC or falls below
  13480. * lower_thresh_degreeC.
  13481. */
  13482. WMI_THERMAL_MGMT_ACTION_NOTIFY_HOST = 2,
  13483. };
  13484. typedef struct {
  13485. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  13486. /*Thermal thresholds*/
  13487. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  13488. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  13489. /*Enable/Disable Thermal Monitoring for Mitigation*/
  13490. A_UINT32 enable;
  13491. /* action: what the target should do when a thermal upper/lower threshold
  13492. * is crossed.
  13493. * Refer to the WMI_THERMAL_MGMT_ACTION enum.
  13494. */
  13495. A_UINT32 action;
  13496. A_UINT32 threshold_warning_degreeC;
  13497. A_UINT32 sample_rate_ms;
  13498. } wmi_thermal_mgmt_cmd_fixed_param;
  13499. typedef struct {
  13500. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  13501. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  13502. } wmi_thermal_mgmt_event_fixed_param;
  13503. /**
  13504. * This command is sent from WLAN host driver to firmware to
  13505. * request firmware to configure auto shutdown timer in fw
  13506. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  13507. */
  13508. typedef struct {
  13509. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  13510. A_UINT32 timer_value; /** timer value; 0=disable */
  13511. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  13512. enum wmi_host_auto_shutdown_reason {
  13513. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  13514. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  13515. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  13516. };
  13517. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  13518. typedef struct{
  13519. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  13520. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  13521. } wmi_host_auto_shutdown_event_fixed_param;
  13522. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  13523. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  13524. * This command is only used by some customer for verification test. It is not for end-user.
  13525. *
  13526. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  13527. *
  13528. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  13529. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  13530. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  13531. * <channel, ack_offset> pair is unique.
  13532. *
  13533. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  13534. * called basic_config_info by bitmap
  13535. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  13536. *
  13537. * '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
  13538. * is ignored.
  13539. * disable will remove preious conditions from FW.
  13540. * conditions from the later command will over write conditions stored from a previous command.
  13541. *
  13542. */
  13543. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  13544. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  13545. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  13546. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  13547. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  13548. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  13549. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  13550. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  13551. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  13552. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  13553. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  13554. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  13555. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  13556. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  13557. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  13558. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  13559. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  13560. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  13561. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  13562. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  13563. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  13564. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  13565. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  13566. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  13567. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  13568. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  13569. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  13570. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  13571. /** Bit map definition for basic_config_info starts */
  13572. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  13573. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  13574. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  13575. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  13576. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  13577. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  13578. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  13579. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  13580. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  13581. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  13582. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  13583. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  13584. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  13585. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  13586. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  13587. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  13588. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  13589. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  13590. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  13591. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  13592. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  13593. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  13594. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  13595. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  13596. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  13597. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  13598. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  13599. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  13600. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  13601. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  13602. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  13603. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  13604. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  13605. /*
  13606. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  13607. * is temporarily maintained as an alias for the correct name
  13608. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13609. */
  13610. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  13611. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  13612. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13613. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  13614. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  13615. /*
  13616. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  13617. * is temporarily maintained as an alias for the correct name
  13618. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  13619. */
  13620. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  13621. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  13622. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  13623. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  13624. /** Bit map definition for basic_config_info ends */
  13625. typedef struct{
  13626. A_UINT32 tlv_header;
  13627. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  13628. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  13629. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  13630. * 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
  13631. * 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
  13632. * 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
  13633. * Bit16 : band condition b'0: 2G, b'1: 5G
  13634. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  13635. * 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
  13636. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  13637. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  13638. * Bit23 ~ Bit31: reserved
  13639. */
  13640. A_UINT32 basic_config_info;
  13641. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  13642. * it depends on Bit14 of basic_config_info
  13643. * Total 24 channels for 5G
  13644. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  13645. * Total 14 channels for 2G
  13646. * 1 ~ 14
  13647. */
  13648. A_UINT32 channel;
  13649. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  13650. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  13651. * Legacy rates , 11b, 11g, 11A
  13652. * 11n one stream (ht20, ht40) 8+8
  13653. * 11n two streams (ht20, ht40) 8+8
  13654. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  13655. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  13656. */
  13657. A_UINT32 rate0;
  13658. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  13659. * 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
  13660. */
  13661. /** 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
  13662. */
  13663. A_UINT32 rate1;
  13664. } wmi_tpc_chainmask_config;
  13665. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  13666. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  13667. typedef struct{
  13668. A_UINT32 tlv_header;
  13669. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  13670. A_UINT32 num_tpc_chainmask_configs;
  13671. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  13672. } wmi_tpc_chainmask_config_cmd_fixed_param;
  13673. typedef struct {
  13674. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_req_fixed_param */
  13675. A_UINT32 pdev_id;
  13676. /**
  13677. * Bits 31:0: base address of ring [31:0]
  13678. */
  13679. A_UINT32 base_addr_lo;
  13680. /**
  13681. * Bits 3:0: base address of ring [35:32]
  13682. * Bits 31:4: reserved
  13683. */
  13684. A_UINT32 base_addr_hi;
  13685. /**
  13686. * Bits 31:0: address of head index [31:0]
  13687. */
  13688. A_UINT32 head_idx_addr_lo;
  13689. /**
  13690. * Bits 3:0: address of head index [35:32]
  13691. * Bits 31:4: reserved
  13692. */
  13693. A_UINT32 head_idx_addr_hi;
  13694. /**
  13695. * Bits 31:0: address of tail index [31:0]
  13696. */
  13697. A_UINT32 tail_idx_addr_lo;
  13698. /**
  13699. * Bits 3:0: address of tail index [35:32]
  13700. * Bits 31:4: reserved
  13701. */
  13702. A_UINT32 tail_idx_addr_hi;
  13703. A_UINT32 num_ptr; /** Number of pointers in the ring */
  13704. } wmi_oem_dma_ring_cfg_req_fixed_param;
  13705. #define WMI_OEM_DMA_RING_ADDR_LO_S 0
  13706. #define WMI_OEM_DMA_RING_ADDR_LO 0xffffffff
  13707. #define WMI_OEM_DMA_RING_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_LO)
  13708. #define WMI_OEM_DMA_RING_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_LO)
  13709. #define WMI_OEM_DMA_RING_ADDR_HI_S 0
  13710. #define WMI_OEM_DMA_RING_ADDR_HI 0xf
  13711. #define WMI_OEM_DMA_RING_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_RING_ADDR_HI)
  13712. #define WMI_OEM_DMA_RING_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_RING_ADDR_HI)
  13713. typedef struct {
  13714. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_ring_cfg_rsp_fixed_param */
  13715. A_UINT32 pdev_id;
  13716. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  13717. } wmi_oem_dma_ring_cfg_rsp_fixed_param;
  13718. typedef struct {
  13719. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_indirect_data */
  13720. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  13721. /**
  13722. * Bits 31:0: address of data [31:0]
  13723. */
  13724. A_UINT32 addr_lo;
  13725. /**
  13726. * Bits 3:0: address of data [35:32]
  13727. * Bits 11:4: reserved
  13728. * Bits 31:12: opaque host context data [19:0]
  13729. */
  13730. A_UINT32 addr_hi;
  13731. A_UINT32 len; /** Length of data in bytes */
  13732. } wmi_oem_indirect_data;
  13733. #define WMI_OEM_DMA_DATA_ADDR_LO_S 0
  13734. #define WMI_OEM_DMA_DATA_ADDR_LO 0xffffffff
  13735. #define WMI_OEM_DMA_DATA_ADDR_LO_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_LO)
  13736. #define WMI_OEM_DMA_DATA_ADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_LO)
  13737. #define WMI_OEM_DMA_DATA_ADDR_HI_S 0
  13738. #define WMI_OEM_DMA_DATA_ADDR_HI 0xf
  13739. #define WMI_OEM_DMA_DATA_ADDR_HI_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI)
  13740. #define WMI_OEM_DMA_DATA_ADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_OEM_DMA_DATA_ADDR_HI)
  13741. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_S 12
  13742. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA 0xfffff
  13743. #define WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA_GET(dword) WMI_F_MS(dword, WMI_OEM_DMA_DATA_ADDR_HI_HOST_DATA)
  13744. #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)
  13745. typedef struct {
  13746. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_dma_buf_release_hdr */
  13747. A_UINT32 pdev_id; /** ID of pdev whose OEM DMA ring produced the data */
  13748. } wmi_oem_dma_buf_release_fixed_param;
  13749. typedef struct {
  13750. /**
  13751. * Bits 31:0: address of data [31:0]
  13752. */
  13753. A_UINT32 addr_lo;
  13754. /**
  13755. * Bits 3:0: address of data [35:32]
  13756. * Bits 11:4: reserved
  13757. * Bits 31:12: host context data [19:0]
  13758. */
  13759. A_UINT32 addr_hi;
  13760. } wmi_oem_dma_buf_release_entry;
  13761. typedef struct {
  13762. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  13763. A_UINT32 data_len; /** length in byte of data[]. */
  13764. /* This structure is used to send REQ binary blobs
  13765. * from application/service to firmware where Host drv is pass through .
  13766. * Following this structure is the TLV:
  13767. * A_UINT8 data[]; <-- length in byte given by field data_len.
  13768. */
  13769. } wmi_nan_cmd_param;
  13770. typedef struct {
  13771. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  13772. A_UINT32 data_len; /** length in byte of data[]. */
  13773. /* This structure is used to send REQ binary blobs
  13774. * from firmware to application/service where Host drv is pass through .
  13775. * Following this structure is the TLV:
  13776. * A_UINT8 data[]; <-- length in byte given by field data_len.
  13777. */
  13778. } wmi_nan_event_hdr;
  13779. /**
  13780. * Event to indicate NAN discovery interface created
  13781. */
  13782. typedef struct {
  13783. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  13784. A_UINT32 tlv_header;
  13785. /** Unique id identifying the VDEV */
  13786. A_UINT32 vdev_id;
  13787. /** NAN interface MAC address */
  13788. wmi_mac_addr nan_interface_macaddr;
  13789. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  13790. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  13791. /**
  13792. * Event to indicate NAN discovery interface deleted
  13793. */
  13794. typedef struct {
  13795. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  13796. A_UINT32 tlv_header;
  13797. /** Unique id identifying the VDEV */
  13798. A_UINT32 vdev_id;
  13799. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  13800. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  13801. /**
  13802. * Event to indicate NAN device started new cluster
  13803. */
  13804. typedef struct {
  13805. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  13806. A_UINT32 tlv_header;
  13807. /** Unique id identifying the VDEV */
  13808. A_UINT32 vdev_id;
  13809. /** NAN Cluster ID */
  13810. A_UINT32 nan_cluster_id;
  13811. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  13812. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  13813. /**
  13814. * Event to indicate NAN device joined to cluster
  13815. */
  13816. typedef struct {
  13817. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  13818. A_UINT32 tlv_header;
  13819. /** Unique id identifying the VDEV */
  13820. A_UINT32 vdev_id;
  13821. /** NAN Cluster ID */
  13822. A_UINT32 nan_cluster_id;
  13823. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  13824. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  13825. /** NAN DATA CMD's */
  13826. /**
  13827. * NAN Data get capabilities req
  13828. */
  13829. typedef struct {
  13830. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  13831. A_UINT32 tlv_header;
  13832. /** unique id generated in upper layer for the transaction */
  13833. A_UINT32 transaction_id;
  13834. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  13835. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  13836. /**
  13837. * NDP Response code
  13838. */
  13839. typedef enum {
  13840. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  13841. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  13842. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  13843. } wmi_ndp_rsp_code_PROTOTYPE;
  13844. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  13845. /**
  13846. * NDP Channel configuration type
  13847. */
  13848. typedef enum {
  13849. WMI_NDP_CHANNEL_NOT_REQUESTED = 0, /* Channel will not configured */
  13850. WMI_NDP_REQUEST_CHANNEL_SETUP = 1, /* Channel will be provided and is optional/hint */
  13851. WMI_NDP_FORCE_CHANNEL_SETUP = 2/* NDP must start on the provided channel */
  13852. } wmi_ndp_channel_cfg_PROTOTYPE;
  13853. #define wmi_ndp_channel_cfg wmi_ndp_channel_cfg_PROTOTYPE
  13854. /**
  13855. * NDP Initiator requesting a data session
  13856. */
  13857. typedef struct {
  13858. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  13859. A_UINT32 tlv_header;
  13860. /** Unique id identifying the VDEV */
  13861. A_UINT32 vdev_id;
  13862. /** unique id generated in upper layer for the transaction */
  13863. A_UINT32 transaction_id;
  13864. /** Unique Instance Id identifying the Responder's service */
  13865. A_UINT32 service_instance_id;
  13866. /** Discovery MAC addr of the publisher/peer */
  13867. wmi_mac_addr peer_discovery_mac_addr;
  13868. /** Actual number of bytes in TLV ndp_cfg */
  13869. A_UINT32 ndp_cfg_len;
  13870. /** Actual number of bytes in TLV ndp_app_info */
  13871. A_UINT32 ndp_app_info_len;
  13872. /** NDP channel configuration type defined in wmi_ndp_channel_cfg */
  13873. A_UINT32 ndp_channel_cfg;
  13874. /** NAN Cipher Suite Shared Key */
  13875. A_UINT32 nan_csid;
  13876. /** Actual number of bytes in TLV ndp_pmk */
  13877. A_UINT32 nan_pmk_len;
  13878. /** Actual number of bytes in TLV ndp_passphrase */
  13879. A_UINT32 nan_passphrase_len;
  13880. /** Actual number of bytes in TLV nan_servicename */
  13881. A_UINT32 nan_servicename_len;
  13882. /**
  13883. * TLV (tag length value) parameters follow the ndp_initiator_req
  13884. * structure. The TLV's are:
  13885. * wmi_channel channel;
  13886. * A_UINT8 ndp_cfg[];
  13887. * A_UINT8 ndp_app_info[];
  13888. * A_UINT8 ndp_pmk[];
  13889. * A_INT8 ndp_passphrase[];
  13890. * A_INT8 nan_servicename[];
  13891. */
  13892. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  13893. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  13894. /**
  13895. * Initiate a data response on the responder side
  13896. * for data request indication from the peer
  13897. */
  13898. typedef struct {
  13899. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  13900. A_UINT32 tlv_header;
  13901. /** Unique id identifying the VDEV */
  13902. A_UINT32 vdev_id;
  13903. /** unique id generated in upper layer for the transaction */
  13904. A_UINT32 transaction_id;
  13905. /**
  13906. * Unique token Id generated on the initiator/responder
  13907. * side used for a NDP session between two NAN devices
  13908. */
  13909. A_UINT32 ndp_instance_id;
  13910. /** Response Code defined in wmi_ndp_rsp_code */
  13911. A_UINT32 rsp_code;
  13912. /** Number of bytes in TLV ndp_cfg */
  13913. A_UINT32 ndp_cfg_len;
  13914. /** Number of bytes in TLV ndp_app_info */
  13915. A_UINT32 ndp_app_info_len;
  13916. /** NAN Cipher Suite Shared Key */
  13917. A_UINT32 nan_csid;
  13918. /** Actual number of bytes in TLV ndp_pmk */
  13919. A_UINT32 nan_pmk_len;
  13920. /** Actual number of bytes in TLV ndp_passphrase */
  13921. A_UINT32 nan_passphrase_len;
  13922. /** Actual number of bytes in TLV nan_servicename */
  13923. A_UINT32 nan_servicename_len;
  13924. /**
  13925. * TLV (tag length value) parameters follow the ndp_responder_req
  13926. * structure. The TLV's are:
  13927. * A_UINT8 ndp_cfg[];
  13928. * A_UINT8 ndp_app_info[];
  13929. * A_UINT8 ndp_pmk[];
  13930. * A_INT8 ndp_passphrase[];
  13931. * A_INT8 nan_servicename[];
  13932. */
  13933. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  13934. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  13935. /**
  13936. * NDP end type
  13937. */
  13938. typedef enum {
  13939. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  13940. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  13941. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  13942. } wmi_ndp_end_type_PROTOTYPE;
  13943. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  13944. /**
  13945. * NDP end reason code
  13946. */
  13947. typedef enum {
  13948. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  13949. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  13950. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  13951. } wmi_ndp_end_reason_code_PROTOTYPE;
  13952. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  13953. /**
  13954. * NDP end request
  13955. */
  13956. typedef struct {
  13957. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  13958. A_UINT32 tlv_header;
  13959. /** NDP instance id */
  13960. A_UINT32 ndp_instance_id;
  13961. } wmi_ndp_end_req_PROTOTYPE;
  13962. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  13963. /**
  13964. * NDP End request
  13965. */
  13966. typedef struct {
  13967. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  13968. A_UINT32 tlv_header;
  13969. /** unique id generated in upper layer for the transaction */
  13970. A_UINT32 transaction_id;
  13971. /**
  13972. * TLV (tag length value) parameters follow the ndp_end_req
  13973. * structure. The TLV's are:
  13974. * wmi_ndp_end_req ndp_end_req_list[];
  13975. */
  13976. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  13977. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  13978. /* NAN DATA RSP EVENTS */
  13979. /**
  13980. * Event to indicate NAN Data Interface capabilities cmd
  13981. */
  13982. typedef struct {
  13983. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  13984. A_UINT32 tlv_header;
  13985. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  13986. A_UINT32 transaction_id;
  13987. /** Max ndi interface support */
  13988. A_UINT32 max_ndi_interfaces;
  13989. /** Max ndp sessions can support */
  13990. A_UINT32 max_ndp_sessions;
  13991. /** Max number of peer's per ndi */
  13992. A_UINT32 max_peers_per_ndi;
  13993. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  13994. A_UINT32 nan_data_supported_bands;
  13995. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  13996. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  13997. /**
  13998. * NDP command response code
  13999. */
  14000. typedef enum {
  14001. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  14002. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  14003. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  14004. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  14005. /**
  14006. * Event response for wmi_ndp_initiator_req
  14007. */
  14008. typedef struct {
  14009. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  14010. A_UINT32 tlv_header;
  14011. /** Unique id identifying the VDEV */
  14012. A_UINT32 vdev_id;
  14013. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  14014. A_UINT32 transaction_id;
  14015. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14016. A_UINT32 rsp_status;
  14017. A_UINT32 reason_code;
  14018. /**
  14019. * Unique token Id generated on the initiator/responder
  14020. * side used for a NDP session between two NAN devices
  14021. */
  14022. A_UINT32 ndp_instance_id;
  14023. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  14024. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  14025. /**
  14026. * Event response for wmi_ndp_responder_req cmd
  14027. */
  14028. typedef struct {
  14029. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  14030. A_UINT32 tlv_header;
  14031. /** Unique id identifying the VDEV */
  14032. A_UINT32 vdev_id;
  14033. /** Copy of transaction_id received in wmi_ndp_responder_req */
  14034. A_UINT32 transaction_id;
  14035. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14036. A_UINT32 rsp_status;
  14037. A_UINT32 reason_code;
  14038. /**
  14039. * Unique token Id generated on the initiator/responder
  14040. * side used for a NDP session between two NAN devices
  14041. */
  14042. A_UINT32 ndp_instance_id;
  14043. /** NDI mac address of the peer */
  14044. wmi_mac_addr peer_ndi_mac_addr;
  14045. /** Host can create peer if this entry is TRUE */
  14046. A_UINT32 create_peer;
  14047. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  14048. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  14049. /**
  14050. * Active ndp instance id
  14051. */
  14052. typedef struct {
  14053. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  14054. A_UINT32 tlv_header;
  14055. /** NDP instance id */
  14056. A_UINT32 ndp_instance_id;
  14057. } wmi_active_ndp_instance_id_PROTOTYPE;
  14058. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  14059. /**
  14060. * NDP end response per ndi
  14061. */
  14062. typedef struct {
  14063. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  14064. A_UINT32 tlv_header;
  14065. /** Unique id identifying the VDEV */
  14066. A_UINT32 vdev_id;
  14067. /** Peer MAC addr */
  14068. wmi_mac_addr peer_mac_addr;
  14069. /** Number of active ndps on this ndi */
  14070. A_UINT32 num_active_ndps_on_ndi;
  14071. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  14072. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  14073. /**
  14074. * Event response for wmi_ndp_end_req cmd
  14075. */
  14076. typedef struct {
  14077. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  14078. A_UINT32 tlv_header;
  14079. /** Copy of transaction_id received in wmi_ndp_end_req */
  14080. A_UINT32 transaction_id;
  14081. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  14082. A_UINT32 rsp_status;
  14083. A_UINT32 reason_code;
  14084. /**
  14085. * TLV (tag length value) parameters follow the ndp_end_rsp
  14086. * structure. The TLV's are:
  14087. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  14088. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  14089. */
  14090. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  14091. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  14092. /** NAN DATA EVENTS */
  14093. /**
  14094. * NDP self role
  14095. */
  14096. typedef enum {
  14097. WMI_NDP_INITIATOR_ROLE,
  14098. WMI_NDP_RESPONDER_ROLE,
  14099. } wmi_ndp_self_role_PROTOTYPE;
  14100. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  14101. /**
  14102. * NDP accept policy
  14103. */
  14104. typedef enum {
  14105. WMI_NDP_ACCEPT_POLICY_NONE,
  14106. WMI_NDP_ACCEPT_POLICY_ALL,
  14107. } wmi_ndp_accept_policy_PROTOTYPE;
  14108. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  14109. /**
  14110. * Event indication received on the responder side when a NDP Initiator request/
  14111. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  14112. *
  14113. * Event indication received on the initiator side when a
  14114. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  14115. */
  14116. typedef struct {
  14117. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  14118. A_UINT32 tlv_header;
  14119. /** Unique id identifying the VDEV */
  14120. A_UINT32 vdev_id;
  14121. /** Self NDP Role defined in wmi_ndp_self_role */
  14122. A_UINT32 self_ndp_role;
  14123. /** Accept policy defined in wmi_ndp_accept_policy */
  14124. A_UINT32 accept_policy;
  14125. /** Unique Instance Id corresponding to a service/session. */
  14126. A_UINT32 service_instance_id;
  14127. /** Discovery MAC addr of the peer/initiator */
  14128. wmi_mac_addr peer_discovery_mac_addr;
  14129. /** NDI mac address of the peer */
  14130. wmi_mac_addr peer_ndi_mac_addr;
  14131. /**
  14132. * Unique token Id generated on the initiator/responder
  14133. * side used for a NDP session between two NAN devices
  14134. */
  14135. A_UINT32 ndp_instance_id;
  14136. /** Number of bytes in TLV wmi_ndp_cfg */
  14137. A_UINT32 ndp_cfg_len;
  14138. /** Number of bytes in TLV wmi_ndp_app_info */
  14139. A_UINT32 ndp_app_info_len;
  14140. /** Peer NAN Cipher Suite Shared Key */
  14141. A_UINT32 nan_csid;
  14142. /** Actual number of bytes in TLV nan_scid */
  14143. A_UINT32 nan_scid_len;
  14144. /** Self NDI mac address */
  14145. wmi_mac_addr self_ndi_mac_addr;
  14146. /**
  14147. * TLV (tag length value) parameters follow the ndp_indication
  14148. * structure. The TLV's are:
  14149. * A_UINT8 ndp_cfg[];
  14150. * A_UINT8 ndp_app_info[];
  14151. * A_UINT8 nan_scid[];
  14152. */
  14153. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  14154. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  14155. /**
  14156. * Event indication of data confirm is received on both
  14157. * initiator and responder side confirming a NDP session
  14158. */
  14159. typedef struct {
  14160. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  14161. A_UINT32 tlv_header;
  14162. /** Unique id identifying the VDEV */
  14163. A_UINT32 vdev_id;
  14164. /**
  14165. * Unique token Id generated on the initiator/responder
  14166. * side used for a NDP session between two NAN devices
  14167. */
  14168. A_UINT32 ndp_instance_id;
  14169. /** NDI mac address of the peer (required to derive target ipv6 address) */
  14170. wmi_mac_addr peer_ndi_mac_addr;
  14171. /** Response Code defined in wmi_ndp_rsp_code */
  14172. A_UINT32 rsp_code;
  14173. /** Number of bytes in TLV wmi_ndp_cfg */
  14174. A_UINT32 ndp_cfg_len;
  14175. /** Number of bytes in TLV wmi_ndp_app_info */
  14176. A_UINT32 ndp_app_info_len;
  14177. /** Reason Code */
  14178. A_UINT32 reason_code;
  14179. /** Number of active ndps on this peer */
  14180. A_UINT32 num_active_ndps_on_peer;
  14181. /** Number of channels on this peer */
  14182. A_UINT32 num_ndp_channels;
  14183. /**
  14184. * TLV (tag length value) parameters follow the ndp_confirm
  14185. * structure. The TLV's are:
  14186. * A_UINT8 ndp_cfg[];
  14187. * A_UINT8 ndp_app_info[];
  14188. * wmi_channel ndp_channel_list[];
  14189. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  14190. * // since Nss is associated with the channel
  14191. */
  14192. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  14193. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  14194. /**
  14195. * Event indication received on the initiator/responder side terminating a NDP session
  14196. */
  14197. typedef struct {
  14198. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  14199. A_UINT32 tlv_header;
  14200. /** type defined in wmi_ndp_end_type */
  14201. A_UINT32 type;
  14202. /** Unique id identifying the VDEV */
  14203. A_UINT32 vdev_id;
  14204. /** reason_code defined in wmi_ndp_end_reason_code */
  14205. A_UINT32 reason_code;
  14206. /** NDP instance id */
  14207. A_UINT32 ndp_instance_id;
  14208. /** NDI MAC addr of the peer */
  14209. wmi_mac_addr peer_ndi_mac_addr;
  14210. /** Number of active ndps on this peer */
  14211. A_UINT32 num_active_ndps_on_peer;
  14212. } wmi_ndp_end_indication_PROTOTYPE;
  14213. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  14214. typedef struct
  14215. {
  14216. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndl_schedule_update_fixed_param */
  14217. /** Unique id identifying the VDEV */
  14218. A_UINT32 vdev_id;
  14219. /** peer MAC address */
  14220. wmi_mac_addr peer_macaddr;
  14221. /** Flags:
  14222. * Bit 0 -> Nss updated
  14223. * Bit 1 -> channel list updated
  14224. * Bits 2-31 -> Reserved
  14225. */
  14226. A_UINT32 flags;
  14227. /** num of channels */
  14228. A_UINT32 num_channels;
  14229. /** num of ndp instances */
  14230. A_UINT32 num_ndp_instances;
  14231. /**
  14232. * TLV (tag length value) parameters follow the ndl_schedule_update
  14233. * structure. The TLV's are:
  14234. * A_UINT32 ndp_instance_list[];
  14235. * wmi_channel ndl_channel_list[];
  14236. * A_UINT32 nss_list[]; // Nss indexing should match with channel indexing,
  14237. * // since Nss is associate with a channel
  14238. */
  14239. } wmi_ndl_schedule_update_fixed_param_PROTOTYPE;
  14240. #define wmi_ndl_schedule_update_fixed_param wmi_ndl_schedule_update_fixed_param_PROTOTYPE
  14241. typedef struct {
  14242. A_UINT32 tlv_header;
  14243. A_UINT32 num_data;
  14244. /* followed by WMITLV_TAG_ARRAY_BYTE */
  14245. } wmi_diag_data_container_event_fixed_param;
  14246. enum {
  14247. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  14248. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  14249. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  14250. };
  14251. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  14252. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  14253. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  14254. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  14255. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  14256. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  14257. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  14258. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  14259. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  14260. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  14261. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  14262. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  14263. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK 0x00000001
  14264. #define PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT 0
  14265. #define SET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param, value) \
  14266. do { \
  14267. (param) &= ~PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK; \
  14268. (param) |= (value) << PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT; \
  14269. while (0)
  14270. #define GET_PDEV_SMART_CHAINMASK_SCHEME_DECISION(param) \
  14271. (((param) & PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_MASK) >> PDEV_PARAM_SMART_CHAINMASK_SCHEME_DECISION_SHIFT)
  14272. /**
  14273. * This command is sent from WLAN host driver to firmware to
  14274. * notify the current modem power state. Host would receive a
  14275. * message from modem when modem is powered on. Host driver
  14276. * would then send this command to firmware. Firmware would then
  14277. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  14278. *
  14279. * This command is only applicable for APQ platform which has
  14280. * modem on the platform. If firmware doesn't support MWS Coex,
  14281. * this command can be dropped by firmware.
  14282. *
  14283. * This is a requirement from modem team that WCN can't toggle
  14284. * UART before modem is powered on.
  14285. */
  14286. typedef struct {
  14287. /** TLV tag and len; tag equals
  14288. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  14289. A_UINT32 tlv_header;
  14290. /** Modem power state parameter */
  14291. A_UINT32 modem_power_state;
  14292. } wmi_modem_power_state_cmd_param;
  14293. enum {
  14294. WMI_MODEM_STATE_OFF = 0,
  14295. WMI_MODEM_STATE_ON
  14296. };
  14297. /**
  14298. * This command is sent from WLAN host driver to firmware to
  14299. * notify the updated Specific Absorption Rate (SAR) limits.
  14300. * A critical regulation for FCC compliance, OEMs require methods to set
  14301. * limits on TX power of WLAN/WWAN.
  14302. * Host would receive instructions on what to set the limits per
  14303. * band/chain/modulation to, it would then interpret and send the limits
  14304. * to FW using this WMI message.
  14305. * Since it is possible to have too many commands to fit into one message,
  14306. * FW will keep receiving the messages, until it finds one with
  14307. * commit_limits = 1, at which point it will apply all the received
  14308. * specifications.
  14309. */
  14310. typedef struct {
  14311. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
  14312. A_UINT32 tlv_header;
  14313. /** when set to WMI_SAR_FEATURE_ON_*, enable SAR feature
  14314. * with BDF (SET_0 to 4) or WMI
  14315. * if set to WMI_SAR_FEATURE_OFF, disable feature;
  14316. * if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
  14317. */
  14318. A_UINT32 sar_enable;
  14319. /** number of items in sar_limits[] */
  14320. A_UINT32 num_limit_rows;
  14321. /** once received and is set to 1, FW will calculate the power limits
  14322. * and send set_power command to apply them.
  14323. * Otherwise just update local values stored in FW until a future msg
  14324. * with commit_limits=1 arrives.
  14325. */
  14326. A_UINT32 commit_limits;
  14327. /**
  14328. * TLV (tag length value) parameters follow the sar_limit_cmd_row
  14329. * structure. The TLV's are:
  14330. * wmi_sar_limit_cmd_row sar_limits[];
  14331. */
  14332. } wmi_sar_limits_cmd_fixed_param;
  14333. enum wmi_sar_feature_state_flags {
  14334. WMI_SAR_FEATURE_OFF = 0,
  14335. WMI_SAR_FEATURE_ON_SET_0,
  14336. WMI_SAR_FEATURE_ON_SET_1,
  14337. WMI_SAR_FEATURE_ON_SET_2,
  14338. WMI_SAR_FEATURE_ON_SET_3,
  14339. WMI_SAR_FEATURE_ON_SET_4,
  14340. WMI_SAR_FEATURE_NO_CHANGE,
  14341. WMI_SAR_FEATURE_ON_USER_DEFINED,
  14342. WMI_SAR_FEATURE_ON_SAR_V2_0,
  14343. };
  14344. typedef struct {
  14345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
  14346. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  14347. * new band_id values .
  14348. */
  14349. A_UINT32 band_id;
  14350. A_UINT32 chain_id;
  14351. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  14352. A_UINT32 mod_id;
  14353. /**
  14354. * To be backwards-compatible with older code use a union with
  14355. * limit_value & limit_index as alternate names / interpretations
  14356. * of the same message information element.
  14357. * The older code still uses limit_value, while the new code will
  14358. * use limit_index.
  14359. * The interpretation of the field as value or index depends on
  14360. * WMI_SAR_FEATURE_ON_*
  14361. * WMI_SAR_FEATURE_ON_SAR_V2_0 will use it as index, other case
  14362. * still use it as value.
  14363. */
  14364. union {
  14365. /** actual power limit value, in steps of 0.5 dBm */
  14366. A_UINT32 limit_value;
  14367. A_UINT32 limit_index;
  14368. };
  14369. /** in case the OEM doesn't care about one of the qualifiers from above,
  14370. * the bit for that qualifier within the validity_bitmap can be set to 0
  14371. * so that limit is applied to all possible cases of this qualifier
  14372. * (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
  14373. * treated as a wildcard).
  14374. * Current masks:
  14375. * WMI_SAR_BAND_ID_VALID_MASK
  14376. * WMI_SAR_CHAIN_ID_VALID_MASK
  14377. * WMI_SAR_MOD_ID_VALID_MASK
  14378. * Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
  14379. * it means apply same limit_value to both WMI_SAR_MOD_CCK and
  14380. * WMI_SAR_MOD_OFDM cases.
  14381. */
  14382. A_UINT32 validity_bitmap;
  14383. } wmi_sar_limit_cmd_row;
  14384. enum wmi_sar_band_id_flags {
  14385. WMI_SAR_2G_ID = 0,
  14386. WMI_SAR_5G_ID
  14387. };
  14388. enum wmi_sar_mod_id_flags {
  14389. WMI_SAR_MOD_CCK = 0,
  14390. WMI_SAR_MOD_OFDM
  14391. };
  14392. /**
  14393. * This message is sent from FW to WLAN host to inform the host of the
  14394. * updated Specific Absorption Rate (SAR) limits currently in use.
  14395. */
  14396. typedef struct {
  14397. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_event_param */
  14398. A_UINT32 tlv_header;
  14399. /** when set to WMI_SAR_FEATURE_ON_*, SAR feature is enabled
  14400. * with BDF (SET_0 to 4) or WMI
  14401. * if set to WMI_SAR_FEATURE_OFF, feature is disabled;
  14402. */
  14403. A_UINT32 sar_enable;
  14404. /**
  14405. * number of items in sar_limits[].
  14406. * used when sar_enable == WMI_SAR_FEATURE_ON_USER_DEFINED.
  14407. * Should be zero if any of the BDF sets is activated.
  14408. */
  14409. A_UINT32 num_limit_rows;
  14410. /**
  14411. * TLV (tag length value) parameters follow the sar_get_limit_event_row
  14412. * structure. The TLV's are:
  14413. * wmi_sar_get_limit_event_row sar_limits[num_limit_rows];
  14414. */
  14415. } wmi_sar_get_limits_event_fixed_param;
  14416. typedef struct {
  14417. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limit_event_row */
  14418. /** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
  14419. * new band_id values .
  14420. */
  14421. A_UINT32 band_id;
  14422. A_UINT32 chain_id;
  14423. /** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
  14424. A_UINT32 mod_id;
  14425. /** actual power limit value, in steps of 0.5 dBm */
  14426. A_UINT32 limit_value;
  14427. } wmi_sar_get_limit_event_row;
  14428. #define WMI_SAR_BAND_ID_VALID_MASK (0x1)
  14429. #define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
  14430. #define WMI_SAR_MOD_ID_VALID_MASK (0x4)
  14431. #define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
  14432. #define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
  14433. #define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
  14434. #define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
  14435. #define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
  14436. #define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
  14437. /**
  14438. * This command is sent from WLAN host driver to firmware to
  14439. * get current Specific Absorption Rate (SAR) limits status from firmware.
  14440. * The command does not require any parameters as of now.
  14441. */
  14442. typedef struct {
  14443. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_get_limits_cmd_param */
  14444. A_UINT32 tlv_header;
  14445. /** currently no parameters are required. Reserved bit field for future use added */
  14446. /* All bits need to be set to 0 while it is a reserved field. */
  14447. A_UINT32 reserved;
  14448. } wmi_sar_get_limits_cmd_fixed_param;
  14449. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  14450. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  14451. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  14452. generated whenever firmware roamed to new AP silently and
  14453. (a) If the host is awake, FW sends the event to the host immediately .
  14454. (b) If host is in sleep then either
  14455. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  14456. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  14457. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  14458. */
  14459. typedef struct {
  14460. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  14461. A_UINT32 tlv_header;
  14462. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  14463. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  14464. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  14465. } wmi_key_material;
  14466. typedef struct {
  14467. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  14468. /** Unique id identifying the VDEV on which roaming is done by firmware */
  14469. A_UINT32 vdev_id;
  14470. /** auth_status: connected or authorized */
  14471. A_UINT32 auth_status;
  14472. /** roam_reason:
  14473. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  14474. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  14475. * bit 6 for HW mode status, set 1 to indicate host to schedule
  14476. * HW mode change, see WMI_ROAM_REQUEST_HOST_HW_MODE_CHANGE.
  14477. */
  14478. A_UINT32 roam_reason;
  14479. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  14480. A_UINT32 rssi;
  14481. /** MAC address of roamed AP */
  14482. wmi_mac_addr bssid; /* BSSID */
  14483. /** whether the frame is beacon or probe rsp */
  14484. A_UINT32 is_beacon;
  14485. /** the length of beacon/probe rsp */
  14486. A_UINT32 bcn_probe_rsp_len;
  14487. /** the length of reassoc rsp */
  14488. A_UINT32 reassoc_rsp_len;
  14489. /** the length of reassoc req */
  14490. A_UINT32 reassoc_req_len;
  14491. /**
  14492. * TLV (tag length value) parameters follows roam_synch_event
  14493. * The TLV's are:
  14494. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  14495. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  14496. * wmi_channel chan;
  14497. * wmi_key_material key;
  14498. * A_UINT32 status; subnet changed status not being used currently.
  14499. * will pass the information using roam_status.
  14500. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  14501. *
  14502. **/
  14503. } wmi_roam_synch_event_fixed_param;
  14504. /**
  14505. * The WMI_ROAM_SYNCH_FRAME_EVENTID message is used in conjunction with the
  14506. * WMI_ROAM_SYNCH_EVENTID message. The former will be sent 1st followed by
  14507. * the latter for cases where the WMI_ROAM_SYNCH_EVENTID message size would
  14508. * exceed 2K. The more_frag field in the WMI_ROAM_SYNCH_FRAME_EVENTID informs
  14509. * the host whether more WMI_ROAM_SYNCH_FRAME_EVENTID messages would follow;
  14510. * after the WMI_ROAM_SYNCH_FRAME_EVENTID messages the target sends the
  14511. * WMI_ROAM_SYNCH_EVENTID with bcn_probe_rsp_len, reassoc_rsp_len, and
  14512. * reassoc_rsp_len set to 0.
  14513. */
  14514. typedef struct {
  14515. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param */
  14516. /** Unique id identifying the VDEV on which roaming is done by firmware */
  14517. A_UINT32 vdev_id;
  14518. /** More frags to follow? */
  14519. A_UINT32 more_frag;
  14520. /** whether the frame is beacon or probe rsp */
  14521. A_UINT32 is_beacon;
  14522. /** the length of beacon/probe rsp */
  14523. A_UINT32 bcn_probe_rsp_len;
  14524. /** the length of reassoc rsp */
  14525. A_UINT32 reassoc_rsp_len;
  14526. /** the length of reassoc req */
  14527. A_UINT32 reassoc_req_len;
  14528. /**
  14529. * TLV (tag length value) parameters follows roam_synch_event
  14530. * The TLV's are:
  14531. * A_UINT8 bcn_probe_rsp_frame[bcn_probe_rsp_len];
  14532. * A_UINT8 reassoc_rsp_frame[reassoc_rsp_len];
  14533. * A_UINT8 reassoc_req_frame[reassoc_req_len];
  14534. */
  14535. } wmi_roam_synch_frame_event_fixed_param;
  14536. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  14537. typedef struct {
  14538. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  14539. A_UINT32 tlv_header;
  14540. /** MAC address of the peer for which the estimated link speed is required. */
  14541. wmi_mac_addr peer_macaddr;
  14542. /* Set to 1 only if vdev_id field is valid */
  14543. A_UINT32 valid_vdev_id;
  14544. /* VDEV to which the peer belongs to */
  14545. A_UINT32 vdev_id;
  14546. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  14547. typedef struct {
  14548. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  14549. A_UINT32 tlv_header;
  14550. /** MAC address of the peer for which the estimated link speed is required.
  14551. */
  14552. wmi_mac_addr peer_macaddr;
  14553. /* Estimated link speed in kbps.
  14554. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  14555. */
  14556. A_UINT32 est_linkspeed_kbps;
  14557. /* Set to 1 only if vdev_id field is valid */
  14558. A_UINT32 valid_vdev_id;
  14559. /* VDEV to which the peer belongs to */
  14560. A_UINT32 vdev_id;
  14561. } wmi_peer_estimated_linkspeed_event_fixed_param;
  14562. typedef struct {
  14563. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  14564. /* vdev ID */
  14565. A_UINT32 vdev_id;
  14566. A_UINT32 data_len; /** length in byte of data[]. */
  14567. /* This structure is used to send REQ binary blobs
  14568. * from application/service to firmware where Host drv is pass through .
  14569. * Following this structure is the TLV:
  14570. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14571. */
  14572. } wmi_req_stats_ext_cmd_fixed_param;
  14573. typedef struct {
  14574. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  14575. A_UINT32 vdev_id; /** vdev ID */
  14576. A_UINT32 data_len; /** length in byte of data[]. */
  14577. /* This structure is used to send REQ binary blobs
  14578. * from firmware to application/service where Host drv is pass through .
  14579. * Following this structure is the TLV:
  14580. * A_UINT8 data[]; <-- length in byte given by field data_len.
  14581. */
  14582. } wmi_stats_ext_event_fixed_param;
  14583. typedef struct {
  14584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  14585. /** unique id identifying the VDEV, generated by the caller */
  14586. A_UINT32 vdev_id;
  14587. /** peer MAC address */
  14588. wmi_mac_addr peer_macaddr;
  14589. } wmi_peer_delete_resp_event_fixed_param;
  14590. typedef struct {
  14591. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  14592. A_UINT32 tlv_header;
  14593. A_UINT32 vdev_id; /* vdev ID */
  14594. /* MAC address of the peer for which the estimated link speed is required.*/
  14595. wmi_mac_addr peer_macaddr;
  14596. A_UINT32 state; /* peer state */
  14597. } wmi_peer_state_event_fixed_param;
  14598. typedef struct {
  14599. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  14600. A_UINT32 tlv_header;
  14601. /* unique id identifying the VDEV, generated by the caller */
  14602. A_UINT32 vdev_id;
  14603. /* peer MAC address */
  14604. wmi_mac_addr peer_macaddr;
  14605. } wmi_peer_assoc_conf_event_fixed_param;
  14606. enum {
  14607. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  14608. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  14609. };
  14610. typedef struct {
  14611. /**
  14612. * TLV tag and len;
  14613. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  14614. */
  14615. A_UINT32 tlv_header;
  14616. A_UINT32 vdev_id;
  14617. /**
  14618. * active or passive. if active all the channels are actively scanned.
  14619. * if passive then all the channels are passively scanned
  14620. */
  14621. A_UINT32 scan_type;
  14622. /**
  14623. * FW can perform multiple scans with in a OBSS scan interval.
  14624. * For each scan,
  14625. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  14626. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  14627. * The unit for these 2 parameters is TUs.
  14628. */
  14629. A_UINT32 obss_scan_passive_dwell;
  14630. A_UINT32 obss_scan_active_dwell;
  14631. /**
  14632. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  14633. * both min and total per channel dwell time requirement
  14634. */
  14635. A_UINT32 bss_channel_width_trigger_scan_interval;
  14636. /**
  14637. * FW can perform multiple scans with in a OBSS scan interval.
  14638. * For each scan,
  14639. * the total per channel dwell time across all scans with in OBSS scan interval should be
  14640. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  14641. * for active scans and ,
  14642. * The unit for these 2 parameters is TUs.
  14643. */
  14644. A_UINT32 obss_scan_passive_total_per_channel;
  14645. A_UINT32 obss_scan_active_total_per_channel;
  14646. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  14647. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  14648. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  14649. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  14650. A_UINT32 current_operating_class; /** STA current operating class */
  14651. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  14652. A_UINT32 channel_len;
  14653. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  14654. A_UINT32 ie_len;
  14655. } wmi_obss_scan_enable_cmd_fixed_param;
  14656. typedef struct {
  14657. /**
  14658. * TLV tag and len;
  14659. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  14660. */
  14661. A_UINT32 tlv_header;
  14662. A_UINT32 vdev_id;
  14663. } wmi_obss_scan_disable_cmd_fixed_param;
  14664. typedef struct {
  14665. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  14666. A_UINT32 tlv_header;
  14667. /** unique id identifying the VDEV */
  14668. A_UINT32 vdev_id;
  14669. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  14670. A_UINT32 tx_status;
  14671. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  14672. typedef enum {
  14673. WMI_FRAME_TX_OK, /* frame tx ok */
  14674. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  14675. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  14676. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  14677. } WMI_FRAME_TX_STATUS;
  14678. /**
  14679. * This command is sent from WLAN host driver to firmware to
  14680. * request firmware to send the latest channel avoidance range
  14681. * to host.
  14682. *
  14683. * This command is only applicable for APQ platform which has
  14684. * modem on the platform. If firmware doesn't support MWS Coex,
  14685. * this command can be dropped by firmware.
  14686. *
  14687. * Host would send this command to firmware to request a channel
  14688. * avoidance information update.
  14689. */
  14690. typedef struct {
  14691. /** TLV tag and len; tag equals
  14692. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  14693. A_UINT32 tlv_header;
  14694. } wmi_chan_avoid_update_cmd_param;
  14695. /* ExtScan operation mode */
  14696. typedef enum {
  14697. WMI_EXTSCAN_MODE_NONE = 0x0000,
  14698. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  14699. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  14700. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  14701. } wmi_extscan_operation_mode;
  14702. /* Channel Mask */
  14703. typedef enum {
  14704. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  14705. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  14706. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  14707. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  14708. } wmi_channel_band_mask;
  14709. typedef enum {
  14710. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  14711. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  14712. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  14713. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  14714. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  14715. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  14716. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  14717. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  14718. WMI_EXTSCAN_EVENT_MAX = 0x8000
  14719. } wmi_extscan_event_type;
  14720. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  14721. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  14722. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  14723. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  14724. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  14725. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  14726. typedef enum {
  14727. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  14728. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  14729. } wmi_extscan_forwarding_flags;
  14730. typedef enum {
  14731. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  14732. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  14733. } wmi_extscan_configuration_flags;
  14734. typedef enum {
  14735. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  14736. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  14737. } wmi_extscan_bucket_configuration_flags;
  14738. typedef enum {
  14739. WMI_EXTSCAN_STATUS_OK = 0,
  14740. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  14741. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  14742. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  14743. } wmi_extscan_start_stop_status;
  14744. typedef struct {
  14745. /** Request ID - to identify command. Cannot be 0 */
  14746. A_UINT32 request_id;
  14747. /** Requestor ID - client requesting ExtScan */
  14748. A_UINT32 requestor_id;
  14749. /** VDEV id(interface) that is requesting scan */
  14750. A_UINT32 vdev_id;
  14751. } wmi_extscan_command_id;
  14752. typedef struct {
  14753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14754. /** channel number */
  14755. A_UINT32 channel;
  14756. /** dwell time in msec - use defaults if 0 */
  14757. A_UINT32 min_dwell_time;
  14758. A_UINT32 max_dwell_time;
  14759. /** passive/active channel and other flags */
  14760. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  14761. } wmi_extscan_bucket_channel;
  14762. /* Scan Bucket specification */
  14763. typedef struct {
  14764. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14765. /** Bucket ID - 0-based */
  14766. A_UINT32 bucket_id;
  14767. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  14768. A_UINT32 notify_extscan_events;
  14769. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  14770. A_UINT32 forwarding_flags;
  14771. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  14772. A_UINT32 configuration_flags;
  14773. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  14774. A_UINT32 base_period_multiplier;
  14775. /** dwell time in msec on active channels - use defaults if 0 */
  14776. A_UINT32 min_dwell_time_active;
  14777. A_UINT32 max_dwell_time_active;
  14778. /** dwell time in msec on passive channels - use defaults if 0 */
  14779. A_UINT32 min_dwell_time_passive;
  14780. A_UINT32 max_dwell_time_passive;
  14781. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  14782. A_UINT32 channel_band;
  14783. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  14784. A_UINT32 num_channels;
  14785. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  14786. A_UINT32 min_period;
  14787. /** period above which exponent is not applied anymore */
  14788. A_UINT32 max_period;
  14789. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  14790. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  14791. */
  14792. A_UINT32 exp_backoff;
  14793. /** number of scans performed at a given periodicity after which exponential back off value is
  14794. * applied to current periodicity to obtain a newer one
  14795. */
  14796. A_UINT32 exp_max_step_count;
  14797. /** Followed by the variable length TLV chan_list:
  14798. * wmi_extscan_bucket_channel chan_list[] */
  14799. } wmi_extscan_bucket;
  14800. typedef struct {
  14801. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  14802. /** Request ID - to identify command. Cannot be 0 */
  14803. A_UINT32 request_id;
  14804. /** Requestor ID - client requesting ExtScan */
  14805. A_UINT32 requestor_id;
  14806. /** VDEV id(interface) that is requesting scan */
  14807. A_UINT32 vdev_id;
  14808. /** table ID - to allow support for multiple simultaneous requests */
  14809. A_UINT32 table_id;
  14810. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  14811. A_UINT32 base_period;
  14812. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  14813. A_UINT32 max_iterations;
  14814. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  14815. A_UINT32 forwarding_flags;
  14816. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  14817. A_UINT32 configuration_flags;
  14818. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  14819. A_UINT32 notify_extscan_events;
  14820. /** Scan Priority, input to scan scheduler */
  14821. A_UINT32 scan_priority;
  14822. /** Maximum number of BSSIDs to cache on each scan cycle */
  14823. A_UINT32 max_bssids_per_scan_cycle;
  14824. /** Minimum RSSI value to report */
  14825. A_UINT32 min_rssi;
  14826. /** Maximum table usage in percentage */
  14827. A_UINT32 max_table_usage;
  14828. /** default dwell time in msec on active channels */
  14829. A_UINT32 min_dwell_time_active;
  14830. A_UINT32 max_dwell_time_active;
  14831. /** default dwell time in msec on passive channels */
  14832. A_UINT32 min_dwell_time_passive;
  14833. A_UINT32 max_dwell_time_passive;
  14834. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  14835. A_UINT32 min_rest_time;
  14836. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  14837. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  14838. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  14839. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  14840. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  14841. * irrespective of activity. activity is determined by the idle_time parameter.
  14842. */
  14843. A_UINT32 max_rest_time;
  14844. /** time before sending next set of probe requests.
  14845. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  14846. * The number of probe requests specified depends on the ssid_list and bssid_list
  14847. */
  14848. /** Max number of probes to be sent */
  14849. A_UINT32 n_probes;
  14850. /** time in msec between 2 sets of probe requests. */
  14851. A_UINT32 repeat_probe_time;
  14852. /** time in msec between 2 consequetive probe requests with in a set. */
  14853. A_UINT32 probe_spacing_time;
  14854. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  14855. A_UINT32 idle_time;
  14856. /** maximum time in msec allowed for scan */
  14857. A_UINT32 max_scan_time;
  14858. /** delay in msec before sending first probe request after switching to a channel */
  14859. A_UINT32 probe_delay;
  14860. /** Scan control flags */
  14861. A_UINT32 scan_ctrl_flags;
  14862. /** Burst duration time in msec*/
  14863. A_UINT32 burst_duration;
  14864. /** number of bssids in the TLV bssid_list[] */
  14865. A_UINT32 num_bssid;
  14866. /** number of ssid in the TLV ssid_list[] */
  14867. A_UINT32 num_ssids;
  14868. /** number of bytes in TLV ie_data[] */
  14869. A_UINT32 ie_len;
  14870. /** number of buckets in the TLV bucket_list[] */
  14871. A_UINT32 num_buckets;
  14872. /** in number of scans, send notifications to host after these many scans */
  14873. A_UINT32 report_threshold_num_scans;
  14874. /** number of channels in channel_list[] determined by the
  14875. sum of wmi_extscan_bucket.num_channels in array */
  14876. /**
  14877. * TLV (tag length value) parameters follow the extscan_cmd
  14878. * structure. The TLV's are:
  14879. * wmi_ssid ssid_list[];
  14880. * wmi_mac_addr bssid_list[];
  14881. * A_UINT8 ie_data[];
  14882. * wmi_extscan_bucket bucket_list[];
  14883. * wmi_extscan_bucket_channel channel_list[];
  14884. */
  14885. } wmi_extscan_start_cmd_fixed_param;
  14886. typedef struct {
  14887. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  14888. /** Request ID - to match running command. 0 matches any request */
  14889. A_UINT32 request_id;
  14890. /** Requestor ID - client requesting stop */
  14891. A_UINT32 requestor_id;
  14892. /** VDEV id(interface) that is requesting scan */
  14893. A_UINT32 vdev_id;
  14894. /** table ID - to allow support for multiple simultaneous requests */
  14895. A_UINT32 table_id;
  14896. } wmi_extscan_stop_cmd_fixed_param;
  14897. enum wmi_extscan_get_cached_results_flags {
  14898. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  14899. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  14900. };
  14901. typedef struct {
  14902. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  14903. /** request ID - used to correlate command with events */
  14904. A_UINT32 request_id;
  14905. /** Requestor ID - client that requested results */
  14906. A_UINT32 requestor_id;
  14907. /** VDEV id(interface) that is requesting scan */
  14908. A_UINT32 vdev_id;
  14909. /** table ID - to allow support for multiple simultaneous requests */
  14910. A_UINT32 table_id;
  14911. /** maximum number of results to be returned */
  14912. A_UINT32 max_results;
  14913. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  14914. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  14915. } wmi_extscan_get_cached_results_cmd_fixed_param;
  14916. typedef struct {
  14917. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  14918. /** request ID - used to correlate command with events */
  14919. A_UINT32 request_id;
  14920. /** Requestor ID - client that requested results */
  14921. A_UINT32 requestor_id;
  14922. /** VDEV id(interface) that is requesting scan */
  14923. A_UINT32 vdev_id;
  14924. /** table ID - to allow support for multiple simultaneous requests */
  14925. A_UINT32 table_id;
  14926. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  14927. typedef struct {
  14928. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14929. /**bssid */
  14930. wmi_mac_addr bssid;
  14931. /**channel number */
  14932. A_UINT32 channel;
  14933. /**upper RSSI limit */
  14934. A_UINT32 upper_rssi_limit;
  14935. /**lower RSSI limit */
  14936. A_UINT32 lower_rssi_limit;
  14937. } wmi_extscan_wlan_change_bssid_param;
  14938. typedef struct {
  14939. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  14940. /** Request ID - to identify command. Cannot be 0 */
  14941. A_UINT32 request_id;
  14942. /** Requestor ID - client requesting wlan change monitoring */
  14943. A_UINT32 requestor_id;
  14944. /** VDEV id(interface) that is requesting scan */
  14945. A_UINT32 vdev_id;
  14946. /** table ID - to allow support for multiple simultaneous tables */
  14947. A_UINT32 table_id;
  14948. /** operation mode: start/stop */
  14949. A_UINT32 mode; /* wmi_extscan_operation_mode */
  14950. /** number of rssi samples to store */
  14951. A_UINT32 max_rssi_samples;
  14952. /** number of samples to use to calculate RSSI average */
  14953. A_UINT32 rssi_averaging_samples;
  14954. /** number of scans to confirm loss of contact with RSSI */
  14955. A_UINT32 lost_ap_scan_count;
  14956. /** number of out-of-range BSSIDs necessary to send event */
  14957. A_UINT32 max_out_of_range_count;
  14958. /** total number of bssid signal descriptors (in all pages) */
  14959. A_UINT32 total_entries;
  14960. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  14961. A_UINT32 first_entry_index;
  14962. /** number of bssid signal descriptors in this page */
  14963. A_UINT32 num_entries_in_page;
  14964. /* Following this structure is the TLV:
  14965. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  14966. * (number of elements given by field num_page_entries)
  14967. */
  14968. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  14969. typedef struct {
  14970. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  14971. /**bssid */
  14972. wmi_mac_addr bssid;
  14973. /**RSSI min threshold for reporting */
  14974. A_UINT32 min_rssi;
  14975. /**Deprecated entry - channel number */
  14976. A_UINT32 channel;
  14977. /** RSSI max threshold for reporting */
  14978. A_UINT32 max_rssi;
  14979. } wmi_extscan_hotlist_entry;
  14980. typedef struct {
  14981. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  14982. /** Request ID - to identify command. Cannot be 0 */
  14983. A_UINT32 request_id;
  14984. /** Requestor ID - client requesting hotlist monitoring */
  14985. A_UINT32 requestor_id;
  14986. /** VDEV id(interface) that is requesting scan */
  14987. A_UINT32 vdev_id;
  14988. /** table ID - to allow support for multiple simultaneous tables */
  14989. A_UINT32 table_id;
  14990. /** operation mode: start/stop */
  14991. A_UINT32 mode; /* wmi_extscan_operation_mode */
  14992. /** total number of bssids (in all pages) */
  14993. A_UINT32 total_entries;
  14994. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  14995. A_UINT32 first_entry_index;
  14996. /** number of bssids in this page */
  14997. A_UINT32 num_entries_in_page;
  14998. /** number of consecutive scans to confirm loss of contact with AP */
  14999. A_UINT32 lost_ap_scan_count;
  15000. /* Following this structure is the TLV:
  15001. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  15002. */
  15003. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  15004. typedef struct {
  15005. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15006. /**ssid */
  15007. wmi_ssid ssid;
  15008. /**band */
  15009. A_UINT32 band;
  15010. /**RSSI threshold for reporting */
  15011. A_UINT32 min_rssi;
  15012. A_UINT32 max_rssi;
  15013. } wmi_extscan_hotlist_ssid_entry;
  15014. typedef struct {
  15015. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  15016. /** Request ID - to identify command. Cannot be 0 */
  15017. A_UINT32 request_id;
  15018. /** Requestor ID - client requesting hotlist ssid monitoring */
  15019. A_UINT32 requestor_id;
  15020. /** VDEV id(interface) that is requesting scan */
  15021. A_UINT32 vdev_id;
  15022. /** table ID - to allow support for multiple simultaneous tables */
  15023. A_UINT32 table_id;
  15024. /** operation mode: start/stop */
  15025. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15026. /**total number of ssids (in all pages) */
  15027. A_UINT32 total_entries;
  15028. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  15029. A_UINT32 first_entry_index;
  15030. /**number of ssids in this page */
  15031. A_UINT32 num_entries_in_page;
  15032. /** number of consecutive scans to confirm loss of an ssid **/
  15033. A_UINT32 lost_ap_scan_count;
  15034. /* Following this structure is the TLV:
  15035. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  15036. */
  15037. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  15038. typedef struct {
  15039. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15040. /** table ID - to allow support for multiple simultaneous tables */
  15041. A_UINT32 table_id;
  15042. /** size in bytes of scan cache entry */
  15043. A_UINT32 scan_cache_entry_size;
  15044. /** maximum number of scan cache entries */
  15045. A_UINT32 max_scan_cache_entries;
  15046. /** maximum number of buckets per extscan request */
  15047. A_UINT32 max_buckets;
  15048. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  15049. A_UINT32 max_bssid_per_scan;
  15050. /** table usage level at which indication must be sent to host */
  15051. A_UINT32 max_table_usage_threshold;
  15052. } wmi_extscan_cache_capabilities;
  15053. typedef struct {
  15054. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15055. /** table ID - to allow support for multiple simultaneous tables */
  15056. A_UINT32 table_id;
  15057. /** size in bytes of wlan change entry */
  15058. A_UINT32 wlan_change_entry_size;
  15059. /** maximum number of entries in wlan change table */
  15060. A_UINT32 max_wlan_change_entries;
  15061. /** number of RSSI samples used for averaging RSSI */
  15062. A_UINT32 max_rssi_averaging_samples;
  15063. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  15064. A_UINT32 max_rssi_history_entries;
  15065. } wmi_extscan_wlan_change_monitor_capabilities;
  15066. typedef struct {
  15067. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15068. /** table ID - to allow support for multiple simultaneous tables */
  15069. A_UINT32 table_id;
  15070. /** size in bytes of hotlist entry */
  15071. A_UINT32 wlan_hotlist_entry_size;
  15072. /** maximum number of entries in wlan change table */
  15073. A_UINT32 max_hotlist_entries;
  15074. } wmi_extscan_hotlist_monitor_capabilities;
  15075. typedef struct {
  15076. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  15077. /** Request ID - matches request ID used to start hot list monitoring */
  15078. A_UINT32 request_id;
  15079. /** Requestor ID - client requesting stop */
  15080. A_UINT32 requestor_id;
  15081. /** number of extscan caches */
  15082. A_UINT32 num_extscan_cache_tables;
  15083. /** number of wlan change lists */
  15084. A_UINT32 num_wlan_change_monitor_tables;
  15085. /** number of hotlists */
  15086. A_UINT32 num_hotlist_monitor_tables;
  15087. /** if one sided rtt data collection is supported */
  15088. A_UINT32 rtt_one_sided_supported;
  15089. /** if 11v data collection is supported */
  15090. A_UINT32 rtt_11v_supported;
  15091. /** if 11mc data collection is supported */
  15092. A_UINT32 rtt_ftm_supported;
  15093. /** number of extscan cache capabilities (one per table) */
  15094. A_UINT32 num_extscan_cache_capabilities;
  15095. /** number of wlan change capabilities (one per table) */
  15096. A_UINT32 num_extscan_wlan_change_capabilities;
  15097. /** number of extscan hotlist capabilities (one per table) */
  15098. A_UINT32 num_extscan_hotlist_capabilities;
  15099. /* Following this structure is the TLV:
  15100. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  15101. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  15102. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  15103. */
  15104. } wmi_extscan_set_capabilities_cmd_fixed_param;
  15105. typedef struct {
  15106. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  15107. /** Request ID - matches request ID used to start hot list monitoring */
  15108. A_UINT32 request_id;
  15109. /** Requestor ID - client requesting capabilities */
  15110. A_UINT32 requestor_id;
  15111. } wmi_extscan_get_capabilities_cmd_fixed_param;
  15112. typedef struct {
  15113. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  15114. /** Request ID of the operation that was started/stopped */
  15115. A_UINT32 request_id;
  15116. /** Requestor ID of the operation that was started/stopped */
  15117. A_UINT32 requestor_id;
  15118. /** VDEV id(interface) of the operation that was started/stopped */
  15119. A_UINT32 vdev_id;
  15120. /** extscan WMI command */
  15121. A_UINT32 command;
  15122. /** operation mode: start/stop */
  15123. A_UINT32 mode; /* wmi_extscan_operation_mode */
  15124. /**success/failure */
  15125. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  15126. /** table ID - to allow support for multiple simultaneous requests */
  15127. A_UINT32 table_id;
  15128. } wmi_extscan_start_stop_event_fixed_param;
  15129. typedef struct {
  15130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  15131. /** Request ID of the extscan operation that is currently running */
  15132. A_UINT32 request_id;
  15133. /** Requestor ID of the extscan operation that is currently running */
  15134. A_UINT32 requestor_id;
  15135. /** VDEV id(interface) of the extscan operation that is currently running */
  15136. A_UINT32 vdev_id;
  15137. /** scan event (wmi_scan_event_type) */
  15138. A_UINT32 event; /* wmi_extscan_event_type */
  15139. /** table ID - to allow support for multiple simultaneous requests */
  15140. A_UINT32 table_id;
  15141. /**number of buckets */
  15142. A_UINT32 num_buckets;
  15143. /* Following this structure is the TLV:
  15144. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  15145. */
  15146. } wmi_extscan_operation_event_fixed_param;
  15147. /* Types of extscan tables */
  15148. typedef enum {
  15149. EXTSCAN_TABLE_NONE = 0,
  15150. EXTSCAN_TABLE_BSSID = 1,
  15151. EXTSCAN_TABLE_RSSI = 2,
  15152. } wmi_extscan_table_type;
  15153. typedef struct {
  15154. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  15155. /** Request ID of the extscan operation that is currently running */
  15156. A_UINT32 request_id;
  15157. /** Requestor ID of the extscan operation that is currently running */
  15158. A_UINT32 requestor_id;
  15159. /** VDEV id(interface) of the extscan operation that is currently running */
  15160. A_UINT32 vdev_id;
  15161. /** table ID - to allow support for multiple simultaneous tables */
  15162. A_UINT32 table_id;
  15163. /**see wmi_extscan_table_type for table reporting usage */
  15164. A_UINT32 table_type;
  15165. /**number of entries in use */
  15166. A_UINT32 entries_in_use;
  15167. /**maximum number of entries in table */
  15168. A_UINT32 maximum_entries;
  15169. } wmi_extscan_table_usage_event_fixed_param;
  15170. typedef enum {
  15171. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  15172. this can be used to discard scan results */
  15173. } wmi_scan_status_flags;
  15174. typedef struct {
  15175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15176. /** RSSI */
  15177. A_UINT32 rssi;
  15178. /** time stamp in milliseconds */
  15179. A_UINT32 tstamp;
  15180. /** Extscan cycle during which this entry was scanned */
  15181. A_UINT32 scan_cycle_id;
  15182. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  15183. A_UINT32 flags;
  15184. /** Bitmask of buckets (i.e. sets of channels) scanned */
  15185. A_UINT32 buckets_scanned;
  15186. } wmi_extscan_rssi_info;
  15187. typedef struct {
  15188. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15189. /**bssid */
  15190. wmi_mac_addr bssid;
  15191. /**ssid */
  15192. wmi_ssid ssid;
  15193. /**channel number */
  15194. A_UINT32 channel;
  15195. /* capabilities */
  15196. A_UINT32 capabilities;
  15197. /* beacon interval in TUs */
  15198. A_UINT32 beacon_interval;
  15199. /**time stamp in milliseconds - time last seen */
  15200. A_UINT32 tstamp;
  15201. /**flags - _tExtScanEntryFlags */
  15202. A_UINT32 flags;
  15203. /**RTT in ns */
  15204. A_UINT32 rtt;
  15205. /**rtt standard deviation */
  15206. A_UINT32 rtt_sd;
  15207. /* rssi information */
  15208. A_UINT32 number_rssi_samples;
  15209. /** IE length */
  15210. A_UINT32 ie_length; /* length of IE data */
  15211. } wmi_extscan_wlan_descriptor;
  15212. typedef struct {
  15213. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  15214. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15215. A_UINT32 request_id;
  15216. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15217. A_UINT32 requestor_id;
  15218. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  15219. A_UINT32 vdev_id;
  15220. /** Request ID of the extscan operation that is currently running */
  15221. A_UINT32 extscan_request_id;
  15222. /** Requestor ID of the extscan operation that is currently running */
  15223. A_UINT32 extscan_requestor_id;
  15224. /** VDEV id(interface) of the extscan operation that is currently running */
  15225. A_UINT32 extscan_vdev_id;
  15226. /** table ID - to allow support for multiple simultaneous tables */
  15227. A_UINT32 table_id;
  15228. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  15229. A_UINT32 current_tstamp;
  15230. /**total number of bssids (in all pages) */
  15231. A_UINT32 total_entries;
  15232. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15233. A_UINT32 first_entry_index;
  15234. /**number of bssids in this page */
  15235. A_UINT32 num_entries_in_page;
  15236. /** number of buckets scanned**/
  15237. A_UINT32 buckets_scanned;
  15238. /* Followed by the variable length TLVs
  15239. * wmi_extscan_wlan_descriptor bssid_list[]
  15240. * wmi_extscan_rssi_info rssi_list[]
  15241. * A_UINT8 ie_list[]
  15242. */
  15243. } wmi_extscan_cached_results_event_fixed_param;
  15244. typedef enum {
  15245. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  15246. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  15247. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  15248. } wmi_extscan_wlan_change_flags;
  15249. typedef struct {
  15250. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  15251. /**bssid */
  15252. wmi_mac_addr bssid;
  15253. /**time stamp in milliseconds */
  15254. A_UINT32 tstamp;
  15255. /**upper RSSI limit */
  15256. A_UINT32 upper_rssi_limit;
  15257. /**lower RSSI limit */
  15258. A_UINT32 lower_rssi_limit;
  15259. /** channel */
  15260. A_UINT32 channel; /* in MHz */
  15261. /**current RSSI average */
  15262. A_UINT32 rssi_average;
  15263. /**flags - wmi_extscan_wlan_change_flags */
  15264. A_UINT32 flags;
  15265. /**legnth of RSSI history to follow (number of values) */
  15266. A_UINT32 num_rssi_samples;
  15267. } wmi_extscan_wlan_change_result_bssid;
  15268. typedef struct {
  15269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  15270. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15271. A_UINT32 request_id;
  15272. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15273. A_UINT32 requestor_id;
  15274. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  15275. A_UINT32 vdev_id;
  15276. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15277. A_UINT32 config_request_id;
  15278. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15279. A_UINT32 config_requestor_id;
  15280. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  15281. A_UINT32 config_vdev_id;
  15282. /** table ID - to allow support for multiple simultaneous tables */
  15283. A_UINT32 table_id;
  15284. /**number of entries with RSSI out of range or BSSID not detected */
  15285. A_UINT32 change_count;
  15286. /**total number of bssid signal descriptors (in all pages) */
  15287. A_UINT32 total_entries;
  15288. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  15289. A_UINT32 first_entry_index;
  15290. /**number of bssids signal descriptors in this page */
  15291. A_UINT32 num_entries_in_page;
  15292. /* Following this structure is the TLV:
  15293. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  15294. * (number of descriptors given by field num_entries_in_page)
  15295. * Following this structure is the list of RSSI values (each is an A_UINT8):
  15296. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  15297. */
  15298. } wmi_extscan_wlan_change_results_event_fixed_param;
  15299. enum _tExtScanEntryFlags
  15300. {
  15301. WMI_HOTLIST_FLAG_NONE = 0x00,
  15302. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  15303. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  15304. };
  15305. typedef struct {
  15306. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15307. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15308. A_UINT32 config_request_id;
  15309. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15310. A_UINT32 config_requestor_id;
  15311. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  15312. A_UINT32 config_vdev_id;
  15313. /** table ID - to allow support for multiple simultaneous tables */
  15314. A_UINT32 table_id;
  15315. /**total number of bssids (in all pages) */
  15316. A_UINT32 total_entries;
  15317. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15318. A_UINT32 first_entry_index;
  15319. /**number of bssids in this page */
  15320. A_UINT32 num_entries_in_page;
  15321. /* Following this structure is the TLV:
  15322. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15323. */
  15324. } wmi_extscan_hotlist_match_event_fixed_param;
  15325. typedef struct {
  15326. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  15327. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15328. A_UINT32 config_request_id;
  15329. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15330. A_UINT32 config_requestor_id;
  15331. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  15332. A_UINT32 config_vdev_id;
  15333. /** table ID - to allow support for multiple simultaneous tables */
  15334. A_UINT32 table_id;
  15335. /**total number of ssids (in all pages) */
  15336. A_UINT32 total_entries;
  15337. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  15338. A_UINT32 first_entry_index;
  15339. /**number of ssids in this page */
  15340. A_UINT32 num_entries_in_page;
  15341. /* Following this structure is the TLV:
  15342. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  15343. */
  15344. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  15345. typedef struct {
  15346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  15347. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15348. A_UINT32 request_id;
  15349. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15350. A_UINT32 requestor_id;
  15351. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  15352. A_UINT32 vdev_id;
  15353. /** number of extscan caches */
  15354. A_UINT32 num_extscan_cache_tables;
  15355. /** number of wlan change lists */
  15356. A_UINT32 num_wlan_change_monitor_tables;
  15357. /** number of hotlists */
  15358. A_UINT32 num_hotlist_monitor_tables;
  15359. /** if one sided rtt data collection is supported */
  15360. A_UINT32 rtt_one_sided_supported;
  15361. /** if 11v data collection is supported */
  15362. A_UINT32 rtt_11v_supported;
  15363. /** if 11mc data collection is supported */
  15364. A_UINT32 rtt_ftm_supported;
  15365. /** number of extscan cache capabilities (one per table) */
  15366. A_UINT32 num_extscan_cache_capabilities;
  15367. /** number of wlan change capabilities (one per table) */
  15368. A_UINT32 num_extscan_wlan_change_capabilities;
  15369. /** number of extscan hotlist capabilities (one per table) */
  15370. A_UINT32 num_extscan_hotlist_capabilities;
  15371. /* max number of roaming ssid whitelist firmware can support */
  15372. A_UINT32 num_roam_ssid_whitelist;
  15373. /* max number of blacklist bssid firmware can support */
  15374. A_UINT32 num_roam_bssid_blacklist;
  15375. /* max number of preferred list firmware can support */
  15376. A_UINT32 num_roam_bssid_preferred_list;
  15377. /* max number of hotlist ssids firmware can support */
  15378. A_UINT32 num_extscan_hotlist_ssid;
  15379. /* max number of epno networks firmware can support */
  15380. A_UINT32 num_epno_networks;
  15381. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  15382. * supports multiple lists of each type.
  15383. *
  15384. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  15385. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  15386. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  15387. */
  15388. } wmi_extscan_capabilities_event_fixed_param;
  15389. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  15390. typedef struct{
  15391. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  15392. A_UINT32 reserved0; /* for future need */
  15393. } wmi_d0_wow_disable_ack_event_fixed_param;
  15394. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  15395. typedef struct {
  15396. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  15397. /** pdev_id for identifying the MAC
  15398. * See macros starting with WMI_PDEV_ID_ for values.
  15399. */
  15400. A_UINT32 pdev_id;
  15401. } wmi_pdev_resume_event_fixed_param;
  15402. /** value representing all modules */
  15403. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  15404. /* param definitions */
  15405. /**
  15406. * Log level for a given module. Value contains both module id and log level.
  15407. * here is the bitmap definition for value.
  15408. * module Id : 16
  15409. * Flags : reserved
  15410. * Level : 8
  15411. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  15412. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  15413. */
  15414. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  15415. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  15416. (val) |= (lvl & 0xff); \
  15417. } while (0)
  15418. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  15419. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  15420. (val) |= ((mid & 0xffff) << 16); \
  15421. } while (0)
  15422. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  15423. /**
  15424. * Enable the debug log for a given vdev. Value is vdev id
  15425. */
  15426. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  15427. /**
  15428. * Disable the debug log for a given vdev. Value is vdev id
  15429. * All the log level for a given VDEV is disabled except the ERROR log messages
  15430. */
  15431. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  15432. /**
  15433. * set vdev enable bitmap. value is the vden enable bitmap
  15434. */
  15435. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  15436. /**
  15437. * set a given log level to all the modules specified in the module bitmap.
  15438. * and set the log levle for all other modules to DBGLOG_ERR.
  15439. * value: log levelt to be set.
  15440. * module_id_bitmap : identifies the modules for which the log level should be set and
  15441. * modules for which the log level should be reset to DBGLOG_ERR.
  15442. */
  15443. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  15444. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  15445. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  15446. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  15447. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  15448. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  15449. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  15450. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  15451. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  15452. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  15453. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  15454. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  15455. typedef struct {
  15456. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  15457. A_UINT32 dbg_log_param; /** param types are defined above */
  15458. A_UINT32 value;
  15459. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  15460. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  15461. */
  15462. } wmi_debug_log_config_cmd_fixed_param;
  15463. typedef struct {
  15464. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  15465. A_UINT32 param; /* Reserved for future use */
  15466. /** pdev_id for identifying the MAC
  15467. * See macros starting with WMI_PDEV_ID_ for values.
  15468. */
  15469. A_UINT32 pdev_id;
  15470. } wmi_pdev_get_temperature_cmd_fixed_param;
  15471. typedef struct {
  15472. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  15473. A_INT32 value; /* temprature value in Celcius degree */
  15474. /** pdev_id for identifying the MAC
  15475. * See macros starting with WMI_PDEV_ID_ for values.
  15476. */
  15477. A_UINT32 pdev_id;
  15478. } wmi_pdev_temperature_event_fixed_param;
  15479. typedef enum {
  15480. ANTDIV_HW_CFG_STATUS,
  15481. ANTDIV_SW_CFG_STATUS,
  15482. ANTDIV_MAX_STATUS_TYPE_NUM
  15483. } ANTDIV_STATUS_TYPE;
  15484. typedef struct {
  15485. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  15486. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  15487. /** pdev_id for identifying the MAC
  15488. * See macros starting with WMI_PDEV_ID_ for values.
  15489. */
  15490. A_UINT32 pdev_id;
  15491. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  15492. typedef struct {
  15493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  15494. A_UINT32 support; /* ANT DIV feature enabled or not */
  15495. A_UINT32 chain_num; /* how many chain supported */
  15496. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  15497. /*
  15498. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  15499. * the antennas attached to that tx/rx chain.
  15500. */
  15501. A_UINT32 selectable_ant_mask[8];
  15502. /** pdev_id for identifying the MAC
  15503. * See macros starting with WMI_PDEV_ID_ for values.
  15504. */
  15505. A_UINT32 pdev_id;
  15506. } wmi_pdev_antdiv_status_event_fixed_param;
  15507. typedef struct {
  15508. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  15509. A_UINT32 vdev_id;
  15510. A_UINT32 enable;
  15511. A_UINT32 srv_ipv4; /* server IP */
  15512. A_UINT32 start_lsb; /* starting address assigned to client */
  15513. A_UINT32 num_client; /* number of clients we support */
  15514. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  15515. typedef enum {
  15516. AP_RX_DATA_OFFLOAD = 0x00,
  15517. STA_RX_DATA_OFFLOAD = 0x01,
  15518. } wmi_ipa_offload_types;
  15519. /**
  15520. * This command is sent from WLAN host driver to firmware for
  15521. * enabling/disabling IPA data-path offload features.
  15522. *
  15523. *
  15524. * Enabling data path offload to IPA(based on host INI configuration), example:
  15525. * when STA interface comes up,
  15526. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15527. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15528. *
  15529. * Disabling data path offload to IPA, example:
  15530. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  15531. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  15532. *
  15533. *
  15534. * This command is applicable only on the PCIE LL systems
  15535. *
  15536. */
  15537. typedef struct {
  15538. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  15539. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  15540. A_UINT32 vdev_id;
  15541. A_UINT32 enable; /* 1 == enable, 0 == disable */
  15542. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  15543. typedef enum {
  15544. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  15545. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  15546. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  15547. } wmi_set_led_flashing_type;
  15548. /**
  15549. 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.
  15550. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  15551. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  15552. 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
  15553. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  15554. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  15555. Zero is reached, it is skipped and moves on to the next interval.
  15556. */
  15557. typedef struct{
  15558. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  15559. A_UINT32 pattern_id; /* pattern identifier */
  15560. A_UINT32 led_x0; /* led flashing parameter0 */
  15561. A_UINT32 led_x1; /* led flashing parameter1 */
  15562. A_UINT32 gpio_num; /* GPIO number */
  15563. } wmi_set_led_flashing_cmd_fixed_param;
  15564. /**
  15565. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  15566. * within small networks that do not include a local name server.
  15567. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  15568. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  15569. * global server.
  15570. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  15571. * by type in a specified domain using standard DNS queries.
  15572. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  15573. */
  15574. typedef struct {
  15575. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  15576. A_UINT32 vdev_id;
  15577. A_UINT32 enable;
  15578. } wmi_mdns_offload_cmd_fixed_param;
  15579. #define WMI_MAX_MDNS_FQDN_LEN 64
  15580. #define WMI_MAX_MDNS_RESP_LEN 512
  15581. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  15582. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  15583. typedef struct {
  15584. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  15585. A_UINT32 vdev_id;
  15586. /** type of fqdn, general or unique */
  15587. A_UINT32 type;
  15588. /** length of fqdn */
  15589. A_UINT32 fqdn_len;
  15590. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  15591. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  15592. */
  15593. } wmi_mdns_set_fqdn_cmd_fixed_param;
  15594. typedef struct {
  15595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  15596. A_UINT32 vdev_id;
  15597. /** Answer Resource Record count */
  15598. A_UINT32 AR_count;
  15599. /** length of response */
  15600. A_UINT32 resp_len;
  15601. /* Following this structure is the TLV byte stream of resp data of length resp_len
  15602. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  15603. */
  15604. } wmi_mdns_set_resp_cmd_fixed_param;
  15605. typedef struct {
  15606. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  15607. A_UINT32 vdev_id;
  15608. } wmi_mdns_get_stats_cmd_fixed_param;
  15609. typedef struct {
  15610. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  15611. A_UINT32 vdev_id;
  15612. /** curTimestamp in milliseconds */
  15613. A_UINT32 curTimestamp;
  15614. /** last received Query in milliseconds */
  15615. A_UINT32 lastQueryTimestamp;
  15616. /** last sent Response in milliseconds */
  15617. A_UINT32 lastResponseTimestamp;
  15618. /** stats of received queries */
  15619. A_UINT32 totalQueries;
  15620. /** stats of macth queries */
  15621. A_UINT32 totalMatches;
  15622. /** stats of responses */
  15623. A_UINT32 totalResponses;
  15624. /** indicate the current status of mDNS offload */
  15625. A_UINT32 status;
  15626. } wmi_mdns_stats_event_fixed_param;
  15627. /**
  15628. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  15629. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  15630. * request and create/remove connection even host is suspended.
  15631. * 3 major components are offloaded:
  15632. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  15633. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  15634. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  15635. * Current implementation only supports WPA2 CCMP.
  15636. */
  15637. typedef struct {
  15638. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  15639. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  15640. A_UINT32 vdev_id;
  15641. /** enable/disable sap auth offload */
  15642. A_UINT32 enable;
  15643. /** sap ssid */
  15644. wmi_ssid ap_ssid;
  15645. /** authentication mode (defined above) */
  15646. A_UINT32 rsn_authmode;
  15647. /** unicast cipher set */
  15648. A_UINT32 rsn_ucastcipherset;
  15649. /** mcast/group cipher set */
  15650. A_UINT32 rsn_mcastcipherset;
  15651. /** mcast/group management frames cipher set */
  15652. A_UINT32 rsn_mcastmgmtcipherset;
  15653. /** sap channel */
  15654. A_UINT32 channel;
  15655. /** length of psk */
  15656. A_UINT32 psk_len;
  15657. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  15658. * A_UINT8 psk[];
  15659. */
  15660. } wmi_sap_ofl_enable_cmd_fixed_param;
  15661. typedef struct {
  15662. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  15663. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  15664. A_UINT32 vdev_id;
  15665. /** aid (association id) of this station */
  15666. A_UINT32 assoc_id;
  15667. /** peer station's mac addr */
  15668. wmi_mac_addr peer_macaddr;
  15669. /** length of association request frame */
  15670. A_UINT32 data_len;
  15671. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  15672. * A_UINT8 bufp[];
  15673. */
  15674. } wmi_sap_ofl_add_sta_event_fixed_param;
  15675. typedef enum {
  15676. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  15677. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  15678. } wmi_sap_ofl_del_sta_flags;
  15679. typedef struct {
  15680. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  15681. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  15682. A_UINT32 vdev_id;
  15683. /** aid (association id) of this station */
  15684. A_UINT32 assoc_id;
  15685. /** peer station's mac addr */
  15686. wmi_mac_addr peer_macaddr;
  15687. /** disassociation reason */
  15688. A_UINT32 reason;
  15689. /** flags - wmi_sap_ofl_del_sta_flags */
  15690. A_UINT32 flags;
  15691. } wmi_sap_ofl_del_sta_event_fixed_param;
  15692. typedef struct {
  15693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  15694. A_UINT32 vdev_id;
  15695. /* Number of client failure connection attempt */
  15696. A_UINT32 num_retry;
  15697. /* Time in milliseconds to record the client's failure connection attempts */
  15698. A_UINT32 retry_allow_time_ms;
  15699. /* Time in milliseconds to drop the connection request if client is blacklisted */
  15700. A_UINT32 blackout_time_ms;
  15701. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  15702. typedef struct {
  15703. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  15704. A_UINT32 data_len; /** length in byte of data[]. */
  15705. /** This structure is used to send REQ binary blobs
  15706. * from application/service to firmware where Host drv is pass through .
  15707. * Following this structure is the TLV:
  15708. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15709. */
  15710. } wmi_apfind_cmd_param;
  15711. typedef enum apfind_event_type_e {
  15712. APFIND_MATCH_EVENT = 0,
  15713. APFIND_WAKEUP_EVENT,
  15714. } APFIND_EVENT_TYPE;
  15715. typedef struct {
  15716. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  15717. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  15718. A_UINT32 data_len; /** length in byte of data[]. */
  15719. /** This structure is used to send event binary blobs
  15720. * from firmware to application/service and Host drv.
  15721. * Following this structure is the TLV:
  15722. * A_UINT8 data[]; <-- length in byte given by field data_len.
  15723. */
  15724. } wmi_apfind_event_hdr;
  15725. /* SAP obss detection offload types */
  15726. typedef enum {
  15727. WMI_SAP_OBSS_DETECTION_MODE_DISABLED = 0, /* fw to disable the detection */
  15728. WMI_SAP_OBSS_DETECTION_MODE_PRESENT_NOTIFY = 1, /* if the matching beacon is present, notify host immediately */
  15729. WMI_SAP_OBSS_DETECTION_MODE_ABSENT_TIMEOUT_NOTIFY = 2,/* if the matching beacon is absent for the timeout period, notify host */
  15730. } WMI_SAP_OBSS_DETECTION_MODE;
  15731. typedef struct wmi_sap_obss_detection_cfg_cmd_s {
  15732. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_cfg_cmd_fixed_param */
  15733. A_UINT32 vdev_id;
  15734. A_UINT32 detect_period_ms;
  15735. /* detect whether there is 11b ap/ibss */
  15736. A_UINT32 b_ap_detect_mode; /* refer WMI_SAP_OBSS_DETECTION_MODE */
  15737. /* detect whether there is 11b sta connected with other APs */
  15738. A_UINT32 b_sta_detect_mode;
  15739. /* detect whether there is 11g AP */
  15740. A_UINT32 g_ap_detect_mode;
  15741. /* detect whether there is legacy 11a traffic */
  15742. A_UINT32 a_detect_mode;
  15743. /* detect whether there is ap which is ht legacy mode */
  15744. A_UINT32 ht_legacy_detect_mode;
  15745. /* detect whether there is ap which is ht mixed mode : has 11b/11g sta */
  15746. A_UINT32 ht_mixed_detect_mode;
  15747. /* detect whether there is ap which has 20M only station */
  15748. A_UINT32 ht_20mhz_detect_mode;
  15749. } wmi_sap_obss_detection_cfg_cmd_fixed_param;
  15750. typedef enum {
  15751. WMI_SAP_OBSS_DETECTION_EVENT_REASON_NOT_SUPPORT = 0,
  15752. WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY,
  15753. WMI_SAP_OBSS_DETECTION_EVENT_REASON_ABSENT_TIMEOUT,
  15754. } WMI_SAP_OBSS_DETECTION_EVENT_REASON;
  15755. /* WMI_SAP_OBSS_DETECTION_MATCH_MASK is one or more of the following shift bits */
  15756. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_AP_S 0
  15757. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11B_STA_S 1
  15758. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11G_AP_S 2
  15759. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_11A_S 3
  15760. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_LEGACY_S 4
  15761. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_MIXED_S 5
  15762. #define WMI_SAP_OBSS_DETECTION_MATCH_BIT_HT_20MHZ_S 6
  15763. typedef struct wmi_sap_obss_detection_info_evt_s {
  15764. A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_sap_obss_detection_info_evt_fixed_param */
  15765. A_UINT32 vdev_id;
  15766. A_UINT32 reason; /* refer WMI_SAP_OBSS_DETECTION_EVENT_REASON */
  15767. A_UINT32 matched_detection_masks; /* bit(s) from WMI_SAP_OBSS_DETECTION_MATCH_MASK */
  15768. wmi_mac_addr matched_bssid_addr; /* valid when reason is WMI_SAP_OBSS_DETECTION_EVENT_REASON_PRESENT_NOTIFY */
  15769. } wmi_sap_obss_detection_info_evt_fixed_param;
  15770. /** WMI command to enable STA FW handle bss color change notification from AP */
  15771. typedef struct {
  15772. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_bss_color_change_enable_fixed_param */
  15773. A_UINT32 vdev_id;
  15774. A_UINT32 enable;
  15775. } wmi_bss_color_change_enable_fixed_param;
  15776. typedef enum {
  15777. WMI_BSS_COLOR_COLLISION_DISABLE = 0,
  15778. WMI_BSS_COLOR_COLLISION_DETECTION,
  15779. WMI_BSS_COLOR_FREE_SLOT_TIMER_EXPIRY,
  15780. WMI_BSS_COLOR_FREE_SLOT_AVAILABLE,
  15781. } WMI_BSS_COLOR_COLLISION_EVT_TYPE;
  15782. /** Command to enable OBSS Color collision detection for both STA and AP mode */
  15783. typedef struct {
  15784. A_UINT32 tlv_header; /* tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_det_config_fixed_param */
  15785. A_UINT32 vdev_id;
  15786. A_UINT32 flags; /* proposed for future use cases */
  15787. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  15788. A_UINT32 current_bss_color;
  15789. A_UINT32 detection_period_ms; /* scan interval for both AP and STA mode */
  15790. A_UINT32 scan_period_ms; /* scan period for passive scan to detect collision */
  15791. A_UINT32 free_slot_expiry_time_ms; /* FW to notify host at timer expiry after which Host disables bss color */
  15792. } wmi_obss_color_collision_det_config_fixed_param;
  15793. /** WMI event to notify host on OBSS Color collision detection, free slot available for AP mode */
  15794. typedef struct {
  15795. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_obss_color_collision_evt_fixed_param */
  15796. A_UINT32 vdev_id;
  15797. A_UINT32 evt_type; /* WMI_BSS_COLOR_COLLISION_EVT_TYPE */
  15798. A_UINT32 bss_color_bitmap_bit0to31; /* Bit set indicating BSS color present */
  15799. A_UINT32 bss_color_bitmap_bit32to63; /* Bit set indicating BSS color present */
  15800. } wmi_obss_color_collision_evt_fixed_param;
  15801. /**
  15802. * OCB DCC types and structures.
  15803. */
  15804. /**
  15805. * DCC types as described in ETSI TS 102 687
  15806. * Type Format stepSize referenceValue numBits
  15807. * -------------------------------------------------------------------------
  15808. * ndlType_acPrio INTEGER (0...7) 1 number 3
  15809. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  15810. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  15811. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  15812. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  15813. * ndlType_datarate INTEGER (0..7) Table 8 3
  15814. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  15815. * ndlType_numberElements INTEGER (0..63) number 6
  15816. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  15817. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  15818. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  15819. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  15820. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  15821. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  15822. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  15823. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  15824. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  15825. * ndlType_queueStatus Enumeration Table A.2 1
  15826. * ndlType_dccMechanism Bitset Table A.2 6
  15827. *
  15828. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  15829. * cannot be changed without breaking WMI compatibility.
  15830. *
  15831. * NOTE: For each of the types, one additional bit is allocated. This
  15832. * leftmost bit is used to indicate that the value is invalid. */
  15833. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  15834. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  15835. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  15836. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  15837. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  15838. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  15839. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  15840. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  15841. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  15842. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  15843. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  15844. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  15845. #define SIZE_NDLTYPE_SNR (1 + 7)
  15846. #define SIZE_NDLTYPE_TIMING (1 + 12)
  15847. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  15848. #define SIZE_NDLTYPE_RATIO (1 + 7)
  15849. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  15850. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  15851. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  15852. #define SIZE_BYTE (8)
  15853. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  15854. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  15855. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  15856. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  15857. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  15858. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  15859. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  15860. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  15861. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  15862. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  15863. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  15864. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  15865. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  15866. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  15867. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  15868. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  15869. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  15870. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  15871. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  15872. /** The MCS_COUNT macro cannot be modified without breaking
  15873. * WMI compatibility. */
  15874. #define MCS_COUNT (8)
  15875. /** Flags for ndlType_dccMechanism. */
  15876. typedef enum {
  15877. DCC_MECHANISM_TPC = 1,
  15878. DCC_MECHANISM_TRC = 2,
  15879. DCC_MECHANISM_TDC = 4,
  15880. DCC_MECHANISM_DSC = 8,
  15881. DCC_MECHANISM_TAC = 16,
  15882. DCC_MECHANISM_RESERVED = 32,
  15883. DCC_MECHANISM_ALL = 0x3f,
  15884. } wmi_dcc_ndl_type_dcc_mechanism;
  15885. /** Values for ndlType_queueStatus. */
  15886. typedef enum {
  15887. DCC_QUEUE_CLOSED = 0,
  15888. DCC_QUEUE_OPEN = 1,
  15889. } wmi_dcc_ndl_type_queue_status;
  15890. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  15891. /** Values for ndlType_datarate */
  15892. typedef enum {
  15893. DCC_DATARATE_3_MBPS = 0,
  15894. DCC_DATARATE_4_5_MBPS = 1,
  15895. DCC_DATARATE_6_MBPS = 2,
  15896. DCC_DATARATE_9_MBPS = 3,
  15897. DCC_DATARATE_12_MBPS = 4,
  15898. DCC_DATARATE_18_MBPS = 5,
  15899. DCC_DATARATE_24_MBPS = 6,
  15900. DCC_DATARATE_27_MBPS = 7,
  15901. } wmi_dcc_ndl_type_datarate;
  15902. /** Data structure for active state configuration. */
  15903. typedef struct {
  15904. /** TLV tag and len; tag equals
  15905. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  15906. A_UINT32 tlv_header;
  15907. /**
  15908. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  15909. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  15910. */
  15911. A_UINT32 state_info;
  15912. /**
  15913. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  15914. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  15915. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  15916. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  15917. */
  15918. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  15919. /**
  15920. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  15921. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  15922. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  15923. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  15924. */
  15925. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  15926. /**
  15927. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  15928. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  15929. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  15930. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  15931. */
  15932. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  15933. /**
  15934. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  15935. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  15936. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  15937. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  15938. */
  15939. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  15940. /**
  15941. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  15942. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  15943. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  15944. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  15945. */
  15946. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  15947. } wmi_dcc_ndl_active_state_config;
  15948. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  15949. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  15950. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  15951. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  15952. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  15953. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  15954. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  15955. #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)
  15956. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  15957. #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)
  15958. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  15959. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  15960. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  15961. #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)
  15962. /** Data structure for EDCA/QOS parameters. */
  15963. typedef struct
  15964. {
  15965. /** TLV tag and len; tag equals
  15966. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  15967. A_UINT32 tlv_header;
  15968. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  15969. A_UINT32 aifsn;
  15970. /** Contention Window minimum. Range: 1 - 10 */
  15971. A_UINT32 cwmin;
  15972. /** Contention Window maximum. Range: 1 - 10 */
  15973. A_UINT32 cwmax;
  15974. } wmi_qos_parameter;
  15975. /** Data structure for information specific to a channel. */
  15976. typedef struct {
  15977. /** TLV tag and len; tag equals
  15978. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  15979. A_UINT32 tlv_header;
  15980. A_UINT32 bandwidth; /* MHz units */
  15981. wmi_mac_addr mac_address;
  15982. } wmi_ocb_channel;
  15983. /** Data structure for an element of the schedule array. */
  15984. typedef struct {
  15985. /** TLV tag and len; tag equals
  15986. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  15987. A_UINT32 tlv_header;
  15988. A_UINT32 channel_freq; /* MHz units */
  15989. A_UINT32 total_duration; /* ms units */
  15990. A_UINT32 guard_interval; /* ms units */
  15991. } wmi_ocb_schedule_element;
  15992. /** Data structure for OCB configuration. */
  15993. typedef struct {
  15994. /** TLV tag and len; tag equals
  15995. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  15996. A_UINT32 tlv_header;
  15997. /** VDEV id(interface) that is being configured */
  15998. A_UINT32 vdev_id;
  15999. A_UINT32 channel_count;
  16000. A_UINT32 schedule_size;
  16001. A_UINT32 flags;
  16002. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  16003. /** This is followed by a TLV array of wmi_channel. */
  16004. /** This is followed by a TLV array of wmi_ocb_channel. */
  16005. /** This is followed by a TLV array of wmi_qos_parameter. */
  16006. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  16007. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  16008. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  16009. } wmi_ocb_set_config_cmd_fixed_param;
  16010. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  16011. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  16012. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  16013. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  16014. typedef struct {
  16015. /** TLV tag and len; tag equals
  16016. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  16017. A_UINT32 tlv_header;
  16018. /* VDEV identifier */
  16019. A_UINT32 vdev_id;
  16020. A_UINT32 status;
  16021. } wmi_ocb_set_config_resp_event_fixed_param;
  16022. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  16023. WMI compatibility. */
  16024. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  16025. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  16026. /** Data structure to set the UTC time. */
  16027. typedef struct {
  16028. /** TLV tag and len; tag equals
  16029. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  16030. A_UINT32 tlv_header;
  16031. /* VDEV identifier */
  16032. A_UINT32 vdev_id;
  16033. /** 10 bytes of the utc time. */
  16034. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  16035. /** 5 bytes of the time error. */
  16036. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  16037. } wmi_ocb_set_utc_time_cmd_fixed_param;
  16038. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  16039. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  16040. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  16041. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  16042. /** Data structure start the timing advertisement. The template for the
  16043. * timing advertisement frame follows this structure in the WMI command.
  16044. */
  16045. typedef struct {
  16046. /** TLV tag and len; tag equals
  16047. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  16048. A_UINT32 tlv_header;
  16049. /* VDEV identifier */
  16050. A_UINT32 vdev_id;
  16051. /** Number of times the TA is sent every 5 seconds. */
  16052. A_UINT32 repeat_rate;
  16053. /** The frequency on which to transmit. */
  16054. A_UINT32 channel_freq; /* MHz units */
  16055. /** The offset into the template of the timestamp. */
  16056. A_UINT32 timestamp_offset;
  16057. /** The offset into the template of the time value. */
  16058. A_UINT32 time_value_offset;
  16059. /** The length of the timing advertisement template. The
  16060. * template is in the TLV data. */
  16061. A_UINT32 timing_advert_template_length;
  16062. /** This is followed by a binary array containing the TA template. */
  16063. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  16064. /** Data structure to stop the timing advertisement. */
  16065. typedef struct {
  16066. /** TLV tag and len; tag equals
  16067. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  16068. A_UINT32 tlv_header;
  16069. /* VDEV identifier */
  16070. A_UINT32 vdev_id;
  16071. A_UINT32 channel_freq; /* MHz units */
  16072. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  16073. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  16074. typedef struct {
  16075. /** TLV tag and len; tag equals
  16076. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  16077. A_UINT32 tlv_header;
  16078. /* VDEV identifier */
  16079. A_UINT32 vdev_id;
  16080. A_UINT32 reserved;
  16081. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  16082. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  16083. typedef struct {
  16084. /** TLV tag and len; tag equals
  16085. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  16086. A_UINT32 tlv_header;
  16087. /* VDEV identifier */
  16088. A_UINT32 vdev_id;
  16089. A_UINT32 tsf_timer_high;
  16090. A_UINT32 tsf_timer_low;
  16091. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  16092. /** Data structure for DCC stats configuration per channel. */
  16093. typedef struct {
  16094. /** TLV tag and len; tag equals
  16095. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  16096. A_UINT32 tlv_header;
  16097. /** The channel for which this applies, 16 bits. */
  16098. /** The dcc_stats_bitmap, 8 bits. */
  16099. A_UINT32 chan_info;
  16100. /** Demodulation model parameters. */
  16101. /**
  16102. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  16103. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  16104. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16105. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16106. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16107. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16108. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16109. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16110. */
  16111. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16112. /** Communication ranges. */
  16113. /**
  16114. * tx_power, ndlType_txPower, 1+7 bits.
  16115. * datarate, ndlType_datarate, 1+3 bits.
  16116. */
  16117. A_UINT32 tx_power_datarate;
  16118. /**
  16119. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  16120. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  16121. */
  16122. A_UINT32 carrier_sense_est_comm_range;
  16123. /** Channel load measures. */
  16124. /**
  16125. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  16126. * carrierSense, ndlType_rxPower, 1+7 bits.
  16127. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  16128. */
  16129. A_UINT32 dcc_stats;
  16130. /**
  16131. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  16132. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  16133. */
  16134. A_UINT32 packet_stats;
  16135. /**
  16136. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  16137. */
  16138. A_UINT32 channel_busy_time;
  16139. /** Transmit packet statistics. */
  16140. /**
  16141. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16142. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16143. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16144. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16145. */
  16146. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  16147. /**
  16148. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16149. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16150. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16151. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16152. */
  16153. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16154. /**
  16155. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16156. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16157. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16158. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16159. */
  16160. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  16161. /**
  16162. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16163. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16164. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16165. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16166. */
  16167. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16168. } wmi_dcc_ndl_stats_per_channel;
  16169. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16170. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16171. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16172. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16173. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  16174. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  16175. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16176. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16177. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  16178. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  16179. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  16180. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  16181. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  16182. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  16183. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  16184. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  16185. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  16186. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  16187. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  16188. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  16189. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  16190. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  16191. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  16192. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  16193. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  16194. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  16195. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  16196. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  16197. #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)
  16198. #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)
  16199. #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)
  16200. #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)
  16201. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16202. #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)
  16203. #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)
  16204. #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)
  16205. /** Bitmap for DCC stats. */
  16206. typedef enum {
  16207. DCC_STATS_DEMODULATION_MODEL = 1,
  16208. DCC_STATS_COMMUNICATION_RANGES = 2,
  16209. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  16210. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  16211. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  16212. DCC_STATS_ALL = 0xff,
  16213. } wmi_dcc_stats_bitmap;
  16214. /** Data structure for getting the DCC stats. */
  16215. typedef struct {
  16216. /** TLV tag and len; tag equals
  16217. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  16218. A_UINT32 tlv_header;
  16219. /* VDEV identifier */
  16220. A_UINT32 vdev_id;
  16221. /** The number of channels for which stats are being requested. */
  16222. A_UINT32 num_channels;
  16223. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  16224. } wmi_dcc_get_stats_cmd_fixed_param;
  16225. typedef struct {
  16226. /** TLV tag and len; tag equals
  16227. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  16228. A_UINT32 tlv_header;
  16229. /** The channel for which this applies. */
  16230. A_UINT32 chan_freq; /* MHz units */
  16231. /** The DCC stats being requested. */
  16232. A_UINT32 dcc_stats_bitmap;
  16233. } wmi_dcc_channel_stats_request;
  16234. /** Data structure for the response with the DCC stats. */
  16235. typedef struct {
  16236. /** TLV tag and len; tag equals
  16237. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  16238. A_UINT32 tlv_header;
  16239. /* VDEV identifier */
  16240. A_UINT32 vdev_id;
  16241. /** Number of channels in the response. */
  16242. A_UINT32 num_channels;
  16243. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16244. } wmi_dcc_get_stats_resp_event_fixed_param;
  16245. /** Data structure for clearing the DCC stats. */
  16246. typedef struct {
  16247. /** TLV tag and len; tag equals
  16248. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  16249. A_UINT32 tlv_header;
  16250. /* VDEV identifier */
  16251. A_UINT32 vdev_id;
  16252. A_UINT32 dcc_stats_bitmap;
  16253. } wmi_dcc_clear_stats_cmd_fixed_param;
  16254. /** Data structure for the pushed DCC stats */
  16255. typedef struct {
  16256. /** TLV tag and len; tag equals
  16257. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  16258. A_UINT32 tlv_header;
  16259. /* VDEV identifier */
  16260. A_UINT32 vdev_id;
  16261. /** The number of channels in the response. */
  16262. A_UINT32 num_channels;
  16263. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  16264. } wmi_dcc_stats_event_fixed_param;
  16265. /** Data structure for updating NDL per channel. */
  16266. typedef struct {
  16267. /** TLV tag and len; tag equals
  16268. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  16269. A_UINT32 tlv_header;
  16270. /**
  16271. * Channel frequency, 16 bits
  16272. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  16273. */
  16274. A_UINT32 chan_info;
  16275. /**
  16276. * NDL_minDccSampling, 10 bits.
  16277. * Maximum time interval between subsequent checks of the DCC rules.
  16278. */
  16279. A_UINT32 ndl_min_dcc_sampling;
  16280. /**
  16281. * dcc_enable, 1 bit.
  16282. * dcc_stats_enable, 1 bit.
  16283. * dcc_stats_interval, 16 bits.
  16284. */
  16285. A_UINT32 dcc_flags;
  16286. /** General DCC configuration. */
  16287. /**
  16288. * NDL_timeUp, ndlType_timing, 1+12 bits.
  16289. * NDL_timeDown, ndlType_timing, 1+12 bits.
  16290. */
  16291. A_UINT32 general_config;
  16292. /** Transmit power thresholds. */
  16293. /**
  16294. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  16295. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  16296. */
  16297. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  16298. /**
  16299. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  16300. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  16301. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  16302. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  16303. */
  16304. /* see "ETSI TS 102 687" table above for units */
  16305. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  16306. /** Packet timing thresholds. */
  16307. /**
  16308. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16309. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16310. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16311. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16312. */
  16313. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  16314. /**
  16315. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  16316. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  16317. */
  16318. A_UINT32 min_max_packet_interval;
  16319. /**
  16320. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  16321. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  16322. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  16323. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  16324. */
  16325. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  16326. /** Packet datarate thresholds. */
  16327. /**
  16328. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  16329. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  16330. */
  16331. A_UINT32 min_max_datarate;
  16332. /**
  16333. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  16334. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  16335. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  16336. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  16337. */
  16338. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  16339. /** Receive signal thresholds. */
  16340. /**
  16341. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  16342. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  16343. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  16344. */
  16345. A_UINT32 min_max_def_carrier_sense;
  16346. /** Receive model parameter. */
  16347. /**
  16348. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  16349. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  16350. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  16351. */
  16352. A_UINT32 receive_model_parameter;
  16353. /**
  16354. * NDL_minSNR, ndlType_snr, 1+7 bits.
  16355. */
  16356. A_UINT32 receive_model_parameter_2;
  16357. /** Demodulation model parameters. */
  16358. /**
  16359. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  16360. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  16361. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  16362. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  16363. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  16364. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  16365. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  16366. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  16367. */
  16368. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  16369. /** Transmit model parameters. */
  16370. /**
  16371. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  16372. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  16373. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  16374. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  16375. */
  16376. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  16377. /**
  16378. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  16379. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  16380. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  16381. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  16382. */
  16383. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  16384. /**
  16385. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  16386. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  16387. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  16388. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  16389. */
  16390. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  16391. /**
  16392. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  16393. */
  16394. A_UINT32 tm_max_channel_use;
  16395. /**
  16396. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  16397. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  16398. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  16399. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  16400. */
  16401. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  16402. /** Channel load thresholds. */
  16403. /**
  16404. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  16405. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  16406. */
  16407. A_UINT32 min_max_channel_load;
  16408. /** Transmit queue parameters. */
  16409. /**
  16410. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  16411. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  16412. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  16413. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  16414. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  16415. */
  16416. A_UINT32 transmit_queue_parameters;
  16417. /**
  16418. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  16419. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  16420. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  16421. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  16422. */
  16423. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  16424. } wmi_dcc_ndl_chan;
  16425. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  16426. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  16427. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  16428. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  16429. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  16430. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  16431. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  16432. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  16433. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  16434. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  16435. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  16436. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  16437. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  16438. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  16439. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  16440. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  16441. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  16442. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  16443. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  16444. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  16445. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  16446. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  16447. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  16448. #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)
  16449. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  16450. #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)
  16451. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  16452. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  16453. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  16454. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  16455. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  16456. #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)
  16457. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  16458. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  16459. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  16460. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  16461. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  16462. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  16463. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  16464. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  16465. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  16466. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  16467. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  16468. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  16469. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  16470. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  16471. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  16472. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  16473. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  16474. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  16475. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  16476. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  16477. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  16478. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  16479. #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)
  16480. #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)
  16481. #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)
  16482. #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)
  16483. #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)
  16484. #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)
  16485. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  16486. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  16487. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  16488. #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)
  16489. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  16490. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  16491. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  16492. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  16493. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  16494. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  16495. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  16496. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  16497. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  16498. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  16499. /** Data structure for updating the NDL. */
  16500. typedef struct {
  16501. /** TLV tag and len; tag equals
  16502. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  16503. A_UINT32 tlv_header;
  16504. /* VDEV identifier */
  16505. A_UINT32 vdev_id;
  16506. /** The number of channels in the request. */
  16507. A_UINT32 num_channel;
  16508. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  16509. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  16510. } wmi_dcc_update_ndl_cmd_fixed_param;
  16511. typedef struct {
  16512. /** TLV tag and len; tag equals
  16513. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  16514. A_UINT32 tlv_header;
  16515. /* VDEV identifier */
  16516. A_UINT32 vdev_id;
  16517. A_UINT32 status;
  16518. } wmi_dcc_update_ndl_resp_event_fixed_param;
  16519. /* Actions for TSF timestamp */
  16520. typedef enum {
  16521. TSF_TSTAMP_CAPTURE_REQ = 1,
  16522. TSF_TSTAMP_CAPTURE_RESET = 2,
  16523. TSF_TSTAMP_READ_VALUE = 3,
  16524. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  16525. } wmi_tsf_tstamp_action;
  16526. typedef struct {
  16527. /** TLV tag and len; tag equals
  16528. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  16529. A_UINT32 tlv_header;
  16530. /** unique id identifying the VDEV, generated by the caller */
  16531. A_UINT32 vdev_id;
  16532. /* action type, refer to wmi_tsf_tstamp_action */
  16533. A_UINT32 tsf_action;
  16534. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  16535. typedef struct {
  16536. /* TLV tag and len; tag equals
  16537. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  16538. A_UINT32 tlv_header;
  16539. /* VDEV identifier */
  16540. A_UINT32 vdev_id;
  16541. /* low 32bit of tsf */
  16542. A_UINT32 tsf_low;
  16543. /* high 32 bit of tsf */
  16544. A_UINT32 tsf_high;
  16545. /* low 32 bits of qtimer */
  16546. A_UINT32 qtimer_low;
  16547. /* high 32 bits of qtimer */
  16548. A_UINT32 qtimer_high;
  16549. } wmi_vdev_tsf_report_event_fixed_param;
  16550. /* ie_id values:
  16551. * 0 to 255 are used for individual IEEE802.11 Information Element types
  16552. */
  16553. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  16554. /* source values: */
  16555. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  16556. /* band values: */
  16557. typedef enum {
  16558. WMI_SET_VDEV_IE_BAND_ALL = 0,
  16559. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  16560. WMI_SET_VDEV_IE_BAND_5GHZ,
  16561. } wmi_set_vdev_ie_band;
  16562. typedef struct {
  16563. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  16564. A_UINT32 tlv_header;
  16565. /** unique id identifying the VDEV, generated by the caller */
  16566. A_UINT32 vdev_id;
  16567. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  16568. A_UINT32 ie_id;
  16569. /** ie_len corresponds to num of bytes in ie_data[] */
  16570. A_UINT32 ie_len;
  16571. /** source of this command */
  16572. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  16573. /** band for this IE - se wmi_set_vdev_ie_band enum */
  16574. A_UINT32 band;
  16575. /**
  16576. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  16577. * A_UINT8 ie_data[];
  16578. *
  16579. */
  16580. } wmi_vdev_set_ie_cmd_fixed_param;
  16581. /* DISA feature related data structures */
  16582. #define MAX_MAC_HEADER_LEN 32
  16583. typedef enum {
  16584. WMI_ENCRYPT_DECRYPT_FLAG_INVALID,
  16585. WMI_ENCRYPT = 1,
  16586. WMI_DECRYPT = 2,
  16587. } WMI_ENCRYPT_DECRYPT_FLAG;
  16588. typedef struct {
  16589. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param */
  16590. /** unique id identifying the VDEV, generated by the caller */
  16591. A_UINT32 vdev_id;
  16592. A_UINT32 key_flag; /* WMI_ENCRYPT_DECRYPT_FLAG */
  16593. A_UINT32 key_idx;
  16594. A_UINT32 key_cipher;
  16595. A_UINT32 key_len; /* units = bytes */
  16596. A_UINT32 key_txmic_len; /* units = bytes */
  16597. A_UINT32 key_rxmic_len; /* units = bytes */
  16598. /** Key: This array needs to be provided in little-endian order */
  16599. A_UINT8 key_data[WMI_MAX_KEY_LEN];
  16600. /** Packet number: This array needs to be provided in little-endian order.
  16601. * If the PN is less than 8 bytes, the PN data shall be placed into this
  16602. * pn[] array starting at byte 0, leaving the MSBs empty.
  16603. */
  16604. A_UINT8 pn[8];
  16605. /** 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
  16606. * This array needs to be provided in little-endian order.
  16607. */
  16608. A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
  16609. A_UINT32 data_len; /** Payload length, units = bytes */
  16610. /*
  16611. * Following this struct are this TLV:
  16612. * A_UINT8 data[]; <-- actual data to be encrypted,
  16613. * needs to be provided in little-endian order
  16614. */
  16615. } wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
  16616. /* This event is generated in response to WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
  16617. * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
  16618. * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
  16619. * then on receiving the tx completion for the DISA frame this WMI event
  16620. * will be delivered to HOST with the encrypted frame.
  16621. */
  16622. typedef struct {
  16623. /** TLV tag and len; tag equals
  16624. * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param */
  16625. A_UINT32 tlv_header;
  16626. /* VDEV identifier */
  16627. A_UINT32 vdev_id;
  16628. A_INT32 status; /* 0: success, -1: Failure, */
  16629. /* 802.11 header length + encrypted payload length (units = bytes) */
  16630. A_UINT32 data_length;
  16631. /*
  16632. * Following this struct is this TLV:
  16633. * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
  16634. * 802.11 header + encrypted payload,
  16635. * provided in little-endian order
  16636. */
  16637. } wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
  16638. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  16639. typedef struct {
  16640. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  16641. /** Set Preferred Channel List **/
  16642. /** # of channels to scan */
  16643. A_UINT32 num_chan;
  16644. /**
  16645. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  16646. * structure. The TLV's are:
  16647. * A_UINT32 channel_list[];
  16648. **/
  16649. } wmi_soc_set_pcl_cmd_fixed_param;
  16650. /* Values for channel_weight */
  16651. typedef enum {
  16652. WMI_PCL_WEIGHT_DISALLOW = 0,
  16653. WMI_PCL_WEIGHT_LOW = 1,
  16654. WMI_PCL_WEIGHT_MEDIUM = 2,
  16655. WMI_PCL_WEIGHT_HIGH = 3,
  16656. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  16657. } wmi_pcl_chan_weight;
  16658. typedef struct {
  16659. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  16660. /** Set Preferred Channel List **/
  16661. /** pdev_id for identifying the MAC
  16662. * See macros starting with WMI_PDEV_ID_ for values.
  16663. */
  16664. A_UINT32 pdev_id;
  16665. /** # of channels to scan */
  16666. A_UINT32 num_chan;
  16667. /**
  16668. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  16669. * structure. The TLV's are:
  16670. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  16671. **/
  16672. } wmi_pdev_set_pcl_cmd_fixed_param;
  16673. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  16674. typedef struct {
  16675. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  16676. /** Set Hardware Mode **/
  16677. /* Hardware Mode Index */
  16678. A_UINT32 hw_mode_index;
  16679. } wmi_soc_set_hw_mode_cmd_fixed_param;
  16680. typedef struct {
  16681. A_UINT32 tlv_header; /* TLV tag and len tag equals WMITLV_TAG_STRUC_wmi_pdev_band_to_mac */
  16682. /** pdev_id for identifying the MAC
  16683. * See macros starting with WMI_PDEV_ID_ for values.
  16684. */
  16685. A_UINT32 pdev_id;
  16686. /* start frequency in MHz */
  16687. A_UINT32 start_freq;
  16688. /* end frequency in MHz */
  16689. A_UINT32 end_freq;
  16690. } wmi_pdev_band_to_mac;
  16691. typedef struct {
  16692. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  16693. /** Set Hardware Mode **/
  16694. /** pdev_id for identifying the MAC
  16695. * See macros starting with WMI_PDEV_ID_ for values.
  16696. */
  16697. A_UINT32 pdev_id;
  16698. /* Hardware Mode Index */
  16699. A_UINT32 hw_mode_index;
  16700. /* Number of band to mac TLVs */
  16701. A_UINT32 num_band_to_mac;
  16702. /* Followed by TLVs of type
  16703. * num_band_to_mac * wmi_pdev_band_to_mac.
  16704. */
  16705. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  16706. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  16707. typedef struct {
  16708. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  16709. /** Set Dual MAC Firmware Configuration **/
  16710. /* Concurrent scan configuration bits */
  16711. A_UINT32 concurrent_scan_config_bits;
  16712. /* Firmware mode configuration bits */
  16713. A_UINT32 fw_mode_config_bits;
  16714. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  16715. typedef struct {
  16716. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  16717. /** Set Dual MAC Firmware Configuration **/
  16718. /** pdev_id for identifying the MAC
  16719. * See macros starting with WMI_PDEV_ID_ for values.
  16720. */
  16721. A_UINT32 pdev_id;
  16722. /* Concurrent scan configuration bits */
  16723. A_UINT32 concurrent_scan_config_bits;
  16724. /* Firmware mode configuration bits */
  16725. A_UINT32 fw_mode_config_bits;
  16726. } wmi_pdev_set_mac_config_cmd_fixed_param;
  16727. typedef struct { /* DEPRECATED */
  16728. A_UINT32 num_tx_chains;
  16729. A_UINT32 num_rx_chains;
  16730. A_UINT32 reserved[2];
  16731. } soc_num_tx_rx_chains;
  16732. typedef struct {
  16733. A_UINT32 num_tx_chains_2g;
  16734. A_UINT32 num_rx_chains_2g;
  16735. A_UINT32 num_tx_chains_5g;
  16736. A_UINT32 num_rx_chains_5g;
  16737. } band_num_tx_rx_chains;
  16738. typedef union { /* DEPRECATED */
  16739. soc_num_tx_rx_chains soc_txrx_chain_setting;
  16740. band_num_tx_rx_chains band_txrx_chain_setting;
  16741. } antenna_num_tx_rx_chains;
  16742. typedef enum {
  16743. ANTENNA_MODE_DISABLED = 0x0,
  16744. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  16745. /* reserved */
  16746. } antenna_mode_reason;
  16747. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  16748. typedef struct {
  16749. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  16750. /* the reason for setting antenna mode, refer antenna_mode_reason */
  16751. A_UINT32 reason;
  16752. /*
  16753. * The above reason parameter will select whether the following union
  16754. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  16755. */
  16756. antenna_num_tx_rx_chains num_txrx_chains_setting;
  16757. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  16758. typedef struct {
  16759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  16760. /** pdev_id for identifying the MAC
  16761. * See macros starting with WMI_PDEV_ID_ for values.
  16762. */
  16763. A_UINT32 pdev_id;
  16764. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  16765. A_UINT32 num_txrx_chains;
  16766. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  16767. /** Data structure for information specific to a VDEV to MAC mapping. */
  16768. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  16769. typedef struct {
  16770. /** TLV tag and len; tag equals
  16771. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  16772. A_UINT32 tlv_header;
  16773. A_UINT32 vdev_id; /* VDEV ID */
  16774. A_UINT32 mac_id; /* MAC ID */
  16775. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  16776. /** Data structure for information specific to a VDEV to MAC mapping. */
  16777. typedef struct {
  16778. /** TLV tag and len; tag equals
  16779. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  16780. A_UINT32 tlv_header;
  16781. /** pdev_id for identifying the MAC
  16782. * See macros starting with WMI_PDEV_ID_ for values.
  16783. */
  16784. A_UINT32 pdev_id;
  16785. A_UINT32 vdev_id;
  16786. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  16787. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  16788. typedef struct {
  16789. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  16790. /** Set Hardware Mode Response Event **/
  16791. /* Status of set_hw_mode command */
  16792. /*
  16793. * Values for Status:
  16794. * 0 - OK; command successful
  16795. * 1 - EINVAL; Requested invalid hw_mode
  16796. * 2 - ECANCELED; HW mode change canceled
  16797. * 3 - ENOTSUP; HW mode not supported
  16798. * 4 - EHARDWARE; HW mode change prevented by hardware
  16799. * 5 - EPENDING; HW mode change is pending
  16800. * 6 - ECOEX; HW mode change conflict with Coex
  16801. */
  16802. A_UINT32 status;
  16803. /* Configured Hardware Mode */
  16804. A_UINT32 cfgd_hw_mode_index;
  16805. /* Number of Vdev to Mac entries */
  16806. A_UINT32 num_vdev_mac_entries;
  16807. /**
  16808. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16809. * structure. The TLV's are:
  16810. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16811. */
  16812. } wmi_soc_set_hw_mode_response_event_fixed_param;
  16813. typedef struct {
  16814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  16815. /** Set Hardware Mode Response Event **/
  16816. /** pdev_id for identifying the MAC
  16817. * See macros starting with WMI_PDEV_ID_ for values.
  16818. */
  16819. A_UINT32 pdev_id;
  16820. /* Status of set_hw_mode command */
  16821. /*
  16822. * Values for Status:
  16823. * 0 - OK; command successful
  16824. * 1 - EINVAL; Requested invalid hw_mode
  16825. * 2 - ECANCELED; HW mode change canceled
  16826. * 3 - ENOTSUP; HW mode not supported
  16827. * 4 - EHARDWARE; HW mode change prevented by hardware
  16828. * 5 - EPENDING; HW mode change is pending
  16829. * 6 - ECOEX; HW mode change conflict with Coex
  16830. */
  16831. A_UINT32 status;
  16832. /* Configured Hardware Mode */
  16833. A_UINT32 cfgd_hw_mode_index;
  16834. /* Number of Vdev to Mac entries */
  16835. A_UINT32 num_vdev_mac_entries;
  16836. /**
  16837. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16838. * structure. The TLV's are:
  16839. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16840. */
  16841. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  16842. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  16843. typedef struct {
  16844. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  16845. /** Hardware Mode Transition Event **/
  16846. /* Original or old Hardware mode */
  16847. A_UINT32 old_hw_mode_index;
  16848. /* New Hardware Mode */
  16849. A_UINT32 new_hw_mode_index;
  16850. /* Number of Vdev to Mac entries */
  16851. A_UINT32 num_vdev_mac_entries;
  16852. /**
  16853. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16854. * structure. The TLV's are:
  16855. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16856. */
  16857. } wmi_soc_hw_mode_transition_event_fixed_param;
  16858. typedef struct {
  16859. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  16860. /** Hardware Mode Transition Event **/
  16861. /** pdev_id for identifying the MAC
  16862. * See macros starting with WMI_PDEV_ID_ for values.
  16863. */
  16864. A_UINT32 pdev_id;
  16865. /* Original or old Hardware mode */
  16866. A_UINT32 old_hw_mode_index;
  16867. /* New Hardware Mode */
  16868. A_UINT32 new_hw_mode_index;
  16869. /* Number of Vdev to Mac entries */
  16870. A_UINT32 num_vdev_mac_entries;
  16871. /**
  16872. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  16873. * structure. The TLV's are:
  16874. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  16875. */
  16876. } wmi_pdev_hw_mode_transition_event_fixed_param;
  16877. /**
  16878. * This command is sent from WLAN host driver to firmware for
  16879. * plugging in reorder queue desc to lithium hw.
  16880. *
  16881. * Example: plug-in queue desc for TID 5
  16882. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  16883. * (vdev_id = PEER vdev id,
  16884. * peer_macaddr = PEER mac addr,
  16885. * tid = 5,
  16886. * queue_ptr_lo = queue desc addr lower 32 bits,
  16887. * queue_ptr_hi = queue desc addr higher 32 bits,
  16888. * queue_no = 16-bit number assigned by host for queue,
  16889. * stored in bits 15:0 of queue_no field)
  16890. */
  16891. typedef struct {
  16892. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  16893. A_UINT32 vdev_id;
  16894. wmi_mac_addr peer_macaddr; /* peer mac address */
  16895. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  16896. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  16897. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  16898. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  16899. stored in bits 15:0 of queue_no field */
  16900. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  16901. /**
  16902. * This command is sent from WLAN host driver to firmware for
  16903. * removing one or more reorder queue desc to lithium hw.
  16904. *
  16905. * Example: remove queue desc for all TIDs
  16906. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  16907. * (vdev_id = PEER vdev id,
  16908. * peer_macaddr = PEER mac addr,
  16909. * tid = 0x1FFFF,
  16910. */
  16911. typedef struct {
  16912. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  16913. A_UINT32 vdev_id;
  16914. wmi_mac_addr peer_macaddr; /* peer mac address */
  16915. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  16916. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  16917. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  16918. typedef struct {
  16919. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  16920. /** Set Dual MAC Config Response Event **/
  16921. /* Status for set_dual_mac_config command */
  16922. /*
  16923. * Values for Status:
  16924. * 0 - OK; command successful
  16925. * 1 - EINVAL; Requested invalid hw_mode
  16926. * 3 - ENOTSUP; HW mode not supported
  16927. * 4 - EHARDWARE; HW mode change prevented by hardware
  16928. * 6 - ECOEX; HW mode change conflict with Coex
  16929. */
  16930. A_UINT32 status;
  16931. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  16932. typedef struct {
  16933. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  16934. /** Set Dual MAC Config Response Event **/
  16935. /** pdev_id for identifying the MAC
  16936. * See macros starting with WMI_PDEV_ID_ for values.
  16937. */
  16938. A_UINT32 pdev_id;
  16939. /* Status for set_dual_mac_config command */
  16940. /*
  16941. * Values for Status:
  16942. * 0 - OK; command successful
  16943. * 1 - EINVAL; Requested invalid hw_mode
  16944. * 3 - ENOTSUP; HW mode not supported
  16945. * 4 - EHARDWARE; HW mode change prevented by hardware
  16946. * 6 - ECOEX; HW mode change conflict with Coex
  16947. */
  16948. A_UINT32 status;
  16949. } wmi_pdev_set_mac_config_response_event_fixed_param;
  16950. typedef enum {
  16951. MAWC_MOTION_STATE_UNKNOWN,
  16952. MAWC_MOTION_STATE_STATIONARY,
  16953. MAWC_MOTION_STATE_WALK,
  16954. MAWC_MOTION_STATE_TRANSIT,
  16955. } MAWC_MOTION_STATE;
  16956. typedef enum {
  16957. MAWC_SENSOR_STATUS_OK,
  16958. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  16959. MAWC_SENSOR_STATUS_SHUTDOWN,
  16960. } MAWC_SENSOR_STATUS;
  16961. typedef struct {
  16962. /* TLV tag and len; tag equals
  16963. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  16964. A_UINT32 tlv_header;
  16965. /** new motion state, MAWC_MOTION_STATE */
  16966. A_UINT32 motion_state;
  16967. /** status code of sensor, MAWC_SENSOR_STATUS */
  16968. A_UINT32 sensor_status;
  16969. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  16970. /* MBO flag field definition */
  16971. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  16972. * 1 - Allow to connect to MBO AP only
  16973. * Bit 1-31 : reserved.
  16974. */
  16975. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  16976. typedef struct {
  16977. /* TLV tag and len; tag equals
  16978. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  16979. A_UINT32 tlv_header;
  16980. /** vdev id */
  16981. A_UINT32 vdev_id;
  16982. /** enable or disable MBO */
  16983. A_UINT32 enable;
  16984. /** MBO flags, refer to definition of MBO flags*/
  16985. A_UINT32 flags;
  16986. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  16987. typedef struct {
  16988. /* TLV tag and len; tag equals
  16989. * WMITLV_TAG_ARRAY_STRUC */
  16990. A_UINT32 tlv_header;
  16991. /** Current operating class number */
  16992. A_UINT32 cur_op_class;
  16993. /** Country string of current reg domain,
  16994. * the expected value should be same as country str defined
  16995. * in country IE.
  16996. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  16997. * The ordering of this array must be maintained,
  16998. * even when a big-endian host's WMI messages undergo
  16999. * automatic byte reordering for conversion to the
  17000. * little-endian ordering required by the target.
  17001. * On big-endian hosts, this array may need to be byte-swapped
  17002. * by the host, so the subsequent automatic byte-swap
  17003. * will result in the correct final byte order.
  17004. * global operating class: set country_str[0]=0
  17005. */
  17006. A_UINT8 country_str[4];
  17007. /** Supported operating class number in current regdomain */
  17008. A_UINT32 supp_op_class_num;
  17009. /* The TLVs will follow. */
  17010. /* A_UINT32 supp_op_class_list[] */
  17011. } wmi_supported_operating_class_param;
  17012. typedef struct {
  17013. /* TLV tag and len; tag equals
  17014. * WMITLV_TAG_ARRAY_STRUC */
  17015. A_UINT32 tlv_header;
  17016. /** non preferred channel attribute length */
  17017. A_UINT32 non_prefer_ch_attr_len;
  17018. /* The TLVs will follow. */
  17019. /** A_UINT8 non_prefer_ch_attr[];*/
  17020. } wmi_mbo_non_preferred_channel_report_param;
  17021. typedef struct {
  17022. /* TLV tag and len; tag equals
  17023. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  17024. A_UINT32 tlv_header;
  17025. /* enable(1) or disable(0) */
  17026. A_UINT32 enable;
  17027. } wmi_mawc_enable_sensor_event_fixed_param;
  17028. typedef struct {
  17029. /* TLV tag and len; tag equals
  17030. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  17031. A_UINT32 tlv_header;
  17032. /* Unique id identifying the VDEV */
  17033. A_UINT32 vdev_id;
  17034. /* enable(1) or disable(0) MAWC */
  17035. A_UINT32 enable;
  17036. /* ratio of skipping suppressing scan, skip one out of x */
  17037. A_UINT32 suppress_ratio;
  17038. } wmi_extscan_configure_mawc_cmd_fixed_param;
  17039. typedef struct {
  17040. /* TLV tag and len; tag equals
  17041. * WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param */
  17042. A_UINT32 tlv_header;
  17043. /* Unique id identifying the VDEV */
  17044. A_UINT32 vdev_id;
  17045. /* enable(1) or disable(0) packet error rate trigger for roaming */
  17046. A_UINT32 enable;
  17047. /* high_rate_thresh, low_rate_thresh, pkt_err_rate_thresh_pct:
  17048. * If PER monitoring as a trigger for roaming is enabled,
  17049. * it is controlled by high_rate_thresh, low_rate_thresh, and
  17050. * pkt_err_rate_thresh_pct.
  17051. * PER monitoring is performed only when the time-averaged throughput
  17052. * is less than high_rate_thresh.
  17053. * During PER monitoring, the target keeps track of the PHY rate for
  17054. * each of the first N PPDUs within a time window.
  17055. * If the number of PPDUs with PHY rate < low_rate_thresh exceeds
  17056. * N * pkt_err_rate_thresh_pct / 100, roaming will be triggered.
  17057. *
  17058. * This PER monitoring as a trigger for roaming is performed
  17059. * concurrently but independently for rx and tx.
  17060. */
  17061. A_UINT32 high_rate_thresh; /* units = Kbps */
  17062. A_UINT32 low_rate_thresh; /* units = Kbps */
  17063. A_UINT32 pkt_err_rate_thresh_pct;
  17064. /*
  17065. * rest time after associating to a new AP before
  17066. * starting to monitor PER as a roaming trigger,
  17067. * (units are seconds)
  17068. */
  17069. A_UINT32 per_rest_time;
  17070. /* This is the total time for which PER monitoring will be run.
  17071. * After completion of time windows, the average PER over the window
  17072. * will be computed.
  17073. * The parameter value stores specifications for both TX and RX
  17074. * monitor times.
  17075. * The two least-significant bytes (0 & 1) hold the RX monitor time;
  17076. * the two most-significant bytes (2 & 3) hold the TX monitor time.
  17077. */
  17078. A_UINT32 pkt_err_rate_mon_time; /* units = seconds */
  17079. /* Minimum roamable AP RSSI for candidate selection for PER based roam */
  17080. A_INT32 min_candidate_rssi; /* units = dBm */
  17081. } wmi_roam_per_config_fixed_param;
  17082. typedef struct {
  17083. /* TLV tag and len; tag equals
  17084. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  17085. A_UINT32 tlv_header;
  17086. /* Unique id identifying the VDEV */
  17087. A_UINT32 vdev_id;
  17088. /* enable(1) or disable(0) MAWC */
  17089. A_UINT32 enable;
  17090. /* ratio of exponential backoff, next = current + current*ratio/100 */
  17091. A_UINT32 exp_backoff_ratio;
  17092. /* initial scan interval(msec) */
  17093. A_UINT32 init_scan_interval;
  17094. /* max scan interval(msec) */
  17095. A_UINT32 max_scan_interval;
  17096. } wmi_nlo_configure_mawc_cmd_fixed_param;
  17097. typedef struct {
  17098. /* TLV tag and len; tag equals
  17099. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  17100. A_UINT32 tlv_header;
  17101. /* Unique id identifying the VDEV */
  17102. A_UINT32 vdev_id;
  17103. /* enable(1) or disable(0) MAWC */
  17104. A_UINT32 enable;
  17105. /* data traffic load (kBps) to register CMC */
  17106. A_UINT32 traffic_load_threshold;
  17107. /* RSSI threshold (dBm) to scan for Best AP */
  17108. A_UINT32 best_ap_rssi_threshold;
  17109. /* high RSSI threshold adjustment in Stationary to suppress scan */
  17110. A_UINT32 rssi_stationary_high_adjust;
  17111. /* low RSSI threshold adjustment in Stationary to suppress scan */
  17112. A_UINT32 rssi_stationary_low_adjust;
  17113. } wmi_roam_configure_mawc_cmd_fixed_param;
  17114. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  17115. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  17116. typedef enum {
  17117. PACKET_FILTER_TYPE_INVALID = 0,
  17118. PACKET_FILTER_TYPE_FILTER_PKT,
  17119. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  17120. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  17121. } WMI_PACKET_FILTER_FILTER_TYPE;
  17122. typedef enum {
  17123. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  17124. /* L2 header */
  17125. PACKET_FILTER_PROTO_TYPE_MAC,
  17126. PACKET_FILTER_PROTO_TYPE_SNAP,
  17127. /* L3 header (EtherType) */
  17128. PACKET_FILTER_PROTO_TYPE_IPV4,
  17129. PACKET_FILTER_PROTO_TYPE_IPV6,
  17130. /* L4 header (IP protocol) */
  17131. PACKET_FILTER_PROTO_TYPE_UDP,
  17132. PACKET_FILTER_PROTO_TYPE_TCP,
  17133. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  17134. PACKET_FILTER_PROTO_TYPE_MAX
  17135. } WMI_PACKET_FILTER_PROTO_TYPE;
  17136. typedef enum {
  17137. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  17138. PACKET_FILTER_CMP_TYPE_EQUAL,
  17139. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  17140. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  17141. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  17142. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  17143. PACKET_FILTER_CMP_TYPE_MAX
  17144. } WMI_PACKET_FILTER_CMP_TYPE;
  17145. typedef enum {
  17146. PACKET_FILTER_SET_INACTIVE = 0,
  17147. PACKET_FILTER_SET_ACTIVE
  17148. } WMI_PACKET_FILTER_ACTION;
  17149. typedef enum {
  17150. PACKET_FILTER_SET_DISABLE = 0,
  17151. PACKET_FILTER_SET_ENABLE
  17152. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  17153. typedef struct {
  17154. A_UINT32 proto_type;
  17155. A_UINT32 cmp_type;
  17156. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  17157. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  17158. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  17159. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  17160. } WMI_PACKET_FILTER_PARAMS_TYPE;
  17161. typedef struct {
  17162. A_UINT32 tlv_header;
  17163. A_UINT32 vdev_id;
  17164. A_UINT32 filter_id;
  17165. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  17166. A_UINT32 filter_type;
  17167. A_UINT32 num_params; /* how many entries in paramsData are valid */
  17168. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  17169. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  17170. /* deprecated0:
  17171. * This field simply provides filler space to retain the original message
  17172. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  17173. * from 10 to 5.
  17174. */
  17175. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  17176. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  17177. /* enable / disable all filters within the specified vdev */
  17178. typedef struct {
  17179. A_UINT32 tlv_header;
  17180. A_UINT32 vdev_id;
  17181. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  17182. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  17183. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  17184. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  17185. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  17186. WMI_SET_BITS(tcp_flag_u32, \
  17187. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17188. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  17189. tcp_flag_values)
  17190. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  17191. WMI_GET_BITS(tcp_flag_u32, \
  17192. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  17193. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  17194. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  17195. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  17196. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  17197. WMI_SET_BITS(tcp_flag_u32, \
  17198. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17199. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  17200. tcp_flags_mask)
  17201. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  17202. WMI_GET_BITS(tcp_flag_u32, \
  17203. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  17204. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  17205. typedef struct {
  17206. A_UINT32 tlv_header;
  17207. /**
  17208. * @brief lro_enable - indicates whether lro is enabled
  17209. * [0] LRO Enable
  17210. */
  17211. A_UINT32 lro_enable;
  17212. /**
  17213. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  17214. * values to check for
  17215. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  17216. * the values in this field after masking with TCP flags mask below,
  17217. * LRO eligible will not be set
  17218. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  17219. * provided above with the TCP flags field in the received packet
  17220. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  17221. * macros to isolate the mask field and values field that are packed
  17222. * into this u32 "word".
  17223. */
  17224. A_UINT32 tcp_flag_u32;
  17225. /**
  17226. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17227. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17228. * bytes 0 to 3
  17229. *
  17230. * In this and all the below toeplitz_hash fields, the bytes are
  17231. * specified in little-endian order. For example:
  17232. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  17233. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  17234. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  17235. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  17236. */
  17237. A_UINT32 toeplitz_hash_ipv4_0_3;
  17238. /**
  17239. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17240. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17241. * bytes 4 to 7
  17242. */
  17243. A_UINT32 toeplitz_hash_ipv4_4_7;
  17244. /**
  17245. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17246. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17247. * bytes 8 to 11
  17248. */
  17249. A_UINT32 toeplitz_hash_ipv4_8_11;
  17250. /**
  17251. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17252. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17253. * bytes 12 to 15
  17254. */
  17255. A_UINT32 toeplitz_hash_ipv4_12_15;
  17256. /**
  17257. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  17258. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  17259. * byte 16
  17260. */
  17261. A_UINT32 toeplitz_hash_ipv4_16;
  17262. /**
  17263. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17264. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17265. * bytes 0 to 3
  17266. */
  17267. A_UINT32 toeplitz_hash_ipv6_0_3;
  17268. /**
  17269. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17270. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17271. * bytes 4 to 7
  17272. */
  17273. A_UINT32 toeplitz_hash_ipv6_4_7;
  17274. /**
  17275. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17276. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17277. * bytes 8 to 11
  17278. */
  17279. A_UINT32 toeplitz_hash_ipv6_8_11;
  17280. /**
  17281. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17282. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17283. * bytes 12 to 15
  17284. */
  17285. A_UINT32 toeplitz_hash_ipv6_12_15;
  17286. /**
  17287. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17288. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17289. * bytes 16 to 19
  17290. */
  17291. A_UINT32 toeplitz_hash_ipv6_16_19;
  17292. /**
  17293. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17294. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17295. * bytes 20 to 22
  17296. */
  17297. A_UINT32 toeplitz_hash_ipv6_20_23;
  17298. /**
  17299. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17300. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17301. * bytes 24 to 27
  17302. */
  17303. A_UINT32 toeplitz_hash_ipv6_24_27;
  17304. /**
  17305. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17306. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17307. * bytes 28 to 31
  17308. */
  17309. A_UINT32 toeplitz_hash_ipv6_28_31;
  17310. /**
  17311. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17312. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17313. * bytes 32 to 35
  17314. */
  17315. A_UINT32 toeplitz_hash_ipv6_32_35;
  17316. /**
  17317. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17318. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17319. * bytes 36 to 39
  17320. */
  17321. A_UINT32 toeplitz_hash_ipv6_36_39;
  17322. /**
  17323. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  17324. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  17325. * byte 40
  17326. */
  17327. A_UINT32 toeplitz_hash_ipv6_40;
  17328. } wmi_lro_info_cmd_fixed_param;
  17329. typedef struct {
  17330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  17331. A_UINT32 offset; /* flash offset to write, starting from 0 */
  17332. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  17333. } wmi_transfer_data_to_flash_cmd_fixed_param;
  17334. typedef struct {
  17335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  17336. /** Return status. 0 for success, non-zero otherwise */
  17337. A_UINT32 status;
  17338. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  17339. typedef struct {
  17340. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  17341. A_UINT32 offset; /* flash offset to read, starting from 0 */
  17342. A_UINT32 length; /* data length to read, unit: byte */
  17343. } wmi_read_data_from_flash_cmd_fixed_param;
  17344. typedef struct {
  17345. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  17346. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  17347. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  17348. A_UINT32 length; /* length of data being reported, unit: byte */
  17349. } wmi_read_data_from_flash_event_fixed_param;
  17350. typedef enum {
  17351. ENHANCED_MCAST_FILTER_DISABLED,
  17352. ENHANCED_MCAST_FILTER_ENABLED
  17353. } ENHANCED_MCAST_FILTER_CONFIG;
  17354. /*
  17355. * Command to enable/disable filtering of multicast IP with unicast mac
  17356. */
  17357. typedef struct {
  17358. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  17359. /* Unique id identifying the VDEV */
  17360. A_UINT32 vdev_id;
  17361. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  17362. A_UINT32 enable;
  17363. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  17364. typedef struct {
  17365. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  17366. A_UINT32 tlv_header;
  17367. /** unique id identifying the VDEV, generated by the caller */
  17368. A_UINT32 vdev_id;
  17369. /** WISA enable / disable mode */
  17370. A_UINT32 wisa_mode;
  17371. } wmi_vdev_wisa_cmd_fixed_param;
  17372. /*
  17373. * This structure is used to report SMPS force mode set complete to host.
  17374. */
  17375. typedef struct {
  17376. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  17377. /* Unique id identifying the VDEV */
  17378. A_UINT32 vdev_id;
  17379. /* Return status. 0 for success, non-zero otherwise */
  17380. A_UINT32 status;
  17381. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  17382. /*
  17383. * This structure is used to report SCPC calibrated data to host.
  17384. */
  17385. typedef struct {
  17386. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  17387. /** number of BDF patches. Each patch contains offset, length and data */
  17388. A_UINT32 num_patch;
  17389. /* This TLV is followed by another TLV of array of bytes
  17390. * A_UINT8 data[];
  17391. * This data array contains, for example
  17392. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  17393. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  17394. *
  17395. */
  17396. } wmi_scpc_event_fixed_param;
  17397. typedef enum {
  17398. FW_ACTIVE_BPF_MODE_DISABLE = (1 << 1),
  17399. FW_ACTIVE_BPF_MODE_FORCE_ENABLE = (1 << 2),
  17400. FW_ACTIVE_BPF_MODE_ADAPTIVE_ENABLE = (1 << 3),
  17401. } FW_ACTIVE_BPF_MODE;
  17402. /* bpf interface structure */
  17403. typedef struct wmi_bpf_get_capability_cmd_s {
  17404. A_UINT32 tlv_header;
  17405. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  17406. } wmi_bpf_get_capability_cmd_fixed_param;
  17407. typedef struct wmi_bpf_capability_info_evt_s {
  17408. A_UINT32 tlv_header;
  17409. A_UINT32 bpf_version; /* fw's implement version */
  17410. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  17411. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  17412. A_UINT32 fw_active_bpf_support_mcbc_modes; /* multicast/broadcast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17413. A_UINT32 fw_active_bpf_support_uc_modes; /* unicast - refer to FW_ACTIVE_BPF_MODE, it can be 'or' of them */
  17414. } wmi_bpf_capability_info_evt_fixed_param;
  17415. /* bit 0 of flags: report counters */
  17416. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  17417. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  17418. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  17419. A_UINT32 tlv_header;
  17420. A_UINT32 flags;
  17421. A_UINT32 vdev_id;
  17422. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  17423. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  17424. A_UINT32 tlv_header;
  17425. A_UINT32 vdev_id;
  17426. A_UINT32 num_filters;
  17427. A_UINT32 num_checked_pkts;
  17428. A_UINT32 num_dropped_pkts;
  17429. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  17430. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  17431. A_UINT32 tlv_header;
  17432. A_UINT32 vdev_id;
  17433. A_UINT32 filter_id;
  17434. A_UINT32 bpf_version; /* host bpf version */
  17435. A_UINT32 total_length;
  17436. A_UINT32 current_offset;
  17437. A_UINT32 current_length;
  17438. /*
  17439. * The TLV follows:
  17440. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  17441. */
  17442. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  17443. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  17444. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  17445. A_UINT32 tlv_header;
  17446. A_UINT32 vdev_id;
  17447. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  17448. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  17449. typedef struct wmi_bpf_set_vdev_active_mode_cmd_s {
  17450. A_UINT32 tlv_header;
  17451. A_UINT32 vdev_id;
  17452. A_UINT32 mcbc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17453. A_UINT32 uc_mode; /* refer to FW_ACTIVE_BPF_MODE */
  17454. } wmi_bpf_set_vdev_active_mode_cmd_fixed_param;
  17455. typedef struct wmi_bpf_set_vdev_enable_cmd_s {
  17456. A_UINT32 tlv_header;
  17457. A_UINT32 vdev_id;
  17458. A_UINT32 is_enabled; /* fw assume host default enables */
  17459. } wmi_bpf_set_vdev_enable_cmd_fixed_param;
  17460. typedef struct wmi_bpf_set_vdev_work_memory_cmd_s {
  17461. A_UINT32 tlv_header;
  17462. A_UINT32 vdev_id;
  17463. A_UINT32 bpf_version; /* bpf instruction version */
  17464. A_UINT32 program_len; /* the program length may be changed by this command */
  17465. A_UINT32 addr_offset; /* start writing addr in the working memory */
  17466. A_UINT32 length; /* the writing size of this command (byte units) */
  17467. /*
  17468. * The TLV follows:
  17469. * A_UINT8 buf_inst[]; <-- Variable length buffer with the data to write
  17470. */
  17471. } wmi_bpf_set_vdev_work_memory_cmd_fixed_param;
  17472. typedef struct wmi_bpf_get_vdev_work_memory_cmd_s {
  17473. A_UINT32 tlv_header;
  17474. A_UINT32 vdev_id;
  17475. A_UINT32 addr_offset; /* start reading addr in the working memory */
  17476. A_UINT32 length; /* reading size from addr (byte units) */
  17477. } wmi_bpf_get_vdev_work_memory_cmd_fixed_param;
  17478. typedef struct wmi_bpf_get_vdev_work_memory_resp_evt_s {
  17479. A_UINT32 tlv_header;
  17480. A_UINT32 vdev_id;
  17481. A_UINT32 offset; /* read memory offset from start_addr */
  17482. A_UINT32 length; /* read memory length of this command */
  17483. A_UINT32 fragment; /* 1 means more data will come, 0 means last fragment */
  17484. /*
  17485. * The TLV follows:
  17486. * A_UINT8 buf_inst[]; <-- Variable length buffer containing the read data
  17487. */
  17488. } wmi_bpf_get_vdev_work_memory_resp_evt_fixed_param;
  17489. #define AES_BLOCK_LEN 16 /* in bytes */
  17490. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  17491. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  17492. #define FIPS_ENCRYPT_CMD 0
  17493. #define FIPS_DECRYPT_CMD 1
  17494. #define FIPS_ENGINE_AES_CTR 0
  17495. #define FIPS_ENGINE_AES_MIC 1
  17496. #define FIPS_ERROR_OPER_TIMEOUT 1
  17497. /* WMI_PDEV_FIPS_CMDID */
  17498. typedef struct {
  17499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  17500. union {
  17501. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17502. /** pdev_id for identifying the MAC
  17503. * See macros starting with WMI_PDEV_ID_ for values.
  17504. */
  17505. A_UINT32 pdev_id;
  17506. };
  17507. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  17508. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  17509. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  17510. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  17511. A_UINT32 data_len; /* data length */
  17512. /*
  17513. * Following this structure is the TLV:
  17514. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  17515. */
  17516. } wmi_pdev_fips_cmd_fixed_param;
  17517. typedef struct {
  17518. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  17519. union {
  17520. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17521. /** pdev_id for identifying the MAC
  17522. * See macros starting with WMI_PDEV_ID_ for values.
  17523. */
  17524. A_UINT32 pdev_id;
  17525. };
  17526. A_UINT32 enable; /* 1:enable, 0:disable */
  17527. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  17528. A_UINT32 rx_antenna; /* rx antenna */
  17529. A_UINT32 tx_default_antenna; /* tx default antenna */
  17530. /*
  17531. * Following this structure is the TLV:
  17532. * wmi_pdev_smart_ant_gpio_handle
  17533. */
  17534. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  17535. /** GPIO pins/function values to control antennas */
  17536. typedef struct {
  17537. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  17538. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  17539. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  17540. /** pdev_id for identifying the MAC
  17541. * See macros starting with WMI_PDEV_ID_ for values.
  17542. */
  17543. A_UINT32 pdev_id;
  17544. } wmi_pdev_smart_ant_gpio_handle;
  17545. typedef struct {
  17546. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  17547. union {
  17548. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17549. /** pdev_id for identifying the MAC
  17550. * See macros starting with WMI_PDEV_ID_ for values.
  17551. */
  17552. A_UINT32 pdev_id;
  17553. };
  17554. A_UINT32 rx_antenna;
  17555. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  17556. typedef struct {
  17557. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  17558. /** unique id identifying the vdev, generated by the caller */
  17559. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17560. /** peer MAC address */
  17561. wmi_mac_addr peer_macaddr;
  17562. /*
  17563. * Following this structure is the TLV:
  17564. * wmi_peer_smart_ant_set_tx_antenna_series
  17565. */
  17566. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  17567. typedef struct {
  17568. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  17569. /* antenna array */
  17570. A_UINT32 antenna_series;
  17571. } wmi_peer_smart_ant_set_tx_antenna_series;
  17572. typedef struct {
  17573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  17574. /* rate array */
  17575. A_UINT32 train_rate_series;
  17576. /* antenna array */
  17577. A_UINT32 train_antenna_series;
  17578. /* Rate flags */
  17579. /* TODO: For future use? */
  17580. A_UINT32 rc_flags;
  17581. } wmi_peer_smart_ant_set_train_antenna_param;
  17582. typedef struct {
  17583. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  17584. /** unique id identifying the VDEV, generated by the caller */
  17585. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17586. /** peer MAC address */
  17587. wmi_mac_addr peer_macaddr;
  17588. /* num packets; 0-stop training */
  17589. A_UINT32 num_pkts;
  17590. /*
  17591. * Following this structure is the TLV:
  17592. * wmi_peer_smart_ant_set_train_antenna_param
  17593. */
  17594. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  17595. typedef struct {
  17596. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  17597. /** unique id identifying the vdev, generated by the caller */
  17598. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17599. /** peer MAC address */
  17600. wmi_mac_addr peer_macaddr;
  17601. /* command id*/
  17602. A_UINT32 cmd_id;
  17603. /* number of arguments passed */
  17604. A_UINT32 args_count;
  17605. /*
  17606. * Following this structure is the TLV:
  17607. * A_UINT32 args[]; <-- argument list
  17608. */
  17609. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  17610. typedef struct {
  17611. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  17612. A_UINT32 antCtrlChain;
  17613. /** pdev_id for identifying the MAC
  17614. * See macros starting with WMI_PDEV_ID_ for values.
  17615. */
  17616. A_UINT32 pdev_id;
  17617. } wmi_pdev_set_ant_ctrl_chain;
  17618. typedef struct {
  17619. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  17620. A_UINT32 mac_id; /* MAC ID */
  17621. A_UINT32 antCtrlCommon1;
  17622. A_UINT32 antCtrlCommon2;
  17623. /*
  17624. * Following this structure is the TLV:
  17625. * wmi_pdev_set_ant_ctrl_chain
  17626. */
  17627. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  17628. typedef struct {
  17629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  17630. union {
  17631. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17632. /** pdev_id for identifying the MAC
  17633. * See macros starting with WMI_PDEV_ID_ for values.
  17634. */
  17635. A_UINT32 pdev_id;
  17636. };
  17637. /** len of CTL info */
  17638. A_UINT32 ctl_len;
  17639. /* ctl array (len adjusted to number of words).
  17640. * Following this structure is the TLV:
  17641. * A_UINT32 ctl_info[1];
  17642. */
  17643. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  17644. typedef struct {
  17645. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  17646. union {
  17647. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17648. /** pdev_id for identifying the MAC
  17649. * See macros starting with WMI_PDEV_ID_ for values.
  17650. */
  17651. A_UINT32 pdev_id;
  17652. };
  17653. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  17654. /*
  17655. * Bit 7:0 len of array gain table
  17656. * Bit 8 bypass multi chain gain or not
  17657. */
  17658. /* array gain table(s) (len adjusted to number of words).
  17659. * Following this structure is the TLV:
  17660. * A_UINT32 arraygain_tbl[1];
  17661. */
  17662. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  17663. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  17664. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  17665. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  17666. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  17667. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  17668. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  17669. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  17670. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  17671. typedef struct {
  17672. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  17673. /** parameter id */
  17674. A_UINT32 param_id;
  17675. /** parameter value */
  17676. A_UINT32 param_value;
  17677. } wmi_fwtest_set_param_cmd_fixed_param;
  17678. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  17679. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  17680. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  17681. typedef struct {
  17682. /** TLV tag and len; tag equals
  17683. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  17684. A_UINT32 tlv_header;
  17685. wmi_mac_addr peer_macaddr;
  17686. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  17687. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  17688. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  17689. A_UINT32 vdev_id;
  17690. A_UINT32 pdev_id;
  17691. } wmi_atf_peer_info;
  17692. typedef struct {
  17693. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  17694. A_UINT32 num_peers;
  17695. /*
  17696. * Following this structure is the TLV:
  17697. * struct wmi_atf_peer_info peer_info[num_peers];
  17698. */
  17699. } wmi_peer_atf_request_fixed_param;
  17700. /* Structure for Bandwidth Fairness peer information */
  17701. typedef struct {
  17702. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  17703. A_UINT32 tlv_header;
  17704. wmi_mac_addr peer_macaddr;
  17705. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  17706. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  17707. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  17708. A_UINT32 vdev_id;
  17709. A_UINT32 pdev_id;
  17710. } wmi_bwf_peer_info;
  17711. /* Structure for Bandwidth Fairness peer request */
  17712. typedef struct {
  17713. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  17714. A_UINT32 num_peers;
  17715. /*
  17716. * Following this structure is the TLV:
  17717. * struct wmi_bwf_peer_info peer_info[num_peers];
  17718. */
  17719. } wmi_peer_bwf_request_fixed_param;
  17720. /* Equal distribution of ATF air time within an VDEV. */
  17721. typedef struct {
  17722. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  17723. A_UINT32 vdev_id;
  17724. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  17725. A_UINT32 pdev_id;
  17726. } wmi_vdev_atf_request_fixed_param;
  17727. typedef struct {
  17728. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  17729. /** pdev_id for identifying the MAC
  17730. * See macros starting with WMI_PDEV_ID_ for values.
  17731. */
  17732. A_UINT32 pdev_id;
  17733. /** parameter */
  17734. A_UINT32 param;
  17735. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  17736. typedef struct {
  17737. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  17738. /** pdev_id for identifying the MAC
  17739. * See macros starting with WMI_PDEV_ID_ for values.
  17740. */
  17741. A_UINT32 pdev_id;
  17742. /** parameter */
  17743. A_UINT32 param;
  17744. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  17745. typedef struct {
  17746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  17747. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17748. A_UINT32 qb_enable;
  17749. wmi_mac_addr peer_macaddr;
  17750. } WMI_QBOOST_CFG_CMD_fixed_param;
  17751. #define WMI_INST_STATS_INVALID_RSSI 0
  17752. typedef struct {
  17753. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  17754. A_UINT32 iRSSI; /* dB above the noise floor */
  17755. /* peer MAC address */
  17756. wmi_mac_addr peer_macaddr;
  17757. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17758. } wmi_inst_rssi_stats_resp_fixed_param;
  17759. typedef struct {
  17760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  17761. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  17762. } wmi_peer_cck_ofdm_rate_info;
  17763. typedef struct {
  17764. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  17765. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  17766. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  17767. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  17768. } wmi_peer_mcs_rate_info;
  17769. typedef struct {
  17770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  17771. wmi_mac_addr peer_macaddr;
  17772. A_UINT32 ratecount; /* Max Rate count for each mode */
  17773. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17774. /*
  17775. * Following this structure are the TLV:
  17776. * struct wmi_peer_cck_ofdm_rate_info;
  17777. * struct wmi_peer_mcs_rate_info;
  17778. */
  17779. } wmi_peer_ratecode_list_event_fixed_param;
  17780. typedef struct wmi_wds_addr_event {
  17781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  17782. A_UINT32 event_type[4];
  17783. wmi_mac_addr peer_mac;
  17784. wmi_mac_addr dest_mac;
  17785. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  17786. } wmi_wds_addr_event_fixed_param;
  17787. typedef struct {
  17788. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  17789. wmi_mac_addr peer_macaddr;
  17790. A_UINT32 peer_ps_state;
  17791. } wmi_peer_sta_ps_statechange_event_fixed_param;
  17792. /* WMI_PDEV_FIPS_EVENTID */
  17793. typedef struct {
  17794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  17795. union {
  17796. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17797. /** pdev_id for identifying the MAC
  17798. * See macros starting with WMI_PDEV_ID_ for values.
  17799. */
  17800. A_UINT32 pdev_id;
  17801. };
  17802. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  17803. A_UINT32 data_len; /* Data length */
  17804. /*
  17805. * Following this structure is the TLV:
  17806. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  17807. */
  17808. } wmi_pdev_fips_event_fixed_param;
  17809. typedef struct {
  17810. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  17811. union {
  17812. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17813. /** pdev_id for identifying the MAC
  17814. * See macros starting with WMI_PDEV_ID_ for values.
  17815. */
  17816. A_UINT32 pdev_id;
  17817. };
  17818. /* Noise threshold iterations with high values */
  17819. A_UINT32 noise_floor_report_iter;
  17820. /* Total noise threshold iterations */
  17821. A_UINT32 noise_floor_total_iter;
  17822. } wmi_pdev_channel_hopping_event_fixed_param;
  17823. enum {
  17824. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  17825. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  17826. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  17827. };
  17828. typedef struct {
  17829. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  17830. union {
  17831. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17832. /** pdev_id for identifying the MAC
  17833. * See macros starting with WMI_PDEV_ID_ for values.
  17834. */
  17835. A_UINT32 pdev_id;
  17836. };
  17837. A_UINT32 rate_flags;
  17838. /**
  17839. * FLAG_ONE_CHAIN 0x00000001 - one chain mask
  17840. * FLAG_TWO_CHAIN 0x00000003 - two chain mask
  17841. * FLAG_THREE_CHAIN 0x00000007 - three chain mask
  17842. * FLAG_FOUR_CHAIN 0x0000000F - four chain mask
  17843. * FLAG_FIVE_CHAIN 0x0000001F - five chain mask
  17844. * FLAG_SIX_CHAIN 0x0000003F - six chain mask
  17845. * FLAG_SEVEN_CHAIN 0x0000007F - seven chain mask
  17846. * FLAG_EIGHT_CHAIN 0x000000FF - eight chain mask
  17847. * FLAG_STBC 0x00000100 - STBC is set
  17848. * FLAG_40MHZ 0x00000200 - bits 9-10 used for BW:
  17849. * FLAG_80MHZ 0x00000400 (bw >> 9) & 3 will give
  17850. * FLAG_160MHZ 0x00000600 1 -> 40 MHz, 2 -> 80 MHz, 3 -> 160 MHz
  17851. * FLAG_TXBF 0x00000800 - Tx Bf enabled
  17852. * FLAG_RTSENA 0x00001000 - RTS enabled
  17853. * FLAG_CTSENA 0x00002000 - CTS enabled
  17854. * FLAG_LDPC 0x00004000 - LDPC set
  17855. * FLAG_SGI 0x00008000 - Short gaurd interval
  17856. * (0x00010000-0x00080000 unused)
  17857. *------------------
  17858. * 0x00100000-0x00700000 used for SU/MU/OFDMA tx mode
  17859. * FLAG_SU 0x00100000 - SU Data
  17860. * FLAG_DL_MU_MIMO_AC 0x00200000 - DL AC MU data
  17861. * FLAG_DL_MU_MIMO_AX 0x00300000 - DL AX MU data
  17862. * FLAG_DL_OFDMA 0x00400000 - DL OFDMA data
  17863. * FLAG_UL_OFDMA 0x00500000 - UL OFDMA data
  17864. * FLAG_UL_MU_MIMO 0x00600000 - UL MU data
  17865. *------------------
  17866. * */
  17867. A_UINT32 nss;
  17868. /**
  17869. * NSS 0x0 - 0x7
  17870. * */
  17871. A_UINT32 preamble;
  17872. /**
  17873. * PREAM_OFDM - 0x0
  17874. * PREAM_CCK - 0x1
  17875. * PREAM_HT - 0x2
  17876. * PREAM_VHT - 0x3
  17877. * PREAM_HE - 0x4
  17878. * */
  17879. A_UINT32 hw_rate;
  17880. /**
  17881. * *** HW_OFDM_RATE ***
  17882. * OFDM_48_MBPS - 0x0
  17883. * OFDM_24_MBPS - 0x1
  17884. * OFDM_12_MBPS - 0x2
  17885. * OFDM_6_MBPS - 0x3
  17886. * OFDM_54_MBPS - 0x4
  17887. * OFDM_36_MBPS - 0x5
  17888. * OFDM_18_MBPS - 0x6
  17889. * OFDM_9_MBPS - 0x7
  17890. *
  17891. * *** HW_CCK_RATE ***
  17892. * CCK_11_LONG_MBPS - 0x0
  17893. * CCK_5_5_LONG_MBPS - 0x1
  17894. * CCK_2_LONG_MBPS - 0x2
  17895. * CCK_1_LONG_MBPS - 0x3
  17896. * CCK_11_SHORT_MBPS - 0x4
  17897. * CCK_5_5_SHORT_MBPS - 0x5
  17898. * CCK_2_SHORT_MBPS - 0x6
  17899. *
  17900. * *** HW_HT / VHT_RATE ***
  17901. * MCS 0x0 - 0xb
  17902. * */
  17903. } wmi_pdev_get_tpc_cmd_fixed_param;
  17904. typedef struct {
  17905. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  17906. /** pdev_id for identifying the MAC
  17907. * See macros starting with WMI_PDEV_ID_ for values.
  17908. */
  17909. A_UINT32 pdev_id;
  17910. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  17911. typedef struct {
  17912. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  17913. /** pdev_id for identifying the MAC
  17914. * See macros starting with WMI_PDEV_ID_ for values.
  17915. */
  17916. A_UINT32 pdev_id;
  17917. /*
  17918. * Following this structure is the TLV:
  17919. * A_UINT32 tpc[2];
  17920. * tpc[0] - maximum power per rate
  17921. * tpc[1] - minimum power per rate
  17922. * Currently this event only provides max and min power limits
  17923. * for a single rate. In the future this event may be expanded
  17924. * to provide the information for multiple rates.
  17925. * At that time, the format of the data will be provided.
  17926. */
  17927. } wmi_pdev_tpc_event_fixed_param;
  17928. typedef struct {
  17929. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  17930. union {
  17931. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  17932. /** pdev_id for identifying the MAC
  17933. * See macros starting with WMI_PDEV_ID_ for values.
  17934. */
  17935. A_UINT32 pdev_id;
  17936. };
  17937. A_UINT32 nfdBr_len;
  17938. A_UINT32 nfdBm_len;
  17939. A_UINT32 freqNum_len;
  17940. /*
  17941. * Following this structure is the TLV:
  17942. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  17943. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  17944. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  17945. */
  17946. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  17947. typedef struct {
  17948. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  17949. A_UINT32 nfdBr;
  17950. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  17951. typedef struct {
  17952. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  17953. A_UINT32 nfdBm;
  17954. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  17955. typedef struct {
  17956. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  17957. A_UINT32 freqNum;
  17958. } wmi_pdev_nfcal_power_all_channels_freqNum;
  17959. typedef struct {
  17960. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  17961. A_UINT32 cck_level;
  17962. } wmi_ani_cck_event_fixed_param;
  17963. typedef enum wmi_power_debug_reg_fmt_type {
  17964. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  17965. * SOC_SYSTEM_SLEEP
  17966. * WLAN_SYSTEM_SLEEP
  17967. * RTC_SYNC_FORCE_WAKE
  17968. * MAC_DMA_ISR
  17969. * MAC_DMA_TXRX_ISR
  17970. * MAC_DMA_ISR_S1
  17971. * MAC_DMA_ISR_S2
  17972. * MAC_DMA_ISR_S3
  17973. * MAC_DMA_ISR_S4
  17974. * MAC_DMA_ISR_S5
  17975. * MAC_DMA_ISR_S6
  17976. * MAC_DMA_ISR_S7
  17977. */
  17978. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  17979. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  17980. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  17981. typedef struct {
  17982. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  17983. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  17984. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  17985. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  17986. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  17987. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  17988. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  17989. /*
  17990. * Following this structure is the TLV:
  17991. * A_UINT32 debug_registers[num_debug_registers];
  17992. */
  17993. } wmi_pdev_chip_power_stats_event_fixed_param;
  17994. typedef enum wmi_chip_power_save_failure_reason_code_type {
  17995. WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON,
  17996. WMI_HW_POWER_SAVE_FAILURE_REASON,
  17997. WMI_CSS_LOCKED_POWER_FAILURE_REASON,
  17998. WMI_MAC0_LOCKED_POWER_FAILURE_REASON,
  17999. WMI_MAC1_LOCKED_POWER_FAILURE_REASON,
  18000. WMI_POWER_SAVE_FAILURE_REASON_MAX = 0xf,
  18001. } WMI_POWER_SAVE_FAILURE_REASON_TYPE;
  18002. typedef struct {
  18003. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_save_failure_detected_fixed_param */
  18004. A_UINT32 power_save_failure_reason_code; /* Chip power save failuire reason as defined in WMI_POWER_SAVE_FAILURE_REASON_TYPE */
  18005. A_UINT32 protocol_wake_lock_bitmap[4]; /* bitmap with bits set for modules (from WLAN_MODULE_ID enum) voting against sleep for prolonged duration */
  18006. } wmi_chip_power_save_failure_detected_fixed_param;
  18007. typedef struct {
  18008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  18009. A_UINT32 ofdm_level;
  18010. } wmi_ani_ofdm_event_fixed_param;
  18011. /* When a bit is set it specifies the particular WLAN traffic type is high priority.
  18012. * BT low priority traffic has higher priority than WLAN low priority traffic and has
  18013. * lower priority when compared to WLAN high priority traffic.
  18014. * BT high priority traffic has higher priority than WLAN low/high priority traffic.
  18015. */
  18016. #define WMI_PDEV_BE_PRIORITY_BIT (1<<0)
  18017. #define WMI_PDEV_BK_PRIORITY_BIT (1<<1)
  18018. #define WMI_PDEV_VI_PRIORITY_BIT (1<<2)
  18019. #define WMI_PDEV_VO_PRIORITY_BIT (1<<3)
  18020. #define WMI_PDEV_BEACON_PRIORITY_BIT (1<<4)
  18021. #define WMI_PDEV_MGMT_PRIORITY_BIT (1<<5)
  18022. #define WMI_PDEV_IS_BE_PRIORITY_SET(val) ((val) & WMI_PDEV_BE_PRIORITY_BIT)
  18023. #define WMI_PDEV_IS_BK_PRIORITY_SET(val) ((val) & WMI_PDEV_BK_PRIORITY_BIT)
  18024. #define WMI_PDEV_IS_VI_PRIORITY_SET(val) ((val) & WMI_PDEV_VI_PRIORITY_BIT)
  18025. #define WMI_PDEV_IS_VO_PRIORITY_SET(val) ((val) & WMI_PDEV_VO_PRIORITY_BIT)
  18026. #define WMI_PDEV_IS_BEACON_PRIORITY_SET(val) ((val) & WMI_PDEV_BEACON_PRIORITY_BIT)
  18027. #define WMI_PDEV_IS_MGMT_PRIORITY_SET(val) ((val) & WMI_PDEV_MGMT_PRIORITY_BIT)
  18028. typedef enum wmi_coex_algo_type {
  18029. WMI_COEX_ALGO_UNCONS_FREERUN = 0,
  18030. WMI_COEX_ALGO_FREERUN = 1,
  18031. WMI_COEX_ALGO_OCS = 2,
  18032. } WMI_COEX_ALGO_TYPE;
  18033. typedef enum wmi_coex_config_type {
  18034. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  18035. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  18036. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  18037. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  18038. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  18039. WMI_COEX_CONFIG_COEX_DBG = 6, /* config of COEX debug setting */
  18040. WMI_COEX_CONFIG_PAGE_P2P_STA_TDM = 7, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + PAGE */
  18041. WMI_COEX_CONFIG_INQUIRY_P2P_TDM = 8, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + INQUIRY */
  18042. WMI_COEX_CONFIG_INQUIRY_STA_TDM = 9, /* config interval (ms units) (arg1 BT, arg2 WLAN) for STA + INQUIRY */
  18043. WMI_COEX_CONFIG_INQUIRY_SAP_TDM = 10, /* config interval (ms units) (arg1 BT, arg2 WLAN) for SAP + INQUIRY */
  18044. WMI_COEX_CONFIG_INQUIRY_P2P_STA_TDM = 11, /* config interval (ms units) (arg1 BT, arg2 WLAN) for P2P + STA + INQUIRY */
  18045. WMI_COEX_CONFIG_TX_POWER = 12, /* config wlan total tx power when bt coex (arg1 is wlan_tx_power_limit, in 0.5dbm units) */
  18046. 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) */
  18047. WMI_COEX_CONFIG_AP_TDM = 14, /* config interval (arg1 duty cycle in ms, arg2 WLAN duration in ms) for AP */
  18048. WMI_COEX_CONFIG_WLAN_SCAN_PRIORITY = 15, /* config to set WLAN priority during Off Channel Scan */
  18049. WMI_COEX_CONFIG_WLAN_PKT_PRIORITY = 16, /* config to set WLAN priority for BE/BK/VO/VI/Beacon/Management frame */
  18050. WMI_COEX_CONFIG_PTA_INTERFACE = 17, /* config PTA interface,
  18051. arg1 PTA num,
  18052. arg2 mode (2-wire/3-wire/PTA),
  18053. arg3 first slot time in microsec,
  18054. arg4 BT priority time in microsec,
  18055. arg5 PTA algorithm (WMI_COEX_ALGO_TYPE),
  18056. arg6 PTA priority */
  18057. WMI_COEX_CONFIG_BTC_DUTYCYCLE = 18, /* config interval (ms units) (arg1 WLAN pause duration, arg2 WLAN unpause duration) for WLAN UL + BT Rx */
  18058. WMI_COEX_CONFIG_HANDOVER_RSSI = 19, /* config to set WLAN RSSI (dBm units) at which device switches from Hybrid to TDD coex mode */
  18059. WMI_COEX_CONFIG_PTA_BT_INFO = 20, /* get BT information,
  18060. arg1 BT info type: WMI_COEX_PTA_BT_INFO_TYPE_T, scan/advertise/connection info,
  18061. arg2-arg5: BT information parameters */
  18062. WMI_COEX_CONFIG_SINK_WLAN_TDM = 21, /* config interval (ms units) (arg1 BT, arg2 WLAN) for A2DP SINK + WLAN */
  18063. WMI_COEX_CONFIG_COEX_ENABLE_MCC_TDM = 22, /* config disable/enable COEX TDM for MCC */
  18064. } WMI_COEX_CONFIG_TYPE;
  18065. typedef struct {
  18066. A_UINT32 tlv_header;
  18067. A_UINT32 vdev_id;
  18068. A_UINT32 config_type; /* wmi_coex_config_type enum */
  18069. A_UINT32 config_arg1;
  18070. A_UINT32 config_arg2;
  18071. A_UINT32 config_arg3;
  18072. A_UINT32 config_arg4;
  18073. A_UINT32 config_arg5;
  18074. A_UINT32 config_arg6;
  18075. } WMI_COEX_CONFIG_CMD_fixed_param;
  18076. /**
  18077. * This command is sent from WLAN host driver to firmware to
  18078. * request firmware to enable/disable channel avoidance report
  18079. * to host.
  18080. *
  18081. */
  18082. enum {
  18083. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  18084. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  18085. };
  18086. typedef struct {
  18087. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  18088. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  18089. A_UINT32 rpt_allow;
  18090. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  18091. /*
  18092. * Periodic channel stats WMI command structure
  18093. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  18094. */
  18095. typedef struct {
  18096. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  18097. /** 1 = enable, 0 = disable */
  18098. A_UINT32 enable;
  18099. /** periodic stats duration (units are milliseconds) */
  18100. A_UINT32 stats_period;
  18101. /** pdev_id for identifying the MAC
  18102. * See macros starting with WMI_PDEV_ID_ for values.
  18103. */
  18104. A_UINT32 pdev_id;
  18105. } wmi_set_periodic_channel_stats_config_fixed_param;
  18106. typedef struct {
  18107. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  18108. /** pdev_id for identifying the MAC
  18109. * See macros starting with WMI_PDEV_ID_ for values.
  18110. */
  18111. A_UINT32 pdev_id;
  18112. /* Identify the wlan module */
  18113. A_UINT32 module_id;
  18114. /* Num of elements in the following args[] array */
  18115. A_UINT32 num_args;
  18116. /**
  18117. * Following this structure are the TLVs:
  18118. * A_UINT32 args[];
  18119. **/
  18120. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  18121. typedef struct {
  18122. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  18123. /**
  18124. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  18125. * @details
  18126. * Each WMM access category (voice, video, best-effort, background)
  18127. * will have its own timeout value to dictate how long to wait for
  18128. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  18129. * have already been received.
  18130. * This parameter specifies the timeout in milliseconds for each
  18131. * access category.
  18132. * The array elements are indexed by the WMI_AC enum to identify
  18133. * which array element corresponds to which AC / traffic type.
  18134. */
  18135. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  18136. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  18137. /**
  18138. * wlan stats shall be understood as per period.
  18139. * Generally, it is reported periodically based on the period specified by host.
  18140. * But if the variation of one stats of compared to the
  18141. * pervious notification exceeds a threshold,
  18142. * FW will report the wlan stats immediately.
  18143. * The values of the stats becomes the new reference to compute variations.
  18144. * This threshold can be a global setting or per category.
  18145. * Host can enable/disable the mechanism for any stats per bitmap.
  18146. * TX/RX thresholds (percentage value) are shared across ACs,
  18147. * and TX/RX stats comprisons are processed per AC of each peer.
  18148. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  18149. * and the detailed tx_mpdus threshold value is set to 10%,
  18150. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  18151. * and it reaches 110 during the second period,
  18152. * FW will generate and send out a wlan stats event immediately.
  18153. */
  18154. typedef struct {
  18155. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  18156. /** Indicate if threshold mechnism is enabled or disabled.
  18157. * It is disabled by default.
  18158. * Host can enable and disable it dynamically.
  18159. */
  18160. A_UINT32 enable_thresh;
  18161. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  18162. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  18163. */
  18164. A_UINT32 use_thresh_bitmap;
  18165. /** global threshold, valid when use_thresh_bitmap equals 0.
  18166. * It takes effect for all counters.
  18167. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  18168. */
  18169. A_UINT32 gbl_thresh;
  18170. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  18171. A_UINT32 cca_thresh_enable_bitmap;
  18172. /** Enable/disable bitmap for threshold mechanism of signal stats */
  18173. A_UINT32 signal_thresh_enable_bitmap;
  18174. /** Enable/disable bitmap for threshold mechanism of TX stats */
  18175. A_UINT32 tx_thresh_enable_bitmap;
  18176. /** Enable/disable bitmap for threshold mechanism of RX stats */
  18177. A_UINT32 rx_thresh_enable_bitmap;
  18178. /* This TLV is followed by TLVs below:
  18179. * wmi_chan_cca_stats_thresh cca_thresh;
  18180. * wmi_peer_signal_stats_thresh signal_thresh;
  18181. * wmi_tx_stats_thresh tx_thresh;
  18182. * wmi_rx_stats_thresh rx_thresh;
  18183. */
  18184. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  18185. typedef enum {
  18186. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  18187. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  18188. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  18189. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  18190. } wmi_wlan_stats_id;
  18191. typedef struct {
  18192. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  18193. wmi_wlan_stats_id stats_id;
  18194. } wmi_request_wlan_stats_cmd_fixed_param;
  18195. typedef enum {
  18196. WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01, /* request stats of one specified peer */
  18197. WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02, /* request stats of all peers belong to specified VDEV */
  18198. } wmi_peer_stats_info_request_type;
  18199. /** It is required to issue WMI_PDEV_PARAM_PEER_STATS_INFO_ENABLE
  18200. * (with a non-zero value) before issuing the first REQUEST_PEER_STATS_INFO.
  18201. */
  18202. typedef struct {
  18203. /** TLV tag and len; tag equals
  18204. * WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param */
  18205. A_UINT32 tlv_header;
  18206. /** request_type to indicate if only stats of
  18207. * one peer or all peers of the VDEV are requested,
  18208. * see wmi_peer_stats_info_request_type.
  18209. */
  18210. A_UINT32 request_type;
  18211. /** VDEV identifier */
  18212. A_UINT32 vdev_id;
  18213. /** this peer_macaddr is only used if request_type == ONE_PEER_STATS_INFO */
  18214. wmi_mac_addr peer_macaddr;
  18215. /** flag to indicate if FW needs to reset requested peers stats */
  18216. A_UINT32 reset_after_request;
  18217. } wmi_request_peer_stats_info_cmd_fixed_param;
  18218. typedef enum {
  18219. WMI_REQUEST_ONE_RADIO_CHAN_STATS = 0x01, /* request stats of one specified channel */
  18220. WMI_REQUEST_ALL_RADIO_CHAN_STATS = 0x02, /* request stats of all channels */
  18221. } wmi_radio_chan_stats_request_type;
  18222. /** It is required to issue WMI_PDEV_PARAM_RADIO_CHAN_STATS_ENABLE
  18223. * (with a non-zero value) before issuing the first REQUEST_RADIO_CHAN_STATS.
  18224. */
  18225. typedef struct {
  18226. /** TLV tag and len; tag equals
  18227. * WMITLV_TAG_STRUC_wmi_request_radio_chan_stats_cmd_fixed_param */
  18228. A_UINT32 tlv_header;
  18229. /** request_type to indicate if only stats of
  18230. * one channel or all channels are requested,
  18231. * see wmi_radio_chan_stats_request_type.
  18232. */
  18233. A_UINT32 request_type;
  18234. /** Frequency of channel whose stats is requested,
  18235. * only used when request_type == WMI_REQUEST_ONE_RADIO_CHAN_STATS
  18236. */
  18237. A_UINT32 chan_mhz;
  18238. /** flag to indicate if FW needs to reset requested stats of specified channel/channels */
  18239. A_UINT32 reset_after_request;
  18240. } wmi_request_radio_chan_stats_cmd_fixed_param;
  18241. typedef struct {
  18242. /** TLV tag and len; tag equals
  18243. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  18244. A_UINT32 tlv_header;
  18245. /* VDEV identifier */
  18246. A_UINT32 vdev_id;
  18247. /* Leader's mac address */
  18248. wmi_mac_addr leader_mac_addr;
  18249. } wmi_rmc_set_leader_cmd_fixed_param;
  18250. typedef struct {
  18251. /** TLV tag and len; tag equals
  18252. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  18253. A_UINT32 tlv_header;
  18254. /* VDEV identifier */
  18255. A_UINT32 vdev_id;
  18256. /* 0: success
  18257. * 1: selected leader not found in network, able to find using auto selection
  18258. * -1: error
  18259. * non zero value should be return to userspace in case of failure */
  18260. A_INT32 status;
  18261. /* bssid of new leader */
  18262. wmi_mac_addr leader_mac_addr;
  18263. } wmi_rmc_manual_leader_event_fixed_param;
  18264. typedef enum {
  18265. WLAN_2G_CAPABILITY = 0x1,
  18266. WLAN_5G_CAPABILITY = 0x2,
  18267. } WLAN_BAND_CAPABILITY;
  18268. typedef enum wmi_hw_mode_config_type {
  18269. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  18270. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  18271. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  18272. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  18273. * Support for both PHYs within one band is planned for 5G only
  18274. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  18275. * but could be extended to other bands in the future.
  18276. * The separation of the band between the two PHYs needs to be communicated separately.
  18277. */
  18278. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  18279. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  18280. */
  18281. WMI_HW_MODE_DBS_OR_SBS = 5, /* One PHY is on 5G and the other PHY can be in 2G or 5G. */
  18282. } WMI_HW_MODE_CONFIG_TYPE;
  18283. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18284. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18285. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18286. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18287. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18288. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18289. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18290. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18291. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18292. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18293. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  18294. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  18295. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  18296. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  18297. typedef struct {
  18298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  18299. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  18300. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  18301. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  18302. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  18303. * though in practice the elements may always be ordered by hw_mode_id */
  18304. A_UINT32 hw_mode_id;
  18305. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  18306. A_UINT32 pdev_id;
  18307. /* phy id. Starts with 0 */
  18308. A_UINT32 phy_id;
  18309. /* supported modulations and number of MU beamformees */
  18310. union {
  18311. struct {
  18312. A_UINT32 supports_11b:1,
  18313. supports_11g:1,
  18314. supports_11a:1,
  18315. supports_11n:1,
  18316. supports_11ac:1,
  18317. supports_11ax:1,
  18318. unused: 22,
  18319. max_mubfee: 4; /* max MU beamformees supported per MAC */
  18320. };
  18321. A_UINT32 supported_flags;
  18322. };
  18323. /* supported bands, enum WLAN_BAND_CAPABILITY */
  18324. A_UINT32 supported_bands;
  18325. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  18326. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  18327. A_UINT32 ampdu_density;
  18328. /* max bw supported 2G, enum wmi_channel_width */
  18329. A_UINT32 max_bw_supported_2G;
  18330. /* WMI HT Capability, WMI_HT_CAP defines */
  18331. A_UINT32 ht_cap_info_2G;
  18332. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18333. A_UINT32 vht_cap_info_2G;
  18334. /* VHT Supported MCS Set field Rx/Tx same
  18335. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18336. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18337. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18338. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18339. * - 3 indicates that n spatial streams is not supported */
  18340. A_UINT32 vht_supp_mcs_2G;
  18341. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18342. A_UINT32 he_cap_info_2G;
  18343. /* HE Supported MCS Set field Rx/Tx same
  18344. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18345. * bit 2-0 indicating max HE MCS of NSS1
  18346. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18347. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18348. * HE BW less than or equal to 80MHZ is encoded as follows
  18349. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18350. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  18351. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  18352. * - 3 indicates that n spatial streams is not supported
  18353. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18354. */
  18355. A_UINT32 he_supp_mcs_2G;
  18356. /* Valid Transmit chain mask */
  18357. A_UINT32 tx_chain_mask_2G;
  18358. /* Valid Receive chain mask */
  18359. A_UINT32 rx_chain_mask_2G;
  18360. /* max bw supported 5G, enum wmi_channel_width */
  18361. A_UINT32 max_bw_supported_5G;
  18362. /* WMI HT Capability, WMI_HT_CAP defines */
  18363. A_UINT32 ht_cap_info_5G;
  18364. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  18365. A_UINT32 vht_cap_info_5G;
  18366. /* VHT Supported MCS Set field Rx/Tx same
  18367. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  18368. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18369. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  18370. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  18371. * - 3 indicates that n spatial streams is not supported */
  18372. A_UINT32 vht_supp_mcs_5G;
  18373. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  18374. A_UINT32 he_cap_info_5G;
  18375. /* HE Supported MCS Set field Rx/Tx same
  18376. * - 2 bits are used for each NSS chain.Max of 8 NSS can be encoded with
  18377. * bit 2-0 indicating max HE MCS of NSS1
  18378. * bit 5-3 indicating max HE MCS of NSS2 and so on
  18379. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18380. * HE BW less than or equal to 80MHZ is encoded as follows
  18381. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  18382. * - 1 indicates support for VHT-MCS 0-9 for n spatial streams
  18383. * - 2 indicates support for VHT-MCS 0-11 for n spatial streams
  18384. * - 3 indicates that n spatial streams is not supported
  18385. * - WMI_HE_MAX_MCS_4_SS_MASK macro can be used for encoding this info
  18386. * - The max HE-MCS for n SS subfield (where n = 1,...,8) in case of
  18387. * HE BW equal to 80+80 or 160 MHZ encoding is same as above just the
  18388. * lower 16 bits are used for lower 80MHz NSS-MCS supported combo and
  18389. * upper 16 bits are used for upper 80MHz NSS-MCS supported combo
  18390. */
  18391. A_UINT32 he_supp_mcs_5G;
  18392. /* Valid Transmit chain mask */
  18393. A_UINT32 tx_chain_mask_5G;
  18394. /* Valid Receive chain mask */
  18395. A_UINT32 rx_chain_mask_5G;
  18396. /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
  18397. A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
  18398. A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
  18399. wmi_ppe_threshold he_ppet2G;
  18400. wmi_ppe_threshold he_ppet5G;
  18401. /* chainmask table to be used for the MAC */
  18402. A_UINT32 chainmask_table_id;
  18403. /* PDEV ID to LMAC ID mapping */
  18404. A_UINT32 lmac_id;
  18405. } WMI_MAC_PHY_CAPABILITIES;
  18406. typedef struct {
  18407. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  18408. /* hw_mode_id - identify a particular set of HW characteristics,
  18409. * as specified by the subsequent fields */
  18410. A_UINT32 hw_mode_id;
  18411. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  18412. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  18413. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  18414. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  18415. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  18416. A_UINT32 phy_id_map;
  18417. /* hw_mode_config_type
  18418. * Identify a particular type of HW mode such as SBS, DBS etc.
  18419. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  18420. */
  18421. A_UINT32 hw_mode_config_type;
  18422. } WMI_HW_MODE_CAPABILITIES;
  18423. /*
  18424. * The following macros are for the bitfields witihin the supported flags field
  18425. * of WMI_MAC_PHY_CHAINMASK_CAPABILITY:
  18426. * Capabilities for the chainmask
  18427. */
  18428. #define WMI_SUPPORT_CHAN_WIDTH_20_GET(flags) WMI_GET_BITS(flags, 0, 1)
  18429. #define WMI_SUPPORT_CHAN_WIDTH_20_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  18430. #define WMI_SUPPORT_CHAN_WIDTH_40_GET(flags) WMI_GET_BITS(flags, 1, 1)
  18431. #define WMI_SUPPORT_CHAN_WIDTH_40_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  18432. #define WMI_SUPPORT_CHAN_WIDTH_80_GET(flags) WMI_GET_BITS(flags, 2, 1)
  18433. #define WMI_SUPPORT_CHAN_WIDTH_80_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  18434. #define WMI_SUPPORT_CHAN_WIDTH_160_GET(flags) WMI_GET_BITS(flags, 3, 1)
  18435. #define WMI_SUPPORT_CHAN_WIDTH_160_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  18436. #define WMI_SUPPORT_CHAN_WIDTH_80P80_GET(flags) WMI_GET_BITS(flags, 4, 1)
  18437. #define WMI_SUPPORT_CHAN_WIDTH_80P80_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  18438. #define WMI_SUPPORT_CHAIN_MASK_2G_GET(flags) WMI_GET_BITS(flags, 27, 1)
  18439. #define WMI_SUPPORT_CHAIN_MASK_2G_SET(flags, value) WMI_SET_BITS(flags, 27, 1, value)
  18440. #define WMI_SUPPORT_CHAIN_MASK_5G_GET(flags) WMI_GET_BITS(flags, 28, 1)
  18441. #define WMI_SUPPORT_CHAIN_MASK_5G_SET(flags, value) WMI_SET_BITS(flags, 28, 1, value)
  18442. #define WMI_SUPPORT_CHAIN_MASK_TX_GET(flags) WMI_GET_BITS(flags, 29, 1)
  18443. #define WMI_SUPPORT_CHAIN_MASK_TX_SET(flags, value) WMI_SET_BITS(flags, 29, 1, value)
  18444. #define WMI_SUPPORT_CHAIN_MASK_RX_GET(flags) WMI_GET_BITS(flags, 30, 1)
  18445. #define WMI_SUPPORT_CHAIN_MASK_RX_SET(flags, value) WMI_SET_BITS(flags, 30, 1, value)
  18446. #define WMI_SUPPORT_CHAIN_MASK_ADFS_GET(flags) WMI_GET_BITS(flags, 31, 1)
  18447. #define WMI_SUPPORT_CHAIN_MASK_ADFS_SET(flags, value) WMI_SET_BITS(flags, 31, 1, value)
  18448. /** Definition of valid chainmask and associated capabilities */
  18449. typedef struct {
  18450. A_UINT32 tlv_header;/* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_CAPABILITY */
  18451. /* supported flags: Capabilities for this chianmask*/
  18452. union {
  18453. struct {
  18454. A_UINT32 supports_chan_width_20:1,
  18455. supports_chan_width_40:1,
  18456. supports_chan_width_80:1,
  18457. supports_chan_width_160:1,
  18458. supports_chan_width_80P80:1,
  18459. reserved:22, /* bits 26:5 */
  18460. chain_mask_2G:1,
  18461. chain_mask_5G:1,
  18462. chain_mask_tx:1,
  18463. chain_mask_rx:1,
  18464. supports_aDFS:1; /* agile DFS */
  18465. };
  18466. A_UINT32 supported_flags;
  18467. };
  18468. A_UINT32 chainmask;
  18469. } WMI_MAC_PHY_CHAINMASK_CAPABILITY;
  18470. typedef struct {
  18471. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CHAINMASK_COMBO */
  18472. A_UINT32 chainmask_table_id;
  18473. /* Number of vaild Chainmask in the table */
  18474. A_UINT32 num_valid_chainmask;
  18475. /*
  18476. * This TLV is followed by the below TLVs:
  18477. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask]
  18478. */
  18479. } WMI_MAC_PHY_CHAINMASK_COMBO;
  18480. typedef struct {
  18481. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  18482. /* num HW modes */
  18483. A_UINT32 num_hw_modes;
  18484. /* number of unique chainmask combo tables */
  18485. A_UINT32 num_chainmask_tables;
  18486. /*
  18487. * This TLV is followed by the below TLVs:
  18488. *
  18489. * WMI_HW_MODE_CAPABILITIES soc_hw_mode_caps[num_hw_modes]
  18490. *
  18491. * (intervening TLVs, e.g. HW_MODE_CAPS, MAC_PHY_CAPS, HAL_REG_CAPS)
  18492. *
  18493. * WMI_MAC_PHY_CHAINMASK_COMBO mac_phy_chainmask_combo[num_chainmask_tables]
  18494. * // number of chainmasks specified in mac_phy_chainmask_combo[0]
  18495. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask0]
  18496. * // number of chainmasks specified in mac_phy_chainmask_combo[1]
  18497. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask1]
  18498. * // number of chainmasks specified in mac_phy_chainmask_combo[2]
  18499. * WMI_MAC_PHY_CHAINMASK_CAPABILITY mac_phy_chainmask_caps[num_valid_chainmask2]
  18500. * etc.
  18501. */
  18502. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  18503. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  18504. typedef struct {
  18505. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  18506. /* phy id */
  18507. A_UINT32 phy_id;
  18508. /* regdomain value specified in EEPROM */
  18509. A_UINT32 eeprom_reg_domain;
  18510. /* regdomain */
  18511. A_UINT32 eeprom_reg_domain_ext;
  18512. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  18513. A_UINT32 regcap1;
  18514. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  18515. A_UINT32 regcap2;
  18516. /* REGDMN MODE, see REGDMN_MODE_ enum */
  18517. A_UINT32 wireless_modes;
  18518. A_UINT32 low_2ghz_chan;
  18519. A_UINT32 high_2ghz_chan;
  18520. A_UINT32 low_5ghz_chan;
  18521. A_UINT32 high_5ghz_chan;
  18522. } WMI_HAL_REG_CAPABILITIES_EXT;
  18523. typedef struct {
  18524. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  18525. A_UINT32 num_phy;
  18526. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  18527. } WMI_SOC_HAL_REG_CAPABILITIES;
  18528. typedef struct {
  18529. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_OEM_DMA_RING_CAPABILITIES */
  18530. A_UINT32 pdev_id;
  18531. A_UINT32 min_num_ptr;
  18532. /* Minimum number of pointers in the OEM DMA ring for this pdev */
  18533. A_UINT32 min_buf_size;
  18534. /* Minimum size in bytes of each buffer in the OEM DMA ring */
  18535. A_UINT32 min_buf_align;
  18536. /* Minimum alignment in bytes of each buffer in the OEM DMA ring */
  18537. } WMI_OEM_DMA_RING_CAPABILITIES;
  18538. typedef struct {
  18539. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES*/
  18540. /* sar version in bdf */
  18541. A_UINT32 active_version;
  18542. } WMI_SAR_CAPABILITIES;
  18543. typedef struct {
  18544. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  18545. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  18546. A_UINT32 default_adaptive_dwell_mode;
  18547. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  18548. A_UINT32 adapative_lpf_weight;
  18549. /** interval to monitor passive scan in msec */
  18550. A_UINT32 passive_monitor_interval_ms;
  18551. /** % of wifi activity to switch from passive to active 0-100 */
  18552. A_UINT32 wifi_activity_threshold_pct;
  18553. } wmi_scan_adaptive_dwell_parameters_tlv;
  18554. typedef struct {
  18555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  18556. /* globally enable/disable adaptive dwell */
  18557. A_UINT32 enable;
  18558. /** pdev_id for identifying the MAC
  18559. * See macros starting with WMI_PDEV_ID_ for values.
  18560. * In non-DBDC case host should set it to 0
  18561. */
  18562. A_UINT32 pdev_id;
  18563. /**
  18564. * followed by TLV (tag length value) parameters array
  18565. * The TLV's are:
  18566. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  18567. */
  18568. } wmi_scan_adaptive_dwell_config_fixed_param;
  18569. typedef struct {
  18570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_param_tlv */
  18571. /** module_id **/
  18572. A_UINT32 module_id;
  18573. /** number of dbs scans */
  18574. A_UINT32 num_dbs_scans;
  18575. /** number of non-dbs scans */
  18576. A_UINT32 num_non_dbs_scans;
  18577. } wmi_scan_dbs_duty_cycle_tlv_param;
  18578. typedef struct {
  18579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_dbs_duty_cycle_fixed_param */
  18580. /* number of scan client dutycycle param elements */
  18581. A_UINT32 num_clients;
  18582. /** pdev_id for identifying the MAC
  18583. * See macros starting with WMI_PDEV_ID_ for values.
  18584. * In non-DBDC case host should set it to 0
  18585. */
  18586. A_UINT32 pdev_id;
  18587. /**
  18588. * followed by TLV (tag length value) parameters array
  18589. * The TLV's are:
  18590. * wmi_scan_selection_duty_cycle_tlv_param[num_clients];
  18591. */
  18592. } wmi_scan_dbs_duty_cycle_fixed_param;
  18593. typedef struct {
  18594. /** TLV tag and len; tag equals
  18595. * WMITLV_TAG_STRUC_wmi_therm_throt_level_config_info */
  18596. A_UINT32 tlv_header;
  18597. /**
  18598. * temperature sensor value in celsius when to exit to lower zone,
  18599. * this value can be lower than HWM of lower zone as zone overlapping
  18600. * is permitted by design to provide hysteresis
  18601. */
  18602. A_UINT32 temp_lwm;
  18603. /**
  18604. * temperature sensor value in celsius when to exit to higher zone,
  18605. * this value can be higher than LWM of higher zone as zone overlapping
  18606. * is permitted by design to provide hysteresis
  18607. */
  18608. A_UINT32 temp_hwm;
  18609. A_UINT32 dc_off_percent; /* duty cycle off percent 0-100. 0 means no off, 100 means no on (shutdown the phy) */
  18610. /** Disable only the transmit queues in firmware that have lower priority than value defined by prio
  18611. * Prioritization:
  18612. * 0 = disable all data tx queues, No Prioritization defined
  18613. * 1 = disable BK tx queue
  18614. * 2 = disable BK+BE tx queues
  18615. * 3 = disable BK+BE+VI tx queues
  18616. */
  18617. A_UINT32 prio;
  18618. } wmi_therm_throt_level_config_info;
  18619. typedef struct {
  18620. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_config_request_fixed_param */
  18621. A_UINT32 pdev_id; /* config for each pdev */
  18622. A_UINT32 enable; /* 0:disable, 1:enable */
  18623. A_UINT32 dc; /* duty cycle in ms */
  18624. A_UINT32 dc_per_event; /* how often (after how many duty cycles) the FW sends stats to host */
  18625. A_UINT32 therm_throt_levels; /* Indicates the number of thermal zone configuration */
  18626. /*
  18627. * Following this structure is the TLV:
  18628. * struct wmi_therm_throt_level_config_info therm_throt_level_config_info[therm_throt_levels];
  18629. */
  18630. } wmi_therm_throt_config_request_fixed_param;
  18631. /** FW response with the stats event id for every pdev and zones */
  18632. typedef struct {
  18633. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_therm_throt_stats_event_fixed_param */
  18634. A_UINT32 tlv_header;
  18635. A_UINT32 pdev_id; /* stats for corresponding pdev*/
  18636. A_UINT32 temp; /* Temperature reading in celsius */
  18637. A_UINT32 level; /* current thermal throttling level */
  18638. A_UINT32 therm_throt_levels; /* number of levels in therm_throt_level_stats_info */
  18639. /* This TLV is followed by another TLV of array of structs
  18640. * wmi_therm_throt_level_stats_info therm_throt_level_stats_info[therm_throt_levels];
  18641. */
  18642. } wmi_therm_throt_stats_event_fixed_param;
  18643. typedef struct {
  18644. /** TLV tag and len; tag equals
  18645. * WMITLV_TAG_STRUC_wmi_therm_throt_level_stats_info */
  18646. A_UINT32 tlv_header;
  18647. A_UINT32 level_count; /* count of each time thermal throttling entered this state */
  18648. A_UINT32 dc_count; /* total number of duty cycles spent in this state. */
  18649. /* this number increments by one each time we are in this state and we finish one full duty cycle. */
  18650. } wmi_therm_throt_level_stats_info;
  18651. typedef enum {
  18652. WMI_REG_EXT_FCC_MIDBAND = 0,
  18653. WMI_REG_EXT_JAPAN_MIDBAND = 1,
  18654. WMI_REG_EXT_FCC_DFS_HT40 = 2,
  18655. WMI_REG_EXT_JAPAN_NONDFS_HT40 = 3,
  18656. WMI_REG_EXT_JAPAN_DFS_HT40 = 4,
  18657. WMI_REG_EXT_FCC_CH_144 = 5,
  18658. } WMI_REG_EXT_BITMAP;
  18659. #ifdef WMI_CMD_STRINGS
  18660. static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command)
  18661. {
  18662. switch (wmi_command) {
  18663. /* initialize the wlan sub system */
  18664. WMI_RETURN_STRING(WMI_INIT_CMDID);
  18665. /* Scan specific commands */
  18666. /* start scan request to FW */
  18667. WMI_RETURN_STRING(WMI_START_SCAN_CMDID);
  18668. /* stop scan request to FW */
  18669. WMI_RETURN_STRING(WMI_STOP_SCAN_CMDID);
  18670. /* full list of channels as defined by the regulatory
  18671. * that will be used by scanner */
  18672. WMI_RETURN_STRING(WMI_SCAN_CHAN_LIST_CMDID);
  18673. /* overwrite default priority table in scan scheduler */
  18674. WMI_RETURN_STRING(WMI_SCAN_SCH_PRIO_TBL_CMDID);
  18675. /* This command to adjust the priority and min.max_rest_time
  18676. * of an on ongoing scan request.
  18677. */
  18678. WMI_RETURN_STRING(WMI_SCAN_UPDATE_REQUEST_CMDID);
  18679. /* PDEV(physical device) specific commands */
  18680. /* set regulatorty ctl id used by FW to determine the exact
  18681. * ctl power limits */
  18682. WMI_RETURN_STRING(WMI_PDEV_SET_REGDOMAIN_CMDID);
  18683. /* set channel. mainly used for supporting monitor mode */
  18684. WMI_RETURN_STRING(WMI_PDEV_SET_CHANNEL_CMDID);
  18685. /* set pdev specific parameters */
  18686. WMI_RETURN_STRING(WMI_PDEV_SET_PARAM_CMDID);
  18687. /* enable packet log */
  18688. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_ENABLE_CMDID);
  18689. /* disable packet log*/
  18690. WMI_RETURN_STRING(WMI_PDEV_PKTLOG_DISABLE_CMDID);
  18691. /* set wmm parameters */
  18692. WMI_RETURN_STRING(WMI_PDEV_SET_WMM_PARAMS_CMDID);
  18693. /* set HT cap ie that needs to be carried probe requests
  18694. * HT/VHT channels */
  18695. WMI_RETURN_STRING(WMI_PDEV_SET_HT_CAP_IE_CMDID);
  18696. /* set VHT cap ie that needs to be carried on probe
  18697. * requests on VHT channels */
  18698. WMI_RETURN_STRING(WMI_PDEV_SET_VHT_CAP_IE_CMDID);
  18699. /* Command to send the DSCP-to-TID map to the target */
  18700. WMI_RETURN_STRING(WMI_PDEV_SET_DSCP_TID_MAP_CMDID);
  18701. /* set quiet ie parameters. primarily used in AP mode */
  18702. WMI_RETURN_STRING(WMI_PDEV_SET_QUIET_MODE_CMDID);
  18703. /* Enable/Disable Green AP Power Save */
  18704. WMI_RETURN_STRING(WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
  18705. /* get TPC config for the current operating channel */
  18706. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CONFIG_CMDID);
  18707. /* set the base MAC address for the physical device before
  18708. * a VDEV is created. For firmware that does not support
  18709. * this feature and this command, the pdev MAC address will
  18710. * not be changed. */
  18711. WMI_RETURN_STRING(WMI_PDEV_SET_BASE_MACADDR_CMDID);
  18712. /* eeprom content dump , the same to bdboard data */
  18713. WMI_RETURN_STRING(WMI_PDEV_DUMP_CMDID);
  18714. /* VDEV(virtual device) specific commands */
  18715. /* vdev create */
  18716. WMI_RETURN_STRING(WMI_VDEV_CREATE_CMDID);
  18717. /* vdev delete */
  18718. WMI_RETURN_STRING(WMI_VDEV_DELETE_CMDID);
  18719. /* vdev start request */
  18720. WMI_RETURN_STRING(WMI_VDEV_START_REQUEST_CMDID);
  18721. /* vdev restart request (RX only, NO TX, used for CAC period)*/
  18722. WMI_RETURN_STRING(WMI_VDEV_RESTART_REQUEST_CMDID);
  18723. /* vdev up request */
  18724. WMI_RETURN_STRING(WMI_VDEV_UP_CMDID);
  18725. /* vdev stop request */
  18726. WMI_RETURN_STRING(WMI_VDEV_STOP_CMDID);
  18727. /* vdev down request */
  18728. WMI_RETURN_STRING(WMI_VDEV_DOWN_CMDID);
  18729. /* set a vdev param */
  18730. WMI_RETURN_STRING(WMI_VDEV_SET_PARAM_CMDID);
  18731. /* set a key (used for setting per peer unicast
  18732. * and per vdev multicast) */
  18733. WMI_RETURN_STRING(WMI_VDEV_INSTALL_KEY_CMDID);
  18734. /* wnm sleep mode command */
  18735. WMI_RETURN_STRING(WMI_VDEV_WNM_SLEEPMODE_CMDID);
  18736. WMI_RETURN_STRING(WMI_VDEV_WMM_ADDTS_CMDID);
  18737. WMI_RETURN_STRING(WMI_VDEV_WMM_DELTS_CMDID);
  18738. WMI_RETURN_STRING(WMI_VDEV_SET_WMM_PARAMS_CMDID);
  18739. WMI_RETURN_STRING(WMI_VDEV_SET_GTX_PARAMS_CMDID);
  18740. WMI_RETURN_STRING(WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID);
  18741. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_START_CMDID);
  18742. WMI_RETURN_STRING(WMI_VDEV_PLMREQ_STOP_CMDID);
  18743. WMI_RETURN_STRING(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID);
  18744. WMI_RETURN_STRING(WMI_VDEV_SET_IE_CMDID);
  18745. /* peer specific commands */
  18746. /** create a peer */
  18747. WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID);
  18748. /** delete a peer */
  18749. WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID);
  18750. /** flush specific tid queues of a peer */
  18751. WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID);
  18752. /** set a parameter of a peer */
  18753. WMI_RETURN_STRING(WMI_PEER_SET_PARAM_CMDID);
  18754. /* set peer to associated state. will cary all parameters
  18755. * determined during assocication time */
  18756. WMI_RETURN_STRING(WMI_PEER_ASSOC_CMDID);
  18757. /* add a wds (4 address ) entry. used only for testing
  18758. * WDS feature on AP products */
  18759. WMI_RETURN_STRING(WMI_PEER_ADD_WDS_ENTRY_CMDID);
  18760. /* remove wds (4 address ) entry. used only for testing WDS
  18761. * feature on AP products */
  18762. WMI_RETURN_STRING(WMI_PEER_REMOVE_WDS_ENTRY_CMDID);
  18763. /* set up mcast info for multicast to unicast conversion */
  18764. WMI_RETURN_STRING(WMI_PEER_MCAST_GROUP_CMDID);
  18765. /* request peer info from FW to get PEER_INFO_EVENTID */
  18766. WMI_RETURN_STRING(WMI_PEER_INFO_REQ_CMDID);
  18767. /* beacon/management specific commands */
  18768. /* transmit beacon by reference. used for transmitting beacon
  18769. * on low latency interface like pcie */
  18770. WMI_RETURN_STRING(WMI_BCN_TX_CMDID);
  18771. /* transmit beacon by value */
  18772. WMI_RETURN_STRING(WMI_PDEV_SEND_BCN_CMDID);
  18773. /* set the beacon template. used in beacon offload mode to setup
  18774. * the common beacon template with the FW to be used by FW to
  18775. * generate beacons */
  18776. WMI_RETURN_STRING(WMI_BCN_TMPL_CMDID);
  18777. /* set beacon filter with FW */
  18778. WMI_RETURN_STRING(WMI_BCN_FILTER_RX_CMDID);
  18779. /* enable/disable filtering of probe requests in the firmware */
  18780. WMI_RETURN_STRING(WMI_PRB_REQ_FILTER_RX_CMDID);
  18781. /* transmit management frame by value. will be deprecated */
  18782. WMI_RETURN_STRING(WMI_MGMT_TX_CMDID);
  18783. /* set the probe response template. used in beacon offload mode
  18784. * to setup the common probe response template with the FW to
  18785. * be used by FW to generate probe responses */
  18786. WMI_RETURN_STRING(WMI_PRB_TMPL_CMDID);
  18787. /* commands to directly control ba negotiation directly from
  18788. * host. only used in test mode */
  18789. /* turn off FW Auto addba mode and let host control addba */
  18790. WMI_RETURN_STRING(WMI_ADDBA_CLEAR_RESP_CMDID);
  18791. /* send add ba request */
  18792. WMI_RETURN_STRING(WMI_ADDBA_SEND_CMDID);
  18793. WMI_RETURN_STRING(WMI_ADDBA_STATUS_CMDID);
  18794. /* send del ba */
  18795. WMI_RETURN_STRING(WMI_DELBA_SEND_CMDID);
  18796. /* set add ba response will be used by FW to generate
  18797. * addba response*/
  18798. WMI_RETURN_STRING(WMI_ADDBA_SET_RESP_CMDID);
  18799. /* send single VHT MPDU with AMSDU */
  18800. WMI_RETURN_STRING(WMI_SEND_SINGLEAMSDU_CMDID);
  18801. /* Station power save specific config */
  18802. /* enable/disable station powersave */
  18803. WMI_RETURN_STRING(WMI_STA_POWERSAVE_MODE_CMDID);
  18804. /* set station power save specific parameter */
  18805. WMI_RETURN_STRING(WMI_STA_POWERSAVE_PARAM_CMDID);
  18806. /* set station mimo powersave mode */
  18807. WMI_RETURN_STRING(WMI_STA_MIMO_PS_MODE_CMDID);
  18808. /* DFS-specific commands */
  18809. /* enable DFS (radar detection)*/
  18810. WMI_RETURN_STRING(WMI_PDEV_DFS_ENABLE_CMDID);
  18811. /* disable DFS (radar detection)*/
  18812. WMI_RETURN_STRING(WMI_PDEV_DFS_DISABLE_CMDID);
  18813. /* enable DFS phyerr/parse filter offload */
  18814. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_ENA_CMDID);
  18815. /* enable DFS phyerr/parse filter offload */
  18816. WMI_RETURN_STRING(WMI_DFS_PHYERR_FILTER_DIS_CMDID);
  18817. /* Roaming specific commands */
  18818. /* set roam scan mode */
  18819. WMI_RETURN_STRING(WMI_ROAM_SCAN_MODE);
  18820. /* set roam scan rssi threshold below which roam
  18821. * scan is enabled */
  18822. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_THRESHOLD);
  18823. /* set roam scan period for periodic roam scan mode */
  18824. WMI_RETURN_STRING(WMI_ROAM_SCAN_PERIOD);
  18825. /* set roam scan trigger rssi change threshold */
  18826. WMI_RETURN_STRING(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
  18827. /* set roam AP profile */
  18828. WMI_RETURN_STRING(WMI_ROAM_AP_PROFILE);
  18829. /* set channel list for roam scans */
  18830. WMI_RETURN_STRING(WMI_ROAM_CHAN_LIST);
  18831. /* offload scan specific commands */
  18832. /* set offload scan AP profile */
  18833. WMI_RETURN_STRING(WMI_OFL_SCAN_ADD_AP_PROFILE);
  18834. /* remove offload scan AP profile */
  18835. WMI_RETURN_STRING(WMI_OFL_SCAN_REMOVE_AP_PROFILE);
  18836. /* set offload scan period */
  18837. WMI_RETURN_STRING(WMI_OFL_SCAN_PERIOD);
  18838. /* P2P specific commands */
  18839. /* set P2P device info. FW will used by FW to create P2P IE
  18840. * to be carried in probe response generated during p2p listen
  18841. * and for p2p discoverability */
  18842. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DEVICE_INFO);
  18843. /* enable/disable p2p discoverability on STA/AP VDEVs */
  18844. WMI_RETURN_STRING(WMI_P2P_DEV_SET_DISCOVERABILITY);
  18845. /* set p2p ie to be carried in beacons generated by FW for GO */
  18846. WMI_RETURN_STRING(WMI_P2P_GO_SET_BEACON_IE);
  18847. /* set p2p ie to be carried in probe response frames generated
  18848. * by FW for GO */
  18849. WMI_RETURN_STRING(WMI_P2P_GO_SET_PROBE_RESP_IE);
  18850. /* set the vendor specific p2p ie data.
  18851. * FW will use this to parse the P2P NoA
  18852. * attribute in the beacons/probe responses received.
  18853. */
  18854. WMI_RETURN_STRING(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
  18855. /* set the configure of p2p find offload */
  18856. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID);
  18857. /* set the vendor specific p2p ie data for p2p find offload */
  18858. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_APPIE_CMDID);
  18859. /* set the BSSID/device name pattern of p2p find offload */
  18860. WMI_RETURN_STRING(WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID);
  18861. /* set OppPS related parameters **/
  18862. WMI_RETURN_STRING(WMI_P2P_SET_OPPPS_PARAM_CMDID);
  18863. /* AP power save specific config
  18864. * set AP power save specific param */
  18865. WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID);
  18866. /* set AP UAPSD coex pecific param */
  18867. WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID);
  18868. /* Rate-control specific commands */
  18869. WMI_RETURN_STRING(WMI_PEER_RATE_RETRY_SCHED_CMDID);
  18870. /* WLAN Profiling commands. */
  18871. WMI_RETURN_STRING(WMI_WLAN_PROFILE_TRIGGER_CMDID);
  18872. WMI_RETURN_STRING(WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID);
  18873. WMI_RETURN_STRING(WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID);
  18874. WMI_RETURN_STRING(WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID);
  18875. WMI_RETURN_STRING(WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID);
  18876. /* Suspend resume command Ids */
  18877. WMI_RETURN_STRING(WMI_PDEV_SUSPEND_CMDID);
  18878. WMI_RETURN_STRING(WMI_PDEV_RESUME_CMDID);
  18879. /* Beacon filter commands */
  18880. /* add a beacon filter */
  18881. WMI_RETURN_STRING(WMI_ADD_BCN_FILTER_CMDID);
  18882. /* remove a beacon filter */
  18883. WMI_RETURN_STRING(WMI_RMV_BCN_FILTER_CMDID);
  18884. /* WOW Specific WMI commands */
  18885. /* add pattern for awake */
  18886. WMI_RETURN_STRING(WMI_WOW_ADD_WAKE_PATTERN_CMDID);
  18887. /* deleta a wake pattern */
  18888. WMI_RETURN_STRING(WMI_WOW_DEL_WAKE_PATTERN_CMDID);
  18889. /* enable/deisable wake event */
  18890. WMI_RETURN_STRING(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
  18891. /* enable WOW */
  18892. WMI_RETURN_STRING(WMI_WOW_ENABLE_CMDID);
  18893. /* host woke up from sleep event to FW. Generated in response
  18894. * to WOW Hardware event */
  18895. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
  18896. /* RTT measurement related cmd */
  18897. /* reques to make an RTT measurement */
  18898. WMI_RETURN_STRING(WMI_RTT_MEASREQ_CMDID);
  18899. /* reques to report a tsf measurement */
  18900. WMI_RETURN_STRING(WMI_RTT_TSF_CMDID);
  18901. /* spectral scan command */
  18902. /* configure spectral scan */
  18903. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID);
  18904. /* enable/disable spectral scan and trigger */
  18905. WMI_RETURN_STRING(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID);
  18906. /* F/W stats */
  18907. /* one time request for stats */
  18908. WMI_RETURN_STRING(WMI_REQUEST_STATS_CMDID);
  18909. /* Push MCC Adaptive Scheduler Stats to Firmware */
  18910. WMI_RETURN_STRING(WMI_MCC_SCHED_TRAFFIC_STATS_CMDID);
  18911. /* ARP OFFLOAD REQUEST*/
  18912. WMI_RETURN_STRING(WMI_SET_ARP_NS_OFFLOAD_CMDID);
  18913. /* Proactive ARP Response Add Pattern Command*/
  18914. WMI_RETURN_STRING(WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  18915. /* Proactive ARP Response Del Pattern Command*/
  18916. WMI_RETURN_STRING(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID);
  18917. /* NS offload confid*/
  18918. WMI_RETURN_STRING(WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID);
  18919. /* GTK offload Specific WMI commands */
  18920. WMI_RETURN_STRING(WMI_GTK_OFFLOAD_CMDID);
  18921. /* CSA offload Specific WMI commands */
  18922. /* csa offload enable */
  18923. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_ENABLE_CMDID);
  18924. /* chan switch command */
  18925. WMI_RETURN_STRING(WMI_CSA_OFFLOAD_CHANSWITCH_CMDID);
  18926. /* Chatter commands */
  18927. /* Change chatter mode of operation */
  18928. WMI_RETURN_STRING(WMI_CHATTER_SET_MODE_CMDID);
  18929. /* chatter add coalescing filter command */
  18930. WMI_RETURN_STRING(WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
  18931. /* chatter delete coalescing filter command */
  18932. WMI_RETURN_STRING(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
  18933. /* chatter coalecing query command */
  18934. WMI_RETURN_STRING(WMI_CHATTER_COALESCING_QUERY_CMDID);
  18935. /* addba specific commands */
  18936. /* start the aggregation on this TID */
  18937. WMI_RETURN_STRING(WMI_PEER_TID_ADDBA_CMDID);
  18938. /* stop the aggregation on this TID */
  18939. WMI_RETURN_STRING(WMI_PEER_TID_DELBA_CMDID);
  18940. /* set station mimo powersave method */
  18941. WMI_RETURN_STRING(WMI_STA_DTIM_PS_METHOD_CMDID);
  18942. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  18943. WMI_RETURN_STRING(WMI_STA_UAPSD_AUTO_TRIG_CMDID);
  18944. /* Configure the Keep Alive Parameters */
  18945. WMI_RETURN_STRING(WMI_STA_KEEPALIVE_CMDID);
  18946. /* Request ssn from target for a sta/tid pair */
  18947. WMI_RETURN_STRING(WMI_BA_REQ_SSN_CMDID);
  18948. /* misc command group */
  18949. /* echo command mainly used for testing */
  18950. WMI_RETURN_STRING(WMI_ECHO_CMDID);
  18951. /* !!IMPORTANT!!
  18952. * If you need to add a new WMI command to the
  18953. * WMI_RETURN_STRING(WMI_GRP_MISC) sub-group,
  18954. * please make sure you add it BEHIND
  18955. * WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  18956. * as we MUST have a fixed value here to maintain compatibility between
  18957. * UTF and the ART2 driver
  18958. */
  18959. /* UTF WMI commands */
  18960. WMI_RETURN_STRING(WMI_PDEV_UTF_CMDID);
  18961. /* set debug log config */
  18962. WMI_RETURN_STRING(WMI_DBGLOG_CFG_CMDID);
  18963. /* QVIT specific command id */
  18964. WMI_RETURN_STRING(WMI_PDEV_QVIT_CMDID);
  18965. /* Factory Testing Mode request command
  18966. * used for integrated chipsets */
  18967. WMI_RETURN_STRING(WMI_PDEV_FTM_INTG_CMDID);
  18968. /* set and get keepalive parameters command */
  18969. WMI_RETURN_STRING(WMI_VDEV_SET_KEEPALIVE_CMDID);
  18970. WMI_RETURN_STRING(WMI_VDEV_GET_KEEPALIVE_CMDID);
  18971. /* For fw recovery test command */
  18972. WMI_RETURN_STRING(WMI_FORCE_FW_HANG_CMDID);
  18973. /* Set Mcast/Bdcast filter */
  18974. WMI_RETURN_STRING(WMI_SET_MCASTBCAST_FILTER_CMDID);
  18975. /* set thermal management params */
  18976. WMI_RETURN_STRING(WMI_THERMAL_MGMT_CMDID);
  18977. WMI_RETURN_STRING(WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID);
  18978. WMI_RETURN_STRING(WMI_LRO_CONFIG_CMDID);
  18979. WMI_RETURN_STRING(WMI_TRANSFER_DATA_TO_FLASH_CMDID);
  18980. WMI_RETURN_STRING(WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID);
  18981. WMI_RETURN_STRING(WMI_VDEV_WISA_CMDID);
  18982. WMI_RETURN_STRING(WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID);
  18983. WMI_RETURN_STRING(WMI_WOW_SET_ACTION_WAKE_UP_CMDID);
  18984. WMI_RETURN_STRING(WMI_MAWC_SENSOR_REPORT_IND_CMDID);
  18985. WMI_RETURN_STRING(WMI_ROAM_CONFIGURE_MAWC_CMDID);
  18986. WMI_RETURN_STRING(WMI_NLO_CONFIGURE_MAWC_CMDID);
  18987. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_MAWC_CMDID);
  18988. /* GPIO Configuration */
  18989. WMI_RETURN_STRING(WMI_GPIO_CONFIG_CMDID);
  18990. WMI_RETURN_STRING(WMI_GPIO_OUTPUT_CMDID);
  18991. /* Txbf configuration command */
  18992. WMI_RETURN_STRING(WMI_TXBF_CMDID);
  18993. /* FWTEST Commands */
  18994. WMI_RETURN_STRING(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
  18995. /* set NoA descs */
  18996. WMI_RETURN_STRING(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
  18997. /* TDLS Configuration */
  18998. /* enable/disable TDLS */
  18999. WMI_RETURN_STRING(WMI_TDLS_SET_STATE_CMDID);
  19000. /* set tdls peer state */
  19001. WMI_RETURN_STRING(WMI_TDLS_PEER_UPDATE_CMDID);
  19002. /* Resmgr Configuration */
  19003. /* Adaptive OCS is enabled by default in the FW.
  19004. * This command is used to disable FW based adaptive OCS.
  19005. */
  19006. WMI_RETURN_STRING
  19007. (WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
  19008. /* set the requested channel time quota for the home channels */
  19009. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
  19010. /* set the requested latency for the home channels */
  19011. WMI_RETURN_STRING(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
  19012. /* STA SMPS Configuration */
  19013. /* force SMPS mode */
  19014. WMI_RETURN_STRING(WMI_STA_SMPS_FORCE_MODE_CMDID);
  19015. /* set SMPS parameters */
  19016. WMI_RETURN_STRING(WMI_STA_SMPS_PARAM_CMDID);
  19017. /* Wlan HB commands */
  19018. /* enalbe/disable wlan HB */
  19019. WMI_RETURN_STRING(WMI_HB_SET_ENABLE_CMDID);
  19020. /* set tcp parameters for wlan HB */
  19021. WMI_RETURN_STRING(WMI_HB_SET_TCP_PARAMS_CMDID);
  19022. /* set tcp pkt filter for wlan HB */
  19023. WMI_RETURN_STRING(WMI_HB_SET_TCP_PKT_FILTER_CMDID);
  19024. /* set udp parameters for wlan HB */
  19025. WMI_RETURN_STRING(WMI_HB_SET_UDP_PARAMS_CMDID);
  19026. /* set udp pkt filter for wlan HB */
  19027. WMI_RETURN_STRING(WMI_HB_SET_UDP_PKT_FILTER_CMDID);
  19028. /* Wlan RMC commands*/
  19029. /* enable/disable RMC */
  19030. WMI_RETURN_STRING(WMI_RMC_SET_MODE_CMDID);
  19031. /* configure action frame period */
  19032. WMI_RETURN_STRING(WMI_RMC_SET_ACTION_PERIOD_CMDID);
  19033. /* For debug/future enhancement purposes only,
  19034. * configures/finetunes RMC algorithms */
  19035. WMI_RETURN_STRING(WMI_RMC_CONFIG_CMDID);
  19036. /* WLAN MHF offload commands */
  19037. /* enable/disable MHF offload */
  19038. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_SET_MODE_CMDID);
  19039. /* Plumb routing table for MHF offload */
  19040. WMI_RETURN_STRING(WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID);
  19041. /* location scan commands */
  19042. /* start batch scan */
  19043. WMI_RETURN_STRING(WMI_BATCH_SCAN_ENABLE_CMDID);
  19044. /* stop batch scan */
  19045. WMI_RETURN_STRING(WMI_BATCH_SCAN_DISABLE_CMDID);
  19046. /* get batch scan result */
  19047. WMI_RETURN_STRING(WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID);
  19048. /* OEM related cmd */
  19049. WMI_RETURN_STRING(WMI_OEM_REQ_CMDID);
  19050. WMI_RETURN_STRING(WMI_OEM_REQUEST_CMDID);
  19051. /* NAN request cmd */
  19052. WMI_RETURN_STRING(WMI_NAN_CMDID);
  19053. /* Modem power state cmd */
  19054. WMI_RETURN_STRING(WMI_MODEM_POWER_STATE_CMDID);
  19055. WMI_RETURN_STRING(WMI_REQUEST_STATS_EXT_CMDID);
  19056. WMI_RETURN_STRING(WMI_OBSS_SCAN_ENABLE_CMDID);
  19057. WMI_RETURN_STRING(WMI_OBSS_SCAN_DISABLE_CMDID);
  19058. WMI_RETURN_STRING(WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID);
  19059. WMI_RETURN_STRING(WMI_ROAM_SCAN_CMD);
  19060. WMI_RETURN_STRING(WMI_PDEV_SET_LED_CONFIG_CMDID);
  19061. WMI_RETURN_STRING(WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID);
  19062. WMI_RETURN_STRING(WMI_CHAN_AVOID_UPDATE_CMDID);
  19063. WMI_RETURN_STRING(WMI_COEX_CONFIG_CMDID);
  19064. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID);
  19065. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID);
  19066. WMI_RETURN_STRING(WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID);
  19067. WMI_RETURN_STRING(WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID);
  19068. WMI_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID);
  19069. WMI_RETURN_STRING(WMI_START_LINK_STATS_CMDID);
  19070. WMI_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID);
  19071. WMI_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID);
  19072. WMI_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID);
  19073. WMI_RETURN_STRING(WMI_LPI_START_SCAN_CMDID);
  19074. WMI_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID);
  19075. WMI_RETURN_STRING(WMI_EXTSCAN_START_CMDID);
  19076. WMI_RETURN_STRING(WMI_EXTSCAN_STOP_CMDID);
  19077. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID);
  19078. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID);
  19079. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID);
  19080. WMI_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
  19081. WMI_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
  19082. WMI_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
  19083. WMI_RETURN_STRING(WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID);
  19084. WMI_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
  19085. WMI_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
  19086. WMI_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
  19087. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
  19088. WMI_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
  19089. WMI_RETURN_STRING(WMI_UNIT_TEST_CMDID);
  19090. WMI_RETURN_STRING(WMI_ROAM_SET_RIC_REQUEST_CMDID);
  19091. WMI_RETURN_STRING(WMI_PDEV_GET_TEMPERATURE_CMDID);
  19092. WMI_RETURN_STRING(WMI_SET_DHCP_SERVER_OFFLOAD_CMDID);
  19093. WMI_RETURN_STRING(WMI_TPC_CHAINMASK_CONFIG_CMDID);
  19094. WMI_RETURN_STRING(WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID);
  19095. WMI_RETURN_STRING(WMI_SCAN_PROB_REQ_OUI_CMDID);
  19096. WMI_RETURN_STRING(WMI_TDLS_SET_OFFCHAN_MODE_CMDID);
  19097. WMI_RETURN_STRING(WMI_PDEV_SET_LED_FLASHING_CMDID);
  19098. WMI_RETURN_STRING(WMI_MDNS_OFFLOAD_ENABLE_CMDID);
  19099. WMI_RETURN_STRING(WMI_MDNS_SET_FQDN_CMDID);
  19100. WMI_RETURN_STRING(WMI_MDNS_SET_RESPONSE_CMDID);
  19101. WMI_RETURN_STRING(WMI_MDNS_GET_STATS_CMDID);
  19102. WMI_RETURN_STRING(WMI_ROAM_INVOKE_CMDID);
  19103. WMI_RETURN_STRING(WMI_SET_ANTENNA_DIVERSITY_CMDID);
  19104. WMI_RETURN_STRING(WMI_SAP_OFL_ENABLE_CMDID);
  19105. WMI_RETURN_STRING(WMI_APFIND_CMDID);
  19106. WMI_RETURN_STRING(WMI_PASSPOINT_LIST_CONFIG_CMDID);
  19107. WMI_RETURN_STRING(WMI_OCB_SET_SCHED_CMDID);
  19108. WMI_RETURN_STRING(WMI_OCB_SET_CONFIG_CMDID);
  19109. WMI_RETURN_STRING(WMI_OCB_SET_UTC_TIME_CMDID);
  19110. WMI_RETURN_STRING(WMI_OCB_START_TIMING_ADVERT_CMDID);
  19111. WMI_RETURN_STRING(WMI_OCB_STOP_TIMING_ADVERT_CMDID);
  19112. WMI_RETURN_STRING(WMI_OCB_GET_TSF_TIMER_CMDID);
  19113. WMI_RETURN_STRING(WMI_DCC_GET_STATS_CMDID);
  19114. WMI_RETURN_STRING(WMI_DCC_CLEAR_STATS_CMDID);
  19115. WMI_RETURN_STRING(WMI_DCC_UPDATE_NDL_CMDID);
  19116. WMI_RETURN_STRING(WMI_ROAM_FILTER_CMDID);
  19117. WMI_RETURN_STRING(WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID);
  19118. WMI_RETURN_STRING(WMI_DEBUG_MESG_FLUSH_CMDID);
  19119. WMI_RETURN_STRING(WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID);
  19120. WMI_RETURN_STRING(WMI_SOC_SET_PCL_CMDID);
  19121. WMI_RETURN_STRING(WMI_SOC_SET_HW_MODE_CMDID);
  19122. WMI_RETURN_STRING(WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID);
  19123. WMI_RETURN_STRING(WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID);
  19124. WMI_RETURN_STRING(WMI_DIAG_EVENT_LOG_CONFIG_CMDID);
  19125. WMI_RETURN_STRING(WMI_PACKET_FILTER_CONFIG_CMDID);
  19126. WMI_RETURN_STRING(WMI_PACKET_FILTER_ENABLE_CMDID);
  19127. WMI_RETURN_STRING(WMI_SAP_SET_BLACKLIST_PARAM_CMDID);
  19128. WMI_RETURN_STRING(WMI_WOW_UDP_SVC_OFLD_CMDID);
  19129. WMI_RETURN_STRING(WMI_MGMT_TX_SEND_CMDID);
  19130. WMI_RETURN_STRING(WMI_SOC_SET_ANTENNA_MODE_CMDID);
  19131. WMI_RETURN_STRING(WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID);
  19132. WMI_RETURN_STRING(WMI_AP_PS_EGAP_PARAM_CMDID);
  19133. WMI_RETURN_STRING(WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID);
  19134. WMI_RETURN_STRING(WMI_BPF_GET_CAPABILITY_CMDID);
  19135. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_STATS_CMDID);
  19136. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID);
  19137. WMI_RETURN_STRING(WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID);
  19138. WMI_RETURN_STRING(WMI_NDI_GET_CAP_REQ_CMDID);
  19139. WMI_RETURN_STRING(WMI_NDP_INITIATOR_REQ_CMDID);
  19140. WMI_RETURN_STRING(WMI_NDP_RESPONDER_REQ_CMDID);
  19141. WMI_RETURN_STRING(WMI_NDP_END_REQ_CMDID);
  19142. WMI_RETURN_STRING(WMI_PEER_UPDATE_WDS_ENTRY_CMDID);
  19143. WMI_RETURN_STRING(WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID);
  19144. WMI_RETURN_STRING(WMI_PDEV_FIPS_CMDID);
  19145. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_ENABLE_CMDID);
  19146. WMI_RETURN_STRING(WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID);
  19147. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID);
  19148. WMI_RETURN_STRING(WMI_PDEV_SET_CTL_TABLE_CMDID);
  19149. WMI_RETURN_STRING(WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID);
  19150. WMI_RETURN_STRING(WMI_PDEV_GET_TPC_CMDID);
  19151. WMI_RETURN_STRING(WMI_MIB_STATS_ENABLE_CMDID);
  19152. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID);
  19153. WMI_RETURN_STRING(WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID);
  19154. WMI_RETURN_STRING(WMI_VDEV_RATEMASK_CMDID);
  19155. WMI_RETURN_STRING(WMI_VDEV_ATF_REQUEST_CMDID);
  19156. WMI_RETURN_STRING(WMI_VDEV_SET_DSCP_TID_MAP_CMDID);
  19157. WMI_RETURN_STRING(WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID);
  19158. WMI_RETURN_STRING(WMI_VDEV_SET_QUIET_MODE_CMDID);
  19159. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID);
  19160. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID);
  19161. WMI_RETURN_STRING(WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID);
  19162. WMI_RETURN_STRING(WMI_PEER_ATF_REQUEST_CMDID);
  19163. WMI_RETURN_STRING(WMI_FWTEST_CMDID);
  19164. WMI_RETURN_STRING(WMI_QBOOST_CFG_CMDID);
  19165. WMI_RETURN_STRING(WMI_PDEV_GET_NFCAL_POWER_CMDID);
  19166. WMI_RETURN_STRING(WMI_PDEV_SET_PCL_CMDID);
  19167. WMI_RETURN_STRING(WMI_PDEV_SET_HW_MODE_CMDID);
  19168. WMI_RETURN_STRING(WMI_PDEV_SET_MAC_CONFIG_CMDID);
  19169. WMI_RETURN_STRING(WMI_PDEV_SET_ANTENNA_MODE_CMDID);
  19170. WMI_RETURN_STRING(WMI_ROAM_SET_MBO_PARAM_CMDID);
  19171. WMI_RETURN_STRING(WMI_CHAN_AVOID_RPT_ALLOW_CMDID);
  19172. WMI_RETURN_STRING(WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID);
  19173. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID);
  19174. WMI_RETURN_STRING(WMI_PDEV_WAL_POWER_DEBUG_CMDID);
  19175. WMI_RETURN_STRING(WMI_PEER_BWF_REQUEST_CMDID);
  19176. WMI_RETURN_STRING(WMI_DBGLOG_TIME_STAMP_SYNC_CMDID);
  19177. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_START_CMDID);
  19178. WMI_RETURN_STRING(WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID);
  19179. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_SETUP_CMDID);
  19180. WMI_RETURN_STRING(WMI_PEER_REORDER_QUEUE_REMOVE_CMDID);
  19181. WMI_RETURN_STRING(WMI_SET_MULTIPLE_MCAST_FILTER_CMDID);
  19182. WMI_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID);
  19183. WMI_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID);
  19184. WMI_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID);
  19185. WMI_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID);
  19186. WMI_RETURN_STRING(WMI_PDEV_GET_ANTDIV_STATUS_CMDID);
  19187. WMI_RETURN_STRING(WMI_PEER_ANTDIV_INFO_REQ_CMDID);
  19188. WMI_RETURN_STRING(WMI_MNT_FILTER_CMDID);
  19189. WMI_RETURN_STRING(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID);
  19190. WMI_RETURN_STRING(WMI_COEX_GET_ANTENNA_ISOLATION_CMDID);
  19191. WMI_RETURN_STRING(WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
  19192. WMI_RETURN_STRING(WMI_REQUEST_WLAN_STATS_CMDID);
  19193. WMI_RETURN_STRING(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID);
  19194. WMI_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
  19195. WMI_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID);
  19196. WMI_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID);
  19197. WMI_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID);
  19198. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID);
  19199. WMI_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID);
  19200. WMI_RETURN_STRING(WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID);
  19201. WMI_RETURN_STRING(WMI_LPI_OEM_REQ_CMDID);
  19202. WMI_RETURN_STRING(WMI_PDEV_UPDATE_PKT_ROUTING_CMDID);
  19203. WMI_RETURN_STRING(WMI_PDEV_CHECK_CAL_VERSION_CMDID);
  19204. WMI_RETURN_STRING(WMI_PDEV_SET_DIVERSITY_GAIN_CMDID);
  19205. WMI_RETURN_STRING(WMI_VDEV_SET_ARP_STAT_CMDID);
  19206. WMI_RETURN_STRING(WMI_VDEV_GET_ARP_STAT_CMDID);
  19207. WMI_RETURN_STRING(WMI_VDEV_GET_TX_POWER_CMDID);
  19208. WMI_RETURN_STRING(WMI_OFFCHAN_DATA_TX_SEND_CMDID);
  19209. WMI_RETURN_STRING(WMI_SET_INIT_COUNTRY_CMDID);
  19210. WMI_RETURN_STRING(WMI_SET_SCAN_DBS_DUTY_CYCLE_CMDID);
  19211. WMI_RETURN_STRING(WMI_THERM_THROT_SET_CONF_CMDID);
  19212. WMI_RETURN_STRING(WMI_OEM_DMA_RING_CFG_REQ_CMDID);
  19213. WMI_RETURN_STRING(WMI_PDEV_BSS_CHAN_INFO_REQUEST_CMDID);
  19214. WMI_RETURN_STRING(WMI_VDEV_LIMIT_OFFCHAN_CMDID);
  19215. WMI_RETURN_STRING(WMI_ROAM_BTM_CONFIG_CMDID);
  19216. WMI_RETURN_STRING(WMI_WLM_CONFIG_CMDID);
  19217. WMI_RETURN_STRING(WMI_PDEV_UPDATE_CTLTABLE_REQUEST_CMDID);
  19218. WMI_RETURN_STRING(WMI_PDEV_CONFIG_VENDOR_OUI_ACTION_CMDID);
  19219. WMI_RETURN_STRING(WMI_PDEV_SEND_FD_CMDID);
  19220. WMI_RETURN_STRING(WMI_ENABLE_FILS_CMDID);
  19221. WMI_RETURN_STRING(WMI_PDEV_SET_AC_TX_QUEUE_OPTIMIZED_CMDID);
  19222. WMI_RETURN_STRING(WMI_PEER_TID_MSDUQ_QDEPTH_THRESH_UPDATE_CMDID);
  19223. WMI_RETURN_STRING(WMI_PDEV_SET_RX_FILTER_PROMISCUOUS_CMDID);
  19224. WMI_RETURN_STRING(WMI_SAP_OBSS_DETECTION_CFG_CMDID);
  19225. WMI_RETURN_STRING(WMI_PDEV_DMA_RING_CFG_REQ_CMDID);
  19226. WMI_RETURN_STRING(WMI_11K_OFFLOAD_REPORT_CMDID);
  19227. WMI_RETURN_STRING(WMI_11K_INVOKE_NEIGHBOR_REPORT_CMDID);
  19228. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_ENABLE_CMDID);
  19229. WMI_RETURN_STRING(WMI_BPF_SET_VDEV_WORK_MEMORY_CMDID);
  19230. WMI_RETURN_STRING(WMI_BPF_GET_VDEV_WORK_MEMORY_CMDID);
  19231. WMI_RETURN_STRING(WMI_BSS_COLOR_CHANGE_ENABLE_CMDID);
  19232. WMI_RETURN_STRING(WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID);
  19233. WMI_RETURN_STRING(WMI_RUNTIME_DPD_RECAL_CMDID);
  19234. WMI_RETURN_STRING(WMI_TWT_ENABLE_CMDID);
  19235. WMI_RETURN_STRING(WMI_TWT_DISABLE_CMDID);
  19236. WMI_RETURN_STRING(WMI_TWT_ADD_DIALOG_CMDID);
  19237. WMI_RETURN_STRING(WMI_TWT_DEL_DIALOG_CMDID);
  19238. WMI_RETURN_STRING(WMI_TWT_PAUSE_DIALOG_CMDID);
  19239. WMI_RETURN_STRING(WMI_TWT_RESUME_DIALOG_CMDID);
  19240. WMI_RETURN_STRING(WMI_REQUEST_ROAM_SCAN_STATS_CMDID);
  19241. WMI_RETURN_STRING(WMI_PEER_TID_CONFIGURATIONS_CMDID);
  19242. WMI_RETURN_STRING(WMI_VDEV_SET_CUSTOM_SW_RETRY_TH_CMDID);
  19243. WMI_RETURN_STRING(WMI_GET_TPC_POWER_CMDID);
  19244. }
  19245. return "Invalid WMI cmd";
  19246. }
  19247. #endif /* WMI_CMD_STRINGS */
  19248. /** WMI commands/events for the regulatory offload */
  19249. /** Host indicating current country code to FW */
  19250. typedef struct {
  19251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */
  19252. A_UINT32 pdev_id;
  19253. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19254. } wmi_set_current_country_cmd_fixed_param;
  19255. typedef enum {
  19256. WMI_COUNTRYCODE_ALPHA2,
  19257. WMI_COUNTRYCODE_COUNTRY_ID,
  19258. WMI_COUNTRYCODE_DOMAIN_CODE,
  19259. } WMI_COUNTRYCODE_TYPE;
  19260. typedef struct {
  19261. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_init_country_cmd_fixed_param */
  19262. A_UINT32 pdev_id;
  19263. A_UINT32 countrycode_type; /* WMI_COUNTRYCODE_TYPE */
  19264. union {
  19265. struct {
  19266. /* Three character for alpha2. The first two is ISO name for country the last one
  19267. present if it is indoor and out door. First char in bits 7:0 and second char in bits 15:8 ... */
  19268. A_UINT32 alpha2:24,
  19269. unused:8;
  19270. };
  19271. A_UINT32 country_id; /* Country ID */
  19272. A_UINT32 domain_code; /* Domain code */
  19273. } country_code;
  19274. } wmi_set_init_country_cmd_fixed_param;
  19275. /* Freq units in MHz */
  19276. #define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16)
  19277. #define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value)
  19278. #define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16)
  19279. #define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value)
  19280. /* BW in MHz */
  19281. #define WMI_REG_RULE_MAX_BW_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 0, 16)
  19282. #define WMI_REG_RULE_MAX_BW_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 0, 16, value)
  19283. /* regpower in dBm */
  19284. #define WMI_REG_RULE_REG_POWER_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 16, 8)
  19285. #define WMI_REG_RULE_REG_POWER_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 16, 8, value)
  19286. /* antenna gain */
  19287. #define WMI_REG_RULE_ANTENNA_GAIN_GET(bw_pwr_info) WMI_GET_BITS(bw_pwr_info, 24, 8)
  19288. #define WMI_REG_RULE_ANTENNA_GAIN_SET(bw_pwr_info, value) WMI_SET_BITS(bw_pwr_info, 24, 8, value)
  19289. typedef enum {
  19290. WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */
  19291. WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */
  19292. WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */
  19293. WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */
  19294. } WMI_REGULATORY_FLAGS;
  19295. #define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16)
  19296. #define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value)
  19297. typedef struct {
  19298. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */
  19299. A_UINT32 freq_info; /* bits 15:0 = u16 start_freq,
  19300. * bits 31:16 = u16 end_freq
  19301. * (both in MHz units) */
  19302. A_UINT32 bw_pwr_info; /* bits 15:0 = u16 max_bw (MHz units),
  19303. bits 23:16 = u8 reg_power (dBm units),
  19304. bits 31:24 = u8 ant_gain (dB units) */
  19305. A_UINT32 flag_info; /* bits 15:0 = u16 flags,
  19306. bits 31:16 reserved */
  19307. } wmi_regulatory_rule_struct;
  19308. typedef enum {
  19309. WMI_REG_DFS_UNINIT_REGION = 0,
  19310. WMI_REG_DFS_FCC_REGION = 1,
  19311. WMI_REG_DFS_ETSI_REGION = 2,
  19312. WMI_REG_DFS_MKK_REGION = 3,
  19313. WMI_REG_DFS_CN_REGION = 4,
  19314. WMI_REG_DFS_KR_REGION = 5,
  19315. /* Add new items above */
  19316. WMI_REG_DFS_UNDEF_REGION = 0xFFFF,
  19317. } WMI_REG_DFS_REGION;
  19318. typedef enum {
  19319. WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */
  19320. WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */
  19321. WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */
  19322. WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */
  19323. WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */
  19324. WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */
  19325. } WMI_REGULATORY_PHYBITMAP;
  19326. typedef enum {
  19327. WMI_REG_SET_CC_STATUS_PASS = 0,
  19328. WMI_REG_CURRENT_ALPHA2_NOT_FOUND = 1,
  19329. WMI_REG_INIT_ALPHA2_NOT_FOUND = 2,
  19330. WMI_REG_SET_CC_CHANGE_NOT_ALLOWED = 3,
  19331. WMI_REG_SET_CC_STATUS_NO_MEMORY = 4,
  19332. WMI_REG_SET_CC_STATUS_FAIL = 5,
  19333. } WMI_REG_SET_CC_STATUS_CODE;
  19334. typedef struct {
  19335. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */
  19336. A_UINT32 status_code; /* WMI_REG_SET_CC_STATUS_CODE */
  19337. A_UINT32 phy_id;
  19338. A_UINT32 alpha2;
  19339. A_UINT32 num_phy;
  19340. A_UINT32 country_id;
  19341. A_UINT32 domain_code;
  19342. A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */
  19343. A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */
  19344. A_UINT32 min_bw_2g; /* BW in MHz */
  19345. A_UINT32 max_bw_2g; /* BW in MHz */
  19346. A_UINT32 min_bw_5g; /* BW in MHz */
  19347. A_UINT32 max_bw_5g; /* BW in MHz */
  19348. A_UINT32 num_2g_reg_rules;
  19349. A_UINT32 num_5g_reg_rules;
  19350. /* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */
  19351. } wmi_reg_chan_list_cc_event_fixed_param;
  19352. typedef struct {
  19353. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */
  19354. A_UINT32 vdev_id;
  19355. A_UINT32 scan_period_msec; /** scan duration in milli-seconds */
  19356. A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */
  19357. } wmi_11d_scan_start_cmd_fixed_param;
  19358. typedef struct {
  19359. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */
  19360. A_UINT32 vdev_id;
  19361. } wmi_11d_scan_stop_cmd_fixed_param;
  19362. /** FW indicating new current country code to Host */
  19363. typedef struct {
  19364. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */
  19365. A_UINT32 new_alpha2; /** alpha2 characters representing the country code */
  19366. } wmi_11d_new_country_event_fixed_param;
  19367. typedef struct {
  19368. /** TLV tag and len; tag equals
  19369. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  19370. A_UINT32 tlv_header;
  19371. /* Currently there are no parameters for this message. */
  19372. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  19373. typedef struct {
  19374. /** TLV tag and len; tag equals
  19375. * WMITLV_TAG_STRUC_wmi_pdev_get_nfcal_power_fixed_param */
  19376. A_UINT32 tlv_header;
  19377. /** pdev_id for identifying the MAC
  19378. * See macros starting with WMI_PDEV_ID_ for values.
  19379. */
  19380. A_UINT32 pdev_id;
  19381. } wmi_pdev_get_nfcal_power_fixed_param;
  19382. typedef struct {
  19383. /** TLV tag and len; tag equals
  19384. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  19385. A_UINT32 tlv_header;
  19386. /** 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.
  19387. * Currently the HW descriptor only supports 4 chains at most.
  19388. * Further isolation_chainX elements can be added in the future
  19389. * for additional chains, if needed.
  19390. */
  19391. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  19392. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  19393. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  19394. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  19395. } wmi_coex_report_isolation_event_fixed_param;
  19396. typedef enum {
  19397. WMI_RCPI_MEASUREMENT_TYPE_AVG_MGMT = 1,
  19398. WMI_RCPI_MEASUREMENT_TYPE_AVG_DATA = 2,
  19399. WMI_RCPI_MEASUREMENT_TYPE_LAST_MGMT = 3,
  19400. WMI_RCPI_MEASUREMENT_TYPE_LAST_DATA = 4,
  19401. } wmi_rcpi_measurement_type;
  19402. typedef struct {
  19403. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_rcpi_cmd_fixed_param */
  19404. A_UINT32 tlv_header;
  19405. /* VDEV identifier */
  19406. A_UINT32 vdev_id;
  19407. /* peer MAC address */
  19408. wmi_mac_addr peer_macaddr;
  19409. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19410. A_UINT32 measurement_type;
  19411. } wmi_request_rcpi_cmd_fixed_param;
  19412. typedef struct {
  19413. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_rcpi_event_fixed_param */
  19414. A_UINT32 tlv_header;
  19415. /* VDEV identifier */
  19416. A_UINT32 vdev_id;
  19417. /* peer MAC address */
  19418. wmi_mac_addr peer_macaddr;
  19419. /* measurement type - defined in enum wmi_rcpi_measurement_type */
  19420. A_UINT32 measurement_type;
  19421. /* Measured RCPI in dBm of the peer requested by host */
  19422. A_INT32 rcpi;
  19423. /** status
  19424. * 0 - Requested peer RCPI available
  19425. * 1 - Requested peer RCPI not available
  19426. */
  19427. A_UINT32 status;
  19428. } wmi_update_rcpi_event_fixed_param;
  19429. /* Definition of mask for various package id */
  19430. #define WMI_PKGID_MASK_AUTO 0x00000080
  19431. typedef struct {
  19432. /** TLV tag and len; tag equals*/
  19433. A_UINT32 tlv_header;
  19434. /**
  19435. * The value field is filled with WMI_PKGID_MASK values.
  19436. * Currently, the only flag used within values is
  19437. * WMI_PKGID_MASK_AUTO, where bit7=1 for automotive systems.
  19438. */
  19439. A_UINT32 value;
  19440. } wmi_pkgid_event_fixed_param;
  19441. typedef struct {
  19442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_params */
  19443. A_UINT32 vdev_id; /* vdev id whose mac to be randomized */
  19444. /* enable is set to 1 if mac randomization to be enabled */
  19445. A_UINT32 enable;
  19446. /* randomization mac address if randomization is enabled */
  19447. wmi_mac_addr mac_addr;
  19448. /* To get the PMAC from freq param */
  19449. A_UINT32 freq; /* units in MHz */
  19450. } wmi_vdev_add_mac_addr_to_rx_filter_cmd_fixed_param;
  19451. typedef struct {
  19452. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_add_mac_addr_to_rx_filter_event_fixed_params */
  19453. A_UINT32 vdev_id; /* vdev of id whose mac address was randomized */
  19454. A_UINT32 status; /* status is 1 if success and 0 if failed */
  19455. } wmi_vdev_add_mac_addr_to_rx_filter_status_event_fixed_param;
  19456. /* Definition of HW data filtering */
  19457. typedef enum {
  19458. WMI_HW_DATA_FILTER_DROP_NON_ARP_BC = 0x01,
  19459. WMI_HW_DATA_FILTER_DROP_NON_ICMPV6_MC = 0x02,
  19460. } WMI_HW_DATA_FILTER_BITMAP_TYPE;
  19461. typedef struct {
  19462. A_UINT32 tlv_header;
  19463. A_UINT32 vdev_id;
  19464. A_UINT32 enable; /* 1 . enable, 0- disable */
  19465. A_UINT32 hw_filter_bitmap; /* see WMI_HW_DATA_FILTER_BITMAP_TYPE */
  19466. } wmi_hw_data_filter_cmd_fixed_param;
  19467. /* This command is used whenever host wants to restart multiple
  19468. * VDEVs using single command and the VDEV that are restarted will
  19469. * need to have same properties they had before restart except for the
  19470. * operating channel
  19471. */
  19472. typedef struct {
  19473. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param */
  19474. /** pdev_id for identifying the MAC
  19475. * See macros starting with WMI_PDEV_ID_ for values.
  19476. * In non-DBDC case host should set it to 0
  19477. */
  19478. A_UINT32 pdev_id;
  19479. /** unique id identifying the module, generated by the caller */
  19480. A_UINT32 requestor_id;
  19481. /** Disable H/W ack.
  19482. * During CAC, Our HW shouldn't ack directed frames
  19483. */
  19484. A_UINT32 disable_hw_ack;
  19485. /* Determine the duration of CAC on the given channel 'chan' */
  19486. A_UINT32 cac_duration_ms;
  19487. A_UINT32 num_vdevs;
  19488. /* The TLVs follows this structure:
  19489. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19490. * wmi_channel chan; <------ WMI channel
  19491. */
  19492. } wmi_pdev_multiple_vdev_restart_request_cmd_fixed_param;
  19493. typedef struct {
  19494. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csa_switch_count_status_event_fixed_param */
  19495. A_UINT32 tlv_header;
  19496. /** pdev_id for identifying the MAC
  19497. * See macros starting with WMI_PDEV_ID_ for values.
  19498. * In non-DBDC case host should set it to 0
  19499. */
  19500. A_UINT32 pdev_id;
  19501. /** CSA switch count value in the last transmitted beacon */
  19502. A_UINT32 current_switch_count;
  19503. A_UINT32 num_vdevs;
  19504. /* The TLVs follows this structure:
  19505. * A_UINT32 vdev_ids[]; <--- Array of VDEV ids.
  19506. */
  19507. } wmi_pdev_csa_switch_count_status_event_fixed_param;
  19508. /* Operation types for packet routing command */
  19509. typedef enum {
  19510. WMI_PDEV_ADD_PKT_ROUTING,
  19511. WMI_PDEV_DEL_PKT_ROUTING,
  19512. } wmi_pdev_pkt_routing_op_code;
  19513. /* Packet routing types based on specific data types */
  19514. typedef enum {
  19515. WMI_PDEV_ROUTING_TYPE_ARP_IPV4,
  19516. WMI_PDEV_ROUTING_TYPE_NS_IPV6,
  19517. WMI_PDEV_ROUTING_TYPE_IGMP_IPV4,
  19518. WMI_PDEV_ROUTING_TYPE_MLD_IPV6,
  19519. WMI_PDEV_ROUTING_TYPE_DHCP_IPV4,
  19520. WMI_PDEV_ROUTING_TYPE_DHCP_IPV6,
  19521. } wmi_pdev_pkt_routing_type;
  19522. /* 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 */
  19523. typedef struct {
  19524. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_update_pkt_routing_cmd_fixed_param */
  19525. A_UINT32 tlv_header;
  19526. /** Identifies pdev on which routing needs to be applied */
  19527. A_UINT32 pdev_id;
  19528. /** Indicates the routing operation type: add/delete */
  19529. A_UINT32 op_code; /* wmi_pdev_pkt_routing_op_code */
  19530. /** Bitmap of multiple pkt routing types for a given destination ring and meta data */
  19531. A_UINT32 routing_type_bitmap; /* see wmi_pdev_pkt_routing_type */
  19532. /** 5 bits [4:0] are used to specify the destination ring where the CCE matched
  19533. * packet needs to be routed.
  19534. */
  19535. A_UINT32 dest_ring;
  19536. /** 16 bits [15:0] meta data can be passed to CCE. When the superrule matches,
  19537. * CCE copies this back in RX_MSDU_END_TLV.
  19538. */
  19539. A_UINT32 meta_data;
  19540. } wmi_pdev_update_pkt_routing_cmd_fixed_param;
  19541. typedef enum {
  19542. WMI_CALIBRATION_NO_FEATURE = 0, /* The board was calibrated with a meta which did not have this feature */
  19543. WMI_CALIBRATION_OK, /* The calibration status is OK */
  19544. WMI_CALIBRATION_NOT_OK, /* The calibration status is NOT OK */
  19545. } WMI_CALIBRATION_STATUS;
  19546. #define WMI_BOARD_MCN_STRING_MAX_SIZE 19
  19547. /**
  19548. * WMI_BOARD_MCN_STRING_BUF_SIZE : represents the number of elements in board_mcn_detail.
  19549. * Since board_mcn_detail is of type A_UINT8, the value of WMI_BOARD_MCN_STRING_BUF_SIZE
  19550. * should be multiple of 4 for alignement reason. And the last byte byte is reserved for
  19551. * null-terminator
  19552. */
  19553. #define WMI_BOARD_MCN_STRING_BUF_SIZE (WMI_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
  19554. typedef struct {
  19555. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_event_fixed_param */
  19556. A_UINT32 software_cal_version; /* Current software level calibration data version */
  19557. A_UINT32 board_cal_version; /* Calibration data version programmed on chip */
  19558. A_UINT32 cal_status; /* filled with WMI_CALIBRATION_STATUS enum value */
  19559. /* board_mcn_detail:
  19560. * Provides board's MCN (Material Control Number) information for the host
  19561. * to display. This is used to track the Hardware level revisions/versions.
  19562. * This array carries the ASCII values of the MCN to the host. And host
  19563. * would just print this in a string format whenever user requests.
  19564. * Note: On a big-endian host, the 4 bytes within each A_UINT32 portion
  19565. * of a WMI message will be automatically byteswapped by the copy engine
  19566. * as the messages are transferred between host and target, to convert
  19567. * between the target's little-endianness and the host's big-endianness.
  19568. * Consequently, a big-endian host will have to manually unswap the bytes
  19569. * within the board_mcn_detail string buffer to get the bytes back into
  19570. * the desired natural order.
  19571. */
  19572. A_UINT8 board_mcn_detail[WMI_BOARD_MCN_STRING_BUF_SIZE];
  19573. /** pdev_id for identifying the MAC
  19574. * See macros starting with WMI_PDEV_ID_ for values.
  19575. */
  19576. A_UINT32 pdev_id;
  19577. } wmi_pdev_check_cal_version_event_fixed_param;
  19578. typedef struct {
  19579. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_check_cal_version_cmd_fixed_param */
  19580. /** pdev_id for identifying the MAC
  19581. * See macros starting with WMI_PDEV_ID_ for values.
  19582. */
  19583. A_UINT32 pdev_id;
  19584. } wmi_pdev_check_cal_version_cmd_fixed_param;
  19585. typedef struct {
  19586. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_diversity_gain_cmd_fixed_param */
  19587. /** Identifies pdev on which diversity gain to be applied */
  19588. A_UINT32 pdev_id;
  19589. /** The number of spatial stream */
  19590. A_UINT32 nss;
  19591. /** The number of gains */
  19592. A_UINT32 num_gains;
  19593. /*
  19594. * This fixed_param TLV is followed by other TLVs:
  19595. * A_UINT8 diversity_gains[num_gains]; (gain is in dB units)
  19596. */
  19597. } wmi_pdev_set_diversity_gain_cmd_fixed_param;
  19598. /* flags for unit_test_event */
  19599. #define WMI_UNIT_TEST_EVENT_FLAG_STATUS 0 /* 0 = success, 1 = fail */
  19600. #define WMI_UNIT_TEST_EVENT_FLAG_DONE 1 /* 0 = not done, 1 = done */
  19601. /* from bit 2 to bit 31 are reserved */
  19602. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_SUCCESS(flag) do { \
  19603. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  19604. } while (0)
  19605. #define WMI_SET_UNIT_TEST_EVENT_FLAG_STATUS_FAIL(flag) do { \
  19606. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS); \
  19607. } while (0)
  19608. #define WMI_GET_UNIT_TEST_EVENT_FLAG_STSTUS(flag) \
  19609. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_STATUS))
  19610. #define WMI_SET_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  19611. (flag) |= (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  19612. } while (0)
  19613. #define WMI_CLR_UNIT_TEST_EVENT_FLAG_DONE(flag) do { \
  19614. (flag) &= ~(1 << WMI_UNIT_TEST_EVENT_FLAG_DONE); \
  19615. } while (0)
  19616. #define WMI_GET_UNIT_TEST_EVENT_FLAG_DONE(flag) \
  19617. ((flag) & (1 << WMI_UNIT_TEST_EVENT_FLAG_DONE))
  19618. typedef struct {
  19619. /* TLV tag and len; tag equals WMI_UNIT_TEST_EVENTID */
  19620. A_UINT32 tlv_header;
  19621. /* unique id identifying the VDEV, generated by the caller */
  19622. A_UINT32 vdev_id;
  19623. /* Identify the wlan module */
  19624. A_UINT32 module_id;
  19625. /* unique id identifying the unit test cmd, generated by the caller */
  19626. A_UINT32 diag_token;
  19627. /* flag for the status of the unit_test_cmd */
  19628. A_UINT32 flag;
  19629. /* data length number of bytes for current dump */
  19630. A_UINT32 payload_len;
  19631. /* TLV/Payload after this structure is sent in little endian
  19632. * format for the length mentioned in this structure.
  19633. * A_UINT8 payload[1];
  19634. */
  19635. } wmi_unit_test_event_fixed_param;
  19636. /* Definition of latency levels */
  19637. typedef enum {
  19638. WMI_WLM_LL_NORMAL = 0x0,
  19639. WMI_WLM_LL_MODERATE = 0x1,
  19640. WMI_WLM_LL_LOW = 0x2,
  19641. WMI_WLM_LL_ULTRA_LOW = 0x3,
  19642. } WMI_WLM_LATENCY_LEVEL;
  19643. /*
  19644. * Lay out of flags in wmi_wlm_config_cmd_fixed_param
  19645. *
  19646. * |31 17|16 14| 13 | 12 | 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
  19647. * +------+-----+----+----+------+------+------+------+------+------+-----+-----+
  19648. * | RSVD | NSS |EDCA| TRY| SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
  19649. * +----------------------+-------------+-------------+-------------------------+
  19650. * | WAL | PS | Roam | Scan |
  19651. *
  19652. * Flag values:
  19653. * TRY: (1) enable short limit for retrying unacked tx, where the limit is
  19654. * based on the traffic's latency level
  19655. * (0) default tx retry behavior
  19656. * EDCA: (1) Apply VO parameters on BE
  19657. * (0) default behavior
  19658. * NSS: (0) no Nss limits, other than those negotiatied during association
  19659. * (1) during 2-chain operation, tx only a single spatial stream
  19660. * (2) - (7) reserved / invalid
  19661. */
  19662. /* bit 0-3 of flags is used for scan operation */
  19663. /* bit 0: WLM_FLAGS_SCAN_SUPPRESS, suppress all scan and other bits would be ignored if bit is set */
  19664. #define WLM_FLAGS_SCAN_SUPPRESS 1 /* suppress all scan request */
  19665. /* bit 1: WLM_FLAGS_SCAN_SKIP_DFS, skip dfs channel if bit is set */
  19666. #define WLM_FLAGS_SCAN_SKIP_DFS 1 /* skip dfs channel operation */
  19667. /* bit 2-3: define policy of dwell time/duration of each foreign channel
  19668. (b2 b3)
  19669. (0 0 ): Default dwell time
  19670. (0 1 ): WLM_FLAGS_STICK_SCAN_DWELL_TIME : Stick to original active/passive dwell time, but split
  19671. foreign channel dwell times into fitting into min (dl_latency, ul_latency). Note it can increase
  19672. overall scan duration.
  19673. (1 0 ): WLM_FLAGS_SHRINK_SCAN_DWELL_TIME: Shrink active/passive dwell time to
  19674. min(dl_latency, ul_latency, dwell_time). It may reduce overall scan duration, but it may decrease
  19675. the accuracy of scan result.
  19676. (1 1 ): reserved
  19677. */
  19678. #define WLM_FLAGS_DEFAULT_SCAN_DWELL_TIME 0 /* Default scan dwell time */
  19679. #define WLM_FLAGS_STICK_SCAN_DWELL_TIME 1 /* Shrink off channel time but extend overall scan duration */
  19680. #define WLM_FLAGS_SHRINK_SCAN_DWELL_TIME 2 /* Shrink scan off channel time */
  19681. /* bit 4-5: reserved for scan */
  19682. /* bit 6-7 of flags is used for roaming operation */
  19683. /* bit 6-7: define roaming policy:
  19684. (b6 b7)
  19685. (0 0 ): WLM_FLAGS_ROAM_ALLOW: Default behavior, allow roaming in all scenarios
  19686. (0 1 ): WLM_FLAGS_ROAM_SUPPRESS: Disallow all roaming
  19687. (1 0 ): WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM: Allow final bmiss roaming only
  19688. (1 1 ): reserved
  19689. */
  19690. #define WLM_FLAGS_ROAM_ALLOW 0
  19691. #define WLM_FLAGS_ROAM_SUPPRESS 1
  19692. #define WLM_FLAGS_ALLOW_FINAL_BMISS_ROAM 2
  19693. /* bit 8-9: reserved for roaming */
  19694. /* bit 10-11 of flags is used for powersave operation */
  19695. /* bit 10: WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE, disable css power collapse if bit is set */
  19696. #define WLM_FLAGS_PS_DISABLE_CSS_COLLAPSE 1 /* disable css power collapse */
  19697. /* bit 11: WLM_FLAGS_PS_DISABLE_SYS_SLEEP, disable sys sleep if bit is set */
  19698. #define WLM_FLAGS_PS_DISABLE_SYS_SLEEP 1 /* disable sys sleep */
  19699. /* bit 17-31 of flags is reserved for powersave and WAL */
  19700. #define WLM_FLAGS_SCAN_IS_SUPPRESS(flag) WMI_GET_BITS(flag, 0, 1)
  19701. #define WLM_FLAGS_SCAN_SET_SUPPRESS(flag, val) WMI_SET_BITS(flag, 0, 1, val)
  19702. #define WLM_FLAGS_SCAN_IS_SKIP_DFS(flag) WMI_GET_BITS(flag, 1, 1)
  19703. #define WLM_FLAGS_SCAN_SET_SKIP_DFS(flag, val) WMI_SET_BITS(flag, 1, 1, val)
  19704. #define WLM_FLAGS_SCAN_GET_DWELL_TIME_POLICY(flag) WMI_GET_BITS(flag, 2, 2)
  19705. #define WLM_FLAGS_SCAN_SET_DWELL_TIME_POLICY(flag, val) WMI_SET_BITS(flag, 2, 2, val)
  19706. #define WLM_FLAGS_ROAM_GET_POLICY(flag) WMI_GET_BITS(flag, 6, 2)
  19707. #define WLM_FLAGS_ROAM_SET_POLICY(flag, val) WMI_SET_BITS(flag, 6, 2, val)
  19708. #define WLM_FLAGS_PS_IS_CSS_CLPS_DISABLED(flag) WMI_GET_BITS(flag, 10, 1)
  19709. #define WLM_FLAGS_PS_SET_CSS_CLPS_DISABLE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  19710. #define WLM_FLAGS_PS_IS_SYS_SLP_DISABLED(flag) WMI_GET_BITS(flag, 11, 1)
  19711. #define WLM_FLAGS_PS_SET_SYS_SLP_DISABLE(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  19712. #define WLM_FLAGS_WAL_LIMIT_TRY_ENABLED(flag) WMI_GET_BITS(flag, 12, 1)
  19713. #define WLM_FLAGS_WAL_LIMIT_TRY_SET(flag, val) WMI_SET_BITS(flag, 12, 1, val)
  19714. #define WLM_FLAGS_WAL_ADJUST_EDCA_ENABLED(flag) WMI_GET_BITS(flag, 13, 1)
  19715. #define WLM_FLAGS_WAL_ADJUST_EDCA_SET(flag, val) WMI_SET_BITS(flag, 13, 1, val)
  19716. #define WLM_FLAGS_WAL_1NSS_ENABLED(flag) (WMI_GET_BITS(flag, 14, 3) & 0x1)
  19717. #define WLM_FLAGS_WAL_NSS_SET(flag, val) WMI_SET_BITS(flag, 14, 3, val)
  19718. typedef struct {
  19719. /** TLV tag and len; tag equals
  19720. * WMI_WLM_CONFIG_CMD_fixed_param */
  19721. A_UINT32 tlv_header;
  19722. /* VDEV identifier */
  19723. A_UINT32 vdev_id;
  19724. /* Refer to WMI_WLM_LATENCY_LEVEL
  19725. * Once latency change detected, WLM will notify modules e.g. STAPS or SCAN/ROAM,
  19726. * who subscribed this event. And subscribers, like SCAN, may disable/cutoff offchan
  19727. * operation to support lower latency of WLAN.
  19728. */
  19729. A_UINT32 latency_level;
  19730. /* represent uplink latency in ms
  19731. * This parameter will be used by STAPS module to decide timing parameters, like
  19732. * ITO or SPEC wakeup interval. For SCAN/ROAM, it may used to calculate offchan
  19733. * durations.
  19734. */
  19735. A_UINT32 ul_latency;
  19736. /* represent downlink latency in ms
  19737. * Similar usage as ul_latency
  19738. */
  19739. A_UINT32 dl_latency;
  19740. /* flags for each client of WLM, refer to WLM_FLAGS_ definitions above */
  19741. A_UINT32 flags;
  19742. } wmi_wlm_config_cmd_fixed_param;
  19743. typedef struct {
  19744. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */
  19745. /** 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
  19746. * The host should never set this pdev_id to WMI_PDEV_ID_SOC,
  19747. * because the configuration parameters herein will be different
  19748. * for each MAC instance.
  19749. */
  19750. A_UINT32 pdev_id;
  19751. A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */
  19752. A_UINT32 mbss_support; /* Flag indicating if AP TWT feature supported in MBSS mode or not */
  19753. A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */
  19754. A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */
  19755. /*
  19756. * The congestion parameters below are in percent of occupied airtime.
  19757. */
  19758. A_UINT32 congestion_thresh_teardown; /* Minimum congestion below which TWT will be torn down */
  19759. A_UINT32 congestion_thresh_critical; /* Threshold above which TWT will not be active */
  19760. /*
  19761. * The interference parameters below use an abstract method of evaluating
  19762. * interference. The parameters are in percent, ranging from 0 for no
  19763. * interference, to 100 for interference extreme enough to completely
  19764. * block the signal of interest.
  19765. */
  19766. A_UINT32 interference_thresh_teardown; /* Minimum interference above that TWT will not be active */
  19767. A_UINT32 interference_thresh_setup; /* Minimum interference below that TWT session can be setup */
  19768. A_UINT32 min_no_sta_setup; /* Minimum no of STA required to start TWT setup */
  19769. A_UINT32 min_no_sta_teardown; /* Minimum no of STA below which TWT will be torn down */
  19770. A_UINT32 no_of_bcast_mcast_slots; /* Number of default slot sizes reserved for BCAST/MCAST delivery */
  19771. A_UINT32 min_no_twt_slots; /* Minimum no of available slots for TWT to be operational */
  19772. 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) */
  19773. /*
  19774. * The below interval parameters have units of milliseconds.
  19775. */
  19776. A_UINT32 mode_check_interval; /* Interval between two successive check to decide the mode of TWT */
  19777. A_UINT32 add_sta_slot_interval; /* Interval between decisions making to create TWT slots for STAs */
  19778. A_UINT32 remove_sta_slot_interval; /* Inrerval between decisions making to remove TWT slot of STAs */
  19779. } wmi_twt_enable_cmd_fixed_param;
  19780. /* status code of enabling TWT */
  19781. typedef enum _WMI_ENABLE_TWT_STATUS_T {
  19782. WMI_ENABLE_TWT_STATUS_OK, /* enabling TWT successfully completed */
  19783. WMI_ENABLE_TWT_STATUS_ALREADY_ENABLED, /* TWT already enabled */
  19784. WMI_ENABLE_TWT_STATUS_NOT_READY, /* FW not ready for enabling TWT */
  19785. WMI_ENABLE_TWT_INVALID_PARAM, /* invalid parameters */
  19786. WMI_ENABLE_TWT_STATUS_UNKNOWN_ERROR, /* enabling TWT failed with an unknown reason */
  19787. } WMI_ENABLE_TWT_STATUS_T;
  19788. typedef struct {
  19789. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_complete_event_fixed_param */
  19790. /** 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 */
  19791. A_UINT32 pdev_id;
  19792. A_UINT32 status; /* WMI_ENABLE_TWT_STATUS_T */
  19793. } wmi_twt_enable_complete_event_fixed_param;
  19794. typedef struct {
  19795. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_cmd_fixed_param */
  19796. /** 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 */
  19797. A_UINT32 pdev_id; /* host should never set it to WMI_PDEV_ID_SOC */
  19798. } wmi_twt_disable_cmd_fixed_param;
  19799. typedef struct {
  19800. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_disable_complete_event_fixed_param */
  19801. A_UINT32 reserved0; /* unused right now */
  19802. } wmi_twt_disable_complete_event_fixed_param;
  19803. /* from IEEE 802.11ah section 9.4.2.200 */
  19804. typedef enum _WMI_TWT_COMMAND_T {
  19805. WMI_TWT_COMMAND_REQUEST_TWT = 0,
  19806. WMI_TWT_COMMAND_SUGGEST_TWT = 1,
  19807. WMI_TWT_COMMAND_DEMAND_TWT = 2,
  19808. WMI_TWT_COMMAND_TWT_GROUPING = 3,
  19809. WMI_TWT_COMMAND_ACCEPT_TWT = 4,
  19810. WMI_TWT_COMMAND_ALTERNATE_TWT = 5,
  19811. WMI_TWT_COMMAND_DICTATE_TWT = 6,
  19812. WMI_TWT_COMMAND_REJECT_TWT = 7,
  19813. } WMI_TWT_COMMAND_T;
  19814. /* TWT command, refer to WMI_TWT_COMMAND_T */
  19815. #define TWT_FLAGS_GET_CMD(flag) WMI_GET_BITS(flag, 0, 8)
  19816. #define TWT_FLAGS_SET_CMD(flag, val) WMI_SET_BITS(flag, 0, 8, val)
  19817. /* 0 means Individual TWT, 1 means Broadcast TWT */
  19818. #define TWT_FLAGS_GET_BROADCAST(flag) WMI_GET_BITS(flag, 8, 1)
  19819. #define TWT_FLAGS_SET_BROADCAST(flag, val) WMI_SET_BITS(flag, 8, 1, val)
  19820. /* 0 means non-Trigger-enabled TWT, 1 means means Trigger-enabled TWT */
  19821. #define TWT_FLAGS_GET_TRIGGER(flag) WMI_GET_BITS(flag, 9, 1)
  19822. #define TWT_FLAGS_SET_TRIGGER(flag, val) WMI_SET_BITS(flag, 9, 1, val)
  19823. /* flow type 0 means announced TWT, 1 means un-announced TWT */
  19824. #define TWT_FLAGS_GET_FLOW_TYPE(flag) WMI_GET_BITS(flag, 10, 1)
  19825. #define TWT_FLAGS_SET_FLOW_TYPE(flag, val) WMI_SET_BITS(flag, 10, 1, val)
  19826. /* 0 means TWT protection is required, 1 means TWT protection is not required */
  19827. #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1)
  19828. #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val)
  19829. typedef struct {
  19830. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */
  19831. A_UINT32 vdev_id; /* VDEV identifier */
  19832. wmi_mac_addr peer_macaddr; /* peer MAC address when vdev is AP VDEV */
  19833. /* diaglog_id (TWT dialog ID)
  19834. * This dialog ID must be unique within its vdev.
  19835. */
  19836. A_UINT32 dialog_id;
  19837. /* 1. wake_intvl_mantis must be <= 0xFFFF
  19838. * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis,
  19839. * i.e., wake_intvl_us % wake_intvl_mantis == 0
  19840. * 3. the quotient of wake_intvl_us/wake_intvl_mantis must be 2 to N-th(0<=N<=31) power,
  19841. * i.e., wake_intvl_us/wake_intvl_mantis == 2^N, 0<=N<=31
  19842. */
  19843. A_UINT32 wake_intvl_us; /* TWT Wake Interval in units of us */
  19844. A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */
  19845. /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */
  19846. A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 0xFFFF */
  19847. A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */
  19848. A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */
  19849. } wmi_twt_add_dialog_cmd_fixed_param;
  19850. /* status code of adding TWT dialog */
  19851. typedef enum _WMI_ADD_TWT_STATUS_T {
  19852. WMI_ADD_TWT_STATUS_OK, /* adding TWT dialog successfully completed */
  19853. WMI_ADD_TWT_STATUS_TWT_NOT_ENABLED, /* TWT not enabled */
  19854. WMI_ADD_TWT_STATUS_USED_DIALOG_ID, /* TWT dialog ID is already used */
  19855. WMI_ADD_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  19856. WMI_ADD_TWT_STATUS_NOT_READY, /* FW not ready */
  19857. WMI_ADD_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  19858. WMI_ADD_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  19859. WMI_ADD_TWT_STATUS_NO_RESPONSE, /* peer AP did not send the response frame */
  19860. WMI_ADD_TWT_STATUS_DENIED, /* AP did not accept the request */
  19861. WMI_ADD_TWT_STATUS_UNKNOWN_ERROR, /* adding TWT dialog failed with an unknown reason */
  19862. } WMI_ADD_TWT_STATUS_T;
  19863. typedef struct {
  19864. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_complete_event_fixed_param */
  19865. A_UINT32 vdev_id; /* VDEV identifier */
  19866. A_UINT32 dialog_id; /* TWT dialog ID */
  19867. A_UINT32 status; /* refer to WMI_ADD_TWT_STATUS_T */
  19868. } wmi_twt_add_dialog_complete_event_fixed_param;
  19869. typedef struct {
  19870. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_cmd_fixed_param */
  19871. A_UINT32 vdev_id; /* VDEV identifier */
  19872. A_UINT32 dialog_id; /* TWT dialog ID */
  19873. } wmi_twt_del_dialog_cmd_fixed_param;
  19874. /* status code of deleting TWT dialog */
  19875. typedef enum _WMI_DEL_TWT_STATUS_T {
  19876. WMI_DEL_TWT_STATUS_OK, /* deleting TWT dialog successfully completed */
  19877. WMI_DEL_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  19878. WMI_DEL_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  19879. WMI_DEL_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  19880. WMI_DEL_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  19881. WMI_DEL_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  19882. WMI_DEL_TWT_STATUS_UNKNOWN_ERROR, /* deleting TWT dialog failed with an unknown reason */
  19883. } WMI_DEL_TWT_STATUS_T;
  19884. typedef struct {
  19885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_del_dialog_complete_event_fixed_param */
  19886. A_UINT32 vdev_id; /* VDEV identifier */
  19887. A_UINT32 dialog_id; /* TWT dialog ID */
  19888. A_UINT32 status; /* refer to WMI_DEL_TWT_STATUS_T */
  19889. } wmi_twt_del_dialog_complete_event_fixed_param;
  19890. typedef struct {
  19891. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_cmd_fixed_param */
  19892. A_UINT32 vdev_id; /* VDEV identifier */
  19893. A_UINT32 dialog_id; /* TWT dialog ID */
  19894. } wmi_twt_pause_dialog_cmd_fixed_param;
  19895. /* status code of pausing TWT dialog */
  19896. typedef enum _WMI_PAUSE_TWT_STATUS_T {
  19897. WMI_PAUSE_TWT_STATUS_OK, /* pausing TWT dialog successfully completed */
  19898. WMI_PAUSE_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  19899. WMI_PAUSE_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  19900. WMI_PAUSE_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  19901. WMI_PAUSE_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  19902. WMI_PAUSE_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  19903. WMI_PAUSE_TWT_STATUS_UNKNOWN_ERROR, /* pausing TWT dialog failed with an unknown reason */
  19904. } WMI_PAUSE_TWT_STATUS_T;
  19905. typedef struct {
  19906. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_pause_dialog_complete_event_fixed_param */
  19907. A_UINT32 vdev_id; /* VDEV identifier */
  19908. A_UINT32 dialog_id; /* TWT dialog ID */
  19909. A_UINT32 status; /* refer to WMI_PAUSE_TWT_STATUS_T */
  19910. } wmi_twt_pause_dialog_complete_event_fixed_param;
  19911. typedef struct {
  19912. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param */
  19913. A_UINT32 vdev_id; /* VDEV identifier */
  19914. A_UINT32 dialog_id; /* TWT dialog ID */
  19915. A_UINT32 sp_offset_us; /* this long time after TWT resumed the 1st SP will start */
  19916. A_UINT32 next_twt_size; /* Next TWT subfield Size, refer to IEEE 802.11ax sectin "9.4.1.60 TWT Information field" */
  19917. } wmi_twt_resume_dialog_cmd_fixed_param;
  19918. /* status code of resuming TWT dialog */
  19919. typedef enum _WMI_RESUME_TWT_STATUS_T {
  19920. WMI_RESUME_TWT_STATUS_OK, /* resuming TWT dialog successfully completed */
  19921. WMI_RESUME_TWT_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */
  19922. WMI_RESUME_TWT_STATUS_INVALID_PARAM, /* invalid parameters */
  19923. WMI_RESUME_TWT_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */
  19924. WMI_RESUME_TWT_STATUS_NOT_PAUSED, /* dialog not paused currently */
  19925. WMI_RESUME_TWT_STATUS_NO_RESOURCE, /* FW resource exhausted */
  19926. WMI_RESUME_TWT_STATUS_NO_ACK, /* peer AP/STA did not ACK the request/response frame */
  19927. WMI_RESUME_TWT_STATUS_UNKNOWN_ERROR, /* resuming TWT dialog failed with an unknown reason */
  19928. } WMI_RESUME_TWT_STATUS_T;
  19929. typedef struct {
  19930. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param */
  19931. A_UINT32 vdev_id; /* VDEV identifier */
  19932. A_UINT32 dialog_id; /* TWT dialog ID */
  19933. A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */
  19934. } wmi_twt_resume_dialog_complete_event_fixed_param;
  19935. typedef enum {
  19936. WMI_DMA_RING_CONFIG_MODULE_SPECTRAL,
  19937. } WMI_DMA_RING_SUPPORTED_MODULE;
  19938. typedef struct {
  19939. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_DMA_RING_CAPABILITIES */
  19940. A_UINT32 pdev_id;
  19941. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  19942. A_UINT32 ring_elems_min; /* minimum spaces in the DMA ring for this pdev */
  19943. A_UINT32 min_buf_size; /* minimum size in bytes of each buffer in the DMA ring */
  19944. A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */
  19945. } WMI_DMA_RING_CAPABILITIES;
  19946. #define WMI_DMA_RING_PADDR_LO_S 0
  19947. #define WMI_DMA_RING_PADDR_LO 0xffffffff
  19948. #define WMI_DMA_RING_BASE_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  19949. #define WMI_DMA_RING_BASE_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  19950. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  19951. #define WMI_DMA_RING_HEAD_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  19952. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_LO)
  19953. #define WMI_DMA_RING_TAIL_IDX_PADDR_LO_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_LO)
  19954. #define WMI_DMA_RING_PADDR_HI_S 0
  19955. #define WMI_DMA_RING_PADDR_HI 0xffff
  19956. #define WMI_DMA_RING_BASE_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  19957. #define WMI_DMA_RING_BASE_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  19958. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  19959. #define WMI_DMA_RING_HEAD_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  19960. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_GET(dword) WMI_F_MS(dword, WMI_DMA_RING_PADDR_HI)
  19961. #define WMI_DMA_RING_TAIL_IDX_PADDR_HI_SET(dword, val) WMI_F_RMW(dword, val, WMI_DMA_RING_PADDR_HI)
  19962. typedef struct {
  19963. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_req_fixed_param */
  19964. A_UINT32 pdev_id;
  19965. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  19966. /**
  19967. * Bits 31:0: base address of ring [31:0]
  19968. */
  19969. A_UINT32 base_paddr_lo;
  19970. /**
  19971. * Bits 15:0: base address of ring [47:32]
  19972. * Bits 31:16: reserved (set to 0x0)
  19973. */
  19974. A_UINT32 base_paddr_hi;
  19975. /**
  19976. * Bits 31:0: address of head index [31:0]
  19977. */
  19978. A_UINT32 head_idx_paddr_lo;
  19979. /**
  19980. * Bits 15:0: address of head index [47:32]
  19981. * Bits 31:16: reserved (set to 0x0)
  19982. */
  19983. A_UINT32 head_idx_paddr_hi;
  19984. /**
  19985. * Bits 31:0: address of tail index [31:0]
  19986. */
  19987. A_UINT32 tail_idx_paddr_lo;
  19988. /**
  19989. * Bits 15:0: address of tail index [47:32]
  19990. * Bits 31:16: reserved (set to 0x0)
  19991. */
  19992. A_UINT32 tail_idx_paddr_hi;
  19993. A_UINT32 num_elems; /** Number of elems in the ring */
  19994. A_UINT32 buf_size; /** size of allocated buffer in bytes */
  19995. A_UINT32 num_resp_per_event; /** Number of wmi_dma_buf_release_entry packed together */
  19996. /**
  19997. * This parameter specifies the timeout in milliseconds.
  19998. * Target should timeout and send whatever resp it has if this time expires.
  19999. */
  20000. A_UINT32 event_timeout_ms;
  20001. } wmi_dma_ring_cfg_req_fixed_param;
  20002. typedef struct {
  20003. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_ring_cfg_rsp_fixed_param */
  20004. A_UINT32 pdev_id;
  20005. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20006. A_UINT32 cfg_status; /** Configuration status; see A_STATUS */
  20007. } wmi_dma_ring_cfg_rsp_fixed_param;
  20008. typedef struct {
  20009. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_fixed_param */
  20010. A_UINT32 pdev_id; /** ID of pdev whose DMA ring produced the data */
  20011. A_UINT32 mod_id; /* see WMI_DMA_RING_SUPPORTED_MODULE */
  20012. A_UINT32 num_buf_release_entry;
  20013. /* This TLV is followed by another TLV of array of structs.
  20014. * wmi_dma_buf_release_entry entries;
  20015. */
  20016. } wmi_dma_buf_release_fixed_param;
  20017. typedef struct {
  20018. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dma_buf_release_entry */
  20019. /**
  20020. * Bits 31:0: address of data [31:0]
  20021. */
  20022. A_UINT32 paddr_lo;
  20023. /**
  20024. * Bits 15:0: address of data [47:32]
  20025. * Bits 31:16: reserved
  20026. */
  20027. A_UINT32 paddr_hi;
  20028. } wmi_dma_buf_release_entry;
  20029. typedef struct {
  20030. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_runtime_dpd_recal_cmd_fixed_param */
  20031. A_UINT32 enable; /* Enable/disable */
  20032. /* Thermal Thresholds,
  20033. * DPD recalibration will be triggered, when current temperature is
  20034. * either greater than (tmpt_base_c + dlt_tmpt_c_h),
  20035. * or less than (tmpt_base_c + dlt_tmpt_c_l).
  20036. * Here tmpt_base_c is the temperature in centigrade when first run dpd calibration.
  20037. */
  20038. A_UINT32 dlt_tmpt_c_h;
  20039. A_UINT32 dlt_tmpt_c_l;
  20040. /* cooling_time_ms
  20041. * The time (in milliseconds) expected to be needed for the unit
  20042. * to cool from dlt_tmpt_c_h to dlt_tmpt_c_l.
  20043. */
  20044. A_UINT32 cooling_time_ms;
  20045. /* Max duration for dpd re-cal. Unit: ms */
  20046. A_UINT32 dpd_dur_max_ms;
  20047. } wmi_runtime_dpd_recal_cmd_fixed_param;
  20048. typedef enum {
  20049. WMI_ROAM_TRIGGER_REASON_NONE = 0,
  20050. WMI_ROAM_TRIGGER_REASON_PER,
  20051. WMI_ROAM_TRIGGER_REASON_BMISS,
  20052. WMI_ROAM_TRIGGER_REASON_LOW_RSSI,
  20053. WMI_ROAM_TRIGGER_REASON_HIGH_RSSI,
  20054. WMI_ROAM_TRIGGER_REASON_PERIODIC,
  20055. WMI_ROAM_TRIGGER_REASON_MAWC,
  20056. WMI_ROAM_TRIGGER_REASON_DENSE,
  20057. WMI_ROAM_TRIGGER_REASON_BACKGROUND,
  20058. WMI_ROAM_TRIGGER_REASON_FORCED,
  20059. WMI_ROAM_TRIGGER_REASON_BTM,
  20060. WMI_ROAM_TRIGGER_REASON_UNIT_TEST,
  20061. WMI_ROAM_TRIGGER_REASON_MAX,
  20062. } WMI_ROAM_TRIGGER_REASON_ID;
  20063. /* value for DENSE roam trigger */
  20064. #define WMI_RX_TRAFFIC_ABOVE_THRESHOLD 0x1
  20065. #define WMI_TX_TRAFFIC_ABOVE_THRESHOLD 0x2
  20066. typedef struct {
  20067. A_UINT32 trigger_id; /* id from WMI_ROAM_TRIGGER_REASON_ID */
  20068. /* interpretation of trigger value is as follows, for different trigger IDs
  20069. * ID = PER -> value = PER percentage
  20070. * ID = LOW_RSSI -> value = rssi in dB wrt noise floor,
  20071. * ID = HIGH_RSSI -> value = rssi in dB wrt to noise floor,
  20072. * ID = DENSE -> value = specification if it is tx or rx traffic threshold,
  20073. * (see WMI_[RX,TX]_TRAFFIC_ABOVE_THRESHOLD)
  20074. * ID = PERIODIC -> value = periodicity in ms
  20075. *
  20076. * for other IDs trigger_value would be 0 (invalid)
  20077. */
  20078. A_UINT32 trigger_value;
  20079. } wmi_roam_scan_trigger_reason;
  20080. typedef struct {
  20081. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_roam_scan_stats_cmd_fixed_param */
  20082. A_UINT32 vdev_id;
  20083. } wmi_request_roam_scan_stats_cmd_fixed_param;
  20084. typedef struct {
  20085. /*
  20086. * The timestamp is in units of ticks of a 19.2MHz clock.
  20087. * The timestamp is taken at roam scan start.
  20088. */
  20089. A_UINT32 lower32bit;
  20090. A_UINT32 upper32bit;
  20091. } wmi_roaming_timestamp;
  20092. typedef struct {
  20093. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param */
  20094. A_UINT32 vdev_id;
  20095. /* number of roam scans */
  20096. A_UINT32 num_roam_scans;
  20097. /* This TLV is followed by TLV's:
  20098. * A_UINT32 client_id[num_roam_scans]; based on WMI_SCAN_CLIENT_ID
  20099. * wmi_roaming_timestamp timestamp[num_roam_scans]; clock ticks at the time of scan start
  20100. * A_UINT32 num_channels[num_roam_scans]; number of channels that are scanned
  20101. * A_UINT32 chan_info[]; channel frequencies (MHz) in each scan
  20102. * The num_channels[] elements specify how many elements there are
  20103. * within chan_info[] for each scan.
  20104. * For example, if num_channels = [2, 3] then chan_info will have 5
  20105. * elements, with the first 2 elements from the first scan, and
  20106. * the last 3 elements from the second scan.
  20107. * wmi_mac_addr old_bssid[num_roam_scans]; bssid we are connected to at the time of roaming
  20108. * A_UINT32 is_roaming_success[num_roam_scans]; value is 1 if roaming is successful, 0 if roaming failed
  20109. * wmi_mac_addr new_bssid[num_roam_scans]; bssid after roaming
  20110. * A_UINT32 num_of_roam_candidates[num_roam_scans]; number of candidates found in each roam scan
  20111. * roam_scan_trigger_reason roam_reason[num_roam_scans]; reason for each roam scan
  20112. * wmi_mac_addr bssid[]; bssids of candidates in each roam scan
  20113. * The num_of_roam_candidates[] elements specify how many elements
  20114. * there are within bssid[] for each scan.
  20115. * For example, if num_of_roam_candidates = [2, 3] then bssid will
  20116. * have 5 elements, with the first 2 elements from the first scan,
  20117. * and the last 3 elements from the second scan.
  20118. * A_UINT32 score[]; score of candidates in each roam scan
  20119. * The num_of_roam_candidates[] elements specify how many elements
  20120. * there are within score[] for each scan.
  20121. * For example, if num_of_roam_candidates = [2, 3] then score will
  20122. * have 5 elements, with the first 2 elements from the first scan,
  20123. * and the last 3 elements from the second scan.
  20124. * A_UINT32 channel[]; channel frequency (MHz) of candidates in each roam scan
  20125. * The num_of_roam_candidates[] elements specify how many elements
  20126. * there are within channel[] for each scan.
  20127. * For example, if num_of_roam_candidates = [2, 3] then channel will
  20128. * have 5 elements, with the first 2 elements from the first scan,
  20129. * and the last 3 elements from the second scan.
  20130. * A_UINT32 rssi[]; rssi in dB w.r.t. noise floor of candidates
  20131. * in each roam scan.
  20132. * The num_of_roam_candidates[] elements specify how many elements
  20133. * there are within rssi[] for each scan.
  20134. * For example, if num_of_roam_candidates = [2, 3] then rssi will
  20135. * have 5 elements, with the first 2 elements from the first scan,
  20136. * and the last 3 elements from the second scan.
  20137. */
  20138. } wmi_roam_scan_stats_event_fixed_param;
  20139. typedef struct {
  20140. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_txpower_query_cmd_fixed_param */
  20141. A_UINT32 request_id; /* unique request ID to distinguish the command / event set */
  20142. /* The mode value has the following meaning :
  20143. * 0 : 11a
  20144. * 1 : 11bg
  20145. * 2 : 11b
  20146. * 3 : 11g only
  20147. * 4 : 11a HT20
  20148. * 5 : 11g HT20
  20149. * 6 : 11a HT40
  20150. * 7 : 11g HT40
  20151. * 8 : 11a VHT20
  20152. * 9 : 11a VHT40
  20153. * 10 : 11a VHT80
  20154. * 11 : 11g VHT20
  20155. * 12 : 11g VHT40
  20156. * 13 : 11g VHT80
  20157. * 14 : unknown
  20158. */
  20159. A_UINT32 mode;
  20160. A_UINT32 rate; /* rate index */
  20161. A_UINT32 nss; /* number of spacial stream */
  20162. A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */
  20163. A_UINT32 chain_mask; /* mask for the antenna set to get power */
  20164. A_UINT32 chain_index; /* index for the antenna */
  20165. } wmi_get_tpc_power_cmd_fixed_param;
  20166. typedef struct {
  20167. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param */
  20168. A_UINT32 request_id; /* request ID set by the command */
  20169. A_INT32 tx_power; /* TX power for the specified HALPHY parameters in half dBm unit */
  20170. } wmi_get_tpc_power_evt_fixed_param;
  20171. /* ADD NEW DEFS HERE */
  20172. /*****************************************************************************
  20173. * The following structures are deprecated. DO NOT USE THEM!
  20174. */
  20175. /** Max number of channels in the schedule. */
  20176. #define OCB_CHANNEL_MAX (5)
  20177. /* NOTE: Make sure these data structures are identical to those
  20178. * defined in sirApi.h */
  20179. typedef struct
  20180. {
  20181. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  20182. A_UINT32 aifsn;
  20183. /** Contention Window minimum. Range: 1 - 10 */
  20184. A_UINT32 cwmin;
  20185. /** Contention Window maximum. Range: 1 - 10 */
  20186. A_UINT32 cwmax;
  20187. } wmi_qos_params_t;
  20188. typedef struct
  20189. {
  20190. /** Channel frequency in MHz */
  20191. A_UINT32 chan_freq;
  20192. /** Channel duration in ms */
  20193. A_UINT32 duration;
  20194. /** Start guard interval in ms */
  20195. A_UINT32 start_guard_interval;
  20196. /** End guard interval in ms */
  20197. A_UINT32 end_guard_interval;
  20198. /** Transmit power in dBm, range 0 - 23 */
  20199. A_UINT32 tx_power;
  20200. /** Transmit datarate in Mbps */
  20201. A_UINT32 tx_rate;
  20202. /** QoS parameters for each AC */
  20203. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  20204. /** 1 to enable RX stats for this channel, 0 otherwise */
  20205. A_UINT32 rx_stats;
  20206. } wmi_ocb_channel_t;
  20207. typedef struct {
  20208. /** TLV tag and len; tag equals
  20209. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  20210. A_UINT32 tlv_header;
  20211. /* VDEV identifier */
  20212. A_UINT32 vdev_id;
  20213. /** Number of valid channels in the channels array */
  20214. A_UINT32 num_channels;
  20215. /** The array of channels */
  20216. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  20217. /** 1 to allow off-channel tx, 0 otherwise */
  20218. A_UINT32 off_channel_tx; /* Not supported */
  20219. } wmi_ocb_set_sched_cmd_fixed_param;
  20220. typedef struct {
  20221. /** Return status. 0 for success, non-zero otherwise */
  20222. A_UINT32 status;
  20223. } wmi_ocb_set_sched_event_fixed_param;
  20224. /*****************************************************************************
  20225. * END DEPRECATED
  20226. */
  20227. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  20228. #ifdef __cplusplus
  20229. }
  20230. #endif
  20231. #endif /*_WMI_UNIFIED_H_*/
  20232. /**@}*/