wmi_unified.h 631 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053
  1. /*
  2. * Copyright (c) 2013-2016 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. static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
  109. A_UINT32 entry_index, A_UINT32 bits_per_entry)
  110. {
  111. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  112. A_UINT32 uint_index = (entry_index / entries_per_uint);
  113. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  114. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  115. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  116. return (arr[uint_index] >> start_bit_in_uint) &
  117. ((1 << bits_per_entry) - 1);
  118. }
  119. static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
  120. A_UINT32 bits_per_entry, A_UINT32 val)
  121. {
  122. A_UINT32 entries_per_uint = (32 / bits_per_entry);
  123. A_UINT32 uint_index = (entry_index / entries_per_uint);
  124. A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
  125. A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
  126. A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
  127. arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
  128. arr[uint_index] |=
  129. ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
  130. }
  131. /** 2 word representation of MAC addr */
  132. typedef struct {
  133. /** upper 4 bytes of MAC address */
  134. A_UINT32 mac_addr31to0;
  135. /** lower 2 bytes of MAC address */
  136. A_UINT32 mac_addr47to32;
  137. } wmi_mac_addr;
  138. /** macro to convert MAC address from WMI word format to char array */
  139. #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \
  140. (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \
  141. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  142. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  143. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  144. (c_macaddr)[4] = (((pwmi_mac_addr)->mac_addr47to32) >> 0) & 0xff; \
  145. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  146. } while (0)
  147. /** macro to convert MAC address from char array to WMI word format */
  148. #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \
  149. (pwmi_mac_addr)->mac_addr31to0 = \
  150. (((c_macaddr)[0] << 0) | \
  151. ((c_macaddr)[1] << 8) | \
  152. ((c_macaddr)[2] << 16) | \
  153. ((c_macaddr)[3] << 24)); \
  154. (pwmi_mac_addr)->mac_addr47to32 = ((c_macaddr)[4] | ((c_macaddr)[5] << 8));\
  155. } while (0)
  156. /*
  157. * wmi command groups.
  158. */
  159. typedef enum {
  160. /* 0 to 2 are reserved */
  161. WMI_GRP_START = 0x3,
  162. WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
  163. WMI_GRP_PDEV, /* 0x4 */
  164. WMI_GRP_VDEV, /* 0x5 */
  165. WMI_GRP_PEER, /* 0x6 */
  166. WMI_GRP_MGMT, /* 0x7 */
  167. WMI_GRP_BA_NEG, /* 0x8 */
  168. WMI_GRP_STA_PS, /* 0x9 */
  169. WMI_GRP_DFS, /* 0xa */
  170. WMI_GRP_ROAM, /* 0xb */
  171. WMI_GRP_OFL_SCAN, /* 0xc */
  172. WMI_GRP_P2P, /* 0xd */
  173. WMI_GRP_AP_PS, /* 0xe */
  174. WMI_GRP_RATE_CTRL, /* 0xf */
  175. WMI_GRP_PROFILE, /* 0x10 */
  176. WMI_GRP_SUSPEND, /* 0x11 */
  177. WMI_GRP_BCN_FILTER, /* 0x12 */
  178. WMI_GRP_WOW, /* 0x13 */
  179. WMI_GRP_RTT, /* 0x14 */
  180. WMI_GRP_SPECTRAL, /* 0x15 */
  181. WMI_GRP_STATS, /* 0x16 */
  182. WMI_GRP_ARP_NS_OFL, /* 0x17 */
  183. WMI_GRP_NLO_OFL, /* 0x18 */
  184. WMI_GRP_GTK_OFL, /* 0x19 */
  185. WMI_GRP_CSA_OFL, /* 0x1a */
  186. WMI_GRP_CHATTER, /* 0x1b */
  187. WMI_GRP_TID_ADDBA, /* 0x1c */
  188. WMI_GRP_MISC, /* 0x1d */
  189. WMI_GRP_GPIO, /* 0x1e */
  190. WMI_GRP_FWTEST, /* 0x1f */
  191. WMI_GRP_TDLS, /* 0x20 */
  192. WMI_GRP_RESMGR, /* 0x21 */
  193. WMI_GRP_STA_SMPS, /* 0x22 */
  194. WMI_GRP_WLAN_HB, /* 0x23 */
  195. WMI_GRP_RMC, /* 0x24 */
  196. WMI_GRP_MHF_OFL, /* 0x25 */
  197. WMI_GRP_LOCATION_SCAN, /* 0x26 */
  198. WMI_GRP_OEM, /* 0x27 */
  199. WMI_GRP_NAN, /* 0x28 */
  200. WMI_GRP_COEX, /* 0x29 */
  201. WMI_GRP_OBSS_OFL, /* 0x2a */
  202. WMI_GRP_LPI, /* 0x2b */
  203. WMI_GRP_EXTSCAN, /* 0x2c */
  204. WMI_GRP_DHCP_OFL, /* 0x2d */
  205. WMI_GRP_IPA, /* 0x2e */
  206. WMI_GRP_MDNS_OFL, /* 0x2f */
  207. WMI_GRP_SAP_OFL, /* 0x30 */
  208. WMI_GRP_OCB, /* 0x31 */
  209. WMI_GRP_SOC, /* 0x32 */
  210. WMI_GRP_PKT_FILTER, /* 0x33 */
  211. WMI_GRP_MAWC, /* 0x34 */
  212. WMI_GRP_PMF_OFFLOAD, /* 0x35 */
  213. WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
  214. WMI_GRP_NAN_DATA, /* 0x37 */
  215. WMI_GRP_PROTOTYPE, /* 0x38 */
  216. WMI_GRP_MONITOR, /* 0x39 */
  217. } WMI_GRP_ID;
  218. #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  219. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  220. /**
  221. * Command IDs and commange events
  222. */
  223. typedef enum {
  224. /** initialize the wlan sub system */
  225. WMI_INIT_CMDID = 0x1,
  226. /* Scan specific commands */
  227. /** start scan request to FW */
  228. WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
  229. /** stop scan request to FW */
  230. WMI_STOP_SCAN_CMDID,
  231. /** full list of channels as defined by the regulatory that will be used by scanner */
  232. WMI_SCAN_CHAN_LIST_CMDID,
  233. /** overwrite default priority table in scan scheduler */
  234. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  235. /** This command to adjust the priority and min.max_rest_time
  236. * of an on ongoing scan request.
  237. */
  238. WMI_SCAN_UPDATE_REQUEST_CMDID,
  239. /** set OUI to be used in probe request if enabled */
  240. WMI_SCAN_PROB_REQ_OUI_CMDID,
  241. /** config adaptive dwell scan */
  242. WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
  243. /* PDEV(physical device) specific commands */
  244. /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
  245. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
  246. /** set channel. mainly used for supporting monitor mode */
  247. WMI_PDEV_SET_CHANNEL_CMDID,
  248. /** set pdev specific parameters */
  249. WMI_PDEV_SET_PARAM_CMDID,
  250. /** enable packet log */
  251. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  252. /** disable packet log*/
  253. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  254. /** set wmm parameters */
  255. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  256. /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
  257. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  258. /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
  259. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  260. /** Command to send the DSCP-to-TID map to the target */
  261. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  262. /** set quiet ie parameters. primarily used in AP mode */
  263. WMI_PDEV_SET_QUIET_MODE_CMDID,
  264. /** Enable/Disable Green AP Power Save */
  265. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  266. /** get TPC config for the current operating channel */
  267. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  268. /** set the base MAC address for the physical device before a VDEV is created.
  269. * For firmware that doesn't support this feature and this command, the pdev
  270. * MAC address will not be changed. */
  271. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  272. /* eeprom content dump , the same to bdboard data */
  273. WMI_PDEV_DUMP_CMDID,
  274. /* set LED configuration */
  275. WMI_PDEV_SET_LED_CONFIG_CMDID,
  276. /* Get Current temprature of chip in Celcius degree*/
  277. WMI_PDEV_GET_TEMPERATURE_CMDID,
  278. /* Set LED flashing behavior */
  279. WMI_PDEV_SET_LED_FLASHING_CMDID,
  280. /** Enable/Disable Smart Antenna */
  281. WMI_PDEV_SMART_ANT_ENABLE_CMDID,
  282. /** Set Smart Antenna RX antenna*/
  283. WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  284. /** Override the antenna switch table */
  285. WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  286. /** Override the CTL table */
  287. WMI_PDEV_SET_CTL_TABLE_CMDID,
  288. /** Override the array gain table */
  289. WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  290. /** FIPS test mode command */
  291. WMI_PDEV_FIPS_CMDID,
  292. /** get CCK ANI level */
  293. WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  294. /** get OFDM ANI level */
  295. WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  296. /** NF Cal Power dBr/dBm */
  297. WMI_PDEV_GET_NFCAL_POWER_CMDID,
  298. /** TxPPDU TPC */
  299. WMI_PDEV_GET_TPC_CMDID,
  300. /** Set to enable MIB stats collection */
  301. WMI_MIB_STATS_ENABLE_CMDID,
  302. /** Set preferred channel list for DBS Mgr */
  303. WMI_PDEV_SET_PCL_CMDID,
  304. /** Set HW mode. Eg: single MAC, DBS & SBS, see soc_hw_mode_t for values */
  305. WMI_PDEV_SET_HW_MODE_CMDID,
  306. /** Set DFS, SCAN modes and other FW configurations */
  307. WMI_PDEV_SET_MAC_CONFIG_CMDID,
  308. /** Set per band and per pdev antenna chains */
  309. WMI_PDEV_SET_ANTENNA_MODE_CMDID,
  310. /** Periodic channel stats request command */
  311. WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
  312. /** WMI command for power debug framework */
  313. WMI_PDEV_WAL_POWER_DEBUG_CMDID,
  314. /** set per-AC rx reorder timeouts */
  315. WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
  316. /** WMI command for WOW gpio and type */
  317. WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
  318. /* Get current ANT's per chain's RSSI info */
  319. WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
  320. /** WMI command for getting Chip Power Stats */
  321. WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
  322. /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
  323. WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
  324. /* VDEV (virtual device) specific commands */
  325. /** vdev create */
  326. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
  327. /** vdev delete */
  328. WMI_VDEV_DELETE_CMDID,
  329. /** vdev start request */
  330. WMI_VDEV_START_REQUEST_CMDID,
  331. /** vdev restart request (RX only, NO TX, used for CAC period)*/
  332. WMI_VDEV_RESTART_REQUEST_CMDID,
  333. /** vdev up request */
  334. WMI_VDEV_UP_CMDID,
  335. /** vdev stop request */
  336. WMI_VDEV_STOP_CMDID,
  337. /** vdev down request */
  338. WMI_VDEV_DOWN_CMDID,
  339. /* set a vdev param */
  340. WMI_VDEV_SET_PARAM_CMDID,
  341. /* set a key (used for setting per peer unicast and per vdev multicast) */
  342. WMI_VDEV_INSTALL_KEY_CMDID,
  343. /* wnm sleep mode command */
  344. WMI_VDEV_WNM_SLEEPMODE_CMDID,
  345. WMI_VDEV_WMM_ADDTS_CMDID,
  346. WMI_VDEV_WMM_DELTS_CMDID,
  347. WMI_VDEV_SET_WMM_PARAMS_CMDID,
  348. WMI_VDEV_SET_GTX_PARAMS_CMDID,
  349. WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
  350. WMI_VDEV_PLMREQ_START_CMDID,
  351. WMI_VDEV_PLMREQ_STOP_CMDID,
  352. /* TSF timestamp action for specified vdev */
  353. WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
  354. /** set the additional IEs in probe requests for scan or
  355. * assoc req etc for frames FW locally generates */
  356. WMI_VDEV_SET_IE_CMDID,
  357. WMI_VDEV_RATEMASK_CMDID,
  358. /** ATF VDEV REQUEST commands. */
  359. WMI_VDEV_ATF_REQUEST_CMDID,
  360. /** Command to send the DSCP-to-TID map to the target for VAP */
  361. WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
  362. /* Configure filter for Neighbor Rx Pkt (smart mesh selective listening) */
  363. WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  364. /** set quiet ie parameters. primarily used in AP mode */
  365. WMI_VDEV_SET_QUIET_MODE_CMDID,
  366. /** To set custom aggregation size for per vdev */
  367. WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
  368. /* peer specific commands */
  369. /** create a peer */
  370. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
  371. /** delete a peer */
  372. WMI_PEER_DELETE_CMDID,
  373. /** flush specific tid queues of a peer */
  374. WMI_PEER_FLUSH_TIDS_CMDID,
  375. /** set a parameter of a peer */
  376. WMI_PEER_SET_PARAM_CMDID,
  377. /** set peer to associated state. will cary all parameters determined during assocication time */
  378. WMI_PEER_ASSOC_CMDID,
  379. /**add a wds (4 address) entry. used only for testing WDS feature on AP products */
  380. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  381. /**remove wds (4 address) entry. used only for testing WDS feature on AP products */
  382. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  383. /** set up mcast group infor for multicast to unicast conversion */
  384. WMI_PEER_MCAST_GROUP_CMDID,
  385. /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
  386. WMI_PEER_INFO_REQ_CMDID,
  387. /** request the estimated link speed for the peer. FW shall respond with
  388. * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
  389. */
  390. WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
  391. /** Set the conditions to report peer justified rate to driver
  392. * The justified rate means the the user-rate is justified by PER.
  393. */
  394. WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
  395. /** update a wds (4 address) entry */
  396. WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
  397. /** add a proxy sta entry */
  398. WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  399. /** Set Smart Antenna TX antenna */
  400. WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  401. /** Set Smart Antenna TX train info */
  402. WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  403. /** Set SA node config options */
  404. WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  405. /** ATF PEER REQUEST commands */
  406. WMI_PEER_ATF_REQUEST_CMDID,
  407. /** bandwidth fairness (BWF) peer configuration request command */
  408. WMI_PEER_BWF_REQUEST_CMDID,
  409. /** rx reorder queue setup for peer/tid */
  410. WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  411. /** rx reorder queue remove for peer/tid */
  412. WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
  413. /** specify a limit for rx A-MPDU block size */
  414. WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
  415. /** request peer antdiv info from FW. FW shall respond with PEER_ANTDIV_INFO_EVENTID */
  416. WMI_PEER_ANTDIV_INFO_REQ_CMDID,
  417. /* beacon/management specific commands */
  418. /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
  419. WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
  420. /** transmit beacon by value */
  421. WMI_PDEV_SEND_BCN_CMDID,
  422. /** set the beacon template. used in beacon offload mode to setup the
  423. * the common beacon template with the FW to be used by FW to generate beacons */
  424. WMI_BCN_TMPL_CMDID,
  425. /** set beacon filter with FW */
  426. WMI_BCN_FILTER_RX_CMDID,
  427. /* enable/disable filtering of probe requests in the firmware */
  428. WMI_PRB_REQ_FILTER_RX_CMDID,
  429. /** transmit management frame by value. will be deprecated */
  430. WMI_MGMT_TX_CMDID,
  431. /** set the probe response template. used in beacon offload mode to setup the
  432. * the common probe response template with the FW to be used by FW to generate
  433. * probe responses */
  434. WMI_PRB_TMPL_CMDID,
  435. /** Transmit Mgmt frame by reference */
  436. WMI_MGMT_TX_SEND_CMDID,
  437. /** commands to directly control ba negotiation directly from host. only used in test mode */
  438. /** turn off FW Auto addba mode and let host control addba */
  439. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
  440. /** send add ba request */
  441. WMI_ADDBA_SEND_CMDID,
  442. WMI_ADDBA_STATUS_CMDID,
  443. /** send del ba */
  444. WMI_DELBA_SEND_CMDID,
  445. /** set add ba response will be used by FW to generate addba response*/
  446. WMI_ADDBA_SET_RESP_CMDID,
  447. /** send single VHT MPDU with AMSDU */
  448. WMI_SEND_SINGLEAMSDU_CMDID,
  449. /** Station power save specific config */
  450. /** enable/disable station powersave */
  451. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
  452. /** set station power save specific parameter */
  453. WMI_STA_POWERSAVE_PARAM_CMDID,
  454. /** set station mimo powersave mode */
  455. WMI_STA_MIMO_PS_MODE_CMDID,
  456. /** DFS-specific commands */
  457. /** enable DFS (radar detection)*/
  458. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
  459. /** disable DFS (radar detection)*/
  460. WMI_PDEV_DFS_DISABLE_CMDID,
  461. /** enable DFS phyerr/parse filter offload */
  462. WMI_DFS_PHYERR_FILTER_ENA_CMDID,
  463. /** enable DFS phyerr/parse filter offload */
  464. WMI_DFS_PHYERR_FILTER_DIS_CMDID,
  465. /* Roaming specific commands */
  466. /** set roam scan mode */
  467. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
  468. /** set roam scan rssi threshold below which roam scan is enabled */
  469. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  470. /** set roam scan period for periodic roam scan mode */
  471. WMI_ROAM_SCAN_PERIOD,
  472. /** set roam scan trigger rssi change threshold */
  473. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  474. /** set roam AP profile */
  475. WMI_ROAM_AP_PROFILE,
  476. /** set channel list for roam scans */
  477. WMI_ROAM_CHAN_LIST,
  478. /** Stop scan command */
  479. WMI_ROAM_SCAN_CMD,
  480. /** roaming sme offload sync complete */
  481. WMI_ROAM_SYNCH_COMPLETE,
  482. /** set ric request element for 11r roaming */
  483. WMI_ROAM_SET_RIC_REQUEST_CMDID,
  484. /** Invoke roaming forcefully */
  485. WMI_ROAM_INVOKE_CMDID,
  486. /** roaming filter cmd to allow further filtering of roaming candidate */
  487. WMI_ROAM_FILTER_CMDID,
  488. /** set gateway ip, mac and retries for subnet change detection */
  489. WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
  490. /** configure thresholds for MAWC */
  491. WMI_ROAM_CONFIGURE_MAWC_CMDID,
  492. /** configure MultiBand Operation(refer WFA MBO spec) parameter */
  493. WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
  494. /** offload scan specific commands */
  495. /** set offload scan AP profile */
  496. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
  497. /** remove offload scan AP profile */
  498. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  499. /** set offload scan period */
  500. WMI_OFL_SCAN_PERIOD,
  501. /* P2P specific commands */
  502. /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
  503. * generated during p2p listen and for p2p discoverability */
  504. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
  505. /** enable/disable p2p discoverability on STA/AP VDEVs */
  506. WMI_P2P_DEV_SET_DISCOVERABILITY,
  507. /** set p2p ie to be carried in beacons generated by FW for GO */
  508. WMI_P2P_GO_SET_BEACON_IE,
  509. /** set p2p ie to be carried in probe response frames generated by FW for GO */
  510. WMI_P2P_GO_SET_PROBE_RESP_IE,
  511. /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
  512. * attribute in the beacons/probe responses received.
  513. * Note: This command is currently used only for Apple P2P implementation.
  514. */
  515. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  516. /** set the configure of p2p find offload */
  517. WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
  518. /** set the vendor specific p2p ie data for p2p find offload using */
  519. WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
  520. /** set the BSSID/device name pattern of p2p find offload */
  521. WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
  522. /** set OppPS related parameters **/
  523. WMI_P2P_SET_OPPPS_PARAM_CMDID,
  524. /** set listen offload start related parameters */
  525. WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
  526. /** set listen offload stop related parameters */
  527. WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
  528. /** AP power save specific config */
  529. /** set AP power save specific param */
  530. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
  531. /** set AP UAPSD coex pecific param */
  532. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  533. /** set Enhanced Green AP param */
  534. WMI_AP_PS_EGAP_PARAM_CMDID,
  535. /** Rate-control specific commands */
  536. WMI_PEER_RATE_RETRY_SCHED_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
  537. /** WLAN Profiling commands. */
  538. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
  539. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  540. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  541. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  542. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  543. /** Suspend resume command Ids */
  544. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
  545. WMI_PDEV_RESUME_CMDID,
  546. /* Beacon filter commands */
  547. /** add a beacon filter */
  548. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
  549. /** remove a beacon filter */
  550. WMI_RMV_BCN_FILTER_CMDID,
  551. /* WOW Specific WMI commands*/
  552. /** add pattern for awake */
  553. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
  554. /** deleta a wake pattern */
  555. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  556. /** enable/deisable wake event */
  557. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  558. /** enable WOW */
  559. WMI_WOW_ENABLE_CMDID,
  560. /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
  561. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  562. /* IOAC add keep alive cmd. */
  563. WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
  564. /* IOAC del keep alive cmd. */
  565. WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
  566. /* IOAC add pattern for awake */
  567. WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
  568. /* IOAC deleta a wake pattern */
  569. WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
  570. /* D0-WOW enable or disable cmd */
  571. WMI_D0_WOW_ENABLE_DISABLE_CMDID,
  572. /* enable extend WoW */
  573. WMI_EXTWOW_ENABLE_CMDID,
  574. /* Extend WoW command to configure app type1 parameter */
  575. WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
  576. /* Extend WoW command to configure app type2 parameter */
  577. WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
  578. /* enable ICMPv6 Network advertisement filtering */
  579. WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
  580. /*
  581. * Set a pattern to match UDP packet in WOW mode.
  582. * If match, construct a tx frame in a local buffer
  583. * to send through the peer AP to the entity in the
  584. * IP network that sent the UDP packet to this STA.
  585. */
  586. WMI_WOW_UDP_SVC_OFLD_CMDID,
  587. /* configure WOW host wakeup PIN pattern */
  588. WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
  589. /* Set which action category should wake the host from suspend */
  590. WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
  591. /* RTT measurement related cmd */
  592. /** request to make an RTT measurement */
  593. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
  594. /** request to report a tsf measurement */
  595. WMI_RTT_TSF_CMDID,
  596. /** spectral scan command */
  597. /** configure spectral scan */
  598. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
  599. /** enable/disable spectral scan and trigger */
  600. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  601. /* F/W stats */
  602. /** one time request for stats */
  603. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
  604. /** Push MCC Adaptive Scheduler Stats to Firmware */
  605. WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
  606. /** one time request for txrx stats */
  607. WMI_REQUEST_STATS_EXT_CMDID,
  608. /* Link Layer stats */
  609. /** Request for link layer stats */
  610. WMI_REQUEST_LINK_STATS_CMDID,
  611. /** Request for setting params to link layer stats */
  612. WMI_START_LINK_STATS_CMDID,
  613. /** Request to clear stats*/
  614. WMI_CLEAR_LINK_STATS_CMDID,
  615. /** Request for getting the Firmware Memory Dump */
  616. WMI_GET_FW_MEM_DUMP_CMDID,
  617. /** Request to flush of the buffered debug messages */
  618. WMI_DEBUG_MESG_FLUSH_CMDID,
  619. /** Cmd to configure the verbose level */
  620. WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
  621. /** One time request for wlan stats */
  622. WMI_REQUEST_WLAN_STATS_CMDID,
  623. /** ARP OFFLOAD REQUEST*/
  624. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
  625. /** Proactive ARP Response Add Pattern Command*/
  626. WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  627. /** Proactive ARP Response Del Pattern Command*/
  628. WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
  629. /** NS offload confid*/
  630. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
  631. /** APFIND Config */
  632. WMI_APFIND_CMDID,
  633. /** Passpoint list config */
  634. WMI_PASSPOINT_LIST_CONFIG_CMDID,
  635. /** configure supprssing parameters for MAWC */
  636. WMI_NLO_CONFIGURE_MAWC_CMDID,
  637. /* GTK offload Specific WMI commands*/
  638. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
  639. /* CSA offload Specific WMI commands*/
  640. /** csa offload enable */
  641. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
  642. /** chan switch command */
  643. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  644. /* Chatter commands*/
  645. /* Change chatter mode of operation */
  646. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
  647. /** chatter add coalescing filter command */
  648. WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
  649. /** chatter delete coalescing filter command */
  650. WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
  651. /** chatter coalecing query command */
  652. WMI_CHATTER_COALESCING_QUERY_CMDID,
  653. /**addba specific commands */
  654. /** start the aggregation on this TID */
  655. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
  656. /** stop the aggregation on this TID */
  657. WMI_PEER_TID_DELBA_CMDID,
  658. /** set station mimo powersave method */
  659. WMI_STA_DTIM_PS_METHOD_CMDID,
  660. /** Configure the Station UAPSD AC Auto Trigger Parameters */
  661. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  662. /** Configure the Keep Alive Parameters */
  663. WMI_STA_KEEPALIVE_CMDID,
  664. /* Request ssn from target for a sta/tid pair */
  665. WMI_BA_REQ_SSN_CMDID,
  666. /* misc command group */
  667. /** echo command mainly used for testing */
  668. WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
  669. /* !!IMPORTANT!!
  670. * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
  671. * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
  672. * as we MUST have a fixed value here to maintain compatibility between
  673. * UTF and the ART2 driver
  674. */
  675. /** UTF WMI commands */
  676. WMI_PDEV_UTF_CMDID,
  677. /** set debug log config */
  678. WMI_DBGLOG_CFG_CMDID,
  679. /* QVIT specific command id */
  680. WMI_PDEV_QVIT_CMDID,
  681. /* Factory Testing Mode request command
  682. * used for integrated chipsets */
  683. WMI_PDEV_FTM_INTG_CMDID,
  684. /* set and get keepalive parameters command */
  685. WMI_VDEV_SET_KEEPALIVE_CMDID,
  686. WMI_VDEV_GET_KEEPALIVE_CMDID,
  687. /* For fw recovery test command */
  688. WMI_FORCE_FW_HANG_CMDID,
  689. /* Set Mcast/Bdcast filter */
  690. WMI_SET_MCASTBCAST_FILTER_CMDID,
  691. /** set thermal management params **/
  692. WMI_THERMAL_MGMT_CMDID,
  693. /** set host auto shutdown params **/
  694. WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
  695. /** set tpc chainmask config command */
  696. WMI_TPC_CHAINMASK_CONFIG_CMDID,
  697. /** set Antenna diversity command */
  698. WMI_SET_ANTENNA_DIVERSITY_CMDID,
  699. /** Set OCB Sched Request, deprecated */
  700. WMI_OCB_SET_SCHED_CMDID,
  701. /** Set rssi monitoring config command */
  702. WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
  703. /** Enable/disable Large Receive Offload processing; provide cfg params */
  704. WMI_LRO_CONFIG_CMDID,
  705. /** transfer data from host to firmware to write flash */
  706. WMI_TRANSFER_DATA_TO_FLASH_CMDID,
  707. /** Command to enable/disable filtering of multicast IP with unicast mac */
  708. WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
  709. /** Command to control WISA mode */
  710. WMI_VDEV_WISA_CMDID,
  711. /** set debug log time stamp sync up with host */
  712. WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
  713. /** Command for host to set/delete multiple mcast filters */
  714. WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
  715. /** upload a requested section of data from firmware flash to host */
  716. WMI_READ_DATA_FROM_FLASH_CMDID,
  717. /* GPIO Configuration */
  718. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
  719. WMI_GPIO_OUTPUT_CMDID,
  720. /* Txbf configuration command */
  721. WMI_TXBF_CMDID,
  722. /* FWTEST Commands */
  723. WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
  724. /** set NoA descs **/
  725. WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
  726. /* UNIT Tests */
  727. WMI_UNIT_TEST_CMDID,
  728. /* set debug and tuning parameters */
  729. WMI_FWTEST_CMDID,
  730. /* Q-Boost configuration test commands */
  731. WMI_QBOOST_CFG_CMDID,
  732. /** TDLS Configuration */
  733. /** enable/disable TDLS */
  734. WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
  735. /** set tdls peer state */
  736. WMI_TDLS_PEER_UPDATE_CMDID,
  737. /** TDLS Offchannel control */
  738. WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
  739. /** Resmgr Configuration */
  740. /** Adaptive OCS is enabled by default in the FW. This command is used to
  741. * disable FW based adaptive OCS.
  742. */
  743. WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
  744. /** set the requested channel time quota for the home channels */
  745. WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
  746. /** set the requested latency for the home channels */
  747. WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
  748. /** STA SMPS Configuration */
  749. /** force SMPS mode */
  750. WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
  751. /** set SMPS parameters */
  752. WMI_STA_SMPS_PARAM_CMDID,
  753. /* Wlan HB commands*/
  754. /* enalbe/disable wlan HB */
  755. WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
  756. /* set tcp parameters for wlan HB */
  757. WMI_HB_SET_TCP_PARAMS_CMDID,
  758. /* set tcp pkt filter for wlan HB */
  759. WMI_HB_SET_TCP_PKT_FILTER_CMDID,
  760. /* set udp parameters for wlan HB */
  761. WMI_HB_SET_UDP_PARAMS_CMDID,
  762. /* set udp pkt filter for wlan HB */
  763. WMI_HB_SET_UDP_PKT_FILTER_CMDID,
  764. /** Wlan RMC commands*/
  765. /** enable/disable RMC */
  766. WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
  767. /** configure action frame period */
  768. WMI_RMC_SET_ACTION_PERIOD_CMDID,
  769. /** For debug/future enhancement purposes only,
  770. * configures/finetunes RMC algorithms */
  771. WMI_RMC_CONFIG_CMDID,
  772. /** select manual leader */
  773. WMI_RMC_SET_MANUAL_LEADER_CMDID,
  774. /** WLAN MHF offload commands */
  775. /** enable/disable MHF offload */
  776. WMI_MHF_OFFLOAD_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
  777. /** Plumb routing table for MHF offload */
  778. WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
  779. /*location scan commands*/
  780. /*start batch scan*/
  781. WMI_BATCH_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  782. /*stop batch scan*/
  783. WMI_BATCH_SCAN_DISABLE_CMDID,
  784. /*get batch scan result*/
  785. WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
  786. /* OEM related cmd */
  787. WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
  788. WMI_OEM_REQUEST_CMDID, /* UNUSED */
  789. /** Nan Request */
  790. WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
  791. /** Modem power state command */
  792. WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
  793. WMI_CHAN_AVOID_UPDATE_CMDID,
  794. WMI_COEX_CONFIG_CMDID,
  795. WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
  796. WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
  797. /**
  798. * OBSS scan offload enable/disable commands
  799. * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
  800. * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
  801. * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
  802. * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
  803. * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
  804. * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
  805. */
  806. WMI_OBSS_SCAN_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
  807. WMI_OBSS_SCAN_DISABLE_CMDID,
  808. /**LPI commands*/
  809. /**LPI mgmt snooping config command*/
  810. WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
  811. /**LPI scan start command*/
  812. WMI_LPI_START_SCAN_CMDID,
  813. /**LPI scan stop command*/
  814. WMI_LPI_STOP_SCAN_CMDID,
  815. /** ExtScan commands */
  816. WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
  817. WMI_EXTSCAN_STOP_CMDID,
  818. WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
  819. WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
  820. WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
  821. WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
  822. WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
  823. WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
  824. WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
  825. WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
  826. /** DHCP server offload commands */
  827. WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
  828. /** IPA Offload features related commands */
  829. WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
  830. /** mDNS responder offload commands */
  831. WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
  832. WMI_MDNS_SET_FQDN_CMDID,
  833. WMI_MDNS_SET_RESPONSE_CMDID,
  834. WMI_MDNS_GET_STATS_CMDID,
  835. /* enable/disable AP Authentication offload */
  836. WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
  837. WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
  838. /** Out-of-context-of-BSS (OCB) commands */
  839. WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
  840. WMI_OCB_SET_UTC_TIME_CMDID,
  841. WMI_OCB_START_TIMING_ADVERT_CMDID,
  842. WMI_OCB_STOP_TIMING_ADVERT_CMDID,
  843. WMI_OCB_GET_TSF_TIMER_CMDID,
  844. WMI_DCC_GET_STATS_CMDID,
  845. WMI_DCC_CLEAR_STATS_CMDID,
  846. WMI_DCC_UPDATE_NDL_CMDID,
  847. /* System-On-Chip commands */
  848. WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
  849. WMI_SOC_SET_HW_MODE_CMDID,
  850. WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
  851. WMI_SOC_SET_ANTENNA_MODE_CMDID,
  852. /* packet filter commands */
  853. WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
  854. WMI_PACKET_FILTER_ENABLE_CMDID,
  855. /** Motion Aided WiFi Connectivity (MAWC) commands */
  856. WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
  857. /** WMI commands related to PMF 11w Offload */
  858. WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
  859. /** WMI commands related to pkt filter (BPF) offload */
  860. WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  861. WMI_BPF_GET_VDEV_STATS_CMDID,
  862. WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
  863. WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
  864. /** WMI commands related to monitor mode. */
  865. WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
  866. /**
  867. * Nan Data commands
  868. * NDI - NAN Data Interface
  869. * NDP - NAN Data Path
  870. */
  871. /* Commands in prototyping phase */
  872. WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
  873. WMI_NDP_INITIATOR_REQ_CMDID,
  874. WMI_NDP_RESPONDER_REQ_CMDID,
  875. WMI_NDP_END_REQ_CMDID,
  876. } WMI_CMD_ID;
  877. typedef enum {
  878. /** WMI service is ready; after this event WMI messages can be sent/received */
  879. WMI_SERVICE_READY_EVENTID = 0x1,
  880. /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
  881. WMI_READY_EVENTID,
  882. /** Specify what WMI services the target supports (for services beyond
  883. * what fits in the WMI_SERVICE_READY_EVENT message's wmi_service_bitmap)
  884. */
  885. WMI_SERVICE_AVAILABLE_EVENTID,
  886. /** Scan specific events */
  887. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  888. /* PDEV specific events */
  889. /** TPC config for the current operating channel */
  890. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  891. /** Channel stats event */
  892. WMI_CHAN_INFO_EVENTID,
  893. /** PHY Error specific WMI event */
  894. WMI_PHYERR_EVENTID,
  895. /** eeprom dump event */
  896. WMI_PDEV_DUMP_EVENTID,
  897. /** traffic pause event */
  898. WMI_TX_PAUSE_EVENTID,
  899. /** DFS radar event */
  900. WMI_DFS_RADAR_EVENTID,
  901. /** track L1SS entry and residency event */
  902. WMI_PDEV_L1SS_TRACK_EVENTID,
  903. /** Report current temprature of the chip in Celcius degree */
  904. WMI_PDEV_TEMPERATURE_EVENTID,
  905. /** Extension of WMI_SERVICE_READY msg with extra target capability info */
  906. WMI_SERVICE_READY_EXT_EVENTID,
  907. /** FIPS test mode event */
  908. WMI_PDEV_FIPS_EVENTID,
  909. /** Channel hopping avoidance */
  910. WMI_PDEV_CHANNEL_HOPPING_EVENTID,
  911. /** CCK ANI level event */
  912. WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
  913. /** OFDM ANI level event */
  914. WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
  915. /** Tx PPDU params */
  916. WMI_PDEV_TPC_EVENTID,
  917. /** NF Cal Power in DBR/DBM for all channels */
  918. WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  919. /** SOC/PDEV events */
  920. WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
  921. WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
  922. WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
  923. /** Report ANT DIV feature's status */
  924. WMI_PDEV_ANTDIV_STATUS_EVENTID,
  925. /** Chip level Power stats */
  926. WMI_PDEV_CHIP_POWER_STATS_EVENTID,
  927. /* VDEV specific events */
  928. /** VDEV started event in response to VDEV_START request */
  929. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  930. /** vdev stopped event , generated in response to VDEV_STOP request */
  931. WMI_VDEV_STOPPED_EVENTID,
  932. /* Indicate the set key (used for setting per
  933. * peer unicast and per vdev multicast)
  934. * operation has completed */
  935. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  936. /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
  937. don't use this for any new implementations */
  938. /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
  939. This request is valid only for vdevs operating in soft AP or P2P GO mode */
  940. WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
  941. /* Return the TSF timestamp of specified vdev */
  942. WMI_VDEV_TSF_REPORT_EVENTID,
  943. /* FW response to Host for vdev delete cmdid */
  944. WMI_VDEV_DELETE_RESP_EVENTID,
  945. /* peer specific events */
  946. /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
  947. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  948. /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
  949. WMI_PEER_INFO_EVENTID,
  950. /** Event indicating that TX fail count reaching threshold */
  951. WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
  952. /* Return the estimate link speed for the Peer specified in the
  953. * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
  954. */
  955. WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
  956. /* Return the peer state
  957. * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
  958. */
  959. WMI_PEER_STATE_EVENTID,
  960. /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
  961. * After that, host will send Mx message.
  962. * Otherwise, host will pause any Mx(STA:M2/M4) message
  963. */
  964. WMI_PEER_ASSOC_CONF_EVENTID,
  965. /* FW response to Host for peer delete cmdid */
  966. WMI_PEER_DELETE_RESP_EVENTID,
  967. /** Valid rate code list for peer */
  968. WMI_PEER_RATECODE_LIST_EVENTID,
  969. WMI_WDS_PEER_EVENTID,
  970. WMI_PEER_STA_PS_STATECHG_EVENTID,
  971. /** Peer Ant Div Info Event with rssi per chain, etc */
  972. WMI_PEER_ANTDIV_INFO_EVENTID,
  973. /* beacon/mgmt specific events */
  974. /** RX management frame. the entire frame is carried along with the event. */
  975. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  976. /** software beacon alert event to Host requesting host to Queue a beacon for transmission
  977. use only in host beacon mode */
  978. WMI_HOST_SWBA_EVENTID,
  979. /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
  980. tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
  981. staggered beacon transmission mode */
  982. WMI_TBTTOFFSET_UPDATE_EVENTID,
  983. /** event after the first beacon is transmitted following
  984. a change in the template.*/
  985. WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
  986. /** event after the first probe response is transmitted following
  987. a change in the template.*/
  988. WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
  989. /** Event for Mgmt TX completion event */
  990. WMI_MGMT_TX_COMPLETION_EVENTID,
  991. /** Event for Mgmt TX bundle completion event */
  992. WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
  993. /*ADDBA Related WMI Events*/
  994. /** Indication the completion of the prior
  995. WMI_PEER_TID_DELBA_CMDID(initiator) */
  996. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  997. /** Indication the completion of the prior
  998. *WMI_PEER_TID_ADDBA_CMDID(initiator) */
  999. WMI_TX_ADDBA_COMPLETE_EVENTID,
  1000. /* Seq num returned from hw for a sta/tid pair */
  1001. WMI_BA_RSP_SSN_EVENTID,
  1002. /* Aggregation state requested by BTC */
  1003. WMI_AGGR_STATE_TRIG_EVENTID,
  1004. /** Roam event to trigger roaming on host */
  1005. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1006. /** matching AP found from list of profiles */
  1007. WMI_PROFILE_MATCH,
  1008. /** roam synch event */
  1009. WMI_ROAM_SYNCH_EVENTID,
  1010. /** P2P disc found */
  1011. WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
  1012. /** send noa info to host when noa is changed for beacon tx offload enable */
  1013. WMI_P2P_NOA_EVENTID,
  1014. /** send p2p listen offload stopped event with different reason */
  1015. WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
  1016. /** Send EGAP Info to host */
  1017. WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
  1018. /* send pdev resume event to host after pdev resume. */
  1019. WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
  1020. /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
  1021. will cary wake reason */
  1022. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1023. WMI_D0_WOW_DISABLE_ACK_EVENTID,
  1024. WMI_WOW_INITIAL_WAKEUP_EVENTID,
  1025. /*RTT related event ID*/
  1026. /** RTT measurement report */
  1027. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1028. /** TSF measurement report */
  1029. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1030. /** RTT error report */
  1031. WMI_RTT_ERROR_REPORT_EVENTID,
  1032. /*STATS specific events*/
  1033. /** txrx stats event requested by host */
  1034. WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
  1035. /** FW iface link stats Event */
  1036. WMI_IFACE_LINK_STATS_EVENTID,
  1037. /** FW iface peer link stats Event */
  1038. WMI_PEER_LINK_STATS_EVENTID,
  1039. /** FW Update radio stats Event */
  1040. WMI_RADIO_LINK_STATS_EVENTID,
  1041. /** Firmware memory dump Complete event*/
  1042. WMI_UPDATE_FW_MEM_DUMP_EVENTID,
  1043. /** Event indicating the DIAG logs/events supported by FW */
  1044. WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
  1045. /** Instantaneous RSSI event */
  1046. WMI_INST_RSSI_STATS_EVENTID,
  1047. /** FW update tx power levels event */
  1048. WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
  1049. /** This event is used to report wlan stats to host.
  1050. * It is triggered under 3 conditions:
  1051. * (a) Periodic timer timed out, based on the period specified
  1052. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  1053. * (b) Whenever any of the (enabled) stats thresholds specified
  1054. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  1055. * within the current stats period.
  1056. * (c) In response to the one-time wlan stats request of
  1057. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  1058. *
  1059. * If this event is triggered by condition a or b,
  1060. * the stats counters are cleared at the start of each period.
  1061. * But if it is triggered by condition c, stats counters won't be cleared.
  1062. */
  1063. WMI_REPORT_STATS_EVENTID,
  1064. /* NLO specific events */
  1065. /** NLO match event after the first match */
  1066. WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
  1067. /** NLO scan complete event */
  1068. WMI_NLO_SCAN_COMPLETE_EVENTID,
  1069. /** APFIND specific events */
  1070. WMI_APFIND_EVENTID,
  1071. /** passpoint network match event */
  1072. WMI_PASSPOINT_MATCH_EVENTID,
  1073. /** GTK offload stautus event requested by host */
  1074. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1075. /** GTK offload failed to rekey event */
  1076. WMI_GTK_REKEY_FAIL_EVENTID,
  1077. /* CSA IE received event */
  1078. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1079. /*chatter query reply event*/
  1080. WMI_CHATTER_PC_QUERY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
  1081. /** echo event in response to echo command */
  1082. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1083. /* !!IMPORTANT!!
  1084. * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
  1085. * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
  1086. * as we MUST have a fixed value here to maintain compatibility between
  1087. * UTF and the ART2 driver
  1088. */
  1089. /** UTF specific WMI event */
  1090. WMI_PDEV_UTF_EVENTID,
  1091. /** event carries buffered debug messages */
  1092. WMI_DEBUG_MESG_EVENTID,
  1093. /** FW stats(periodic or on shot) */
  1094. WMI_UPDATE_STATS_EVENTID,
  1095. /** debug print message used for tracing FW code while debugging */
  1096. WMI_DEBUG_PRINT_EVENTID,
  1097. /** DCS wlan or non-wlan interference event
  1098. */
  1099. WMI_DCS_INTERFERENCE_EVENTID,
  1100. /** VI spoecific event */
  1101. WMI_PDEV_QVIT_EVENTID,
  1102. /** FW code profile data in response to profile request */
  1103. WMI_WLAN_PROFILE_DATA_EVENTID,
  1104. /* Factory Testing Mode request event
  1105. * used for integrated chipsets */
  1106. WMI_PDEV_FTM_INTG_EVENTID,
  1107. /* avoid list of frequencies .
  1108. */
  1109. WMI_WLAN_FREQ_AVOID_EVENTID,
  1110. /* Indicate the keepalive parameters */
  1111. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1112. /*Thermal Management event*/
  1113. WMI_THERMAL_MGMT_EVENTID,
  1114. /* Container for DIAG event and log data */
  1115. WMI_DIAG_DATA_CONTAINER_EVENTID,
  1116. /* host auto shutdown event */
  1117. WMI_HOST_AUTO_SHUTDOWN_EVENTID,
  1118. /*update mib counters together with WMI_UPDATE_STATS_EVENTID*/
  1119. WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
  1120. /*update ht/vht info based on vdev (rx and tx NSS and preamble)*/
  1121. WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
  1122. WMI_DIAG_EVENTID,
  1123. /** Set OCB Sched Response, deprecated */
  1124. WMI_OCB_SET_SCHED_EVENTID,
  1125. /** event to indicate the flush of the buffered debug messages is complete*/
  1126. WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
  1127. /** event to report mix/max RSSI breach events */
  1128. WMI_RSSI_BREACH_EVENTID,
  1129. /** event to report completion of data storage into flash memory */
  1130. WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
  1131. /** event to report SCPC calibrated data to host */
  1132. WMI_PDEV_UTF_SCPC_EVENTID,
  1133. /** event to provide requested data from the target's flash memory */
  1134. WMI_READ_DATA_FROM_FLASH_EVENTID,
  1135. /* GPIO Event */
  1136. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1137. /** upload H_CV info WMI event
  1138. * to indicate uploaded H_CV info to host
  1139. */
  1140. WMI_UPLOADH_EVENTID,
  1141. /** capture H info WMI event
  1142. * to indicate captured H info to host
  1143. */
  1144. WMI_CAPTUREH_EVENTID,
  1145. /* hw RFkill */
  1146. WMI_RFKILL_STATE_CHANGE_EVENTID,
  1147. /* TDLS Event */
  1148. WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
  1149. /** STA SMPS Event */
  1150. /** force SMPS mode */
  1151. WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
  1152. /*location scan event*/
  1153. /*report the firmware's capability of batch scan*/
  1154. WMI_BATCH_SCAN_ENABLED_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
  1155. /*batch scan result*/
  1156. WMI_BATCH_SCAN_RESULT_EVENTID,
  1157. /* OEM Event */
  1158. WMI_OEM_CAPABILITY_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OEM), /*DEPRECATED*/
  1159. WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
  1160. WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
  1161. WMI_OEM_RESPONSE_EVENTID,
  1162. /* NAN Event */
  1163. WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
  1164. WMI_NAN_DISC_IFACE_CREATED_EVENTID,
  1165. WMI_NAN_DISC_IFACE_DELETED_EVENTID,
  1166. WMI_NAN_STARTED_CLUSTER_EVENTID,
  1167. WMI_NAN_JOINED_CLUSTER_EVENTID,
  1168. /* Coex Event */
  1169. WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
  1170. /* LPI Event */
  1171. WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
  1172. WMI_LPI_STATUS_EVENTID,
  1173. WMI_LPI_HANDOFF_EVENTID,
  1174. /* ExtScan events */
  1175. WMI_EXTSCAN_START_STOP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
  1176. WMI_EXTSCAN_OPERATION_EVENTID,
  1177. WMI_EXTSCAN_TABLE_USAGE_EVENTID,
  1178. WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
  1179. WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
  1180. WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
  1181. WMI_EXTSCAN_CAPABILITIES_EVENTID,
  1182. WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
  1183. /* mDNS offload events */
  1184. WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
  1185. /* SAP Authentication offload events */
  1186. WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
  1187. WMI_SAP_OFL_DEL_STA_EVENTID,
  1188. /** Out-of-context-of-bss (OCB) events */
  1189. WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
  1190. WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
  1191. WMI_DCC_GET_STATS_RESP_EVENTID,
  1192. WMI_DCC_UPDATE_NDL_RESP_EVENTID,
  1193. WMI_DCC_STATS_EVENTID,
  1194. /* System-On-Chip events */
  1195. WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
  1196. WMI_SOC_HW_MODE_TRANSITION_EVENTID,
  1197. WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
  1198. /** Motion Aided WiFi Connectivity (MAWC) events */
  1199. WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
  1200. /** pkt filter (BPF) offload relevant events */
  1201. WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
  1202. WMI_BPF_VDEV_STATS_INFO_EVENTID,
  1203. /* RMC specific event */
  1204. /* RMC manual leader selected event */
  1205. WMI_RMC_NEW_LEADER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
  1206. /** Events in Prototyping phase */
  1207. WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
  1208. WMI_NDP_INITIATOR_RSP_EVENTID,
  1209. WMI_NDP_RESPONDER_RSP_EVENTID,
  1210. WMI_NDP_END_RSP_EVENTID,
  1211. WMI_NDP_INDICATION_EVENTID,
  1212. WMI_NDP_CONFIRM_EVENTID,
  1213. WMI_NDP_END_INDICATION_EVENTID,
  1214. } WMI_EVT_ID;
  1215. /* defines for OEM message sub-types */
  1216. #define WMI_OEM_CAPABILITY_REQ 0x01
  1217. #define WMI_OEM_CAPABILITY_RSP 0x02
  1218. #define WMI_OEM_MEASUREMENT_REQ 0x03
  1219. #define WMI_OEM_MEASUREMENT_RSP 0x04
  1220. #define WMI_OEM_ERROR_REPORT_RSP 0x05
  1221. #define WMI_OEM_NAN_MEAS_REQ 0x06
  1222. #define WMI_OEM_NAN_MEAS_RSP 0x07
  1223. #define WMI_OEM_NAN_PEER_INFO 0x08
  1224. #define WMI_OEM_CONFIGURE_LCR 0x09
  1225. #define WMI_OEM_CONFIGURE_LCI 0x0A
  1226. #define WMI_CHAN_LIST_TAG 0x1
  1227. #define WMI_SSID_LIST_TAG 0x2
  1228. #define WMI_BSSID_LIST_TAG 0x3
  1229. #define WMI_IE_TAG 0x4
  1230. typedef struct {
  1231. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  1232. /** primary 20 MHz channel frequency in mhz */
  1233. A_UINT32 mhz;
  1234. /** Center frequency 1 in MHz*/
  1235. A_UINT32 band_center_freq1;
  1236. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1237. A_UINT32 band_center_freq2;
  1238. /** channel info described below */
  1239. A_UINT32 info;
  1240. /** contains min power, max power, reg power and reg class id. */
  1241. A_UINT32 reg_info_1;
  1242. /** contains antennamax */
  1243. A_UINT32 reg_info_2;
  1244. } wmi_channel;
  1245. typedef enum {
  1246. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1247. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1248. } wmi_channel_change_cause;
  1249. /** channel info consists of 6 bits of channel mode */
  1250. #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \
  1251. (pwmi_channel)->info &= 0xffffffc0; \
  1252. (pwmi_channel)->info |= (val); \
  1253. } while (0)
  1254. #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
  1255. #define WMI_CHAN_FLAG_HT40_PLUS 6
  1256. #define WMI_CHAN_FLAG_PASSIVE 7
  1257. #define WMI_CHAN_ADHOC_ALLOWED 8
  1258. #define WMI_CHAN_AP_DISABLED 9
  1259. #define WMI_CHAN_FLAG_DFS 10
  1260. #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
  1261. #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
  1262. #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
  1263. #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
  1264. #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
  1265. #define WMI_CHAN_FLAG_DFS_CFREQ2 16 /* Enable radar event reporting for sec80 in VHT80p80 */
  1266. #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
  1267. #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
  1268. (pwmi_channel)->info |= (1 << flag); \
  1269. } while (0)
  1270. #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \
  1271. (((pwmi_channel)->info & (1 << flag)) >> flag)
  1272. #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \
  1273. (pwmi_channel)->reg_info_1 &= 0xffffff00; \
  1274. (pwmi_channel)->reg_info_1 |= (val & 0xff); \
  1275. } while (0)
  1276. #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
  1277. #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \
  1278. (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
  1279. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 8); \
  1280. } while (0)
  1281. #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
  1282. #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \
  1283. (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
  1284. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 16); \
  1285. } while (0)
  1286. #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
  1287. #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \
  1288. (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
  1289. (pwmi_channel)->reg_info_1 |= ((val & 0xff) << 24); \
  1290. } while (0)
  1291. #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
  1292. #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \
  1293. (pwmi_channel)->reg_info_2 &= 0xffffff00; \
  1294. (pwmi_channel)->reg_info_2 |= (val & 0xff); \
  1295. } while (0)
  1296. #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
  1297. /* max tx power is in 1 dBm units */
  1298. #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \
  1299. (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
  1300. (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 8); \
  1301. } while (0)
  1302. #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
  1303. /** HT Capabilities*/
  1304. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1305. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1306. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1307. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1308. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1309. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1310. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1311. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1312. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1313. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1314. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1315. #define WMI_HT_CAP_HT40_SGI 0x0800
  1316. #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
  1317. #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
  1318. /* These macros should be used when we wish to advertise STBC support for
  1319. * only 1SS or 2SS or 3SS. */
  1320. #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  1321. #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  1322. #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  1323. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1324. WMI_HT_CAP_HT20_SGI | \
  1325. WMI_HT_CAP_HT40_SGI | \
  1326. WMI_HT_CAP_TX_STBC | \
  1327. WMI_HT_CAP_RX_STBC | \
  1328. WMI_HT_CAP_LDPC | \
  1329. WMI_HT_CAP_TX_LDPC | \
  1330. WMI_HT_CAP_RX_LDPC)
  1331. /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1332. field. The fields not defined here are not supported, or reserved.
  1333. Do not change these masks and if you have to add new one follow the
  1334. bitmask as specified by 802.11ac draft.
  1335. */
  1336. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1337. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1338. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1339. #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
  1340. #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
  1341. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1342. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1343. #define WMI_VHT_CAP_SGI_160MHZ 0x00000040
  1344. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1345. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1346. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1347. #define WMI_VHT_CAP_SU_BFORMER 0x00000800
  1348. #define WMI_VHT_CAP_SU_BFORMEE 0x00001000
  1349. #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  1350. #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  1351. #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  1352. #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  1353. #define WMI_VHT_CAP_MU_BFORMER 0x00080000
  1354. #define WMI_VHT_CAP_MU_BFORMEE 0x00100000
  1355. #define WMI_VHT_CAP_TXOP_PS 0x00200000
  1356. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1357. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1358. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1359. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1360. #define WMI_VHT_CAP_TX_LDPC 0x40000000
  1361. /* TEMPORARY:
  1362. * Preserve the incorrect old name as an alias for the correct new name
  1363. * until all references to the old name have been removed from all hosts
  1364. * and targets.
  1365. */
  1366. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
  1367. /* These macros should be used when we wish to advertise STBC support for
  1368. * only 1SS or 2SS or 3SS. */
  1369. #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
  1370. #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
  1371. #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
  1372. /* TEMPORARY:
  1373. * Preserve the incorrect old name as an alias for the correct new name
  1374. * until all references to the old name have been removed from all hosts
  1375. * and targets.
  1376. */
  1377. #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
  1378. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1379. WMI_VHT_CAP_SGI_80MHZ | \
  1380. WMI_VHT_CAP_TX_STBC | \
  1381. WMI_VHT_CAP_RX_STBC_MASK | \
  1382. WMI_VHT_CAP_RX_LDPC | \
  1383. WMI_VHT_CAP_TX_LDPC | \
  1384. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1385. WMI_VHT_CAP_RX_FIXED_ANT | \
  1386. WMI_VHT_CAP_TX_FIXED_ANT)
  1387. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  1388. 802.11ac
  1389. */
  1390. #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1))
  1391. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1392. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1393. /** 11ax capabilities */
  1394. #define WMI_HE_CAP_PPE_PRESENT 0x00000001
  1395. #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
  1396. #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
  1397. #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
  1398. #define WMI_HE_FRAG_SUPPORT_SHIFT 3
  1399. /* fragmentation support field value */
  1400. enum {
  1401. WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
  1402. WMI_HE_FRAG_SUPPORT_LEVEL1, /* support for fragments within a VHT single MPDU, no support for fragments within AMPDU */
  1403. WMI_HE_FRAG_SUPPORT_LEVEL2, /* support for up to 1 fragment per MSDU within a single A-MPDU */
  1404. WMI_HE_FRAG_SUPPORT_LEVEL3, /* support for multiple fragments per MSDU within an A-MPDU */
  1405. };
  1406. /** NOTE: This defs cannot be changed in the future without breaking WMI compatibility */
  1407. #define WMI_MAX_NUM_SS 8
  1408. #define WMI_MAX_NUM_RU 4
  1409. /*
  1410. * Figure 8 554ae: -PPE Threshold Info field format
  1411. * we pack PPET16 and PPT8 for four RU's in one element of array.
  1412. *
  1413. * ppet16_ppet8_ru3_ru0 array element 0 holds:
  1414. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1415. *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
  1416. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1417. *
  1418. * ppet16_ppet8_ru3_ru0 array element 1 holds:
  1419. * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
  1420. *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
  1421. *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
  1422. *
  1423. * etc.
  1424. */
  1425. /*
  1426. * Note that in these macros, "ru" is one-based, not zero-based, while
  1427. * nssm1 is zero-based.
  1428. */
  1429. #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
  1430. do { \
  1431. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) % 4) * 6)); \
  1432. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet & 7) << (((ru-1) % 4) * 6)); \
  1433. } while (0)
  1434. #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1435. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) % 4) * 6)) & 7)
  1436. #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
  1437. do { \
  1438. ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1) % 4) * 6 + 3)); \
  1439. ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1) % 4) * 6 + 3)); \
  1440. } while (0)
  1441. #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
  1442. ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1) % 4) * 6 + 3)) & 7)
  1443. typedef struct _wmi_ppe_threshold {
  1444. A_UINT32 numss_m1; /** NSS - 1*/
  1445. A_UINT32 ru_count; /** Max RU count */
  1446. A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; /** ppet8 and ppet16 for max num ss */
  1447. } wmi_ppe_threshold;
  1448. /* WMI_SYS_CAPS_* refer to the capabilities that system support
  1449. */
  1450. #define WMI_SYS_CAP_ENABLE 0x00000001
  1451. #define WMI_SYS_CAP_TXPOWER 0x00000002
  1452. /*
  1453. * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
  1454. * Bits 5:0 are reserved
  1455. */
  1456. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
  1457. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
  1458. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
  1459. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
  1460. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
  1461. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
  1462. #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
  1463. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
  1464. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1465. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1466. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1467. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1468. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1469. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1470. #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1471. #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1472. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
  1473. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
  1474. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
  1475. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
  1476. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
  1477. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
  1478. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
  1479. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
  1480. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
  1481. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
  1482. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
  1483. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
  1484. #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
  1485. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
  1486. #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
  1487. WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
  1488. #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
  1489. ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
  1490. #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
  1491. ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
  1492. #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
  1493. ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
  1494. #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
  1495. ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
  1496. #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
  1497. ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
  1498. #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
  1499. ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
  1500. #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
  1501. ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
  1502. #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
  1503. ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
  1504. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
  1505. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
  1506. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
  1507. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1508. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1509. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1510. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
  1511. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
  1512. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
  1513. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
  1514. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
  1515. WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
  1516. #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
  1517. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
  1518. #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
  1519. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
  1520. #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
  1521. ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
  1522. #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
  1523. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
  1524. #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1525. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1526. #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
  1527. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
  1528. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
  1529. WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
  1530. #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
  1531. ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
  1532. #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
  1533. ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
  1534. /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
  1535. typedef struct _wmi_abi_version {
  1536. A_UINT32 abi_version_0; /** WMI Major and Minor versions */
  1537. A_UINT32 abi_version_1; /** WMI change revision */
  1538. A_UINT32 abi_version_ns_0; /** ABI version namespace first four dwords */
  1539. A_UINT32 abi_version_ns_1; /** ABI version namespace second four dwords */
  1540. A_UINT32 abi_version_ns_2; /** ABI version namespace third four dwords */
  1541. A_UINT32 abi_version_ns_3; /** ABI version namespace fourth four dwords */
  1542. } wmi_abi_version;
  1543. /*
  1544. * maximum number of memroy requests allowed from FW.
  1545. */
  1546. #define WMI_MAX_MEM_REQS 16
  1547. /* !!NOTE!!:
  1548. * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
  1549. * Please don't change it.
  1550. */
  1551. #define HW_BD_INFO_SIZE 5
  1552. /**
  1553. * PDEV ID to identify the physical device,
  1554. * value 0 reserved for SOC level commands/event
  1555. */
  1556. #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
  1557. #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
  1558. #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
  1559. #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
  1560. /**
  1561. * The following struct holds optional payload for
  1562. * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
  1563. * device capability to the host.
  1564. */
  1565. typedef struct {
  1566. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
  1567. A_UINT32 fw_build_vers; /* firmware build number */
  1568. wmi_abi_version fw_abi_vers;
  1569. A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
  1570. A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
  1571. A_UINT32 num_rf_chains;
  1572. /* The following field is only valid for service type WMI_SERVICE_11AC */
  1573. A_UINT32 ht_cap_info; /* WMI HT Capability */
  1574. A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1575. A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1576. A_UINT32 hw_min_tx_power;
  1577. A_UINT32 hw_max_tx_power;
  1578. A_UINT32 sys_cap_info;
  1579. A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1580. /** Max beacon and Probe Response IE offload size (includes
  1581. * optional P2P IEs) */
  1582. A_UINT32 max_bcn_ie_size;
  1583. /*
  1584. * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
  1585. * FW uses this as FW extesnsion memory for saving its data structures. Only valid
  1586. * for low latency interfaces like PCIE where FW can access this memory directly (or)
  1587. * by DMA.
  1588. */
  1589. A_UINT32 num_mem_reqs;
  1590. /* Max No. scan channels target can support
  1591. * If FW is too old and doesn't indicate this number, host side value will default to
  1592. * 0, and host will take the original compatible value (62) for future scan channel
  1593. * setup.
  1594. */
  1595. A_UINT32 max_num_scan_channels;
  1596. /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
  1597. * Default 0 means tha hw_bd_info[] is invalid(legacy board).
  1598. */
  1599. A_UINT32 hw_bd_id;
  1600. A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
  1601. /*
  1602. * Number of MACs supported, i.e. a DBS-capable device will return 2
  1603. */
  1604. A_UINT32 max_supported_macs;
  1605. /*
  1606. * FW sub-feature capabilities to be used in concurrence with wmi_service_bitmap
  1607. */
  1608. A_UINT32 wmi_fw_sub_feat_caps; /* values from enum WMI_FW_SUB_FEAT_CAPS */
  1609. /*
  1610. * Number of Dual Band Simultaneous (DBS) hardware modes
  1611. */
  1612. A_UINT32 num_dbs_hw_modes;
  1613. /*
  1614. * txrx_chainmask
  1615. * [7:0] - 2G band tx chain mask
  1616. * [15:8] - 2G band rx chain mask
  1617. * [23:16] - 5G band tx chain mask
  1618. * [31:24] - 5G band rx chain mask
  1619. *
  1620. */
  1621. A_UINT32 txrx_chainmask;
  1622. /*
  1623. * default Dual Band Simultaneous (DBS) hardware mode
  1624. */
  1625. A_UINT32 default_dbs_hw_mode_index;
  1626. /*
  1627. * Number of msdu descriptors target would use
  1628. */
  1629. A_UINT32 num_msdu_desc;
  1630. /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
  1631. * HAL_REG_CAPABILITIES hal_reg_capabilities;
  1632. * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
  1633. * wlan_host_mem_req mem_reqs[];
  1634. * wlan_dbs_hw_mode_list[];
  1635. */
  1636. } wmi_service_ready_event_fixed_param;
  1637. #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
  1638. typedef struct {
  1639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param */
  1640. /*
  1641. * The wmi_service_segment offset field specifies the position within the
  1642. * logical bitmap of WMI service flags at which the WMI service flags
  1643. * specified within this message begin.
  1644. * Since the first 128 WMI service flags are specified within the
  1645. * wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT message,
  1646. * the wmi_service_segment_offset value is expected to be 128 or more.
  1647. */
  1648. A_UINT32 wmi_service_segment_offset;
  1649. A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
  1650. } wmi_service_available_event_fixed_param;
  1651. typedef struct {
  1652. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT */
  1653. /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
  1654. A_UINT32 default_conc_scan_config_bits;
  1655. /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
  1656. A_UINT32 default_fw_config_bits;
  1657. wmi_ppe_threshold ppet;
  1658. A_UINT32 he_cap_info; /* see section 8.4.2.213 from draft r8 of 802.11ax; see WMI_HE_FRAG_SUPPORT enum */
  1659. /*
  1660. * An HT STA shall not allow transmission of more than one MPDU start
  1661. * within the time limit described in the MPDU maximum density field.
  1662. */
  1663. A_UINT32 mpdu_density; /* units are microseconds */
  1664. /*
  1665. * Maximum no of BSSID based RX filters host can program
  1666. * Value 0 means FW hasn't given any limit to host.
  1667. */
  1668. A_UINT32 max_bssid_rx_filters;
  1669. } wmi_service_ready_ext_event_fixed_param;
  1670. typedef enum {
  1671. WMI_FW_STA_RTT_INITR = 0x00000001,
  1672. WMI_FW_STA_RTT_RESPR = 0x00000002,
  1673. WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
  1674. WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
  1675. WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
  1676. WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
  1677. WMI_FW_AP_RTT_INITR = 0x00000040,
  1678. WMI_FW_AP_RTT_RESPR = 0x00000080,
  1679. WMI_FW_NAN_RTT_INITR = 0x00000100,
  1680. WMI_FW_NAN_RTT_RESPR = 0x00000200,
  1681. /*
  1682. * New fw sub feature capabilites before
  1683. * WMI_FW_MAX_SUB_FEAT_CAP
  1684. */
  1685. WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
  1686. } WMI_FW_SUB_FEAT_CAPS;
  1687. typedef enum {
  1688. WMI_HWBD_NONE = 0, /* No hw board information is given */
  1689. WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
  1690. WMI_HWBD_QCA2582 = 2, /* Killer 1525*/
  1691. } WMI_HWBD_ID;
  1692. #define ATH_BD_DATA_REV_MASK 0x000000FF
  1693. #define ATH_BD_DATA_REV_SHIFT 0
  1694. #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
  1695. #define ATH_BD_DATA_PROJ_ID_SHIFT 8
  1696. #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
  1697. #define ATH_BD_DATA_CUST_ID_SHIFT 16
  1698. #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
  1699. #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
  1700. #define SET_BD_DATA_REV(bd_data_ver, value) \
  1701. ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
  1702. #define GET_BD_DATA_REV(bd_data_ver) \
  1703. (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
  1704. #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
  1705. ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
  1706. #define GET_BD_DATA_PROJ_ID(bd_data_ver) \
  1707. (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
  1708. #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
  1709. ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
  1710. #define GET_BD_DATA_CUST_ID(bd_data_ver) \
  1711. (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
  1712. #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
  1713. ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
  1714. #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
  1715. (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
  1716. #ifdef ROME_LTE_COEX_FREQ_AVOID
  1717. typedef struct {
  1718. A_UINT32 start_freq; /* start frequency, not channel center freq */
  1719. A_UINT32 end_freq; /* end frequency */
  1720. } avoid_freq_range_desc;
  1721. typedef struct {
  1722. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  1723. A_UINT32 num_freq_ranges;
  1724. /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
  1725. avoid_freq_range_desc avd_freq_range[0];
  1726. } wmi_wlan_avoid_freq_ranges_event;
  1727. #endif
  1728. /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
  1729. #define WLAN_INIT_STATUS_SUCCESS 0x0
  1730. #define WLAN_INIT_STATUS_GEN_FAILED 0x1
  1731. #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  1732. #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  1733. typedef A_UINT32 WLAN_INIT_STATUS;
  1734. typedef struct {
  1735. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
  1736. wmi_abi_version fw_abi_vers;
  1737. wmi_mac_addr mac_addr;
  1738. A_UINT32 status;
  1739. A_UINT32 num_dscp_table;
  1740. } wmi_ready_event_fixed_param;
  1741. typedef struct {
  1742. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
  1743. /**
  1744. * @brief num_vdev - number of virtual devices (VAPs) to support
  1745. */
  1746. A_UINT32 num_vdevs;
  1747. /**
  1748. * @brief num_peers - number of peer nodes to support
  1749. */
  1750. A_UINT32 num_peers;
  1751. /*
  1752. * @brief In offload mode target supports features like WOW, chatter and other
  1753. * protocol offloads. In order to support them some functionalities like
  1754. * reorder buffering, PN checking need to be done in target. This determines
  1755. * maximum number of peers suported by target in offload mode
  1756. */
  1757. A_UINT32 num_offload_peers;
  1758. /* @brief Number of reorder buffers available for doing target based reorder
  1759. * Rx reorder buffering
  1760. */
  1761. A_UINT32 num_offload_reorder_buffs;
  1762. /**
  1763. * @brief num_peer_keys - number of keys per peer
  1764. */
  1765. A_UINT32 num_peer_keys;
  1766. /**
  1767. * @brief num_peer_tids - number of TIDs to provide storage for per peer.
  1768. */
  1769. A_UINT32 num_tids;
  1770. /**
  1771. * @brief ast_skid_limit - max skid for resolving hash collisions
  1772. * @details
  1773. * The address search table is sparse, so that if two MAC addresses
  1774. * result in the same hash value, the second of these conflicting
  1775. * entries can slide to the next index in the address search table,
  1776. * and use it, if it is unoccupied. This ast_skid_limit parameter
  1777. * specifies the upper bound on how many subsequent indices to search
  1778. * over to find an unoccupied space.
  1779. */
  1780. A_UINT32 ast_skid_limit;
  1781. /**
  1782. * @brief tx_chain_mask - the nominal chain mask for transmit
  1783. * @details
  1784. * The chain mask may be modified dynamically, e.g. to operate AP tx with
  1785. * a reduced number of chains if no clients are associated.
  1786. * This configuration parameter specifies the nominal chain-mask that
  1787. * should be used when not operating with a reduced set of tx chains.
  1788. */
  1789. A_UINT32 tx_chain_mask;
  1790. /**
  1791. * @brief rx_chain_mask - the nominal chain mask for receive
  1792. * @details
  1793. * The chain mask may be modified dynamically, e.g. for a client to use
  1794. * a reduced number of chains for receive if the traffic to the client
  1795. * is low enough that it doesn't require downlink MIMO or antenna
  1796. * diversity.
  1797. * This configuration parameter specifies the nominal chain-mask that
  1798. * should be used when not operating with a reduced set of rx chains.
  1799. */
  1800. A_UINT32 rx_chain_mask;
  1801. /**
  1802. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  1803. * @details
  1804. * Each WMM access class (voice, video, best-effort, background) will
  1805. * have its own timeout value to dictate how long to wait for missing
  1806. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  1807. * been received.
  1808. * This parameter specifies the timeout in milliseconds for each class .
  1809. * NOTE: the number of class (defined as 4) cannot be
  1810. * changed in the future without breaking WMI compatibility.
  1811. */
  1812. A_UINT32 rx_timeout_pri[4];
  1813. /**
  1814. * @brief rx_decap mode - what mode the rx should decap packets to
  1815. * @details
  1816. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  1817. * THis setting also determines the default TX behavior, however TX
  1818. * behavior can be modified on a per VAP basis during VAP init
  1819. */
  1820. A_UINT32 rx_decap_mode;
  1821. /**
  1822. * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
  1823. */
  1824. A_UINT32 scan_max_pending_req;
  1825. /**
  1826. * @brief maximum VDEV that could use BMISS offload
  1827. */
  1828. A_UINT32 bmiss_offload_max_vdev;
  1829. /**
  1830. * @brief maximum VDEV that could use offload roaming
  1831. */
  1832. A_UINT32 roam_offload_max_vdev;
  1833. /**
  1834. * @brief maximum AP profiles that would push to offload roaming
  1835. */
  1836. A_UINT32 roam_offload_max_ap_profiles;
  1837. /**
  1838. * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
  1839. * @details
  1840. * The target's WAL maintains a table to hold information regarding which
  1841. * peers belong to a given multicast group, so that if multicast->unicast
  1842. * conversion is enabled, the target can convert multicast tx frames to a
  1843. * series of unicast tx frames, to each peer within the multicast group.
  1844. * This num_mcast_groups configuration parameter tells the target how
  1845. * many multicast groups to provide storage for within its multicast
  1846. * group membership table.
  1847. */
  1848. A_UINT32 num_mcast_groups;
  1849. /**
  1850. * @brief num_mcast_table_elems - size to alloc for the mcast membership table
  1851. * @details
  1852. * This num_mcast_table_elems configuration parameter tells the target
  1853. * how many peer elements it needs to provide storage for in its
  1854. * multicast group membership table.
  1855. * These multicast group membership table elements are shared by the
  1856. * multicast groups stored within the table.
  1857. */
  1858. A_UINT32 num_mcast_table_elems;
  1859. /**
  1860. * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
  1861. * @details
  1862. * This configuration parameter specifies whether the target should
  1863. * perform multicast --> unicast conversion on transmit, and if so,
  1864. * what to do if it finds no entries in its multicast group membership
  1865. * table for the multicast IP address in the tx frame.
  1866. * Configuration value:
  1867. * 0 -> Do not perform multicast to unicast conversion.
  1868. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  1869. * from the tx frame is found in the multicast group membership
  1870. * table. If the IP multicast address is not found, drop the frame.
  1871. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  1872. * from the tx frame is found in the multicast group membership
  1873. * table. If the IP multicast address is not found, transmit the
  1874. * frame as multicast.
  1875. */
  1876. A_UINT32 mcast2ucast_mode;
  1877. /**
  1878. * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
  1879. * @details
  1880. * This parameter controls how much memory the target will allocate to
  1881. * store a log of tx PPDU meta-information (how large the PPDU was,
  1882. * when it was sent, whether it was successful, etc.)
  1883. */
  1884. A_UINT32 tx_dbg_log_size;
  1885. /**
  1886. * @brief num_wds_entries - how many AST entries to be allocated for WDS
  1887. */
  1888. A_UINT32 num_wds_entries;
  1889. /**
  1890. * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
  1891. * this limit can be 0 -default, 1 256B
  1892. */
  1893. A_UINT32 dma_burst_size;
  1894. /**
  1895. * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
  1896. * to account for interface latency to avoid underrun.
  1897. */
  1898. A_UINT32 mac_aggr_delim;
  1899. /**
  1900. * @brief rx_skip_defrag_timeout_dup_detection_check
  1901. * @details
  1902. * determine whether target is responsible for detecting duplicate
  1903. * non-aggregate MPDU and timing out stale fragments.
  1904. *
  1905. * A-MPDU reordering is always performed on the target.
  1906. *
  1907. * 0: target responsible for frag timeout and dup checking
  1908. * 1: host responsible for frag timeout and dup checking
  1909. */
  1910. A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
  1911. /**
  1912. * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
  1913. * and Max no of descriptors for each Video link (node).
  1914. */
  1915. A_UINT32 vow_config;
  1916. /**
  1917. * @brief maximum VDEV that could use GTK offload
  1918. */
  1919. A_UINT32 gtk_offload_max_vdev;
  1920. /**
  1921. * @brief num_msdu_desc - Number of msdu descriptors target should use
  1922. */
  1923. A_UINT32 num_msdu_desc; /* Number of msdu desc */
  1924. /**
  1925. * @brief max_frag_entry - Max. number of Tx fragments per MSDU
  1926. * @details
  1927. * This parameter controls the max number of Tx fragments per MSDU.
  1928. * This is sent by the target as part of the WMI_SERVICE_READY event
  1929. * and is overriden by the OS shim as required.
  1930. */
  1931. A_UINT32 max_frag_entries;
  1932. /**
  1933. * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
  1934. * @brief num_msdu_desc - Number of vdev that can support beacon offload
  1935. */
  1936. A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
  1937. /**
  1938. * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
  1939. * @details
  1940. * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
  1941. * peers in a connection tracking table for possible TDLS link creation
  1942. * or deletion. This controls the number of tracked peers per vdev.
  1943. */
  1944. A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
  1945. A_UINT32 beacon_tx_offload_max_vdev;
  1946. A_UINT32 num_multicast_filter_entries;
  1947. A_UINT32 num_wow_filters; /*host can configure the number of wow filters*/
  1948. /**
  1949. * @brief num_keep_alive_pattern - Num of keep alive patterns configured
  1950. * from host.
  1951. */
  1952. A_UINT32 num_keep_alive_pattern;
  1953. /**
  1954. * @brief keep_alive_pattern_size - keep alive pattern size.
  1955. */
  1956. A_UINT32 keep_alive_pattern_size;
  1957. /**
  1958. * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
  1959. * @details
  1960. * Each TDLS STA can become a sleep STA independently. This parameter
  1961. * mentions how many such sleep STAs can be supported concurrently.
  1962. */
  1963. A_UINT32 max_tdls_concurrent_sleep_sta;
  1964. /**
  1965. * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
  1966. * @details
  1967. * Each TDLS STA can become a buffer STA independently. This parameter
  1968. * mentions how many such buffer STAs can be supported concurrently.
  1969. */
  1970. A_UINT32 max_tdls_concurrent_buffer_sta;
  1971. /**
  1972. * @brief wmi_send_separate - host configures fw to send the wmi separately
  1973. */
  1974. A_UINT32 wmi_send_separate;
  1975. /**
  1976. * @brief num_ocb_vdevs - Number of vdevs used for OCB support
  1977. */
  1978. A_UINT32 num_ocb_vdevs;
  1979. /**
  1980. * @brief num_ocb_channels - The supported number of simultaneous OCB channels
  1981. */
  1982. A_UINT32 num_ocb_channels;
  1983. /**
  1984. * @brief num_ocb_schedules - The supported number of OCB schedule segments
  1985. */
  1986. A_UINT32 num_ocb_schedules;
  1987. /**
  1988. * @brief specific configuration from host, such as per platform configuration
  1989. */
  1990. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
  1991. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
  1992. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
  1993. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
  1994. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
  1995. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
  1996. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
  1997. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
  1998. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
  1999. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
  2000. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
  2001. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
  2002. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
  2003. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
  2004. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
  2005. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
  2006. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
  2007. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
  2008. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
  2009. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
  2010. A_UINT32 flag1;
  2011. /** @brief smart_ant_cap - Smart Antenna capabilities information
  2012. * @details
  2013. * 1 - Smart antenna is enabled.
  2014. * 0 - Smart antenna is disabled.
  2015. * In future this can contain smart antenna specifc capabilities.
  2016. */
  2017. A_UINT32 smart_ant_cap;
  2018. /**
  2019. * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2020. * during init
  2021. */
  2022. A_UINT32 BK_Minfree;
  2023. A_UINT32 BE_Minfree;
  2024. A_UINT32 VI_Minfree;
  2025. A_UINT32 VO_Minfree;
  2026. /**
  2027. * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
  2028. * descriptor memory allocation.
  2029. * 1 - Allocate fragment descriptor memory for data packet in firmware.
  2030. * If host wants to transmit data packet at its desired rate,
  2031. * this field must be set.
  2032. * 0 - Don't allocate fragment descriptor for data packet.
  2033. */
  2034. A_UINT32 alloc_frag_desc_for_data_pkt;
  2035. /** how much space to allocate for NDP NS (neighbor solicitation) specs */
  2036. A_UINT32 num_ns_ext_tuples_cfg;
  2037. /**
  2038. * size (in bytes) of the buffer the FW shall allocate to store
  2039. * packet filtering instructions
  2040. */
  2041. A_UINT32 bpf_instruction_size;
  2042. /**
  2043. * Maximum no of BSSID based RX filters host would program
  2044. * Value 0 means host doesn't given any limit to FW.
  2045. */
  2046. A_UINT32 max_bssid_rx_filters;
  2047. /**
  2048. * Use PDEV ID instead of MAC ID, added for backward compatibility with older host
  2049. * which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
  2050. */
  2051. A_UINT32 use_pdev_id;
  2052. } wmi_resource_config;
  2053. #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
  2054. do { \
  2055. (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2056. (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
  2057. WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
  2058. } while (0)
  2059. #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
  2060. (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
  2061. WMI_RSRC_CFG_FLAG_ ## flag ## _S)
  2062. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
  2063. WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
  2064. #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
  2065. WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
  2066. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
  2067. WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
  2068. #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
  2069. WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
  2070. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
  2071. WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
  2072. #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
  2073. WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
  2074. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
  2075. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
  2076. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
  2077. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
  2078. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
  2079. WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
  2080. #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
  2081. WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
  2082. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
  2083. WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
  2084. #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
  2085. WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
  2086. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
  2087. WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
  2088. #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
  2089. WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
  2090. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
  2091. WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
  2092. #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
  2093. WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
  2094. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
  2095. WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
  2096. #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
  2097. WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
  2098. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
  2099. WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
  2100. #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
  2101. WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
  2102. typedef struct {
  2103. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
  2104. /** The following indicate the WMI versions to be supported by
  2105. * the host driver. Note that the host driver decide to
  2106. * "downgrade" its WMI version support and this may not be the
  2107. * native version of the host driver. */
  2108. wmi_abi_version host_abi_vers;
  2109. A_UINT32 num_host_mem_chunks; /** size of array host_mem_chunks[] */
  2110. /* The TLVs for resource_config, host_mem_chunks[], and hw_mode_config will follow.
  2111. * wmi_resource_config resource_config;
  2112. * wlan_host_memory_chunk host_mem_chunks[];
  2113. * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
  2114. * Note that the hw_mode_config, in spite of its "pdev" name,
  2115. * applies to the entire target rather than for a single pdev
  2116. * within the target.
  2117. * To avoid specifying a HW mode for the target, the host should
  2118. * fill hw_mode_config's fields with 0x0.
  2119. */
  2120. } wmi_init_cmd_fixed_param;
  2121. /**
  2122. * TLV for channel list
  2123. */
  2124. typedef struct {
  2125. /** WMI_CHAN_LIST_TAG */
  2126. A_UINT32 tag;
  2127. /** # of channels to scan */
  2128. A_UINT32 num_chan;
  2129. /** channels in Mhz */
  2130. A_UINT32 channel_list[1];
  2131. } wmi_chan_list;
  2132. /**
  2133. * TLV for bssid list
  2134. */
  2135. typedef struct {
  2136. /** WMI_BSSID_LIST_TAG */
  2137. A_UINT32 tag;
  2138. /** number of bssids */
  2139. A_UINT32 num_bssid;
  2140. /** bssid list */
  2141. wmi_mac_addr bssid_list[1];
  2142. } wmi_bssid_list;
  2143. /**
  2144. * TLV for ie data.
  2145. */
  2146. typedef struct {
  2147. /** WMI_IE_TAG */
  2148. A_UINT32 tag;
  2149. /** number of bytes in ie data */
  2150. A_UINT32 ie_len;
  2151. /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4) */
  2152. A_UINT32 ie_data[1];
  2153. } wmi_ie_data;
  2154. /**
  2155. * TLV used for length/buffer
  2156. */
  2157. typedef struct {
  2158. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tlv_buf_len_param */
  2159. A_UINT32 buf_len; /** Length of buf */
  2160. /**
  2161. * Following this structure is the TLV byte stream of buf of length buf_len:
  2162. * A_UINT8 buf[];
  2163. *
  2164. */
  2165. } wmi_tlv_buf_len_param;
  2166. typedef struct {
  2167. /** Len of the SSID */
  2168. A_UINT32 ssid_len;
  2169. /** SSID */
  2170. A_UINT32 ssid[8];
  2171. } wmi_ssid;
  2172. typedef struct {
  2173. /** WMI_SSID_LIST_TAG */
  2174. A_UINT32 tag;
  2175. A_UINT32 num_ssids;
  2176. wmi_ssid ssids[1];
  2177. } wmi_ssid_list;
  2178. /* prefix used by scan requestor ids on the host */
  2179. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2180. /* prefix used by scan request ids generated on the host */
  2181. /* host cycles through the lower 12 bits to generate ids */
  2182. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2183. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2184. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2185. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
  2186. typedef struct {
  2187. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  2188. /** Scan ID */
  2189. A_UINT32 scan_id;
  2190. /** Scan requestor ID */
  2191. A_UINT32 scan_req_id;
  2192. /** VDEV id(interface) that is requesting scan */
  2193. A_UINT32 vdev_id;
  2194. /** Scan Priority, input to scan scheduler */
  2195. A_UINT32 scan_priority;
  2196. /** Scan events subscription */
  2197. A_UINT32 notify_scan_events;
  2198. /** dwell time in msec on active channels */
  2199. A_UINT32 dwell_time_active;
  2200. /** dwell time in msec on passive channels */
  2201. A_UINT32 dwell_time_passive;
  2202. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  2203. A_UINT32 min_rest_time;
  2204. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  2205. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  2206. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  2207. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  2208. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  2209. * irrespective of activity. activity is determined by the idle_time parameter.
  2210. */
  2211. A_UINT32 max_rest_time;
  2212. /** time before sending next set of probe requests.
  2213. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  2214. * The number of probe requests specified depends on the ssid_list and bssid_list
  2215. */
  2216. A_UINT32 repeat_probe_time;
  2217. /** time in msec between 2 consequetive probe requests with in a set. */
  2218. A_UINT32 probe_spacing_time;
  2219. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  2220. A_UINT32 idle_time;
  2221. /** maximum time in msec allowed for scan */
  2222. A_UINT32 max_scan_time;
  2223. /** delay in msec before sending first probe request after switching to a channel */
  2224. A_UINT32 probe_delay;
  2225. /** Scan control flags */
  2226. A_UINT32 scan_ctrl_flags;
  2227. /** Burst duration time in msec*/
  2228. A_UINT32 burst_duration;
  2229. /** # if channels to scan. In the TLV channel_list[] */
  2230. A_UINT32 num_chan;
  2231. /** number of bssids. In the TLV bssid_list[] */
  2232. A_UINT32 num_bssid;
  2233. /** number of ssid. In the TLV ssid_list[] */
  2234. A_UINT32 num_ssids;
  2235. /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
  2236. A_UINT32 ie_len;
  2237. /** Max number of probes to be sent */
  2238. A_UINT32 n_probes;
  2239. /**
  2240. * TLV (tag length value) parameters follow the scan_cmd
  2241. * structure. The TLV's are:
  2242. * A_UINT32 channel_list[];
  2243. * wmi_ssid ssid_list[];
  2244. * wmi_mac_addr bssid_list[];
  2245. * A_UINT8 ie_data[];
  2246. */
  2247. } wmi_start_scan_cmd_fixed_param;
  2248. /**
  2249. * scan control flags.
  2250. */
  2251. /** passively scan all channels including active channels */
  2252. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2253. /** add wild card ssid probe request even though ssid_list is specified. */
  2254. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2255. /** add cck rates to rates/xrate ie for the generated probe request */
  2256. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2257. /** add ofdm rates to rates/xrate ie for the generated probe request */
  2258. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2259. /** To enable indication of Chan load and Noise floor to host */
  2260. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2261. /** Filter Probe request frames */
  2262. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2263. /**When set, not to scan DFS channels*/
  2264. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2265. /**When set, certain errors are ignored and scan continues.
  2266. * Different FW scan engine may use its own logic to decide what errors to ignore*/
  2267. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2268. /** Enable promiscous mode for CCXv4 */
  2269. #define WMI_SCAN_FILTER_PROMISCOUS 0x100
  2270. /** allow to send probe req on DFS channel */
  2271. #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
  2272. /** add TPC content in probe req frame */
  2273. #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
  2274. /** add DS content in probe req frame */
  2275. #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
  2276. /** use random mac address for TA for probe request frame and add
  2277. * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
  2278. * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
  2279. #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
  2280. /** allow mgmt transmission during off channel scan */
  2281. #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
  2282. /** allow data transmission during off channel scan */
  2283. #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
  2284. /** allow capture ppdu with phy errrors */
  2285. #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
  2286. /** always do passive scan on passive channels */
  2287. #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x10000
  2288. /** set HALF (10MHz) rate support */
  2289. #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
  2290. /** set Quarter (5MHz) rate support */
  2291. #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
  2292. /** for adaptive scan mode using 3 bits (21 - 23 bits) */
  2293. #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
  2294. #define WMI_SCAN_DWELL_MODE_SHIFT 21
  2295. typedef enum {
  2296. WMI_SCAN_DWELL_MODE_DEFAULT = 0,
  2297. WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
  2298. WMI_SCAN_DWELL_MODE_MODERATE = 2,
  2299. WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
  2300. WMI_SCAN_DWELL_MODE_STATIC = 4,
  2301. } WMI_SCAN_DWELL_MODE;
  2302. #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
  2303. do { \
  2304. (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
  2305. WMI_SCAN_DWELL_MODE_MASK); \
  2306. } while (0)
  2307. #define WMI_SCAN_GET_DWELL_MODE(flag) \
  2308. (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
  2309. /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2310. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2311. /*
  2312. * Masks identifying types/ID of scans
  2313. * Scan_Stop macros should be the same value as below defined in UMAC
  2314. * #define IEEE80211_SPECIFIC_SCAN 0x00000000
  2315. * #define IEEE80211_VAP_SCAN 0x01000000
  2316. * #define IEEE80211_ALL_SCANS 0x04000000
  2317. */
  2318. #define WMI_SCAN_STOP_ONE 0x00000000
  2319. #define WMI_SCN_STOP_VAP_ALL 0x01000000
  2320. #define WMI_SCAN_STOP_ALL 0x04000000
  2321. typedef struct {
  2322. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  2323. /** requestor requesting cancel */
  2324. A_UINT32 requestor;
  2325. /** Scan ID */
  2326. A_UINT32 scan_id;
  2327. /**
  2328. * Req Type
  2329. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  2330. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  2331. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  2332. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  2333. */
  2334. A_UINT32 req_type;
  2335. /**
  2336. * vDev ID
  2337. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  2338. */
  2339. A_UINT32 vdev_id;
  2340. } wmi_stop_scan_cmd_fixed_param;
  2341. #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
  2342. #define APPEND_TO_EXISTING_CHAN_LIST 1
  2343. typedef struct {
  2344. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
  2345. A_UINT32 num_scan_chans; /** no of elements in chan_info[] */
  2346. A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
  2347. /** Followed by the variable length TLV chan_info:
  2348. * wmi_channel chan_info[] */
  2349. } wmi_scan_chan_list_cmd_fixed_param;
  2350. /*
  2351. * Priority numbers must be sequential, starting with 0.
  2352. */
  2353. /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
  2354. typedef enum {
  2355. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2356. WMI_SCAN_PRIORITY_LOW,
  2357. WMI_SCAN_PRIORITY_MEDIUM,
  2358. WMI_SCAN_PRIORITY_HIGH,
  2359. WMI_SCAN_PRIORITY_VERY_HIGH,
  2360. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2361. } wmi_scan_priority;
  2362. /* Five Levels for Requested Priority */
  2363. /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
  2364. typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
  2365. /**
  2366. * 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
  2367. * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
  2368. * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
  2369. */
  2370. typedef struct {
  2371. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
  2372. /**
  2373. * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
  2374. * 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
  2375. */
  2376. A_UINT32 vdev_type;
  2377. /**
  2378. * number of rows in mapping_table for a specific vdev
  2379. * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
  2380. */
  2381. A_UINT32 number_rows;
  2382. /** mapping_table for a specific vdev follows this TLV
  2383. * WLAN_PRIORITY_MAPPING mapping_table[]; */
  2384. } wmi_scan_sch_priority_table_cmd_fixed_param;
  2385. /** update flags */
  2386. #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
  2387. #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
  2388. #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
  2389. typedef struct {
  2390. A_UINT32 tlv_header;
  2391. /** requestor requesting update scan request */
  2392. A_UINT32 requestor;
  2393. /** Scan ID of the scan request that need to be update */
  2394. A_UINT32 scan_id;
  2395. /** update flags, indicating which of the following fields are valid and need to be updated*/
  2396. A_UINT32 scan_update_flags;
  2397. /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
  2398. A_UINT32 scan_priority;
  2399. /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
  2400. A_UINT32 min_rest_time;
  2401. /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
  2402. A_UINT32 max_rest_time;
  2403. } wmi_scan_update_request_cmd_fixed_param;
  2404. typedef struct {
  2405. A_UINT32 tlv_header;
  2406. /** oui to be used in probe request frame when random mac addresss is
  2407. * requested part of scan parameters. this is applied to both FW internal scans and
  2408. * host initated scans. host can request for random mac address with
  2409. * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
  2410. A_UINT32 prob_req_oui;
  2411. } wmi_scan_prob_req_oui_cmd_fixed_param;
  2412. enum wmi_scan_event_type {
  2413. WMI_SCAN_EVENT_STARTED = 0x1,
  2414. WMI_SCAN_EVENT_COMPLETED = 0x2,
  2415. WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
  2416. WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  2417. WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
  2418. WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
  2419. WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
  2420. WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
  2421. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  2422. WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
  2423. WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
  2424. WMI_SCAN_EVENT_MAX = 0x8000
  2425. };
  2426. enum wmi_scan_completion_reason {
  2427. /** scan related events */
  2428. WMI_SCAN_REASON_NONE = 0xFF,
  2429. WMI_SCAN_REASON_COMPLETED = 0,
  2430. WMI_SCAN_REASON_CANCELLED = 1,
  2431. WMI_SCAN_REASON_PREEMPTED = 2,
  2432. WMI_SCAN_REASON_TIMEDOUT = 3,
  2433. WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
  2434. WMI_SCAN_REASON_SUSPENDED = 5,
  2435. WMI_SCAN_REASON_MAX,
  2436. };
  2437. typedef struct {
  2438. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
  2439. /** scan event (wmi_scan_event_type) */
  2440. A_UINT32 event;
  2441. /** status of the scan completion event */
  2442. A_UINT32 reason;
  2443. /** channel freq , only valid for FOREIGN channel event*/
  2444. A_UINT32 channel_freq;
  2445. /**id of the requestor whose scan is in progress */
  2446. A_UINT32 requestor;
  2447. /**id of the scan that is in progress */
  2448. A_UINT32 scan_id;
  2449. /**id of VDEV that requested the scan */
  2450. A_UINT32 vdev_id;
  2451. } wmi_scan_event_fixed_param;
  2452. /* WMI Diag event */
  2453. typedef struct {
  2454. A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
  2455. A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
  2456. A_UINT32 count; /* Number of diag frames added to current event */
  2457. A_UINT32 dropped;
  2458. /* followed by WMITLV_TAG_ARRAY_BYTE */
  2459. } wmi_diag_event_fixed_param;
  2460. /*
  2461. * If FW has multiple active channels due to MCC(multi channel concurrency),
  2462. * then these stats are combined stats for all the active channels.
  2463. */
  2464. typedef struct {
  2465. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
  2466. /** ack count, it is an incremental number, not accumulated number */
  2467. A_UINT32 ackRcvBad;
  2468. /** bad rts count, it is an incremental number, not accumulated number */
  2469. A_UINT32 rtsBad;
  2470. /** good rts, it is an incremental number, not accumulated number */
  2471. A_UINT32 rtsGood;
  2472. /** fcs count, it is an incremental number, not accumulated number */
  2473. A_UINT32 fcsBad;
  2474. /** beacon count, it is an incremental number, not accumulated number */
  2475. A_UINT32 noBeacons;
  2476. } wmi_update_whal_mib_stats_event_fixed_param;
  2477. /*
  2478. * This defines how much headroom is kept in the
  2479. * receive frame between the descriptor and the
  2480. * payload, in order for the WMI PHY error and
  2481. * management handler to insert header contents.
  2482. *
  2483. * This is in bytes.
  2484. */
  2485. #define WMI_MGMT_RX_HDR_HEADROOM (sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr))
  2486. /** This event will be used for sending scan results
  2487. * as well as rx mgmt frames to the host. The rx buffer
  2488. * will be sent as part of this WMI event. It would be a
  2489. * good idea to pass all the fields in the RX status
  2490. * descriptor up to the host.
  2491. */
  2492. /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
  2493. #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
  2494. /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
  2495. #define WMI_MGMT_RX_HDR_EXTSCAN 0x01
  2496. /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of matched network by FW ENLO */
  2497. #define WMI_MGMT_RX_HDR_ENLO 0x02
  2498. typedef struct {
  2499. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
  2500. /** channel on which this frame is received. */
  2501. A_UINT32 channel;
  2502. /** snr information used to cal rssi */
  2503. A_UINT32 snr;
  2504. /** Rate kbps */
  2505. A_UINT32 rate;
  2506. /** rx phy mode WLAN_PHY_MODE */
  2507. A_UINT32 phy_mode;
  2508. /** length of the frame */
  2509. A_UINT32 buf_len;
  2510. /** rx status */
  2511. A_UINT32 status;
  2512. /** RSSI of PRI 20MHz for each chain. */
  2513. A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
  2514. /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
  2515. A_UINT32 flags;
  2516. /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
  2517. A_INT32 rssi;
  2518. /** delta between local TSF(TSF timestamp when frame was RXd)
  2519. * and remote TSF(TSF timestamp in the IE for mgmt frame -
  2520. * beacon,proberesp for e.g). If remote TSF is not available,
  2521. * delta set to 0.
  2522. * Although tsf_delta is stored as A_UINT32, it can be negative,
  2523. * and thus would need to be sign-extended if added to a value
  2524. * larger than 32 bits.
  2525. */
  2526. A_UINT32 tsf_delta;
  2527. /* The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
  2528. * TSF timestamp in the RX MAC descriptor provided by HW.
  2529. */
  2530. A_UINT32 rx_tsf_l32;
  2531. /* The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
  2532. * after the packet is received.
  2533. */
  2534. A_UINT32 rx_tsf_u32;
  2535. /* This TLV is followed by array of bytes:
  2536. * A_UINT8 bufp[]; <-- management frame buffer
  2537. */
  2538. } wmi_mgmt_rx_hdr;
  2539. typedef struct {
  2540. /** TSF timestamp */
  2541. A_UINT32 tsf_timestamp;
  2542. /**
  2543. * Current freq1, freq2
  2544. *
  2545. * [7:0]: freq1[lo]
  2546. * [15:8] : freq1[hi]
  2547. * [23:16]: freq2[lo]
  2548. * [31:24]: freq2[hi]
  2549. */
  2550. A_UINT32 freq_info_1;
  2551. /**
  2552. * Combined RSSI over all chains and channel width for this PHY error
  2553. *
  2554. * [7:0]: RSSI combined
  2555. * [15:8]: Channel width (MHz)
  2556. * [23:16]: PHY error code
  2557. * [24:16]: reserved (future use)
  2558. */
  2559. A_UINT32 freq_info_2;
  2560. /**
  2561. * RSSI on chain 0 through 3
  2562. *
  2563. * This is formatted the same as the PPDU_START RX descriptor
  2564. * field:
  2565. *
  2566. * [7:0]: pri20
  2567. * [15:8]: sec20
  2568. * [23:16]: sec40
  2569. * [31:24]: sec80
  2570. */
  2571. A_UINT32 rssi_chain0;
  2572. A_UINT32 rssi_chain1;
  2573. A_UINT32 rssi_chain2;
  2574. A_UINT32 rssi_chain3;
  2575. /**
  2576. * Last calibrated NF value for chain 0 through 3
  2577. *
  2578. * nf_list_1:
  2579. *
  2580. * + [15:0] - chain 0
  2581. * + [31:16] - chain 1
  2582. *
  2583. * nf_list_2:
  2584. *
  2585. * + [15:0] - chain 2
  2586. * + [31:16] - chain 3
  2587. */
  2588. A_UINT32 nf_list_1;
  2589. A_UINT32 nf_list_2;
  2590. /** Length of the frame */
  2591. A_UINT32 buf_len;
  2592. } wmi_single_phyerr_rx_hdr;
  2593. #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
  2594. #define WMI_UNIFIED_FREQINFO_1_LO_S 0
  2595. #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
  2596. #define WMI_UNIFIED_FREQINFO_1_HI_S 8
  2597. #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
  2598. #define WMI_UNIFIED_FREQINFO_2_LO_S 16
  2599. #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
  2600. #define WMI_UNIFIED_FREQINFO_2_HI_S 24
  2601. /*
  2602. * Please keep in mind that these _SET macros break macro side effect
  2603. * assumptions; don't be clever with them.
  2604. */
  2605. #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
  2606. (WMI_F_MS((hdr)->freq_info_1, \
  2607. WMI_UNIFIED_FREQINFO_##f##_LO) \
  2608. | (WMI_F_MS((hdr)->freq_info_1, \
  2609. WMI_UNIFIED_FREQINFO_##f##_HI) << 8))
  2610. #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
  2611. do { \
  2612. WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
  2613. WMI_UNIFIED_FREQINFO_##f##_LO); \
  2614. WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
  2615. WMI_UNIFIED_FREQINFO_##f##_HI); \
  2616. } while (0)
  2617. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
  2618. #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
  2619. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
  2620. #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
  2621. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
  2622. #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
  2623. #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
  2624. ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
  2625. WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
  2626. #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
  2627. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2628. WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
  2629. #define WMI_UNIFIED_CHWIDTH_GET(hdr) \
  2630. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
  2631. #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
  2632. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2633. WMI_UNIFIED_FREQINFO_2_CHWIDTH);
  2634. #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
  2635. WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
  2636. #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
  2637. WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
  2638. WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
  2639. #define WMI_UNIFIED_CHAIN_0 0x0000ffff
  2640. #define WMI_UNIFIED_CHAIN_0_S 0
  2641. #define WMI_UNIFIED_CHAIN_1 0xffff0000
  2642. #define WMI_UNIFIED_CHAIN_1_S 16
  2643. #define WMI_UNIFIED_CHAIN_2 0x0000ffff
  2644. #define WMI_UNIFIED_CHAIN_2_S 0
  2645. #define WMI_UNIFIED_CHAIN_3 0xffff0000
  2646. #define WMI_UNIFIED_CHAIN_3_S 16
  2647. #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
  2648. #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
  2649. #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
  2650. #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
  2651. #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
  2652. ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, \
  2653. WMI_UNIFIED_CHAIN_##c)))
  2654. #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
  2655. WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_##c##_FIELD, (nf) & 0xffff, \
  2656. WMI_UNIFIED_CHAIN_##c);
  2657. /*
  2658. * For now, this matches what the underlying hardware is doing.
  2659. * Update ar6000ProcRxDesc() to use these macros when populating
  2660. * the rx descriptor and then we can just copy the field over
  2661. * to the WMI PHY notification without worrying about breaking
  2662. * things.
  2663. */
  2664. #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
  2665. #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
  2666. #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
  2667. #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
  2668. #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
  2669. #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
  2670. #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
  2671. #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
  2672. #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
  2673. WMI_F_RMW((hdr)->rssi_chain##c, (rssi) & 0xff, \
  2674. WMI_UNIFIED_RSSI_CHAN_##ch);
  2675. #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
  2676. ((int8_t) (WMI_F_MS((hdr)->rssi_chain##c, \
  2677. WMI_UNIFIED_RSSI_CHAN_##ch)))
  2678. typedef struct {
  2679. /** Phy error event header */
  2680. wmi_single_phyerr_rx_hdr hdr;
  2681. /** frame buffer */
  2682. A_UINT8 bufp[1];
  2683. } wmi_single_phyerr_rx_event;
  2684. /* PHY ERROR MASK 0 */
  2685. /* bits 1:0 defined but not published */
  2686. #define WMI_PHY_ERROR_MASK0_RADAR (1 << 2)
  2687. /* bits 23:3 defined but not published */
  2688. #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1 << 24)
  2689. /* bits 25:24 defined but not published */
  2690. #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1 << 26)
  2691. /* bits 31:27 defined but not published */
  2692. /* PHY ERROR MASK 1 */
  2693. /* bits 13:0 defined but not published */
  2694. /* bits 31:14 reserved */
  2695. /* PHY ERROR MASK 2 */
  2696. /* bits 31:0 reserved */
  2697. typedef struct {
  2698. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
  2699. /** Phy error phy error count */
  2700. A_UINT32 num_phyerr_events;
  2701. A_UINT32 tsf_l32;
  2702. A_UINT32 tsf_u32;
  2703. A_UINT32 buf_len;
  2704. union {
  2705. A_UINT32 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  2706. /** pdev_id for identifying the MAC
  2707. * See macros starting with WMI_PDEV_ID_ for values.
  2708. */
  2709. A_UINT32 pdev_id;
  2710. };
  2711. A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
  2712. A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
  2713. A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
  2714. /* This TLV is followed by array of bytes:
  2715. * frame buffer - contains multiple payloads in the order:
  2716. * header - payload, header - payload...
  2717. * (The header is of type: wmi_single_phyerr_rx_hdr)
  2718. * A_UINT8 bufp[];
  2719. */
  2720. } wmi_comb_phyerr_rx_hdr;
  2721. /* WMI MGMT TX */
  2722. typedef struct {
  2723. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
  2724. /** unique id identifying the VDEV, generated by the caller */
  2725. A_UINT32 vdev_id;
  2726. /** peer MAC address */
  2727. wmi_mac_addr peer_macaddr;
  2728. /** xmit rate */
  2729. A_UINT32 tx_rate;
  2730. /** xmit power */
  2731. A_UINT32 tx_power;
  2732. /** Buffer length in bytes */
  2733. A_UINT32 buf_len;
  2734. /* This TLV is followed by array of bytes:
  2735. * A_UINT8 bufp[]; <-- management frame buffer
  2736. */
  2737. } wmi_mgmt_tx_hdr;
  2738. typedef struct {
  2739. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param */
  2740. A_UINT32 vdev_id;
  2741. A_UINT32 desc_id; /* echoed in tx_compl_event */
  2742. A_UINT32 chanfreq; /* MHz units */
  2743. A_UINT32 paddr_lo;
  2744. A_UINT32 paddr_hi;
  2745. A_UINT32 frame_len;
  2746. A_UINT32 buf_len; /** Buffer length in bytes */
  2747. /* This TLV is followed by array of bytes: First 64 bytes of management frame
  2748. * A_UINT8 bufp[];
  2749. */
  2750. } wmi_mgmt_tx_send_cmd_fixed_param;
  2751. typedef struct {
  2752. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
  2753. A_UINT32 value;
  2754. } wmi_echo_event_fixed_param;
  2755. typedef struct {
  2756. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
  2757. A_UINT32 value;
  2758. } wmi_echo_cmd_fixed_param;
  2759. typedef struct {
  2760. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
  2761. /** pdev_id for identifying the MAC
  2762. * See macros starting with WMI_PDEV_ID_ for values.
  2763. */
  2764. A_UINT32 pdev_id;
  2765. /** reg domain code */
  2766. A_UINT32 reg_domain;
  2767. A_UINT32 reg_domain_2G;
  2768. A_UINT32 reg_domain_5G;
  2769. A_UINT32 conformance_test_limit_2G;
  2770. A_UINT32 conformance_test_limit_5G;
  2771. A_UINT32 dfs_domain;
  2772. } wmi_pdev_set_regdomain_cmd_fixed_param;
  2773. typedef struct {
  2774. /** TRUE for scan start and flase for scan end */
  2775. A_UINT32 scan_start;
  2776. } wmi_pdev_scan_cmd;
  2777. /* WMI support for setting ratemask in target */
  2778. typedef struct {
  2779. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param */
  2780. A_UINT32 vdev_id;
  2781. /* 0 - cck/ofdm
  2782. * 1 - HT
  2783. * 2 - VHT */
  2784. A_UINT32 type;
  2785. A_UINT32 mask_lower32;
  2786. A_UINT32 mask_higher32;
  2787. } wmi_vdev_config_ratemask_cmd_fixed_param;
  2788. /* nrp action - Filter Neighbor Rx Packets - add/remove filter */
  2789. enum {
  2790. WMI_FILTER_NRP_ACTION_ADD = 0x1,
  2791. WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
  2792. WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
  2793. }; /* nrp - Neighbor Rx Packets */
  2794. /* nrp type - Filter Neighbor Rx Packets - ap/client addr */
  2795. enum {
  2796. WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
  2797. WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
  2798. };
  2799. /* nrp flag - Filter Neighbor Rx Packets
  2800. * (capture flag, 2 & 3 not initially supported)
  2801. */
  2802. enum {
  2803. WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
  2804. WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
  2805. WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
  2806. };
  2807. typedef struct {
  2808. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param */
  2809. A_UINT32 vdev_id;
  2810. /* AP Bssid or Client Mac-addr */
  2811. wmi_mac_addr addr;
  2812. /* Add/Remove NRF Filter */
  2813. A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
  2814. /* client/ap filter */
  2815. A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
  2816. /* optional - tx/rx capture */
  2817. A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
  2818. /* BSSID index - index of the BSSID register */
  2819. A_UINT32 bssid_idx;
  2820. } wmi_vdev_filter_nrp_config_cmd_fixed_param; /* Filter for Neighbor Rx Packets */
  2821. /*Command to set/unset chip in quiet mode*/
  2822. typedef struct {
  2823. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
  2824. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  2825. A_UINT32 period; /*period in TUs*/
  2826. A_UINT32 duration; /*duration in TUs*/
  2827. A_UINT32 next_start; /*offset in TUs*/
  2828. A_UINT32 enabled; /*enable/disable*/
  2829. } wmi_pdev_set_quiet_cmd_fixed_param;
  2830. typedef struct {
  2831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param */
  2832. A_UINT32 vdev_id; /* Virtual interface ID */
  2833. A_UINT32 period; /* period in TUs */
  2834. A_UINT32 duration; /* duration in TUs */
  2835. A_UINT32 next_start; /* offset in TUs */
  2836. A_UINT32 enabled; /* enable/disable */
  2837. } wmi_vdev_set_quiet_cmd_fixed_param;
  2838. typedef struct {
  2839. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param */
  2840. A_UINT32 vdev_id; /* vdev id indicating to which the vdev custom aggregation size will be applied. */
  2841. A_UINT32 tx_aggr_size; /* Size for tx aggregation (max MPDUs per A-MPDU) for the vdev mentioned in vdev id */
  2842. A_UINT32 rx_aggr_size; /* Size for rx aggregation (block ack window size limit) for the vdev mentioned in vdev id*/
  2843. } wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
  2844. /*
  2845. * Command to enable/disable Green AP Power Save.
  2846. * This helps conserve power during AP operation. When the AP has no
  2847. * stations associated with it, the host can enable Green AP Power Save
  2848. * to request the firmware to shut down all but one transmit and receive
  2849. * chains.
  2850. */
  2851. typedef struct {
  2852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
  2853. /** pdev_id for identifying the MAC
  2854. * See macros starting with WMI_PDEV_ID_ for values.
  2855. */
  2856. A_UINT32 pdev_id;
  2857. A_UINT32 enable; /*1:enable, 0:disable*/
  2858. } wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
  2859. #define MAX_HT_IE_LEN 32
  2860. /* DEPRECATED */
  2861. typedef struct {
  2862. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
  2863. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  2864. A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
  2865. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  2866. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  2867. /** The TLV for the HT IE follows:
  2868. * A_UINT32 ie_data[];
  2869. */
  2870. } wmi_pdev_set_ht_ie_cmd_fixed_param;
  2871. #define MAX_VHT_IE_LEN 32
  2872. /* DEPRECATED */
  2873. typedef struct {
  2874. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
  2875. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  2876. A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
  2877. A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
  2878. A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
  2879. /** The TLV for the VHT IE follows:
  2880. * A_UINT32 ie_data[];
  2881. */
  2882. } wmi_pdev_set_vht_ie_cmd_fixed_param;
  2883. typedef struct {
  2884. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
  2885. /** pdev_id for identifying the MAC
  2886. * See macros starting with WMI_PDEV_ID_ for values.
  2887. */
  2888. A_UINT32 pdev_id;
  2889. wmi_mac_addr base_macaddr;
  2890. } wmi_pdev_set_base_macaddr_cmd_fixed_param;
  2891. /*
  2892. * For now, the spectral configuration is global rather than
  2893. * per-vdev. The vdev is a placeholder and will be ignored
  2894. * by the firmware.
  2895. */
  2896. typedef struct {
  2897. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
  2898. A_UINT32 vdev_id;
  2899. A_UINT32 spectral_scan_count;
  2900. A_UINT32 spectral_scan_period;
  2901. A_UINT32 spectral_scan_priority;
  2902. A_UINT32 spectral_scan_fft_size;
  2903. A_UINT32 spectral_scan_gc_ena;
  2904. A_UINT32 spectral_scan_restart_ena;
  2905. A_UINT32 spectral_scan_noise_floor_ref;
  2906. A_UINT32 spectral_scan_init_delay;
  2907. A_UINT32 spectral_scan_nb_tone_thr;
  2908. A_UINT32 spectral_scan_str_bin_thr;
  2909. A_UINT32 spectral_scan_wb_rpt_mode;
  2910. A_UINT32 spectral_scan_rssi_rpt_mode;
  2911. A_UINT32 spectral_scan_rssi_thr;
  2912. A_UINT32 spectral_scan_pwr_format;
  2913. A_UINT32 spectral_scan_rpt_mode;
  2914. A_UINT32 spectral_scan_bin_scale;
  2915. A_UINT32 spectral_scan_dBm_adj;
  2916. A_UINT32 spectral_scan_chn_mask;
  2917. } wmi_vdev_spectral_configure_cmd_fixed_param;
  2918. /*
  2919. * Enabling, disabling and triggering the spectral scan
  2920. * is a per-vdev operation. That is, it will set channel
  2921. * flags per vdev rather than globally; so concurrent scan/run
  2922. * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
  2923. */
  2924. typedef struct {
  2925. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
  2926. A_UINT32 vdev_id;
  2927. /* 0 - ignore; 1 - trigger, 2 - clear trigger */
  2928. A_UINT32 trigger_cmd;
  2929. /* 0 - ignore; 1 - enable, 2 - disable */
  2930. A_UINT32 enable_cmd;
  2931. } wmi_vdev_spectral_enable_cmd_fixed_param;
  2932. typedef enum {
  2933. WMI_CSA_IE_PRESENT = 0x00000001,
  2934. WMI_XCSA_IE_PRESENT = 0x00000002,
  2935. WMI_WBW_IE_PRESENT = 0x00000004,
  2936. WMI_CSWARP_IE_PRESENT = 0x00000008,
  2937. } WMI_CSA_EVENT_IES_PRESENT_FLAG;
  2938. /* wmi CSA receive event from beacon frame */
  2939. typedef struct {
  2940. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
  2941. A_UINT32 i_fc_dur; /* Bit 0-15: FC, Bit 16-31: DUR */
  2942. wmi_mac_addr i_addr1;
  2943. wmi_mac_addr i_addr2;
  2944. /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
  2945. * changed in the future without breaking WMI compatibility */
  2946. A_UINT32 csa_ie[2];
  2947. A_UINT32 xcsa_ie[2];
  2948. A_UINT32 wb_ie[2];
  2949. A_UINT32 cswarp_ie;
  2950. A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
  2951. } wmi_csa_event_fixed_param;
  2952. typedef enum {
  2953. WAL_PEER_MCAST2UCAST_DISABLED = 0,
  2954. WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, /* Drop the frames if match is not found */
  2955. WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, /* Send as mcast if match is not found */
  2956. } WMI_PEER_MCAST2UCAST_MODE;
  2957. typedef enum {
  2958. /** TX chain mask */
  2959. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  2960. /** RX chain mask */
  2961. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  2962. /** TX power limit for 2G Radio */
  2963. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  2964. /** TX power limit for 5G Radio */
  2965. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  2966. /** TX power scale */
  2967. WMI_PDEV_PARAM_TXPOWER_SCALE,
  2968. /** Beacon generation mode . 0: host, 1: target */
  2969. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  2970. /** Beacon generation mode . 0: staggered 1: bursted */
  2971. WMI_PDEV_PARAM_BEACON_TX_MODE,
  2972. /** Resource manager off chan mode .
  2973. * 0: turn off off chan mode. 1: turn on offchan mode
  2974. */
  2975. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  2976. /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
  2977. WMI_PDEV_PARAM_PROTECTION_MODE,
  2978. /** Dynamic bandwidth 0: disable 1: enable */
  2979. WMI_PDEV_PARAM_DYNAMIC_BW,
  2980. /** Non aggregrate/ 11g sw retry threshold.0-disable */
  2981. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  2982. /** aggregrate sw retry threshold. 0-disable*/
  2983. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  2984. /** Station kickout threshold (non of consecutive failures).0-disable */
  2985. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  2986. /** Aggerate size scaling configuration per AC */
  2987. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  2988. /** LTR enable */
  2989. WMI_PDEV_PARAM_LTR_ENABLE,
  2990. /** LTR latency for BE, in us */
  2991. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  2992. /** LTR latency for BK, in us */
  2993. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  2994. /** LTR latency for VI, in us */
  2995. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  2996. /** LTR latency for VO, in us */
  2997. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  2998. /** LTR AC latency timeout, in ms */
  2999. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  3000. /** LTR platform latency override, in us */
  3001. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  3002. /** LTR-M override, in us */
  3003. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  3004. /** Tx activity timeout for LTR, in us */
  3005. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  3006. /** L1SS state machine enable */
  3007. WMI_PDEV_PARAM_L1SS_ENABLE,
  3008. /** Deep sleep state machine enable */
  3009. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  3010. /** RX buffering flush enable */
  3011. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  3012. /** RX buffering matermark */
  3013. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  3014. /** RX buffering timeout enable */
  3015. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  3016. /** RX buffering timeout value */
  3017. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  3018. /** pdev level stats update period in ms */
  3019. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  3020. /** vdev level stats update period in ms */
  3021. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  3022. /** peer level stats update period in ms */
  3023. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  3024. /** beacon filter status update period */
  3025. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  3026. /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  3027. WMI_PDEV_PARAM_PMF_QOS,
  3028. /** Access category on which ARP frames are sent */
  3029. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  3030. /** DCS configuration */
  3031. WMI_PDEV_PARAM_DCS,
  3032. /** Enable/Disable ANI on target */
  3033. WMI_PDEV_PARAM_ANI_ENABLE,
  3034. /** configure the ANI polling period */
  3035. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  3036. /** configure the ANI listening period */
  3037. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  3038. /** configure OFDM immunity level */
  3039. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  3040. /** configure CCK immunity level */
  3041. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  3042. /** Enable/Disable CDD for 1x1 STAs in rate control module */
  3043. WMI_PDEV_PARAM_DYNTXCHAIN,
  3044. /** Enable/Disable proxy STA */
  3045. WMI_PDEV_PARAM_PROXY_STA,
  3046. /** Enable/Disable low power state when all VDEVs are inactive/idle. */
  3047. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  3048. /** Enable/Disable power gating sleep */
  3049. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  3050. /** Enable/Disable Rfkill */
  3051. WMI_PDEV_PARAM_RFKILL_ENABLE,
  3052. /** Set Bursting DUR */
  3053. WMI_PDEV_PARAM_BURST_DUR,
  3054. /** Set Bursting ENABLE */
  3055. WMI_PDEV_PARAM_BURST_ENABLE,
  3056. /** HW rfkill config */
  3057. WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
  3058. /** Enable radio low power features */
  3059. WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
  3060. /** L1SS entry and residency time track */
  3061. WMI_PDEV_PARAM_L1SS_TRACK,
  3062. /** set hyst at runtime, requirement from SS */
  3063. WMI_PDEV_PARAM_HYST_EN,
  3064. /** Enable/ Disable POWER COLLAPSE */
  3065. WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
  3066. /** configure LED system state */
  3067. WMI_PDEV_PARAM_LED_SYS_STATE,
  3068. /** Enable/Disable LED */
  3069. WMI_PDEV_PARAM_LED_ENABLE,
  3070. /** set DIRECT AUDIO time latency */
  3071. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
  3072. /** set DIRECT AUDIO Feature ENABLE */
  3073. WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
  3074. /** pdev level whal mib stats update enable */
  3075. WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
  3076. /** ht/vht info based on vdev */
  3077. WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
  3078. /** Set CTS channel BW for dynamic BW adjustment feature */
  3079. WMI_PDEV_PARAM_CTS_CBW,
  3080. /** Set GPIO pin info used by WNTS */
  3081. WMI_PDEV_PARAM_WNTS_CONFIG,
  3082. /** Enable/Disable hardware adaptive early rx feature */
  3083. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
  3084. /** The minimum early rx duration, to ensure early rx duration is non-zero */
  3085. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
  3086. /** Increasing/decreasing step used by hardware */
  3087. WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
  3088. /** The fixed early rx duration when adaptive early rx is disabled */
  3089. WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
  3090. /** Enable/Disable bmiss based adaptive beacon timeout feature */
  3091. WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
  3092. /** The minimum beacon timeout duration, to ensure beacon timeout duration is non-zero */
  3093. WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
  3094. /** Increasing/decreasing step used by hardware */
  3095. WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
  3096. /** The fixed beacon timeout duration when bmiss based adaptive beacon timeout is disabled */
  3097. WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
  3098. /** Enable/Disable Congestion Estimator based adaptive beacon timeout feature */
  3099. WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
  3100. /** combo value of ce_id, ce_threshold, ce_time, refer to WMI_CE_BTO_CE_ID_MASK */
  3101. WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
  3102. /** 2G TX chain mask */
  3103. WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
  3104. /** 2G RX chain mask */
  3105. WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
  3106. /** 5G TX chain mask */
  3107. WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
  3108. /** 5G RX chain mask */
  3109. WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
  3110. /* Set tx chain mask for CCK rates */
  3111. WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
  3112. /* Set tx chain mask for 1SS stream */
  3113. WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
  3114. /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected */
  3115. WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
  3116. /** TX power backoff in dB: tx power -= param value
  3117. * Host passes values(DB) to Halphy, Halphy reduces the power table by
  3118. * the values. Safety check will happen in Halphy
  3119. */
  3120. WMI_PDEV_PARAM_TXPOWER_DECR_DB,
  3121. /** enable and disable aggregate burst along with duration */
  3122. WMI_PDEV_PARAM_AGGR_BURST,
  3123. /** Set the global RX decap mode */
  3124. WMI_PDEV_PARAM_RX_DECAP_MODE,
  3125. /** Enable/Disable Fast channel reset */
  3126. WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
  3127. /** Default antenna for Smart antenna */
  3128. WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
  3129. /** Set the user-specified antenna gain */
  3130. WMI_PDEV_PARAM_ANTENNA_GAIN,
  3131. /** Set the user-specified RX filter */
  3132. WMI_PDEV_PARAM_RX_FILTER,
  3133. /** configure the user-specified MCAST tid for managed mcast feature
  3134. * 0-15 is the valid range. 0xff will clear the tid setting */
  3135. WMI_PDEV_SET_MCAST_TO_UCAST_TID,
  3136. /** Enable/Disable Proxy sta mode */
  3137. WMI_PDEV_PARAM_PROXY_STA_MODE,
  3138. /** configure the mcast2ucast mode for the pdev->peer_mcast.
  3139. * See WMI_PEER_MCAST2UCAST_MODE for possible values */
  3140. WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
  3141. /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
  3142. WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
  3143. /** Remove the Mcast buffers added by host */
  3144. WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
  3145. /** En/disable station power save state indication */
  3146. WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
  3147. /** Access category on which ARP frames are sent */
  3148. WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
  3149. /** allow or disallow interbss frame forwarding */
  3150. WMI_PDEV_PARAM_BLOCK_INTERBSS,
  3151. /** Enable/Disable reset */
  3152. WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
  3153. /** Enable/Disable/Set MSDU_TTL in milliseconds. */
  3154. WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
  3155. /** Set global PPDU duration limit (usec). */
  3156. WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
  3157. /** set txbf sounding period of vap in milliseconds */
  3158. WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
  3159. /** Set promiscuous mode */
  3160. WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
  3161. /** Set burst mode */
  3162. WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
  3163. /** enable enhanced stats */
  3164. WMI_PDEV_PARAM_EN_STATS,
  3165. /** Set mu-grouping policy */
  3166. WMI_PDEV_PARAM_MU_GROUP_POLICY,
  3167. /** Channel Hopping Enable */
  3168. WMI_PDEV_PARAM_NOISE_DETECTION,
  3169. /** Set Channel Hopping NF threshold in dBm */
  3170. WMI_PDEV_PARAM_NOISE_THRESHOLD,
  3171. /** Set PAPRD policy */
  3172. WMI_PDEV_PARAM_DPD_ENABLE,
  3173. /** Enable/disable mcast/bcast echo, used by ProxySTA */
  3174. WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
  3175. /** ATF enable/disable strict schedule */
  3176. WMI_PDEV_PARAM_ATF_STRICT_SCH,
  3177. /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
  3178. WMI_PDEV_PARAM_ATF_SCHED_DURATION,
  3179. /** Default antenna polarization */
  3180. WMI_PDEV_PARAM_ANT_PLZN,
  3181. /** Set mgmt retry limit */
  3182. WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
  3183. /** Set CCA sensitivity level in dBm */
  3184. WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
  3185. /** Set 2G positive and negative Tx power in 0.5dBm units */
  3186. WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
  3187. /** Set 5G positive and negative Tx power in 0.5dBm
  3188. * units */
  3189. WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
  3190. /** Enable/disble AMSDU for tids */
  3191. WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
  3192. /** Enable/disable AMPDU for tids */
  3193. WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
  3194. /** Set CCA threshold in dBm */
  3195. WMI_PDEV_PARAM_CCA_THRESHOLD,
  3196. /** RTS Fixed rate setting */
  3197. WMI_PDEV_PARAM_RTS_FIXED_RATE,
  3198. /** Pdev reset */
  3199. WMI_PDEV_PARAM_PDEV_RESET,
  3200. /** wapi mbssid offset **/
  3201. WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
  3202. /** ARP DEBUG source address*/
  3203. WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
  3204. /** ARP DEBUG destination address*/
  3205. WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
  3206. /** ATF enable/disable obss noise scheduling */
  3207. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
  3208. /** ATF obss noise scaling factor */
  3209. WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
  3210. /**
  3211. * TX power reduction scaling exponent - final tx power is the
  3212. * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
  3213. * 2^(scale exponent). For example:
  3214. * If this scale exponent is 0, the power is unchanged (divided by 2^0)
  3215. * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
  3216. * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
  3217. * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
  3218. */
  3219. WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
  3220. /** ATF enabe/disabe dynamically */
  3221. WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
  3222. /** Set tx retry limit for control frames. 0 = disable, 31 = max */
  3223. WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
  3224. /** Set propagation delay for 2G / 5G band.
  3225. * The propagation delay is fundamentally a per-peer property, but
  3226. * the target may not support per-peer settings for ack timeouts.
  3227. * This pdev parameter allows the MAC-level ack timeout to be set to
  3228. * a value suitable for the worst-case propagation delay of any peer
  3229. * within that pdev.
  3230. * Units are microseconds.
  3231. */
  3232. WMI_PDEV_PARAM_PROPAGATION_DELAY,
  3233. /**
  3234. * Host can enable/disable ANT DIV feature
  3235. * if it's been enabled in BDF
  3236. */
  3237. WMI_PDEV_PARAM_ENA_ANT_DIV,
  3238. /** Host can force one chain to select a specific ANT */
  3239. WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
  3240. /**
  3241. * Start a cycle ANT self test periodically.
  3242. * In the test, the FW would select each ANT pair
  3243. * one by one, the cycle time could be configured
  3244. * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
  3245. */
  3246. WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
  3247. /**
  3248. * Configure the cycle time of ANT self test,
  3249. * the unit is micro second. Per the timer
  3250. * limitation, too small value could be not so
  3251. * accurate.
  3252. */
  3253. WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
  3254. /**
  3255. * wlan stats observation period, the unit is millisecond.
  3256. * The value of 0 is used to turn off periodic stats report.
  3257. */
  3258. WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
  3259. /**
  3260. * Set tx_msdu_delay[] bin size to specify how many
  3261. * milliseconds each bin of the wmi_tx_stats.tx_msdu_delay[]
  3262. * histogram represents.
  3263. */
  3264. WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS,
  3265. /** set wmi_tx_stats.tx_msdu_delay[] array size */
  3266. WMI_PDEV_PARAM_TX_DELAY_ARRAY_SIZE,
  3267. /** set wmi_tx_stats.tx_mpdu_aggr[] array size */
  3268. WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_SIZE,
  3269. /** set wmi_rx_stats.rx_mpdu_aggr[] array size */
  3270. WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_SIZE,
  3271. } WMI_PDEV_PARAM;
  3272. typedef struct {
  3273. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
  3274. /** pdev_id for identifying the MAC
  3275. * See macros starting with WMI_PDEV_ID_ for values.
  3276. */
  3277. A_UINT32 pdev_id;
  3278. /** parameter id */
  3279. A_UINT32 param_id;
  3280. /** parametr value */
  3281. A_UINT32 param_value;
  3282. } wmi_pdev_set_param_cmd_fixed_param;
  3283. /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
  3284. typedef enum {
  3285. WMI_CTS_CBW_INVALID = 0,
  3286. WMI_CTS_CBW_20,
  3287. WMI_CTS_CBW_40,
  3288. WMI_CTS_CBW_80,
  3289. WMI_CTS_CBW_80_80,
  3290. WMI_CTS_CBW_160,
  3291. } WMI_CTS_CBW;
  3292. typedef struct {
  3293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
  3294. /** pdev_id for identifying the MAC
  3295. * See macros starting with WMI_PDEV_ID_ for values.
  3296. */
  3297. A_UINT32 pdev_id;
  3298. /** parameter */
  3299. A_UINT32 param;
  3300. } wmi_pdev_get_tpc_config_cmd_fixed_param;
  3301. #define WMI_FAST_DIVERSITY_BIT_OFFSET 0
  3302. #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
  3303. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
  3304. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  3305. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
  3306. (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
  3307. #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
  3308. do { \
  3309. (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  3310. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
  3311. WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
  3312. } while (0)
  3313. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
  3314. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  3315. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
  3316. (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
  3317. #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
  3318. do { \
  3319. (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  3320. (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
  3321. WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
  3322. } while (0)
  3323. typedef struct {
  3324. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
  3325. union {
  3326. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  3327. /** pdev_id for identifying the MAC
  3328. * See macros starting with WMI_PDEV_ID_ for values.
  3329. */
  3330. A_UINT32 pdev_id;
  3331. };
  3332. /**
  3333. * The following "value" field is divided into bit fields as follows:
  3334. * bits | purpose
  3335. * -----+---------------------------------------
  3336. * 0 | enable/disable FAST diversity
  3337. * 1 | enable/disable SLOW diversity
  3338. * 5:2 | chain0 slow-diversity weighting factor
  3339. * 9:6 | chain1 slow-diversity weighting factor
  3340. * 31:10| currenty unused (set to 0x0)
  3341. * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
  3342. */
  3343. A_UINT32 value;
  3344. } wmi_pdev_set_antenna_diversity_cmd_fixed_param;
  3345. #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
  3346. typedef struct {
  3347. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param */
  3348. A_UINT32 vdev_id; /* vdev_id, where RSSI monitoring will take place */
  3349. A_UINT32 request_id; /* host will configure request_id and firmware echo this id in RSSI_BREACH_EVENT */
  3350. A_UINT32 enabled_bitmap; /* bit [0-2] = low_rssi_breach_enabled[0-2] enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] */
  3351. A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] > [1] > [2] */
  3352. A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; /* unit dBm. host driver to make sure [0] < [1] < [2] */
  3353. 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] */
  3354. 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] */
  3355. A_UINT32 min_report_interval; /* After last event is generated, we wait until this interval to generate next event */
  3356. A_UINT32 max_num_report; /* this is to suppress number of event to be generated */
  3357. } wmi_rssi_breach_monitor_config_fixed_param;
  3358. typedef struct {
  3359. /** parameter */
  3360. A_UINT32 param;
  3361. } wmi_pdev_dump_cmd;
  3362. typedef enum {
  3363. PAUSE_TYPE_CHOP = 0x1, /** for MCC (switch channel), only vdev_map is valid */
  3364. PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
  3365. PAUSE_TYPE_UAPSD = 0x3, /** for uapsd, only peer_id and tid_map are valid. */
  3366. PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, /** only vdev_map is valid, actually only one vdev id is set at one time */
  3367. PAUSE_TYPE_P2P_GO_PS = 0x5, /** only vdev_map is valid, actually only one vdev id is set at one time */
  3368. PAUSE_TYPE_STA_ADD_BA = 0x6, /** only peer_id and tid_map are valid, actually only one tid is set at one time */
  3369. PAUSE_TYPE_AP_PS = 0x7, /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
  3370. PAUSE_TYPE_IBSS_PS = 0x8, /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
  3371. PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, /** for TDLS offchannel MCC (switch channel), only vdev_map is valid, TDLS connection tracker needs to be notified */
  3372. } wmi_tx_pause_type;
  3373. typedef enum {
  3374. ACTION_PAUSE = 0x0,
  3375. ACTION_UNPAUSE = 0x1,
  3376. } wmi_tx_pause_action;
  3377. typedef struct {
  3378. A_UINT32 tlv_header;
  3379. A_UINT32 pause_type;
  3380. A_UINT32 action;
  3381. A_UINT32 vdev_map;
  3382. A_UINT32 peer_id;
  3383. A_UINT32 tid_map;
  3384. } wmi_tx_pause_event_fixed_param;
  3385. typedef enum {
  3386. WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
  3387. WMI_MGMT_TX_COMP_TYPE_DISCARD,
  3388. WMI_MGMT_TX_COMP_TYPE_INSPECT,
  3389. WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
  3390. WMI_MGMT_TX_COMP_TYPE_MAX,
  3391. } WMI_MGMT_TX_COMP_STATUS_TYPE;
  3392. typedef struct {
  3393. A_UINT32 tlv_header;
  3394. A_UINT32 desc_id; /* from tx_send_cmd */
  3395. A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
  3396. } wmi_mgmt_tx_compl_event_fixed_param;
  3397. typedef struct {
  3398. A_UINT32 tlv_header;
  3399. A_UINT32 num_reports;
  3400. /* tlv for completion
  3401. * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
  3402. * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
  3403. */
  3404. } wmi_mgmt_tx_compl_bundle_event_fixed_param;
  3405. #define WMI_TPC_RATE_MAX 160
  3406. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  3407. #define WMI_TPC_TX_NUM_CHAIN 4
  3408. typedef enum {
  3409. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  3410. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  3411. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  3412. } WMI_TPC_CONFIG_EVENT_FLAG;
  3413. typedef struct {
  3414. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
  3415. A_UINT32 regDomain;
  3416. A_UINT32 chanFreq;
  3417. A_UINT32 phyMode;
  3418. A_UINT32 twiceAntennaReduction;
  3419. A_UINT32 twiceMaxRDPower;
  3420. A_INT32 twiceAntennaGain;
  3421. A_UINT32 powerLimit;
  3422. A_UINT32 rateMax;
  3423. A_UINT32 numTxChain;
  3424. A_UINT32 ctl;
  3425. A_UINT32 flags;
  3426. /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
  3427. A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
  3428. A_INT8 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  3429. A_INT8 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  3430. A_INT8 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN][WMI_TPC_TX_NUM_CHAIN];
  3431. /** pdev_id for identifying the MAC
  3432. * See macros starting with WMI_PDEV_ID_ for values.
  3433. */
  3434. A_UINT32 pdev_id;
  3435. /* This TLV is followed by a byte array:
  3436. * A_UINT8 ratesArray[];
  3437. */
  3438. } wmi_pdev_tpc_config_event_fixed_param;
  3439. typedef struct {
  3440. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
  3441. A_UINT32 periodCnt;
  3442. A_UINT32 L1Cnt;
  3443. A_UINT32 L11Cnt;
  3444. A_UINT32 L12Cnt;
  3445. A_UINT32 L1Entry;
  3446. A_UINT32 L11Entry;
  3447. A_UINT32 L12Entry;
  3448. /** pdev_id for identifying the MAC
  3449. * See macros starting with WMI_PDEV_ID_ for values.
  3450. */
  3451. A_UINT32 pdev_id;
  3452. } wmi_pdev_l1ss_track_event_fixed_param;
  3453. typedef struct {
  3454. A_UINT32 len;
  3455. A_UINT32 msgref;
  3456. A_UINT32 segmentInfo;
  3457. } wmi_pdev_seg_hdr_info;
  3458. /*
  3459. * Transmit power scale factor.
  3460. *
  3461. */
  3462. typedef enum {
  3463. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  3464. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  3465. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  3466. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  3467. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  3468. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  3469. } WMI_TP_SCALE;
  3470. #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
  3471. typedef struct {
  3472. /** message buffer, NULL terminated */
  3473. char bufp[WMI_MAX_DEBUG_MESG];
  3474. } wmi_debug_mesg_event;
  3475. enum {
  3476. /** P2P device */
  3477. VDEV_SUBTYPE_P2PDEV = 0,
  3478. /** P2P client */
  3479. VDEV_SUBTYPE_P2PCLI,
  3480. /** P2P GO */
  3481. VDEV_SUBTYPE_P2PGO,
  3482. /** BT3.0 HS */
  3483. VDEV_SUBTYPE_BT,
  3484. };
  3485. typedef struct {
  3486. /** idnore power , only use flags , mode and freq */
  3487. wmi_channel chan;
  3488. } wmi_pdev_set_channel_cmd;
  3489. typedef enum {
  3490. WMI_PKTLOG_EVENT_RX = 0x1,
  3491. WMI_PKTLOG_EVENT_TX = 0x2,
  3492. WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  3493. WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  3494. /* 0x10 used by deprecated DBG_PRINT */
  3495. WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
  3496. WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
  3497. } WMI_PKTLOG_EVENT;
  3498. typedef enum {
  3499. WMI_PKTLOG_ENABLE_AUTO = 0, /* (default) FW will decide under what conditions to enable pktlog */
  3500. WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
  3501. } WMI_PKTLOG_ENABLE;
  3502. typedef struct {
  3503. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
  3504. /** pdev_id for identifying the MAC
  3505. * See macros starting with WMI_PDEV_ID_ for values.
  3506. */
  3507. A_UINT32 pdev_id;
  3508. A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
  3509. A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
  3510. } wmi_pdev_pktlog_enable_cmd_fixed_param;
  3511. typedef struct {
  3512. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
  3513. /** pdev_id for identifying the MAC
  3514. * See macros starting with WMI_PDEV_ID_ for values.
  3515. */
  3516. A_UINT32 pdev_id;
  3517. } wmi_pdev_pktlog_disable_cmd_fixed_param;
  3518. typedef struct {
  3519. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param */
  3520. /** pdev_id for identifying the MAC
  3521. * See macros starting with WMI_PDEV_ID_ for values.
  3522. */
  3523. A_UINT32 pdev_id;
  3524. A_UINT32 enable_Mib; /** enable for mib stats collection. Stats are delivered to host in wmi_mib_stats structure.
  3525. * If enable_Mib=1, stats collection is enabled. If enable_Mib=0, stats collection does not happen */
  3526. } wmi_mib_stats_enable_cmd_fixed_param;
  3527. /** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
  3528. * NOTE: This constant cannot be changed without breaking
  3529. * WMI Compatibility. */
  3530. #define WMI_DSCP_MAP_MAX (64)
  3531. /*
  3532. * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
  3533. * @details
  3534. * Create an API for sending the custom DSCP-to-TID map to the target
  3535. * If this is a request from the user space or from above the UMAC
  3536. * then the best place to implement this is in the umac_if_offload of the OL path.
  3537. * Provide a place holder for this API in the ieee80211com (ic).
  3538. *
  3539. * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
  3540. * in the target should be directed to the function pointer in the ic.
  3541. *
  3542. * Implementation details of the API to send the map to the target are as described-
  3543. *
  3544. * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
  3545. * DSCP-to-TID map is a one dimensional u_int32_t array of length 64 to accomodate
  3546. * 64 TID values for 2^6 (64) DSCP ids.
  3547. * Example:
  3548. * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
  3549. * 0, 0, 0, 0, 0, 0, 0, 0,
  3550. * 1, 1, 1, 1, 1, 1, 1, 1,
  3551. * 2, 2, 2, 2, 2, 2, 2, 2,
  3552. * 3, 3, 3, 3, 3, 3, 3, 3,
  3553. * 4, 4, 4, 4, 4, 4, 4, 4,
  3554. * 5, 5, 5, 5, 5, 5, 5, 5,
  3555. * 6, 6, 6, 6, 6, 6, 6, 6,
  3556. * 7, 7, 7, 7, 7, 7, 7, 7,
  3557. * };
  3558. *
  3559. * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
  3560. *
  3561. * 3. Copy the DSCP-to-TID map into the WMI buffer.
  3562. *
  3563. * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
  3564. * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
  3565. * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
  3566. * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
  3567. *
  3568. */
  3569. /* DEPRECATED - use VDEV level command instead
  3570. * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
  3571. */
  3572. typedef struct {
  3573. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
  3574. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3575. /* map indicating DSCP to TID conversion */
  3576. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  3577. } wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
  3578. typedef struct {
  3579. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param */
  3580. A_UINT32 vdev_id;
  3581. /** map indicating DSCP to TID conversion */
  3582. A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  3583. A_UINT32 enable_override;
  3584. } wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
  3585. enum WMI_WAKE_GPIO_TYPE {
  3586. WMI_WAKE_GPIO_LOW = 1,
  3587. WMI_WAKE_GPIO_HIGH = 2,
  3588. WMI_WAKE_GPIO_RISING_EDGE = 3,
  3589. WMI_WAKE_GPIO_FALLING_EDGE = 4,
  3590. };
  3591. /**
  3592. * Set GPIO numbers used to wakeup host and wakeup target.
  3593. */
  3594. typedef struct {
  3595. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param */
  3596. A_UINT32 host_wakeup_gpio; /* gpio num used to wakeup host, 0xff disable wakeup gpio */
  3597. A_UINT32 host_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  3598. A_UINT32 target_wakeup_gpio; /* gpio num used to wakeup target, 0xff disable wakeup gpio */
  3599. A_UINT32 target_wakeup_type; /* refer to WMI_WAKE_GPIO_TYPE */
  3600. } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
  3601. /** Fixed rate (rate-code) for broadcast/ multicast data frames */
  3602. /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
  3603. * @details
  3604. * Create an API for setting the custom rate for the MCAST and BCAST frames
  3605. * in the target. If this is a request from the user space or from above the UMAC
  3606. * then the best place to implement this is in the umac_if_offload of the OL path.
  3607. * Provide a place holder for this API in the ieee80211com (ic).
  3608. *
  3609. * Implementation details of the API to set custom rates for MCAST and BCAST in
  3610. * the target are as described-
  3611. *
  3612. * 1. The function will have 3 arguments-
  3613. * vap structure,
  3614. * MCAST/ BCAST identifier code,
  3615. * 8 bit rate code
  3616. *
  3617. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  3618. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  3619. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  3620. * b'3-b'0 indicate the rate, which is indicated as follows:
  3621. * OFDM : 0: OFDM 48 Mbps
  3622. * 1: OFDM 24 Mbps
  3623. * 2: OFDM 12 Mbps
  3624. * 3: OFDM 6 Mbps
  3625. * 4: OFDM 54 Mbps
  3626. * 5: OFDM 36 Mbps
  3627. * 6: OFDM 18 Mbps
  3628. * 7: OFDM 9 Mbps
  3629. * CCK (pream == 1)
  3630. * 0: CCK 11 Mbps Long
  3631. * 1: CCK 5.5 Mbps Long
  3632. * 2: CCK 2 Mbps Long
  3633. * 3: CCK 1 Mbps Long
  3634. * 4: CCK 11 Mbps Short
  3635. * 5: CCK 5.5 Mbps Short
  3636. * 6: CCK 2 Mbps Short
  3637. * HT/VHT (pream == 2/3)
  3638. * 0..7: MCS0..MCS7 (HT)
  3639. * 0..9: MCS0..MCS9 (VHT)
  3640. *
  3641. * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
  3642. * to the target.
  3643. * Arguments to the API are-
  3644. * wmi handle,
  3645. * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
  3646. * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
  3647. * rate value.
  3648. */
  3649. typedef enum {
  3650. WMI_SET_MCAST_RATE,
  3651. WMI_SET_BCAST_RATE
  3652. } MCAST_BCAST_RATE_ID;
  3653. typedef struct {
  3654. MCAST_BCAST_RATE_ID rate_id;
  3655. A_UINT32 rate;
  3656. } mcast_bcast_rate;
  3657. typedef struct {
  3658. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
  3659. A_UINT32 cwmin;
  3660. A_UINT32 cwmax;
  3661. A_UINT32 aifs;
  3662. A_UINT32 txoplimit;
  3663. A_UINT32 acm;
  3664. A_UINT32 no_ack;
  3665. } wmi_wmm_params;
  3666. /* DEPRECATED - use VDEV level command instead
  3667. * (wmi_vdev_set_wmm_params_cmd_fixed_param)
  3668. */
  3669. typedef struct {
  3670. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
  3671. A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
  3672. A_UINT32 dg_type;
  3673. /* The TLVs for the 4 AC follows:
  3674. * wmi_wmm_params wmm_params_ac_be;
  3675. * wmi_wmm_params wmm_params_ac_bk;
  3676. * wmi_wmm_params wmm_params_ac_vi;
  3677. * wmi_wmm_params wmm_params_ac_vo;
  3678. */
  3679. } wmi_pdev_set_wmm_params_cmd_fixed_param;
  3680. typedef enum {
  3681. WMI_REQUEST_PEER_STAT = 0x01,
  3682. WMI_REQUEST_AP_STAT = 0x02,
  3683. WMI_REQUEST_PDEV_STAT = 0x04,
  3684. WMI_REQUEST_VDEV_STAT = 0x08,
  3685. WMI_REQUEST_BCNFLT_STAT = 0x10,
  3686. WMI_REQUEST_VDEV_RATE_STAT = 0x20,
  3687. WMI_REQUEST_INST_STAT = 0x40,
  3688. WMI_REQUEST_MIB_STAT = 0x80,
  3689. WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
  3690. } wmi_stats_id;
  3691. typedef struct {
  3692. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
  3693. wmi_stats_id stats_id;
  3694. /** unique id identifying the VDEV, generated by the caller */
  3695. A_UINT32 vdev_id;
  3696. /** peer MAC address */
  3697. wmi_mac_addr peer_macaddr;
  3698. } wmi_request_stats_cmd_fixed_param;
  3699. /* stats type bitmap */
  3700. #define WMI_LINK_STATS_RADIO 0x00000001
  3701. #define WMI_LINK_STATS_IFACE 0x00000002
  3702. #define WMI_LINK_STATS_ALL_PEER 0x00000004
  3703. #define WMI_LINK_STATS_PER_PEER 0x00000008
  3704. /* wifi clear statistics bitmap */
  3705. #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
  3706. #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
  3707. #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
  3708. #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
  3709. #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
  3710. #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
  3711. #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
  3712. #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
  3713. #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
  3714. #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
  3715. /** Default value for stats if the stats collection has not started */
  3716. #define WMI_STATS_VALUE_INVALID 0xffffffff
  3717. #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
  3718. #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
  3719. #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
  3720. #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
  3721. #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  3722. #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  3723. typedef struct {
  3724. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
  3725. A_UINT32 num_of_diag_events_logs;
  3726. /* The TLVs will follow.
  3727. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  3728. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  3729. * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
  3730. */
  3731. } wmi_diag_event_log_config_fixed_param;
  3732. #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
  3733. #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
  3734. #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
  3735. #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
  3736. typedef struct {
  3737. A_UINT32 tlv_header;
  3738. A_UINT32 num_of_diag_events_logs;
  3739. /* The TLVs will follow.
  3740. * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
  3741. * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
  3742. * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
  3743. * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
  3744. */
  3745. } wmi_diag_event_log_supported_event_fixed_params;
  3746. typedef struct {
  3747. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param*/
  3748. A_UINT32 reserved0; /** placeholder for future */
  3749. } wmi_debug_mesg_flush_fixed_param;
  3750. typedef struct {
  3751. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param*/
  3752. A_UINT32 reserved0; /** placeholder for future */
  3753. } wmi_debug_mesg_flush_complete_fixed_param;
  3754. typedef struct {
  3755. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param */
  3756. /* vdev_id, where RSSI breach event occurred */
  3757. A_UINT32 vdev_id;
  3758. /* request id */
  3759. A_UINT32 request_id;
  3760. /* bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is corresponding to hi_rssi[0-2]*/
  3761. A_UINT32 event_bitmap;
  3762. /* rssi at the time of RSSI breach. Unit dBm */
  3763. A_UINT32 rssi;
  3764. /* bssid of the monitored AP's */
  3765. wmi_mac_addr bssid;
  3766. } wmi_rssi_breach_event_fixed_param;
  3767. typedef struct {
  3768. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */
  3769. /** unique id identifying the segment */
  3770. A_UINT32 seg_id;
  3771. /** Start address of the segment to be read */
  3772. A_UINT32 seg_start_addr_lo;
  3773. A_UINT32 seg_start_addr_hi;
  3774. /** Length of the segment to be read */
  3775. A_UINT32 seg_length;
  3776. /** Host bufeer address to which the segment will be read and dumped */
  3777. A_UINT32 dest_addr_lo;
  3778. A_UINT32 dest_addr_hi;
  3779. } wmi_fw_mem_dump;
  3780. /* Command to get firmware memory dump*/
  3781. typedef struct {
  3782. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
  3783. /** unique id identifying the request */
  3784. A_UINT32 request_id;
  3785. /** number of memory dump segments */
  3786. A_UINT32 num_fw_mem_dump_segs;
  3787. /**
  3788. * This TLV is followed by another TLV
  3789. * wmi_fw_mem_dump fw_mem_dump[];
  3790. */
  3791. } wmi_get_fw_mem_dump_fixed_param;
  3792. /** Event to indicate the completion of fw mem dump */
  3793. typedef struct {
  3794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
  3795. /** unique id identifying the request, given in the request stats command */
  3796. A_UINT32 request_id;
  3797. /*In case of Firmware memory dump */
  3798. A_UINT32 fw_mem_dump_complete;
  3799. } wmi_update_fw_mem_dump_fixed_param;
  3800. typedef enum {
  3801. WMI_ROAMING_IDLE = 0,
  3802. WMI_ROAMING_ACTIVE = 1,
  3803. } wmi_roam_state;
  3804. /* access categories */
  3805. typedef enum {
  3806. WMI_AC_VO = 0,
  3807. WMI_AC_VI = 1,
  3808. WMI_AC_BE = 2,
  3809. WMI_AC_BK = 3,
  3810. WMI_AC_MAX = 4,
  3811. } wmi_traffic_ac;
  3812. typedef enum {
  3813. WMI_STA_STATS = 0,
  3814. WMI_SOFTAP_STATS = 1,
  3815. WMI_IBSS_STATS = 2,
  3816. WMI_P2P_CLIENT_STATS = 3,
  3817. WMI_P2P_GO_STATS = 4,
  3818. WMI_NAN_STATS = 5,
  3819. WMI_MESH_STATS = 6,
  3820. } wmi_link_iface_type;
  3821. /* channel operating width */
  3822. typedef enum {
  3823. WMI_CHAN_WIDTH_20 = 0,
  3824. WMI_CHAN_WIDTH_40 = 1,
  3825. WMI_CHAN_WIDTH_80 = 2,
  3826. WMI_CHAN_WIDTH_160 = 3,
  3827. WMI_CHAN_WIDTH_80P80 = 4,
  3828. WMI_CHAN_WIDTH_5 = 5,
  3829. WMI_CHAN_WIDTH_10 = 6,
  3830. } wmi_channel_width;
  3831. /*Clear stats*/
  3832. typedef struct {
  3833. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
  3834. /** unique id identifying the VDEV, generated by the caller */
  3835. A_UINT32 vdev_id;
  3836. /** stop_stats_collection_req = 1 will imply stop the statistics collection */
  3837. A_UINT32 stop_stats_collection_req;
  3838. /** identifies what stats to be cleared */
  3839. A_UINT32 stats_clear_req_mask;
  3840. /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
  3841. wmi_mac_addr peer_macaddr;
  3842. } wmi_clear_link_stats_cmd_fixed_param;
  3843. /* Link Stats configuration params. Trigger the link layer statistics collection*/
  3844. typedef struct {
  3845. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
  3846. /** threshold to classify the pkts as short or long */
  3847. A_UINT32 mpdu_size_threshold;
  3848. /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
  3849. A_UINT32 aggressive_statistics_gathering;
  3850. } wmi_start_link_stats_cmd_fixed_param;
  3851. typedef struct {
  3852. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
  3853. /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
  3854. A_UINT32 stats_type;
  3855. /** unique id identifying the VDEV, generated by the caller */
  3856. A_UINT32 vdev_id;
  3857. /** unique id identifying the request, generated by the caller */
  3858. A_UINT32 request_id;
  3859. /** peer MAC address */
  3860. wmi_mac_addr peer_macaddr;
  3861. } wmi_request_link_stats_cmd_fixed_param;
  3862. /* channel statistics */
  3863. typedef struct {
  3864. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
  3865. /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
  3866. A_UINT32 channel_width;
  3867. /** Primary 20 MHz channel */
  3868. A_UINT32 center_freq;
  3869. /** center frequency (MHz) first segment */
  3870. A_UINT32 center_freq0;
  3871. /** center frequency (MHz) second segment */
  3872. A_UINT32 center_freq1;
  3873. /** msecs the radio is awake (32 bits number accruing over time) */
  3874. A_UINT32 radio_awake_time;
  3875. /** msecs the CCA register is busy (32 bits number accruing over time) */
  3876. A_UINT32 cca_busy_time;
  3877. } wmi_channel_stats;
  3878. /*
  3879. * Each step represents 0.5 dB. The starting value is 0 dBm.
  3880. * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
  3881. */
  3882. #define MAX_TPC_LEVELS 64
  3883. /* radio statistics */
  3884. typedef struct {
  3885. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
  3886. /** Wifi radio (if multiple radio supported) */
  3887. A_UINT32 radio_id;
  3888. /** msecs the radio is awake (32 bits number accruing over time) */
  3889. A_UINT32 on_time;
  3890. /** msecs the radio is transmitting (32 bits number accruing over time) */
  3891. A_UINT32 tx_time;
  3892. /** msecs the radio is in active receive (32 bits number accruing over time) */
  3893. A_UINT32 rx_time;
  3894. /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
  3895. A_UINT32 on_time_scan;
  3896. /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
  3897. A_UINT32 on_time_nbd;
  3898. /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
  3899. A_UINT32 on_time_gscan;
  3900. /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
  3901. A_UINT32 on_time_roam_scan;
  3902. /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
  3903. A_UINT32 on_time_pno_scan;
  3904. /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
  3905. A_UINT32 on_time_hs20;
  3906. /** number of channels */
  3907. A_UINT32 num_channels;
  3908. /** tx time per TPC level - DEPRECATED
  3909. * This field is deprecated.
  3910. * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID message.
  3911. */
  3912. A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
  3913. } wmi_radio_link_stats;
  3914. /** tx time per power level statistics */
  3915. typedef struct {
  3916. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param */
  3917. /** total number of tx power levels */
  3918. A_UINT32 total_num_tx_power_levels;
  3919. /** number of tx power levels that are carried in this event */
  3920. A_UINT32 num_tx_power_levels;
  3921. /** offset of current stats
  3922. * If ((num_tx_power_levels + power_level_offset)) ==
  3923. * total_num_tx_power_levels)
  3924. * this message completes the report of tx time per power levels.
  3925. * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID messages
  3926. * will be sent by the target to deliver the remainder of the tx time
  3927. * per power level stats.
  3928. */
  3929. A_UINT32 power_level_offset;
  3930. /*
  3931. * This TLV will be followed by a TLV containing a variable-length array of
  3932. * A_UINT32 with tx time per power level data
  3933. * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
  3934. * The tx time is in units of milliseconds.
  3935. * The power levels are board-specific values; a board-specific translation
  3936. * has to be applied to determine what actual power corresponds to each
  3937. * power level.
  3938. * Just as the host has a BDF file available, the host should also have
  3939. * a data file available that provides the power level to power translations.
  3940. */
  3941. } wmi_tx_power_level_stats_evt_fixed_param;
  3942. /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
  3943. typedef struct {
  3944. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  3945. /** unique id identifying the request, given in the request stats command */
  3946. A_UINT32 request_id;
  3947. /** Number of radios*/
  3948. A_UINT32 num_radio;
  3949. /** more_data will be set depending on the number of radios */
  3950. A_UINT32 more_radio_events;
  3951. /*
  3952. * This TLV is followed by another TLV of array of bytes
  3953. * size of(struct wmi_radio_link_stats);
  3954. *
  3955. * This TLV is followed by another TLV of array of bytes
  3956. * num_channels * size of(struct wmi_channel_stats)
  3957. */
  3958. } wmi_radio_link_stats_event_fixed_param;
  3959. /* per rate statistics */
  3960. typedef struct {
  3961. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
  3962. /** rate information
  3963. * The rate-code is a 1-byte field in which:for given rate, nss and preamble
  3964. * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
  3965. * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
  3966. * b'3-b'0 indicate the rate, which is indicated as follows:
  3967. * OFDM : 0: OFDM 48 Mbps
  3968. * 1: OFDM 24 Mbps
  3969. * 2: OFDM 12 Mbps
  3970. * 3: OFDM 6 Mbps
  3971. * 4: OFDM 54 Mbps
  3972. * 5: OFDM 36 Mbps
  3973. * 6: OFDM 18 Mbps
  3974. * 7: OFDM 9 Mbps
  3975. * CCK (pream == 1)
  3976. * 0: CCK 11 Mbps Long
  3977. * 1: CCK 5.5 Mbps Long
  3978. * 2: CCK 2 Mbps Long
  3979. * 3: CCK 1 Mbps Long
  3980. * 4: CCK 11 Mbps Short
  3981. * 5: CCK 5.5 Mbps Short
  3982. * 6: CCK 2 Mbps Short
  3983. * HT/VHT (pream == 2/3)
  3984. * 0..7: MCS0..MCS7 (HT)
  3985. * 0..9: MCS0..MCS9 (VHT)
  3986. */
  3987. A_UINT32 rate;
  3988. /** units of 100 Kbps */
  3989. A_UINT32 bitrate;
  3990. /** number of successfully transmitted data pkts (ACK rcvd) */
  3991. A_UINT32 tx_mpdu;
  3992. /** number of received data pkts */
  3993. A_UINT32 rx_mpdu;
  3994. /** number of data packet losses (no ACK) */
  3995. A_UINT32 mpdu_lost;
  3996. /** total number of data pkt retries */
  3997. A_UINT32 retries;
  3998. /** number of short data pkt retries */
  3999. A_UINT32 retries_short;
  4000. /** number of long data pkt retries */
  4001. A_UINT32 retries_long;
  4002. } wmi_rate_stats;
  4003. typedef struct {
  4004. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
  4005. /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
  4006. A_UINT32 peer_type;
  4007. /** mac address */
  4008. wmi_mac_addr peer_mac_address;
  4009. /** peer wmi_CAPABILITY_XXX */
  4010. A_UINT32 capabilities;
  4011. /** number of rates */
  4012. A_UINT32 num_rates;
  4013. } wmi_peer_link_stats;
  4014. /** PEER statistics (once started) reset and start afresh after each connection */
  4015. typedef struct {
  4016. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
  4017. /** unique id identifying the request, given in the request stats command */
  4018. A_UINT32 request_id;
  4019. /** number of peers accomidated in this particular event */
  4020. A_UINT32 num_peers;
  4021. /** Indicates the fragment number */
  4022. A_UINT32 peer_event_number;
  4023. /** Indicates if there are more peers which will be sent as seperate peer_stats event */
  4024. A_UINT32 more_data;
  4025. /**
  4026. * This TLV is followed by another TLV
  4027. * num_peers * size of(struct wmi_peer_stats)
  4028. * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
  4029. */
  4030. } wmi_peer_stats_event_fixed_param;
  4031. /* per access category statistics */
  4032. typedef struct {
  4033. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
  4034. /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
  4035. A_UINT32 ac_type;
  4036. /** number of successfully transmitted unicast data pkts (ACK rcvd) */
  4037. A_UINT32 tx_mpdu;
  4038. /** number of received unicast mpdus */
  4039. A_UINT32 rx_mpdu;
  4040. /** number of succesfully transmitted multicast data packets */
  4041. /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
  4042. A_UINT32 tx_mcast;
  4043. /** number of received multicast data packets */
  4044. A_UINT32 rx_mcast;
  4045. /** number of received unicast a-mpdus */
  4046. A_UINT32 rx_ampdu;
  4047. /** number of transmitted unicast a-mpdus */
  4048. A_UINT32 tx_ampdu;
  4049. /** number of data pkt losses (no ACK) */
  4050. A_UINT32 mpdu_lost;
  4051. /** total number of data pkt retries */
  4052. A_UINT32 retries;
  4053. /** number of short data pkt retries */
  4054. A_UINT32 retries_short;
  4055. /** number of long data pkt retries */
  4056. A_UINT32 retries_long;
  4057. /** data pkt min contention time (usecs) */
  4058. A_UINT32 contention_time_min;
  4059. /** data pkt max contention time (usecs) */
  4060. A_UINT32 contention_time_max;
  4061. /** data pkt avg contention time (usecs) */
  4062. A_UINT32 contention_time_avg;
  4063. /** num of data pkts used for contention statistics */
  4064. A_UINT32 contention_num_samples;
  4065. } wmi_wmm_ac_stats;
  4066. /* interface statistics */
  4067. typedef struct {
  4068. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
  4069. /** access point beacon received count from connected AP */
  4070. A_UINT32 beacon_rx;
  4071. /** access point mgmt frames received count from connected AP (including Beacon) */
  4072. A_UINT32 mgmt_rx;
  4073. /** action frames received count */
  4074. A_UINT32 mgmt_action_rx;
  4075. /** action frames transmit count */
  4076. A_UINT32 mgmt_action_tx;
  4077. /** access Point Beacon and Management frames RSSI (averaged) */
  4078. A_UINT32 rssi_mgmt;
  4079. /** access Point Data Frames RSSI (averaged) from connected AP */
  4080. A_UINT32 rssi_data;
  4081. /** access Point ACK RSSI (averaged) from connected AP */
  4082. A_UINT32 rssi_ack;
  4083. /** number of peers */
  4084. A_UINT32 num_peers;
  4085. /** Indicates how many peer_stats events will be sent depending on the num_peers. */
  4086. A_UINT32 num_peer_events;
  4087. /** number of ac */
  4088. A_UINT32 num_ac;
  4089. /** Roaming Stat */
  4090. A_UINT32 roam_state;
  4091. /** Average Beacon spread offset is the averaged time delay between TBTT and beacon TSF */
  4092. /** Upper 32 bits of averaged 64 bit beacon spread offset */
  4093. A_UINT32 avg_bcn_spread_offset_high;
  4094. /** Lower 32 bits of averaged 64 bit beacon spread offset */
  4095. A_UINT32 avg_bcn_spread_offset_low;
  4096. /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
  4097. A_UINT32 is_leaky_ap;
  4098. /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
  4099. A_UINT32 avg_rx_frms_leaked;
  4100. /** Rx leak watch window currently in force to minimize data loss because of leaky AP. Rx leak window is the
  4101. time driver waits before shutting down the radio or switching the channel and after receiving an ACK for
  4102. a data frame with PM bit set) */
  4103. A_UINT32 rx_leak_window;
  4104. } wmi_iface_link_stats;
  4105. /** Interface statistics (once started) reset and start afresh after each connection */
  4106. typedef struct {
  4107. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
  4108. /** unique id identifying the request, given in the request stats command */
  4109. A_UINT32 request_id;
  4110. /** unique id identifying the VDEV, generated by the caller */
  4111. A_UINT32 vdev_id;
  4112. /*
  4113. * This TLV is followed by another TLV
  4114. * wmi_iface_link_stats iface_link_stats;
  4115. * num_ac * size of(struct wmi_wmm_ac_stats)
  4116. */
  4117. } wmi_iface_link_stats_event_fixed_param;
  4118. /** Suspend option */
  4119. enum {
  4120. WMI_PDEV_SUSPEND, /* suspend */
  4121. WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
  4122. };
  4123. typedef struct {
  4124. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
  4125. /* suspend option sent to target */
  4126. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  4127. A_UINT32 suspend_opt;
  4128. } wmi_pdev_suspend_cmd_fixed_param;
  4129. typedef struct {
  4130. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
  4131. A_UINT32 pdev_id; /** pdev_id for identifying the MAC, See macros starting with WMI_PDEV_ID_ for values. */
  4132. } wmi_pdev_resume_cmd_fixed_param;
  4133. typedef struct {
  4134. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
  4135. A_UINT32 num_vdev_stats; /* number of vdevs */
  4136. } wmi_vdev_rate_stats_event_fixed_param;
  4137. typedef struct {
  4138. A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info*/
  4139. A_UINT32 vdevid; /* Id of the wlan vdev*/
  4140. A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted*/
  4141. A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above*/
  4142. A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
  4143. A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
  4144. } wmi_vdev_rate_ht_info;
  4145. typedef struct {
  4146. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
  4147. wmi_stats_id stats_id;
  4148. /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
  4149. A_UINT32 num_pdev_stats;
  4150. /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
  4151. A_UINT32 num_vdev_stats;
  4152. /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
  4153. A_UINT32 num_peer_stats;
  4154. A_UINT32 num_bcnflt_stats;
  4155. /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
  4156. A_UINT32 num_chan_stats;
  4157. /** number of MIB stats event structures (wmi_mib_stats) */
  4158. A_UINT32 num_mib_stats;
  4159. /* This TLV is followed by another TLV of array of bytes
  4160. * A_UINT8 data[];
  4161. * This data array contains
  4162. * num_pdev_stats * size of(struct wmi_pdev_stats)
  4163. * num_vdev_stats * size of(struct wmi_vdev_stats)
  4164. * num_peer_stats * size of(struct wmi_peer_stats)
  4165. * num_bcnflt_stats * size_of()
  4166. * num_chan_stats * size of(struct wmi_chan_stats)
  4167. * num_mib_stats * size of(struct wmi_mib_stats)
  4168. *
  4169. */
  4170. } wmi_stats_event_fixed_param;
  4171. /* WLAN channel CCA stats bitmap */
  4172. #define WLAN_STATS_IDLE_TIME_SHIFT 0
  4173. #define WLAN_STATS_IDLE_TIME_TIME 0x00000001
  4174. #define WLAN_STATS_TX_TIME_SHIFT 1
  4175. #define WLAN_STATS_TX_TIME_MASK 0x00000002
  4176. #define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
  4177. #define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
  4178. #define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
  4179. #define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
  4180. #define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
  4181. #define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
  4182. #define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
  4183. #define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
  4184. #define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
  4185. #define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
  4186. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
  4187. #define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
  4188. /* WLAN peer signal stats bitmap */
  4189. #define WLAN_STATS_PER_ANT_SNR_SHIFT 0
  4190. #define WLAN_STATS_PER_ANT_SNR_MASK 0x00000001
  4191. #define WLAN_STATS_NF_SHIFT 1
  4192. #define WLAN_STATS_NF_MASK 0x00000002
  4193. /* WLAN TX stats bitmap */
  4194. #define WLAN_STATS_TX_MSDUS_SHIFT 0
  4195. #define WLAN_STATS_TX_MSDUS_MASK 0x00000001
  4196. #define WLAN_STATS_TX_BYTES_SHIFT 1
  4197. #define WLAN_STATS_TX_BYTES_MASK 0x00000002
  4198. #define WLAN_STATS_TX_MSDU_DROPS_SHIFT 2
  4199. #define WLAN_STATS_TX_MSDU_DROPS_MASK 0x00000004
  4200. #define WLAN_STATS_TX_DROP_BYTES_SHIFT 3
  4201. #define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000008
  4202. #define WLAN_STATS_TX_MPDU_RETRIES_SHIFT 4
  4203. #define WLAN_STATS_TX_MPDU_RETRIES_MASK 0x00000010
  4204. #define WLAN_STATS_TX_MSDU_FAILED_SHIFT 5
  4205. #define WLAN_STATS_TX_MSDU_FAILED_MASK 0x00000020
  4206. #define WLAN_STATS_TX_MPDU_AGGR_SHIFT 6
  4207. #define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000040
  4208. #define WLAN_STATS_TX_MSDU_ACKED_MCS_SHIFT 7
  4209. #define WLAN_STATS_TX_MSDU_ACKED_MCS_MASK 0x00000080
  4210. #define WLAN_STATS_TX_MSDU_FAILED_MCS_SHIFT 8
  4211. #define WLAN_STATS_TX_MSDU_FAILED_MCS_MASK 0x00000100
  4212. #define WLAN_STATS_TX_MSDU_DELAY_SHIFT 9
  4213. #define WLAN_STATS_TX_MSDU_DELAY_MASK 0x00000200
  4214. /* WLAN RX stats bitmap */
  4215. #define WLAN_STATS_MAC_RX_MSDUS_SHIFT 0
  4216. #define WLAN_STATS_MAC_RX_MSDUS_MASK 0x00000001
  4217. #define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
  4218. #define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
  4219. #define WLAN_STATS_PHY_RX_MSDUS_SHIFT 2
  4220. #define WLAN_STATS_PHY_RX_MSDUS_MASK 0x00000004
  4221. #define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
  4222. #define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
  4223. #define WLAN_STATS_SEQ_DCONT_NUM_SHIFT 4
  4224. #define WLAN_STATS_SEQ_DCONT_NUM_MASK 0x00000010
  4225. #define WLAN_STATS_RX_MSDU_RETRY_SHIFT 5
  4226. #define WLAN_STATS_RX_MSDU_RETRY_MASK 0x00000020
  4227. #define WLAN_STATS_RX_MSDU_DUP_SHIFT 6
  4228. #define WLAN_STATS_RX_MSDU_DUP_MASK 0x00000040
  4229. #define WLAN_STATS_RX_MSDU_DISCARD_SHIFT 7
  4230. #define WLAN_STATS_RX_MSDU_DISCARD_MASK 0x00000080
  4231. #define WLAN_STATS_STA_PS_INDS_SHIFT 8
  4232. #define WLAN_STATS_STA_PS_INDS_MASK 0x00000100
  4233. #define WLAN_STATS_STA_PS_DURS_SHIFT 9
  4234. #define WLAN_STATS_STA_PS_DURS_MASK 0x00000200
  4235. #define WLAN_STATS_RX_PROBE_REQS_SHIFT 10
  4236. #define WLAN_STATS_RX_PROBE_REQS_MASK 0x00000400
  4237. #define WLAN_STATS_RX_OTH_MGMTS_SHIFT 11
  4238. #define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00000800
  4239. #define WLAN_STATS_RX_MPDU_AGGR_SHIFT 12
  4240. #define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00001000
  4241. #define WLAN_STATS_RX_MSDU_MCS_SHIFT 13
  4242. #define WLAN_STATS_RX_MSDU_MCS_MASK 0x00002000
  4243. typedef struct
  4244. {
  4245. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
  4246. A_UINT32 vdev_id;
  4247. /** Percentage of idle time, no TX, no RX, no interference */
  4248. A_UINT32 idle_time;
  4249. /** Percentage of time transmitting packets */
  4250. A_UINT32 tx_time;
  4251. /** Percentage of time receiving packets in current BSSs */
  4252. A_UINT32 rx_in_bss_time;
  4253. /** Percentage of time receiving packets not in current BSSs */
  4254. A_UINT32 rx_out_bss_time;
  4255. /** Percentage of time interference detected. */
  4256. A_UINT32 rx_busy_time;
  4257. /** Percentage of time receiving packets with errors
  4258. * or packets flagged as retransmission or seqnum discontinued. */
  4259. A_UINT32 rx_in_bad_cond_time;
  4260. /** Percentage of time the device transmitted packets that haven't been ACKed. */
  4261. A_UINT32 tx_in_bad_cond_time;
  4262. /** Percentage of time the chip is unable to work in normal conditions. */
  4263. A_UINT32 wlan_not_avail_time;
  4264. } wmi_chan_cca_stats;
  4265. /** Thresholds of cca stats, stands for percentages of stats variation.
  4266. * Check wmi_chan_cca_stats for each stats's meaning.
  4267. */
  4268. typedef struct
  4269. {
  4270. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
  4271. A_UINT32 idle_time; /* units = percent */
  4272. A_UINT32 tx_time; /* units = percent */
  4273. A_UINT32 rx_in_bss_time; /* units = percent */
  4274. A_UINT32 rx_out_bss_time; /* units = percent */
  4275. A_UINT32 rx_busy_time; /* units = percent */
  4276. A_UINT32 rx_in_bad_cond_time; /* units = percent */
  4277. A_UINT32 tx_in_bad_cond_time; /* units = percent */
  4278. A_UINT32 wlan_not_avail_time; /* units = percent */
  4279. } wmi_chan_cca_stats_thresh;
  4280. typedef struct
  4281. {
  4282. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
  4283. A_UINT32 vdev_id;
  4284. A_UINT32 peer_id;
  4285. /** per antenna SNR in current bss, units are dB */
  4286. A_INT32 per_ant_snr[WMI_MAX_CHAINS];
  4287. /** Background noise, units are dBm */
  4288. A_INT32 nf;
  4289. } wmi_peer_signal_stats;
  4290. /** Thresholds of signal stats, stand for percentage of stats variation.
  4291. * Check wmi_peer_signal_stats for each stats's meaning.
  4292. */
  4293. typedef struct
  4294. {
  4295. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh */
  4296. A_UINT32 per_ant_snr; /* units = dB */
  4297. A_UINT32 nf; /* units = dBm */
  4298. } wmi_peer_signal_stats_thresh;
  4299. typedef struct
  4300. {
  4301. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
  4302. /** Number of total TX packets on MAC layer in the period */
  4303. A_UINT32 tx_msdus;
  4304. /** Bytes of tx data on MAC layer in the period */
  4305. A_UINT32 tx_bytes;
  4306. /** Number of TX packets cancelled due to any reason in the period,
  4307. * such as WMM limitation/bandwidth limitation/radio congestion */
  4308. A_UINT32 tx_msdu_drops;
  4309. /** Bytes of dropped TX packets in the period */
  4310. A_UINT32 tx_drop_bytes;
  4311. /** Number of unacked transmissions of MPDUs */
  4312. A_UINT32 tx_mpdu_retries;
  4313. /** Number of packets have not been ACKed despite retried */
  4314. A_UINT32 tx_msdu_failed;
  4315. /* This TLV is followed by TLVs below: :
  4316. * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_size];
  4317. * A_UINT32 tx_msdu_acked_mcs[tx_msdu_acked_mcs_array_size];
  4318. * A_UINT32 tx_msdu_failed_mcs[tx_msdu_failed_mcs_array_size];
  4319. * A_UINT32 tx_msdu_delay[tx_msdu_delay_array_size];
  4320. */
  4321. } wmi_tx_stats;
  4322. /** Thresholds of tx stats, stand for percentage of stats variation.
  4323. * Check wmi_tx_stats for each stats's meaning.
  4324. */
  4325. typedef struct
  4326. {
  4327. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
  4328. A_UINT32 tx_msdus;
  4329. A_UINT32 tx_bytes;
  4330. A_UINT32 tx_msdu_drops;
  4331. A_UINT32 tx_drop_bytes;
  4332. A_UINT32 tx_mpdu_retries;
  4333. A_UINT32 tx_msdu_failed;
  4334. A_UINT32 tx_mpdu_aggr;
  4335. A_UINT32 tx_msdu_acked_mcs;
  4336. A_UINT32 tx_msdu_failed_mcs;
  4337. A_UINT32 tx_msdu_delay;
  4338. } wmi_tx_stats_thresh;
  4339. typedef struct
  4340. {
  4341. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
  4342. A_UINT32 vdev_id;
  4343. A_UINT32 peer_id;
  4344. /* The TLVs for the 4 AC follows:
  4345. * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
  4346. */
  4347. } wmi_peer_ac_tx_stats;
  4348. typedef struct
  4349. {
  4350. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
  4351. /** Number of RX packets on MAC layer */
  4352. A_UINT32 mac_rx_msdus;
  4353. /** Bytes of RX packets on MAC layer */
  4354. A_UINT32 mac_rx_bytes;
  4355. /** Number of RX packets on PHY layer */
  4356. A_UINT32 phy_rx_msdus;
  4357. /** Bytes of RX packets on PHY layer */
  4358. A_UINT32 phy_rx_bytes;
  4359. /** Number of discontinuity in seqnum */
  4360. A_UINT32 seq_dcont_num;
  4361. /** Number of RX packets flagged as retransmissions */
  4362. A_UINT32 rx_msdu_retry;
  4363. /** Number of RX packets identified as duplicates */
  4364. A_UINT32 rx_msdu_dup;
  4365. /** Number of RX packets discarded */
  4366. A_UINT32 rx_msdu_discard;
  4367. /** How many times STAs go to sleep */
  4368. A_UINT32 sta_ps_inds;
  4369. /** Total sleep time of STAs, milliseconds units */
  4370. A_UINT32 sta_ps_durs;
  4371. /** Number of probe requests received */
  4372. A_UINT32 rx_probe_reqs;
  4373. /** Number of other management frames received, not including probe requests */
  4374. A_UINT32 rx_oth_mgmts;
  4375. /* This TLV is followed by TLVs below:
  4376. * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_size];
  4377. * A_UINT32 rx_msdu_mcs[rx_msdu_mcs_array_size];
  4378. */
  4379. } wmi_rx_stats;
  4380. /** Thresholds of rx stats, stands for percentage of stats variation.
  4381. * Check wmi_rx_stats for each stats's meaning.
  4382. */
  4383. typedef struct
  4384. {
  4385. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
  4386. A_UINT32 mac_rx_msdus;
  4387. A_UINT32 mac_rx_bytes;
  4388. A_UINT32 phy_rx_msdus;
  4389. A_UINT32 phy_rx_bytes;
  4390. A_UINT32 seq_dcont_num;
  4391. A_UINT32 rx_msdu_retry;
  4392. A_UINT32 rx_msdu_dup;
  4393. A_UINT32 rx_msdu_discard;
  4394. A_UINT32 sta_ps_inds;
  4395. A_UINT32 sta_ps_durs;
  4396. A_UINT32 rx_probe_reqs;
  4397. A_UINT32 rx_oth_mgmts;
  4398. A_UINT32 rx_mpdu_aggr;
  4399. A_UINT32 rx_msdu_mcs;
  4400. } wmi_rx_stats_thresh;
  4401. typedef struct
  4402. {
  4403. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
  4404. A_UINT32 vdev_id;
  4405. A_UINT32 peer_id;
  4406. /* The TLVs for the 4 AC follows:
  4407. * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
  4408. */
  4409. } wmi_peer_ac_rx_stats;
  4410. typedef enum {
  4411. /** Periodic timer timed out, based on the period specified
  4412. * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
  4413. */
  4414. TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
  4415. /** Any of the (enabled) stats thresholds specified
  4416. * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
  4417. * within the current stats period.
  4418. */
  4419. TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
  4420. /** In Response to the one-time wlan stats request of
  4421. * WMI_REQUEST_WLAN_STATS_CMDID from host.
  4422. */
  4423. TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
  4424. } wmi_report_stats_event_trigger_cond_id;
  4425. typedef struct {
  4426. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
  4427. /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
  4428. A_UINT32 trigger_cond_id;
  4429. /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
  4430. A_UINT32 cca_chgd_bitmap;
  4431. /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
  4432. A_UINT32 sig_chgd_bitmap;
  4433. /** Bitmap to indicate changed TX counters which exceeded the thresholds */
  4434. A_UINT32 tx_chgd_bitmap;
  4435. /** Bitmap to indicate changed RX counters which exceeded the thresholds */
  4436. A_UINT32 rx_chgd_bitmap;
  4437. /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
  4438. A_UINT32 num_chan_cca_stats;
  4439. /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
  4440. A_UINT32 num_peer_signal_stats;
  4441. /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
  4442. A_UINT32 num_peer_ac_tx_stats;
  4443. /** Array size of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  4444. * The array indicates number of MPDUs sent on specified aggregation size
  4445. * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
  4446. * Array size can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_SIZE */
  4447. A_UINT32 tx_mpdu_aggr_array_size;
  4448. /** Array size of tx_msdu_acked_mcs[] which is histogram of encoding rate.
  4449. * The array indicates number of acked packets sent at a specific rate */
  4450. A_UINT32 tx_msdu_acked_mcs_array_size;
  4451. /** Array size of tx_msdu_failed_mcs[] which is histogram of encoding rate.
  4452. * The array indicates number of failed packets sent at a specific rate */
  4453. A_UINT32 tx_msdu_failed_mcs_array_size;
  4454. /** tx_msdu_delay[]is a histogram of delays on MAC layer.
  4455. * The array stands for numbers of packets on different TX time delays.
  4456. * TX delay here means time interval between the time the packet has been received
  4457. * at the MAC layer and the time lower layers returns a tx status (<10ms to >100ms)
  4458. *
  4459. * The bin size tx_delay_bin_size_ms specifies how many milliseconds
  4460. * each bin of the tx_delay histogram represents.
  4461. * By default the bin size is 10ms.
  4462. * tx_msdu_delay[0] -> delays between 0-9 ms
  4463. * tx_msdu_delay[1] -> delays between 10-19 ms
  4464. * ...
  4465. * tx_msdu_delay[9] -> delays between 90-99 ms
  4466. * tx_msdu_delay[10] -> delays >= 100 ms
  4467. * Bin size can be set per WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS.
  4468. */
  4469. A_UINT32 tx_msdu_delay_bin_size_ms;
  4470. /** Array size of tx_msdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_DELAY_ARRAY_SIZE */
  4471. A_UINT32 tx_msdu_delay_array_size;
  4472. /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
  4473. A_UINT32 num_peer_ac_rx_stats;
  4474. /** Array size of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
  4475. * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_SIZE */
  4476. A_UINT32 rx_mpdu_aggr_array_size;
  4477. /** Array size of rx_msdu_mcs[] which is histogram of encoding rate.
  4478. * The array indicates number of packets received at a specific rate */
  4479. A_UINT32 rx_msdu_mcs_array_size;
  4480. /**
  4481. * This TLV is followed by TLVs below:
  4482. * wmi_chan_cca_stats chan_cca_stats[]; Array size is specified by num_chan_cca_stats
  4483. * wmi_peer_signal_stats peer_signal_stats[]; Array size is specified by num_peer_signal_stats
  4484. * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array size is specified by num_peer_ac_tx_stats
  4485. * wmi_tx_stats tx_stats[][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  4486. * A_UINT32 tx_mpdu_aggr[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_size,
  4487. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_size + A-MPDU aggregation index
  4488. * A_UINT32 tx_msdu_acked_mcs[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_acked_mcs_array_size,
  4489. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_acked_mcs_array_size + MCS index
  4490. * A_UINT32 tx_msdu_failed_mcs[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_failed_mcs_array_size,
  4491. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_failed_mcs_array_size + MCS index
  4492. * A_UINT32 tx_msdu_delay[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_delay_array_size,
  4493. * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_delay_array_size + tx delay index
  4494. * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array size is specified by num_peer_ac_rx_stats
  4495. * wmi_rx_stats rx_stats[][]; Array size is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
  4496. * A_UINT32 rx_mpdu_aggr[][][]; Array size is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_size,
  4497. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_size + A-MPDU aggregation index
  4498. * A_UINT32 rx_msdu_mcs[][][]; Array size is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_msdu_mcs_array_size,
  4499. * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_msdu_mcs_array_size + MCS index
  4500. **/
  4501. } wmi_report_stats_event_fixed_param;
  4502. /**
  4503. * PDEV statistics
  4504. * @todo
  4505. * add all PDEV stats here
  4506. */
  4507. typedef struct {
  4508. /** Channel noise floor */
  4509. A_INT32 chan_nf;
  4510. /** TX frame count */
  4511. A_UINT32 tx_frame_count;
  4512. /** RX frame count */
  4513. A_UINT32 rx_frame_count;
  4514. /** rx clear count */
  4515. A_UINT32 rx_clear_count;
  4516. /** cycle count */
  4517. A_UINT32 cycle_count;
  4518. /** Phy error count */
  4519. A_UINT32 phy_err_count;
  4520. /** Channel Tx Power */
  4521. A_UINT32 chan_tx_pwr;
  4522. /** WAL dbg stats */
  4523. struct wlan_dbg_stats pdev_stats;
  4524. } wmi_pdev_stats;
  4525. /**
  4526. * VDEV statistics
  4527. * @todo
  4528. * add all VDEV stats here
  4529. */
  4530. typedef struct {
  4531. A_INT32 bcn_snr;
  4532. A_INT32 dat_snr;
  4533. } wmi_snr_info;
  4534. typedef struct {
  4535. /** unique id identifying the VDEV, generated by the caller */
  4536. A_UINT32 vdev_id;
  4537. wmi_snr_info vdev_snr;
  4538. 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) */
  4539. A_UINT32 rx_frm_cnt;/* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast)*/
  4540. A_UINT32 multiple_retry_cnt[WLAN_MAX_AC];/*The number of MSDU packets and MMPDU frames per AC
  4541. that the 802.11 station successfully transmitted after more than one retransmission attempt*/
  4542. A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
  4543. A_UINT32 rts_fail_cnt;/*Total number of RTS/CTS sequence failures for transmission of a packet*/
  4544. A_UINT32 rts_succ_cnt;/*Total number of RTS/CTS sequence success for transmission of a packet*/
  4545. A_UINT32 rx_err_cnt;/*The receive error count. HAL will provide the RxP FCS error global */
  4546. A_UINT32 rx_discard_cnt;/* The sum of the receive error count and dropped-receive-buffer error count. (FCS error)*/
  4547. A_UINT32 ack_fail_cnt;/*Total number packets failed transmit because of no ACK from the remote entity*/
  4548. A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES];/*History of last ten transmit rate, in units of 500 kbit/sec*/
  4549. A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES];/*History of last ten Beacon rssi of the connected Bss*/
  4550. } wmi_vdev_stats;
  4551. /**
  4552. * peer statistics.
  4553. *
  4554. * @todo
  4555. * add more stats
  4556. *
  4557. */
  4558. typedef struct {
  4559. /** peer MAC address */
  4560. wmi_mac_addr peer_macaddr;
  4561. /** rssi */
  4562. A_UINT32 peer_rssi;
  4563. /** last tx data rate used for peer */
  4564. A_UINT32 peer_tx_rate;
  4565. /** last rx data rate used for peer */
  4566. A_UINT32 peer_rx_rate;
  4567. } wmi_peer_stats;
  4568. typedef struct {
  4569. /** Primary channel freq of the channel for which stats are sent */
  4570. A_UINT32 chan_mhz;
  4571. /** Time spent on the channel */
  4572. A_UINT32 sampling_period_us;
  4573. /** Aggregate duration over a sampling period for which channel activity was observed */
  4574. A_UINT32 rx_clear_count;
  4575. /** Accumalation of the TX PPDU duration over a sampling period */
  4576. A_UINT32 tx_duration_us;
  4577. /** Accumalation of the RX PPDU duration over a sampling period */
  4578. A_UINT32 rx_duration_us;
  4579. } wmi_chan_stats;
  4580. typedef struct {
  4581. A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
  4582. A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
  4583. A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
  4584. A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
  4585. A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
  4586. A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
  4587. A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
  4588. A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
  4589. A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
  4590. A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
  4591. A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
  4592. A_UINT32 tx_Qos_mpdu_grp_frag_cnt; /*dot11QosTransmittedFragmentCount */
  4593. A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
  4594. A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
  4595. A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
  4596. A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
  4597. A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
  4598. A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
  4599. A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
  4600. A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
  4601. A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
  4602. A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
  4603. A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; /*dot11RSNAStatsRobustMgmtCCMPReplays*/
  4604. A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
  4605. A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
  4606. A_UINT32 rsna_CCMP_decrypt_err_cnt; /*dot11RSNAStatsCCMPDecryptErrors*/
  4607. A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
  4608. A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
  4609. A_UINT32 tx_mpdu_cnt_in_ampdu; /*dot11TransmittedMPDUsInAMPDUCount*/
  4610. union {
  4611. A_UINT64 counter; /* for use by target only */
  4612. struct {
  4613. A_UINT32 low;
  4614. A_UINT32 high;
  4615. } upload; /* for use by host */
  4616. } tx_octets_in_ampdu; /*dot11TransmittedOctetsInAMPDUCount*/
  4617. A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
  4618. A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
  4619. union {
  4620. A_UINT64 counter; /* for use by target only */
  4621. struct {
  4622. A_UINT32 rx_octets_in_ampdu_low;
  4623. A_UINT32 rx_octets_in_ampdu_high;
  4624. } upload; /* for use by host */
  4625. } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
  4626. A_UINT32 reserved_1;
  4627. A_UINT32 reserved_2;
  4628. A_UINT32 reserved_3;
  4629. A_UINT32 reserved_4;
  4630. } wmi_mib_stats;
  4631. typedef struct {
  4632. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
  4633. A_UINT32 vdev_id;
  4634. A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
  4635. A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
  4636. wmi_mac_addr peer_macaddr;
  4637. } wmi_rssi_stats;
  4638. typedef struct {
  4639. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats */
  4640. A_UINT32 num_per_chain_rssi_stats;
  4641. /* This TLV is followed by another TLV of array of structs:
  4642. * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
  4643. */
  4644. } wmi_per_chain_rssi_stats;
  4645. typedef struct {
  4646. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
  4647. /** unique id identifying the VDEV, generated by the caller */
  4648. A_UINT32 vdev_id;
  4649. /** VDEV type (AP,STA,IBSS,MONITOR) */
  4650. A_UINT32 vdev_type;
  4651. /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
  4652. A_UINT32 vdev_subtype;
  4653. /** VDEV MAC address */
  4654. wmi_mac_addr vdev_macaddr;
  4655. /** Number of configured txrx streams */
  4656. A_UINT32 num_cfg_txrx_streams;
  4657. /**
  4658. * pdev_id for identifying the MAC,
  4659. * See macros starting with WMI_PDEV_ID_ for values.
  4660. */
  4661. A_UINT32 pdev_id;
  4662. /* This TLV is followed by another TLV of array of structures
  4663. * wmi_vdev_txrx_streams cfg_txrx_streams[];
  4664. */
  4665. } wmi_vdev_create_cmd_fixed_param;
  4666. typedef struct {
  4667. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_txrx_streams */
  4668. /* band - Should take values from wmi_channel_band_mask */
  4669. A_UINT32 band;
  4670. /* max supported tx streams per given band for this vdev */
  4671. A_UINT32 supported_tx_streams;
  4672. /* max supported rx streams per given band for this vdev */
  4673. A_UINT32 supported_rx_streams;
  4674. } wmi_vdev_txrx_streams;
  4675. /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
  4676. typedef struct {
  4677. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
  4678. A_UINT32 type_count; /** 255: continuous schedule, 0: reserved */
  4679. A_UINT32 duration; /** Absent period duration in micro seconds */
  4680. A_UINT32 interval; /** Absent period interval in micro seconds */
  4681. A_UINT32 start_time; /** 32 bit tsf time when in starts */
  4682. } wmi_p2p_noa_descriptor;
  4683. /** values for vdev_type */
  4684. #define WMI_VDEV_TYPE_AP 0x1
  4685. #define WMI_VDEV_TYPE_STA 0x2
  4686. #define WMI_VDEV_TYPE_IBSS 0x3
  4687. #define WMI_VDEV_TYPE_MONITOR 0x4
  4688. /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
  4689. * by FW to execute the NAN specific WMI commands and also implement NAN specific
  4690. * operations like Network discovery, service provisioning and service
  4691. * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
  4692. * WMI command to create this VDEV once during initialization and host is not
  4693. * expected to use any VDEV specific WMI commands on this VDEV.
  4694. **/
  4695. #define WMI_VDEV_TYPE_NAN 0x5
  4696. #define WMI_VDEV_TYPE_OCB 0x6
  4697. /* NAN Data Interface */
  4698. #define WMI_VDEV_TYPE_NDI 0x7
  4699. /** values for vdev_subtype */
  4700. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
  4701. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
  4702. #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
  4703. #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
  4704. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
  4705. /* new subtype for 11S mesh is required as 11S functionality differs
  4706. * in many ways from proprietary mesh
  4707. * 11S uses 6-addr frame format and supports peering between mesh
  4708. * stations and dynamic best path selection between mesh stations.
  4709. * While in proprietary mesh, neighboring mesh station MAC is manually
  4710. * added to AST table for traffic flow between mesh stations
  4711. */
  4712. #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
  4713. /** values for vdev_start_request flags */
  4714. /** Indicates that AP VDEV uses hidden ssid. only valid for
  4715. * AP/GO */
  4716. #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
  4717. /** Indicates if robust management frame/management frame
  4718. * protection is enabled. For GO/AP vdevs, it indicates that
  4719. * it may support station/client associations with RMF enabled.
  4720. * For STA/client vdevs, it indicates that sta will
  4721. * associate with AP with RMF enabled. */
  4722. #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
  4723. /*
  4724. * Host is sending bcn_tx_rate to override the beacon tx rates.
  4725. */
  4726. #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
  4727. typedef struct {
  4728. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
  4729. /** unique id identifying the VDEV, generated by the caller */
  4730. A_UINT32 vdev_id;
  4731. /** requestor id identifying the caller module */
  4732. A_UINT32 requestor_id;
  4733. /** beacon interval from received beacon */
  4734. A_UINT32 beacon_interval;
  4735. /** DTIM Period from the received beacon */
  4736. A_UINT32 dtim_period;
  4737. /** Flags */
  4738. A_UINT32 flags;
  4739. /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  4740. wmi_ssid ssid;
  4741. /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
  4742. /** This field will be invalid and ignored unless the */
  4743. /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
  4744. /** When valid, this field contains the fixed tx rate for the beacon */
  4745. /** and probe response frames send by the GO or SoftAP */
  4746. A_UINT32 bcn_tx_rate;
  4747. /** beacon/probe reponse xmit power. Applicable for SoftAP. */
  4748. A_UINT32 bcn_txPower;
  4749. /** number of p2p NOA descriptor(s) from scan entry */
  4750. A_UINT32 num_noa_descriptors;
  4751. /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  4752. During CAC, Our HW shouldn't ack ditected frames */
  4753. A_UINT32 disable_hw_ack;
  4754. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  4755. /** The DBS policy manager indicates the preferred number of transmit streams. */
  4756. A_UINT32 preferred_tx_streams;
  4757. /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
  4758. /** the DBS policy manager indicates the preferred number of receive streams. */
  4759. A_UINT32 preferred_rx_streams;
  4760. /* The TLVs follows this structure:
  4761. * wmi_channel chan; <-- WMI channel
  4762. * wmi_p2p_noa_descriptor noa_descriptors[]; <-- actual p2p NOA descriptor from scan entry
  4763. */
  4764. } wmi_vdev_start_request_cmd_fixed_param;
  4765. typedef struct {
  4766. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
  4767. /** unique id identifying the VDEV, generated by the caller */
  4768. A_UINT32 vdev_id;
  4769. } wmi_vdev_delete_cmd_fixed_param;
  4770. typedef struct {
  4771. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
  4772. /** unique id identifying the VDEV, generated by the caller */
  4773. A_UINT32 vdev_id;
  4774. /** aid (assoc id) received in association response for STA VDEV */
  4775. A_UINT32 vdev_assoc_id;
  4776. /** bssid of the BSS the VDEV is joining */
  4777. wmi_mac_addr vdev_bssid;
  4778. } wmi_vdev_up_cmd_fixed_param;
  4779. typedef struct {
  4780. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
  4781. /** unique id identifying the VDEV, generated by the caller */
  4782. A_UINT32 vdev_id;
  4783. } wmi_vdev_stop_cmd_fixed_param;
  4784. typedef struct {
  4785. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
  4786. /** unique id identifying the VDEV, generated by the caller */
  4787. A_UINT32 vdev_id;
  4788. } wmi_vdev_down_cmd_fixed_param;
  4789. typedef struct {
  4790. /** unique id identifying the VDEV, generated by the caller */
  4791. A_UINT32 vdev_id;
  4792. } wmi_vdev_standby_response_cmd;
  4793. typedef struct {
  4794. /** unique id identifying the VDEV, generated by the caller */
  4795. A_UINT32 vdev_id;
  4796. } wmi_vdev_resume_response_cmd;
  4797. typedef struct {
  4798. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
  4799. /** unique id identifying the VDEV, generated by the caller */
  4800. A_UINT32 vdev_id;
  4801. /** parameter id */
  4802. A_UINT32 param_id;
  4803. /** parameter value */
  4804. A_UINT32 param_value;
  4805. } wmi_vdev_set_param_cmd_fixed_param;
  4806. typedef struct {
  4807. A_UINT32 key_seq_counter_l;
  4808. A_UINT32 key_seq_counter_h;
  4809. } wmi_key_seq_counter;
  4810. #define WMI_CIPHER_NONE 0x0 /* clear key */
  4811. #define WMI_CIPHER_WEP 0x1
  4812. #define WMI_CIPHER_TKIP 0x2
  4813. #define WMI_CIPHER_AES_OCB 0x3
  4814. #define WMI_CIPHER_AES_CCM 0x4
  4815. #define WMI_CIPHER_WAPI 0x5
  4816. #define WMI_CIPHER_CKIP 0x6
  4817. #define WMI_CIPHER_AES_CMAC 0x7
  4818. #define WMI_CIPHER_ANY 0x8
  4819. #define WMI_CIPHER_AES_GCM 0x9
  4820. #define WMI_CIPHER_AES_GMAC 0xa
  4821. typedef struct {
  4822. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
  4823. /** unique id identifying the VDEV, generated by the caller */
  4824. A_UINT32 vdev_id;
  4825. /** MAC address used for installing */
  4826. wmi_mac_addr peer_macaddr;
  4827. /** key index */
  4828. A_UINT32 key_ix;
  4829. /** key flags */
  4830. A_UINT32 key_flags;
  4831. /** key cipher, defined above */
  4832. A_UINT32 key_cipher;
  4833. /** key rsc counter */
  4834. wmi_key_seq_counter key_rsc_counter;
  4835. /** global key rsc counter */
  4836. wmi_key_seq_counter key_global_rsc_counter;
  4837. /** global key tsc counter */
  4838. wmi_key_seq_counter key_tsc_counter;
  4839. /** WAPI key rsc counter */
  4840. A_UINT8 wpi_key_rsc_counter[16];
  4841. /** WAPI key tsc counter */
  4842. A_UINT8 wpi_key_tsc_counter[16];
  4843. /** key length */
  4844. A_UINT32 key_len;
  4845. /** key tx mic length */
  4846. A_UINT32 key_txmic_len;
  4847. /** key rx mic length */
  4848. A_UINT32 key_rxmic_len;
  4849. /*
  4850. * Following this struct are this TLV.
  4851. * A_UINT8 key_data[]; <-- actual key data; contains key followed by tx mic followed by rx mic
  4852. */
  4853. } wmi_vdev_install_key_cmd_fixed_param;
  4854. /** Preamble types to be used with VDEV fixed rate configuration */
  4855. typedef enum {
  4856. WMI_RATE_PREAMBLE_OFDM,
  4857. WMI_RATE_PREAMBLE_CCK,
  4858. WMI_RATE_PREAMBLE_HT,
  4859. WMI_RATE_PREAMBLE_VHT,
  4860. } WMI_RATE_PREAMBLE;
  4861. /** Value to disable fixed rate setting */
  4862. #define WMI_FIXED_RATE_NONE (0xff)
  4863. /** the definition of different VDEV parameters */
  4864. typedef enum {
  4865. /** RTS Threshold */
  4866. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  4867. /** Fragmentation threshold */
  4868. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  4869. /** beacon interval in TUs */
  4870. WMI_VDEV_PARAM_BEACON_INTERVAL,
  4871. /** Listen interval in TUs */
  4872. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  4873. /** muticast rate in Mbps */
  4874. WMI_VDEV_PARAM_MULTICAST_RATE,
  4875. /** management frame rate in Mbps */
  4876. WMI_VDEV_PARAM_MGMT_TX_RATE,
  4877. /** slot time (long vs short) */
  4878. WMI_VDEV_PARAM_SLOT_TIME,
  4879. /** preamble (long vs short) */
  4880. WMI_VDEV_PARAM_PREAMBLE,
  4881. /** SWBA time (time before tbtt in msec) */
  4882. WMI_VDEV_PARAM_SWBA_TIME,
  4883. /** time period for updating VDEV stats */
  4884. WMI_VDEV_STATS_UPDATE_PERIOD,
  4885. /** age out time in msec for frames queued for station in power save*/
  4886. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  4887. /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
  4888. WMI_VDEV_HOST_SWBA_INTERVAL,
  4889. /** DTIM period (specified in units of num beacon intervals) */
  4890. WMI_VDEV_PARAM_DTIM_PERIOD,
  4891. /** scheduler air time limit for this VDEV. used by off chan scheduler */
  4892. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  4893. /** enable/dsiable WDS for this VDEV */
  4894. WMI_VDEV_PARAM_WDS,
  4895. /** ATIM Window */
  4896. WMI_VDEV_PARAM_ATIM_WINDOW,
  4897. /** BMISS max */
  4898. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  4899. /** BMISS first time */
  4900. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  4901. /** BMISS final time */
  4902. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  4903. /** WMM enables/disabled */
  4904. WMI_VDEV_PARAM_FEATURE_WMM,
  4905. /** Channel width */
  4906. WMI_VDEV_PARAM_CHWIDTH,
  4907. /** Channel Offset */
  4908. WMI_VDEV_PARAM_CHEXTOFFSET,
  4909. /** Disable HT Protection */
  4910. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  4911. /** Quick STA Kickout */
  4912. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  4913. /** Rate to be used with Management frames */
  4914. WMI_VDEV_PARAM_MGMT_RATE,
  4915. /** Protection Mode */
  4916. WMI_VDEV_PARAM_PROTECTION_MODE,
  4917. /** Fixed rate setting */
  4918. WMI_VDEV_PARAM_FIXED_RATE,
  4919. /** Short GI Enable/Disable */
  4920. WMI_VDEV_PARAM_SGI,
  4921. /** Enable LDPC */
  4922. WMI_VDEV_PARAM_LDPC,
  4923. /** Enable Tx STBC */
  4924. WMI_VDEV_PARAM_TX_STBC,
  4925. /** Enable Rx STBC */
  4926. WMI_VDEV_PARAM_RX_STBC,
  4927. /** Intra BSS forwarding */
  4928. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  4929. /** Setting Default xmit key for Vdev */
  4930. WMI_VDEV_PARAM_DEF_KEYID,
  4931. /** NSS width */
  4932. WMI_VDEV_PARAM_NSS,
  4933. /** Set the custom rate for the broadcast data frames */
  4934. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  4935. /** Set the custom rate (rate-code) for multicast data frames */
  4936. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  4937. /** Tx multicast packet indicate Enable/Disable */
  4938. WMI_VDEV_PARAM_MCAST_INDICATE,
  4939. /** Tx DHCP packet indicate Enable/Disable */
  4940. WMI_VDEV_PARAM_DHCP_INDICATE,
  4941. /** Enable host inspection of Tx unicast packet to unknown destination */
  4942. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  4943. /* The minimum amount of time AP begins to consider STA inactive */
  4944. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  4945. /* An associated STA is considered inactive when there is no recent TX/RX
  4946. * activity and no downlink frames are buffered for it. Once a STA exceeds
  4947. * the maximum idle inactive time, the AP will send an 802.11 data-null as
  4948. * a keep alive to verify the STA is still associated. If the STA does ACK
  4949. * the data-null, or if the data-null is buffered and the STA does not
  4950. * retrieve it, the STA will be considered unresponsive (see
  4951. * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
  4952. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  4953. /* An associated STA is considered unresponsive if there is no recent
  4954. * TX/RX activity and downlink frames are buffered for it. Once a STA
  4955. * exceeds the maximum unresponsive time, the AP will send a
  4956. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  4957. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  4958. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  4959. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  4960. /** Enable/Disable RTS-CTS */
  4961. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  4962. /* Enable TXBFee/er */
  4963. WMI_VDEV_PARAM_TXBF,
  4964. /**Set packet power save */
  4965. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  4966. /**Drops un-encrypted packets if any received in an encryted connection
  4967. * otherwise forwards to host
  4968. */
  4969. WMI_VDEV_PARAM_DROP_UNENCRY,
  4970. /*
  4971. * Set TX encap type.
  4972. *
  4973. * enum wmi_pkt_type is to be used as the parameter
  4974. * specifying the encap type.
  4975. */
  4976. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  4977. /*
  4978. * Try to detect stations that woke-up and exited power save but did not
  4979. * successfully transmit data-null with PM=0 to AP. When this happens,
  4980. * STA and AP power save state are out-of-sync. Use buffered but
  4981. * undelivered MSDU to the STA as a hint that the STA is really awake
  4982. * and expecting normal ASAP delivery, rather than retrieving BU with
  4983. * PS-Poll, U-APSD trigger, etc.
  4984. *
  4985. * 0 disables out-of-sync detection. Maximum time is 255 seconds.
  4986. */
  4987. WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
  4988. /* Enable/Disable early rx dynamic adjust feature.
  4989. * Early-rx dynamic adjust is a advance power save feature.
  4990. * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
  4991. * timing discrepancies in the system.
  4992. * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
  4993. * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
  4994. * properly to minimum the power consume.*/
  4995. WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
  4996. /* set target bmiss number per sample cycle if bmiss adjust was chosen.
  4997. * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
  4998. * which can be set by user through WMI command.
  4999. */
  5000. WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
  5001. /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
  5002. WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
  5003. /* set slop_step */
  5004. WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
  5005. /* set init slop */
  5006. WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
  5007. /* pause adjust enable/disable */
  5008. WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
  5009. /* Set channel pwr limit value of the vdev the minimal value of all
  5010. * vdevs operating on this channel will be set as channel tx power
  5011. * limit, which is used to configure ratearray
  5012. */
  5013. WMI_VDEV_PARAM_TX_PWRLIMIT,
  5014. /* set the count of snr value for calculation in snr monitor */
  5015. WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
  5016. /** Roaming offload */
  5017. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
  5018. /** Enable Leader request RX functionality for RMC */
  5019. WMI_VDEV_PARAM_ENABLE_RMC,
  5020. /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
  5021. * by himself. If the beacon lost time exceed this threshold, the peer is
  5022. * thought to be gone. */
  5023. WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
  5024. /** max rate in kpbs, transmit rate can't go beyond it */
  5025. WMI_VDEV_PARAM_MAX_RATE,
  5026. /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift*/
  5027. WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
  5028. /* set Tx failure count threshold for the vdev */
  5029. WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
  5030. /* set ebt resync timeout value, in the unit of TU */
  5031. WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
  5032. /* Enable Aggregation State Trigger Event */
  5033. WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
  5034. /* This parameter indicates whether IBSS station can enter into power save
  5035. * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
  5036. * awake all the time and should never set PM=1 in its transmitted frames.
  5037. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
  5038. * is non-zero. */
  5039. WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
  5040. /* This parameter indicates if this station can enter into power collapse
  5041. * for the remaining beacon interval after the ATIM window.
  5042. * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
  5043. * is set to TRUE. */
  5044. WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
  5045. /* This parameter indicates whether IBSS station exit power save mode and
  5046. * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
  5047. * whenever there is a TX/RX activity. */
  5048. WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
  5049. /* If Awake on TX/RX activity is enabled, this parameter indicates
  5050. * the data inactivity time in number of beacon intervals after which
  5051. * IBSS station reenters power save by sending Null frame with PM=1. */
  5052. WMI_VDEV_PARAM_INACTIVITY_CNT,
  5053. /* Inactivity time in msec after which TX Service Period (SP) is
  5054. * terminated by sending a Qos Null frame with EOSP.
  5055. * If value is 0, TX SP is terminated with the last buffered packet itself
  5056. * instead of waiting for the inactivity timeout. */
  5057. WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
  5058. /** DTIM policy */
  5059. WMI_VDEV_PARAM_DTIM_POLICY,
  5060. /* When IBSS network is initialized, PS-supporting device
  5061. * does not enter protocol sleep state during first
  5062. * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
  5063. WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
  5064. /* Enable/Disable 1 RX chain usage during the ATIM window */
  5065. WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
  5066. /* RX Leak window is the time driver waits before shutting down
  5067. * the radio or switching the channel and after receiving an ACK
  5068. * for a data frame with PM bit set) */
  5069. WMI_VDEV_PARAM_RX_LEAK_WINDOW,
  5070. /** Averaging factor(16 bit value) is used in the calculations to
  5071. * perform averaging of different link level statistics like average
  5072. * beacon spread or average number of frames leaked */
  5073. WMI_VDEV_PARAM_STATS_AVG_FACTOR,
  5074. /** disconnect threshold, once the consecutive error for specific peer
  5075. * exceed this threhold, FW will send kickout event to host */
  5076. WMI_VDEV_PARAM_DISCONNECT_TH,
  5077. /** The rate_code of RTS_CTS changed by host. Now FW can support
  5078. * more non-HT rates rather than 1Mbps or 6Mbps */
  5079. WMI_VDEV_PARAM_RTSCTS_RATE,
  5080. /** This parameter indicates whether using a long duration RTS-CTS
  5081. * protection when a SAP goes off channel in MCC mode */
  5082. WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
  5083. /** This parameter indicates whether using a broadcast probe response
  5084. * to increase the detectability of SAP in MCC mode */
  5085. WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
  5086. /** This parameter indicates the power backoff in percentage
  5087. * currently supports 100%, 50%, 25%, 12.5%, and minimum
  5088. * Host passes 0, 1, 2, 3, 4 to Firmware
  5089. * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
  5090. * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
  5091. */
  5092. WMI_VDEV_PARAM_TXPOWER_SCALE,
  5093. /** TX power backoff in dB: tx power -= param value
  5094. * Host passes values(DB) to Halphy, Halphy reduces the power table
  5095. * by the values. Safety check will happen in Halphy.
  5096. */
  5097. WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
  5098. /** Multicast to Unicast conversion setting */
  5099. WMI_VDEV_PARAM_MCAST2UCAST_SET,
  5100. /** Total number of HW retries */
  5101. WMI_VDEV_PARAM_RC_NUM_RETRIES,
  5102. /** Max tx percentage for cabq */
  5103. WMI_VDEV_PARAM_CABQ_MAXDUR,
  5104. /** MFPTEST settings */
  5105. WMI_VDEV_PARAM_MFPTEST_SET,
  5106. /** RTS Fixed rate setting */
  5107. WMI_VDEV_PARAM_RTS_FIXED_RATE,
  5108. /** VHT SGI MASK */
  5109. WMI_VDEV_PARAM_VHT_SGIMASK,
  5110. /** VHT80 Auto Rate MASK */
  5111. WMI_VDEV_PARAM_VHT80_RATEMASK,
  5112. /** set Proxy STA features for this vap */
  5113. WMI_VDEV_PARAM_PROXY_STA,
  5114. /** set virtual cell mode - enable/disable */
  5115. WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
  5116. /** Set receive packet type */
  5117. WMI_VDEV_PARAM_RX_DECAP_TYPE,
  5118. /** Set ratemask with specific Bandwidth and NSS */
  5119. WMI_VDEV_PARAM_BW_NSS_RATEMASK,
  5120. /** Set SENSOR Support */
  5121. WMI_VDEV_PARAM_SENSOR_AP,
  5122. /** Set beacon rate */
  5123. WMI_VDEV_PARAM_BEACON_RATE,
  5124. /** Enable CTS to self for DTIM beacon */
  5125. WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
  5126. /** Disable station kickout at Vap level */
  5127. WMI_VDEV_PARAM_STA_KICKOUT,
  5128. /* VDEV capabilities */
  5129. WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
  5130. /**
  5131. * Increment TSF in micro seconds to avoid beacon collision on mesh VAP.
  5132. * The host must ensure that either no other vdevs share the TSF with
  5133. * this vdev, or else that it is acceptable to apply this TSF adjustment
  5134. * to all vdevs sharing the TSF.
  5135. */
  5136. WMI_VDEV_PARAM_TSF_INCREMENT,
  5137. /** Disable/Enable AMPDU of vdev per AC:
  5138. * bit | AC
  5139. * --------
  5140. * 0 | VO
  5141. * 1 | VI
  5142. * 2 | BE
  5143. * 3 | BK
  5144. * A value of 0 in a given bit disables A-MPDU aggregation for
  5145. * that AC; a value of 1 enables A-MPDU aggregation
  5146. */
  5147. WMI_VDEV_PARAM_AMPDU_PER_AC,
  5148. /**
  5149. * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
  5150. * Used mainly for mesh-vap.
  5151. * The parameter value delivered with the RX_FILTER vdev param contains
  5152. * a bit-or mask of wmi_vdev_param_filter enum values.
  5153. */
  5154. WMI_VDEV_PARAM_RX_FILTER,
  5155. /** vdev-specific mgmt tx power in dBm units (signed integer value) */
  5156. WMI_VDEV_PARAM_MGMT_TX_POWER,
  5157. /** Vdev level non aggregration/11g sw retry threshold. 0-disable, min:0, max:31, default:15 */
  5158. WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
  5159. /** Vdev level aggregration sw retry threshold. 0-disable, min:0, max:31, default:15 */
  5160. WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
  5161. /** disable dynamic bw RTS **/
  5162. WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
  5163. /** per ssid (vdev) based ATF strict/fair scheduling policy
  5164. * param values are WMI_ATF_SSID_FAIR_SCHED or WMI_ATF_SSID_STRICT_SCHED
  5165. */
  5166. WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
  5167. /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
  5168. * The below vdev param types are used for prototyping, and are
  5169. * prone to change.
  5170. */
  5171. WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
  5172. /* 11AX SPECIFIC defines */
  5173. WMI_VDEV_PARAM_BSS_COLOR,
  5174. /* In case of AP this will enable / disable MU-MIMO mode */
  5175. WMI_VDEV_PARAM_SET_UL_MU_MIMO,
  5176. /* set fragmentation level of the vdev's peers.
  5177. * Values can be WMI_HE_FRAG_SUPPORT_LEVEL0..WMI_HE_FRAG_SUPPORT_LEVEL3
  5178. */
  5179. WMI_VDEV_PARAM_SET_FRAG_LEVEL,
  5180. /* control different features of HEControl:
  5181. * Bit 0:- 1/0-> Enable/Disable transmssion of UL scheduling.
  5182. * Bit 1:- 1/0-> Enable / disable honoring of ROMI from a peer.
  5183. * Applicable in AP mode only.
  5184. */
  5185. WMI_VDEV_PARAM_SET_HECONTROL,
  5186. /* enable / disable trigger access for a AP vdev's peers.
  5187. * For a STA mode vdev this will enable/disable triggered access
  5188. * and enable/disable Multi User mode of operation.
  5189. */
  5190. WMI_VDEV_PARAM_SET_HEMU_MODE,
  5191. /* For Tx OFDMA this will set values of CP length or guard interval
  5192. * to be
  5193. * 0: Auto
  5194. * 1: 0.8 us
  5195. * 2: 1.6 us
  5196. * 3: 3.2 us
  5197. * Similar to Guard Interval
  5198. */
  5199. WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
  5200. /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
  5201. } WMI_VDEV_PARAM;
  5202. /* vdev capabilities bit mask */
  5203. #define WMI_VDEV_BEACON_SUPPORT 0x1
  5204. #define WMI_VDEV_WDS_LRN_ENABLED 0x2
  5205. #define WMI_VDEV_VOW_ENABLED 0x4
  5206. #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
  5207. #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
  5208. #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
  5209. /* TXBF capabilities masks */
  5210. #define WMI_TXBF_CONF_SU_TX_BFEE_S 0
  5211. #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
  5212. #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << WMI_TXBF_CONF_SU_TX_BFEE_S)
  5213. #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFEE)
  5214. #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFEE)
  5215. #define WMI_TXBF_CONF_MU_TX_BFEE_S 1
  5216. #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
  5217. #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << WMI_TXBF_CONF_MU_TX_BFEE_S)
  5218. #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFEE)
  5219. #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFEE)
  5220. #define WMI_TXBF_CONF_SU_TX_BFER_S 2
  5221. #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
  5222. #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << WMI_TXBF_CONF_SU_TX_BFER_S)
  5223. #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_SU_TX_BFER)
  5224. #define WMI_TXBF_CONF_SU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_SU_TX_BFER)
  5225. #define WMI_TXBF_CONF_MU_TX_BFER_S 3
  5226. #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
  5227. #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << WMI_TXBF_CONF_MU_TX_BFER_S)
  5228. #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_MU_TX_BFER)
  5229. #define WMI_TXBF_CONF_MU_TX_BFER_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_MU_TX_BFER)
  5230. #define WMI_TXBF_CONF_STS_CAP_S 4
  5231. #define WMI_TXBF_CONF_STS_CAP_M 0x7
  5232. #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << WMI_TXBF_CONF_STS_CAP_S)
  5233. #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_STS_CAP);
  5234. #define WMI_TXBF_CONF_STS_CAP_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_STS_CAP)
  5235. #define WMI_TXBF_CONF_IMPLICIT_BF_S 7
  5236. #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
  5237. #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << WMI_TXBF_CONF_IMPLICIT_BF_S)
  5238. #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_IMPLICIT_BF)
  5239. #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_IMPLICIT_BF)
  5240. #define WMI_TXBF_CONF_BF_SND_DIM_S 8
  5241. #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
  5242. #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << WMI_TXBF_CONF_BF_SND_DIM_S)
  5243. #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x,WMI_TXBF_CONF_BF_SND_DIM)
  5244. #define WMI_TXBF_CONF_BF_SND_DIM_SET(x,z) WMI_F_RMW(x,z,WMI_TXBF_CONF_BF_SND_DIM)
  5245. /* TXBF capabilities */
  5246. typedef struct {
  5247. A_UINT32 txbf_cap;
  5248. } wmi_vdev_txbf_cap;
  5249. /* vdev rx filters (for mesh) */
  5250. typedef enum {
  5251. WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, /* Don't drop any frames - Default */
  5252. WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, /* Drop FromDS frames */
  5253. WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, /* Drop ToDS frames */
  5254. WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, /* Drop NODS frames */
  5255. WMI_VDEV_RX_FILTER_OUT_RA = 0x8, /* Drop RA frames */
  5256. WMI_VDEV_RX_FILTER_OUT_TA = 0x10, /* Drop TA frames */
  5257. } wmi_vdev_param_filter;
  5258. /* Length of ATIM Window in TU */
  5259. #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
  5260. enum wmi_pkt_type {
  5261. WMI_PKT_TYPE_RAW = 0,
  5262. WMI_PKT_TYPE_NATIVE_WIFI = 1,
  5263. WMI_PKT_TYPE_ETHERNET = 2,
  5264. };
  5265. /*******************************************************************
  5266. * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
  5267. * Do not use it!
  5268. *******************************************************************/
  5269. typedef struct {
  5270. A_UINT8 sutxbfee : 1,
  5271. mutxbfee : 1,
  5272. sutxbfer : 1,
  5273. mutxbfer : 1,
  5274. txb_sts_cap : 3,
  5275. implicit_bf : 1;
  5276. } wmi_vdev_txbf_en;
  5277. /** Upto 8 bits are available for Roaming module to be sent along with
  5278. WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
  5279. /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
  5280. #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
  5281. /* Enable Roaming module in FW to do scan based on Final BMISS */
  5282. #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
  5283. /** slot time long */
  5284. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  5285. /** slot time short */
  5286. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  5287. /** preablbe long */
  5288. #define WMI_VDEV_PREAMBLE_LONG 0x1
  5289. /** preablbe short */
  5290. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  5291. /** the definition of different START/RESTART Event response */
  5292. typedef enum {
  5293. /* Event respose of START CMD */
  5294. WMI_VDEV_START_RESP_EVENT = 0,
  5295. /* Event respose of RESTART CMD */
  5296. WMI_VDEV_RESTART_RESP_EVENT,
  5297. } WMI_START_EVENT_PARAM;
  5298. typedef struct {
  5299. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
  5300. /** unique id identifying the VDEV, generated by the caller */
  5301. A_UINT32 vdev_id;
  5302. /** requestor id that requested the VDEV start request */
  5303. A_UINT32 requestor_id;
  5304. /* Respose of Event type START/RESTART */
  5305. WMI_START_EVENT_PARAM resp_type;
  5306. /** status of the response */
  5307. A_UINT32 status;
  5308. /** Vdev chain mask */
  5309. A_UINT32 chain_mask;
  5310. /** Vdev mimo power save mode */
  5311. A_UINT32 smps_mode;
  5312. union {
  5313. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  5314. /** pdev_id for identifying the MAC
  5315. * See macros starting with WMI_PDEV_ID_ for values.
  5316. */
  5317. A_UINT32 pdev_id;
  5318. };
  5319. /** Configured Transmit Streams **/
  5320. A_UINT32 cfgd_tx_streams;
  5321. /** Configured Receive Streams **/
  5322. A_UINT32 cfgd_rx_streams;
  5323. } wmi_vdev_start_response_event_fixed_param;
  5324. typedef struct {
  5325. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
  5326. /** unique id identifying the VDEV, generated by the caller */
  5327. A_UINT32 vdev_id;
  5328. } wmi_vdev_stopped_event_fixed_param;
  5329. typedef struct {
  5330. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
  5331. /** unique id identifying the VDEV, generated by the caller */
  5332. A_UINT32 vdev_id;
  5333. } wmi_vdev_delete_resp_event_fixed_param;
  5334. /** common structure used for simple events (stopped, resume_req, standby response) */
  5335. typedef struct {
  5336. A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
  5337. /** unique id identifying the VDEV, generated by the caller */
  5338. A_UINT32 vdev_id;
  5339. } wmi_vdev_simple_event_fixed_param;
  5340. /** VDEV start response status codes */
  5341. #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
  5342. #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
  5343. #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
  5344. /** Beacon processing related command and event structures */
  5345. typedef struct {
  5346. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
  5347. /** unique id identifying the VDEV, generated by the caller */
  5348. A_UINT32 vdev_id;
  5349. /** xmit rate */
  5350. A_UINT32 tx_rate;
  5351. /** xmit power */
  5352. A_UINT32 txPower;
  5353. /** beacon buffer length in bytes */
  5354. A_UINT32 buf_len;
  5355. /* This TLV is followed by array of bytes:
  5356. * A_UINT8 bufp[]; <-- beacon frame buffer
  5357. */
  5358. } wmi_bcn_tx_hdr;
  5359. /* Beacon filter */
  5360. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  5361. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  5362. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  5363. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  5364. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  5365. typedef struct {
  5366. /** Filter ID */
  5367. A_UINT32 bcn_filter_id;
  5368. /** Filter type - wmi_bcn_filter */
  5369. A_UINT32 bcn_filter;
  5370. /** Buffer len */
  5371. A_UINT32 bcn_filter_len;
  5372. /** Filter info (threshold, BSSID, RSSI) */
  5373. A_UINT8 *bcn_filter_buf;
  5374. } wmi_bcn_filter_rx_cmd;
  5375. /** Capabilities and IEs to be passed to firmware */
  5376. typedef struct {
  5377. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
  5378. /** Capabilities */
  5379. A_UINT32 caps;
  5380. /** ERP info */
  5381. A_UINT32 erp;
  5382. /** Advanced capabilities */
  5383. /** HT capabilities */
  5384. /** HT Info */
  5385. /** ibss_dfs */
  5386. /** wpa Info */
  5387. /** rsn Info */
  5388. /** rrm info */
  5389. /** ath_ext */
  5390. /** app IE */
  5391. } wmi_bcn_prb_info;
  5392. typedef struct {
  5393. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
  5394. /** unique id identifying the VDEV, generated by the caller */
  5395. A_UINT32 vdev_id;
  5396. /** TIM IE offset from the beginning of the template. */
  5397. A_UINT32 tim_ie_offset;
  5398. /** beacon buffer length. data is in TLV data[] */
  5399. A_UINT32 buf_len;
  5400. /*
  5401. * The TLVs follows:
  5402. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  5403. * A_UINT8 data[]; <-- Variable length data
  5404. */
  5405. } wmi_bcn_tmpl_cmd_fixed_param;
  5406. typedef struct {
  5407. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
  5408. /** unique id identifying the VDEV, generated by the caller */
  5409. A_UINT32 vdev_id;
  5410. /** beacon buffer length. data is in TLV data[] */
  5411. A_UINT32 buf_len;
  5412. /*
  5413. * The TLVs follows:
  5414. * wmi_bcn_prb_info bcn_prb_info; <-- beacon probe capabilities and IEs
  5415. * A_UINT8 data[]; <-- Variable length data
  5416. */
  5417. } wmi_prb_tmpl_cmd_fixed_param;
  5418. typedef struct {
  5419. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
  5420. A_UINT32 tlv_header;
  5421. /** unique id identifying the VDEV */
  5422. A_UINT32 vdev_id;
  5423. /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
  5424. A_UINT32 tx_status;
  5425. } wmi_offload_bcn_tx_status_event_fixed_param;
  5426. enum wmi_sta_ps_mode {
  5427. /** enable power save for the given STA VDEV */
  5428. WMI_STA_PS_MODE_DISABLED = 0,
  5429. /** disable power save for a given STA VDEV */
  5430. WMI_STA_PS_MODE_ENABLED = 1,
  5431. };
  5432. typedef struct {
  5433. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
  5434. /** unique id identifying the VDEV, generated by the caller */
  5435. A_UINT32 vdev_id;
  5436. /** Power save mode
  5437. *
  5438. * (see enum wmi_sta_ps_mode)
  5439. */
  5440. A_UINT32 sta_ps_mode;
  5441. } wmi_sta_powersave_mode_cmd_fixed_param;
  5442. enum wmi_csa_offload_en {
  5443. WMI_CSA_OFFLOAD_DISABLE = 0,
  5444. WMI_CSA_OFFLOAD_ENABLE = 1,
  5445. };
  5446. typedef struct {
  5447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
  5448. A_UINT32 vdev_id;
  5449. A_UINT32 csa_offload_enable;
  5450. } wmi_csa_offload_enable_cmd_fixed_param;
  5451. typedef struct {
  5452. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
  5453. A_UINT32 vdev_id;
  5454. /*
  5455. * The TLVs follows:
  5456. * wmi_channel chan;
  5457. */
  5458. } wmi_csa_offload_chanswitch_cmd_fixed_param;
  5459. /**
  5460. * This parameter controls the policy for retrieving frames from AP while the
  5461. * STA is in sleep state.
  5462. *
  5463. * Only takes affect if the sta_ps_mode is enabled
  5464. */
  5465. enum wmi_sta_ps_param_rx_wake_policy {
  5466. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  5467. * the Power save SM(state machine) will come out of sleep by either
  5468. * sending null frame (or) a data frame (with PS==0) in response to TIM
  5469. * bit set in the received beacon frame from AP.
  5470. */
  5471. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  5472. /* Here the power save state machine will not wakeup in response to TIM
  5473. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  5474. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  5475. * access categories are delivery-enabled, the station will send a UAPSD
  5476. * trigger frame, otherwise it will send a PS-Poll.
  5477. */
  5478. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  5479. };
  5480. /** Number of tx frames/beacon that cause the power save SM to wake up.
  5481. *
  5482. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  5483. * meaning, It will cause the SM to never wake up. This is useful if you want
  5484. * to keep the system to sleep all the time for some kind of test mode . host
  5485. * can change this parameter any time. It will affect at the next tx frame.
  5486. */
  5487. enum wmi_sta_ps_param_tx_wake_threshold {
  5488. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  5489. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  5490. /* Values greater than one indicate that many TX attempts per beacon
  5491. * interval before the STA will wake up
  5492. */
  5493. };
  5494. /**
  5495. * The maximum number of PS-Poll frames the FW will send in response to
  5496. * traffic advertised in TIM before waking up (by sending a null frame with PS
  5497. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  5498. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  5499. * parameter is used when the RX wake policy is
  5500. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  5501. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  5502. */
  5503. enum wmi_sta_ps_param_pspoll_count {
  5504. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  5505. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  5506. * will send before waking up.
  5507. */
  5508. };
  5509. /*
  5510. * This will include the delivery and trigger enabled state for every AC.
  5511. * This is the negotiated state with AP. The host MLME needs to set this based
  5512. * on AP capability and the state Set in the association request by the
  5513. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  5514. */
  5515. #define WMI_UAPSD_AC_TYPE_DELI 0
  5516. #define WMI_UAPSD_AC_TYPE_TRIG 1
  5517. #define WMI_UAPSD_AC_BIT_MASK(ac,type) \
  5518. ((type == WMI_UAPSD_AC_TYPE_DELI) ? \
  5519. (1 << (ac<<1)) : \
  5520. (1 << ((ac<<1)+1)))
  5521. enum wmi_sta_ps_param_uapsd {
  5522. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5523. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5524. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5525. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5526. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5527. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5528. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5529. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5530. };
  5531. enum wmi_sta_powersave_param {
  5532. /**
  5533. * Controls how frames are retrievd from AP while STA is sleeping
  5534. *
  5535. * (see enum wmi_sta_ps_param_rx_wake_policy)
  5536. */
  5537. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  5538. /**
  5539. * The STA will go active after this many TX
  5540. *
  5541. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  5542. */
  5543. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  5544. /**
  5545. * Number of PS-Poll to send before STA wakes up
  5546. *
  5547. * (see enum wmi_sta_ps_param_pspoll_count)
  5548. *
  5549. */
  5550. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  5551. /**
  5552. * TX/RX inactivity time in msec before going to sleep.
  5553. *
  5554. * The power save SM will monitor tx/rx activity on the VDEV, if no
  5555. * activity for the specified msec of the parameter the Power save SM will
  5556. * go to sleep.
  5557. */
  5558. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  5559. /**
  5560. * Set uapsd configuration.
  5561. *
  5562. * (see enum wmi_sta_ps_param_uapsd)
  5563. */
  5564. WMI_STA_PS_PARAM_UAPSD = 4,
  5565. /**
  5566. * Number of PS-Poll to send before STA wakes up in QPower Mode
  5567. */
  5568. WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
  5569. /**
  5570. * Enable QPower
  5571. */
  5572. WMI_STA_PS_ENABLE_QPOWER = 6,
  5573. /**
  5574. * Number of TX frames before the entering the Active state
  5575. */
  5576. WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
  5577. /**
  5578. * QPower SPEC PSPOLL interval
  5579. */
  5580. WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
  5581. /**
  5582. * Max SPEC PSPOLL to be sent when the PSPOLL response has
  5583. * no-data bit set
  5584. */
  5585. WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
  5586. };
  5587. typedef struct {
  5588. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
  5589. /** unique id identifying the VDEV, generated by the caller */
  5590. A_UINT32 vdev_id;
  5591. /** station power save parameter (see enum wmi_sta_powersave_param) */
  5592. A_UINT32 param;
  5593. A_UINT32 value;
  5594. } wmi_sta_powersave_param_cmd_fixed_param;
  5595. /** No MIMO power save */
  5596. #define WMI_STA_MIMO_PS_MODE_DISABLE
  5597. /** mimo powersave mode static*/
  5598. #define WMI_STA_MIMO_PS_MODE_STATIC
  5599. /** mimo powersave mode dynamic */
  5600. #define WMI_STA_MIMO_PS_MODE_DYNAMI
  5601. typedef struct {
  5602. /** unique id identifying the VDEV, generated by the caller */
  5603. A_UINT32 vdev_id;
  5604. /** mimo powersave mode as defined above */
  5605. A_UINT32 mimo_pwrsave_mode;
  5606. } wmi_sta_mimo_ps_mode_cmd;
  5607. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  5608. enum wmi_ap_ps_param_uapsd {
  5609. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5610. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5611. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5612. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5613. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5614. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5615. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5616. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5617. };
  5618. /** U-APSD maximum service period of peer station */
  5619. enum wmi_ap_ps_peer_param_max_sp {
  5620. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  5621. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  5622. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  5623. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  5624. /* keep last! */
  5625. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  5626. };
  5627. /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
  5628. enum wmi_ap_ps_param_sifs_resp_frmtype {
  5629. WMI_SIFS_RESP_PSPOLL = (1 << 0),
  5630. WMI_SIFS_RESP_UAPSD = (1 << 1),
  5631. WMI_SIFS_RESP_QBST_EXP = (1 << 2),
  5632. WMI_SIFS_RESP_QBST_DATA = (1 << 3),
  5633. WMI_SIFS_RESP_QBST_BAR = (1 << 4),
  5634. };
  5635. /**
  5636. * AP power save parameter
  5637. * Set a power save specific parameter for a peer station
  5638. */
  5639. enum wmi_ap_ps_peer_param {
  5640. /** Set uapsd configuration for a given peer.
  5641. *
  5642. * This will include the delivery and trigger enabled state for every AC.
  5643. * The host MLME needs to set this based on AP capability and stations
  5644. * request Set in the association request received from the station.
  5645. *
  5646. * Lower 8 bits of the value specify the UAPSD configuration.
  5647. *
  5648. * (see enum wmi_ap_ps_param_uapsd)
  5649. * The default value is 0.
  5650. */
  5651. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  5652. /**
  5653. * Set the service period for a UAPSD capable station
  5654. *
  5655. * The service period from wme ie in the (re)assoc request frame.
  5656. *
  5657. * (see enum wmi_ap_ps_peer_param_max_sp)
  5658. */
  5659. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  5660. /** Time in seconds for aging out buffered frames for STA in power save */
  5661. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  5662. /**
  5663. * Specify frame types that are considered SIFS RESP trigger frame
  5664. * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
  5665. */
  5666. WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  5667. /** Specifies the trigger state of TID. Valid only for UAPSD frame type */
  5668. WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  5669. /** Specifies the WNM sleep state of a STA */
  5670. WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  5671. };
  5672. typedef struct {
  5673. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
  5674. /** unique id identifying the VDEV, generated by the caller */
  5675. A_UINT32 vdev_id;
  5676. /** peer MAC address */
  5677. wmi_mac_addr peer_macaddr;
  5678. /** AP powersave param (see enum wmi_ap_ps_peer_param) */
  5679. A_UINT32 param;
  5680. /** AP powersave param value (see defines) */
  5681. A_UINT32 value;
  5682. } wmi_ap_ps_peer_cmd_fixed_param;
  5683. /** Configure peer station 11v U-APSD coexistance
  5684. *
  5685. * Two parameters from uaspd coexistence ie info (as specified in 11v) are
  5686. * sent down to FW along with this command.
  5687. *
  5688. * The semantics of these fields are described in the following text extracted
  5689. * from 802.11v.
  5690. *
  5691. * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
  5692. * U-APSD Coexistence element, the AP should not transmit frames to the
  5693. * non-AP STA outside of the U-APSD Coexistence Service Period, which
  5694. * begins when the AP receives the U-APSD trigger frame and ends after
  5695. * the transmission period specified by the result of the following
  5696. * calculation:
  5697. *
  5698. * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
  5699. *
  5700. * Where T is the time the U-APSD trigger frame was received at the AP
  5701. * Interval is the UAPSD Coexistence element Duration/Interval field
  5702. * value (see 7.3.2.91) or upon the successful transmission of a frame
  5703. * with EOSP bit set to 1, whichever is earlier.
  5704. *
  5705. *
  5706. * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
  5707. * Coexistence element, the AP should not transmit frames to the non-AP
  5708. * STA outside of the U-APSD Coexistence Service Period, which begins
  5709. * when the AP receives a U-APSD trigger frame and ends after the
  5710. * transmission period specified by the result of the following
  5711. * calculation: End of transmission period = T + Duration
  5712. */
  5713. typedef struct {
  5714. /** unique id identifying the VDEV, generated by the caller */
  5715. A_UINT32 vdev_id;
  5716. /** peer MAC address */
  5717. wmi_mac_addr peer_macaddr;
  5718. /** Enable U-APSD coexistence support for this peer
  5719. *
  5720. * 0 -> disabled (default)
  5721. * 1 -> enabled
  5722. */
  5723. A_UINT32 enabled;
  5724. /** Duration/Interval as defined by 11v U-ASPD coexistance */
  5725. A_UINT32 duration_interval;
  5726. /** Upper 32 bits of 64-bit TSF offset */
  5727. A_UINT32 tsf_offset_high;
  5728. /** Lower 32 bits of 64-bit TSF offset */
  5729. A_UINT32 tsf_offset_low;
  5730. } wmi_ap_powersave_peer_uapsd_coex_cmd;
  5731. typedef enum {
  5732. WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
  5733. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
  5734. WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
  5735. WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
  5736. } wmi_ap_ps_egap_flag_type;
  5737. /**
  5738. * configure ehanced green ap parameters
  5739. */
  5740. typedef struct {
  5741. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  5742. /** Enable enhanced green ap
  5743. * 0 -> disabled
  5744. * 1 -> enabled
  5745. */
  5746. A_UINT32 enable;
  5747. /** The param indicates a duration that all STAs connected
  5748. * to S-AP have no traffic.
  5749. */
  5750. A_UINT32 inactivity_time; /* in unit of milliseconds */
  5751. /** The param indicates a duration that all STAs connected
  5752. * to S-AP have no traffic, after all STAs have entered powersave.
  5753. */
  5754. A_UINT32 wait_time; /* in unit of milliseconds */
  5755. /** The param is used to turn on/off some functions within E-GAP.
  5756. */
  5757. A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
  5758. } wmi_ap_ps_egap_param_cmd_fixed_param;
  5759. typedef enum {
  5760. WMI_AP_PS_EGAP_STATUS_IDLE = 1,
  5761. WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
  5762. WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
  5763. WMI_AP_PS_EGAP_STATUS_MAX = 15
  5764. } wmi_ap_ps_egap_status_type;
  5765. /**
  5766. * send ehanced green ap status to host
  5767. */
  5768. typedef struct
  5769. {
  5770. /** TLV tag and len; tag equals
  5771. * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list */
  5772. A_UINT32 tlv_header;
  5773. union {
  5774. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  5775. /** pdev_id for identifying the MAC
  5776. * See macros starting with WMI_PDEV_ID_ for values.
  5777. */
  5778. A_UINT32 pdev_id;
  5779. };
  5780. /** The param indicates the current tx chainmask with the mac id. */
  5781. A_UINT32 tx_chainmask;
  5782. /** The param indicates the current rx chainmask with the mac id. */
  5783. A_UINT32 rx_chainmask;
  5784. } wmi_ap_ps_egap_info_chainmask_list;
  5785. typedef struct {
  5786. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */
  5787. /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
  5788. A_UINT32 status;
  5789. /* This TLV is followed by
  5790. * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
  5791. */
  5792. } wmi_ap_ps_egap_info_event_fixed_param;
  5793. /* 128 clients = 4 words */
  5794. /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
  5795. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  5796. typedef struct {
  5797. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
  5798. /** TIM bitmap len (in bytes)*/
  5799. A_UINT32 tim_len;
  5800. /** TIM Partial Virtual Bitmap */
  5801. A_UINT32 tim_mcast;
  5802. A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  5803. A_UINT32 tim_changed;
  5804. A_UINT32 tim_num_ps_pending;
  5805. } wmi_tim_info;
  5806. typedef struct {
  5807. /** Flag to enable quiet period IE support */
  5808. A_UINT32 is_enabled;
  5809. /** Quiet start */
  5810. A_UINT32 tbttcount;
  5811. /** Beacon intervals between quiets*/
  5812. A_UINT32 period;
  5813. /** TUs of each quiet*/
  5814. A_UINT32 duration;
  5815. /** TUs of from TBTT of quiet start*/
  5816. A_UINT32 offset;
  5817. } wmi_quiet_info;
  5818. /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
  5819. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
  5820. typedef struct {
  5821. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
  5822. /** Bit 0: Flag to indicate an update in NOA schedule
  5823. * Bits 7-1: Reserved
  5824. * Bits 15-8: Index (identifies the instance of NOA sub element)
  5825. * Bit 16: Opp PS state of the AP
  5826. * Bits 23-17: Ctwindow in TUs
  5827. * Bits 31-24: Number of NOA descriptors
  5828. */
  5829. A_UINT32 noa_attributes;
  5830. wmi_p2p_noa_descriptor noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  5831. } wmi_p2p_noa_info;
  5832. #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
  5833. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
  5834. #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
  5835. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
  5836. #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
  5837. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  5838. WMI_UNIFIED_NOA_ATTR_MODIFIED);
  5839. #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
  5840. #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
  5841. #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
  5842. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
  5843. #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
  5844. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  5845. WMI_UNIFIED_NOA_ATTR_INDEX);
  5846. #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
  5847. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
  5848. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
  5849. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
  5850. #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
  5851. WMI_F_RMW((hdr)->noa_attributes, 0x1, \
  5852. WMI_UNIFIED_NOA_ATTR_OPP_PS);
  5853. #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
  5854. #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
  5855. #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
  5856. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
  5857. #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
  5858. WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
  5859. WMI_UNIFIED_NOA_ATTR_CTWIN);
  5860. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
  5861. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
  5862. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
  5863. WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
  5864. #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
  5865. WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
  5866. WMI_UNIFIED_NOA_ATTR_NUM_DESC);
  5867. typedef struct {
  5868. /** TIM info */
  5869. wmi_tim_info tim_info;
  5870. /** P2P NOA info */
  5871. wmi_p2p_noa_info p2p_noa_info;
  5872. /* TBD: More info elements to be added later */
  5873. } wmi_bcn_info;
  5874. typedef struct {
  5875. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
  5876. /** bitmap identifying the VDEVs, generated by the caller */
  5877. A_UINT32 vdev_map;
  5878. /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
  5879. * wmi_tim_info tim_info[];
  5880. * wmi_p2p_noa_info p2p_noa_info[];
  5881. *
  5882. */
  5883. } wmi_host_swba_event_fixed_param;
  5884. #define WMI_MAX_AP_VDEV 16
  5885. typedef struct {
  5886. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
  5887. /** bimtap of VDEVs that has tbtt offset updated */
  5888. A_UINT32 vdev_map;
  5889. /* The TLVs for tbttoffset_list will follow this TLV.
  5890. * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
  5891. * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
  5892. */
  5893. } wmi_tbtt_offset_event_fixed_param;
  5894. /* Peer Specific commands and events */
  5895. typedef struct {
  5896. A_UINT32 percentage; /* in unit of 12.5% */
  5897. A_UINT32 min_delta; /* in unit of Mbps */
  5898. } rate_delta_t;
  5899. #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
  5900. #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
  5901. #define MAX_NUM_OF_RATE_THRESH 4
  5902. typedef struct {
  5903. A_UINT32 val_cond_flags; /* PEER_RATE_REPORT_COND_FLAG_DELTA, PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  5904. Any of these two conditions or both of them can be set. */
  5905. rate_delta_t rate_delta;
  5906. A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; /* In unit of Mbps. There are at most 4 thresholds.
  5907. If the threshold count is less than 4, set zero to
  5908. the one following the last threshold */
  5909. } report_cond_per_phy_t;
  5910. enum peer_rate_report_cond_phy_type {
  5911. PEER_RATE_REPORT_COND_11B = 0,
  5912. PEER_RATE_REPORT_COND_11A_G,
  5913. PEER_RATE_REPORT_COND_11N,
  5914. PEER_RATE_REPORT_COND_11AC,
  5915. PEER_RATE_REPORT_COND_MAX_NUM
  5916. };
  5917. typedef struct {
  5918. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param */
  5919. A_UINT32 enable_rate_report; /* 1= enable, 0=disable */
  5920. A_UINT32 report_backoff_time; /* in unit of msecond */
  5921. A_UINT32 report_timer_period; /* in unit of msecond */
  5922. /* In the following field, the array index means the phy type,
  5923. * please see enum peer_rate_report_cond_phy_type for detail */
  5924. report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
  5925. } wmi_peer_set_rate_report_condition_fixed_param;
  5926. /* Peer Type:
  5927. * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
  5928. * on address and vdev opmode. This is largely here to allow host to indicate that
  5929. * peer is explicitly a TDLS peer
  5930. */
  5931. enum wmi_peer_type {
  5932. WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
  5933. WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
  5934. WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
  5935. WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
  5936. WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
  5937. WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type is assigned up to 127 */
  5938. /* Reserved from 128 - 255 for target internal use.*/
  5939. WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
  5940. };
  5941. typedef struct {
  5942. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
  5943. /** unique id identifying the VDEV, generated by the caller */
  5944. A_UINT32 vdev_id;
  5945. /** peer MAC address */
  5946. wmi_mac_addr peer_macaddr;
  5947. /** peer type: see enum values above */
  5948. A_UINT32 peer_type;
  5949. } wmi_peer_create_cmd_fixed_param;
  5950. typedef struct {
  5951. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
  5952. /** unique id identifying the VDEV, generated by the caller */
  5953. A_UINT32 vdev_id;
  5954. /** peer MAC address */
  5955. wmi_mac_addr peer_macaddr;
  5956. } wmi_peer_delete_cmd_fixed_param;
  5957. typedef struct {
  5958. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param */
  5959. /** unique id identifying the VDEV, generated by the caller */
  5960. A_UINT32 vdev_id;
  5961. /** peer MAC address */
  5962. wmi_mac_addr peer_macaddr;
  5963. /**
  5964. * maximum block ack window size to use during a rx block ack negotiation,
  5965. * i.e. the maximum number of MPDUs per A-MPDU that will be received
  5966. */
  5967. A_UINT32 rx_block_ack_win_limit;
  5968. } wmi_peer_set_rx_blocksize_cmd_fixed_param;
  5969. typedef struct {
  5970. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
  5971. /** unique id identifying the VDEV, generated by the caller */
  5972. A_UINT32 vdev_id;
  5973. /** peer MAC address */
  5974. wmi_mac_addr peer_macaddr;
  5975. /** tid bitmap identifying the tids to flush */
  5976. A_UINT32 peer_tid_bitmap;
  5977. } wmi_peer_flush_tids_cmd_fixed_param;
  5978. typedef struct {
  5979. /** rate mode . 0: disable fixed rate (auto rate)
  5980. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  5981. * 2: ht20 11n rate specified as mcs index
  5982. * 3: ht40 11n rate specified as mcs index
  5983. */
  5984. A_UINT32 rate_mode;
  5985. /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  5986. * and series 3 is stored at byte 3 (MSB) */
  5987. A_UINT32 rate_series;
  5988. /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
  5989. * and retry count for rate 3 is stored at byte 3 (MSB) */
  5990. A_UINT32 rate_retries;
  5991. } wmi_fixed_rate;
  5992. typedef struct {
  5993. /** unique id identifying the VDEV, generated by the caller */
  5994. A_UINT32 vdev_id;
  5995. /** peer MAC address */
  5996. wmi_mac_addr peer_macaddr;
  5997. /** fixed rate */
  5998. wmi_fixed_rate peer_fixed_rate;
  5999. } wmi_peer_fixed_rate_cmd;
  6000. #define WMI_MGMT_TID 17
  6001. typedef struct {
  6002. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
  6003. /** unique id identifying the VDEV, generated by the caller */
  6004. A_UINT32 vdev_id;
  6005. /** peer MAC address */
  6006. wmi_mac_addr peer_macaddr;
  6007. } wmi_addba_clear_resp_cmd_fixed_param;
  6008. typedef struct {
  6009. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
  6010. /** unique id identifying the VDEV, generated by the caller */
  6011. A_UINT32 vdev_id;
  6012. /** peer MAC address */
  6013. wmi_mac_addr peer_macaddr;
  6014. /** Tid number */
  6015. A_UINT32 tid;
  6016. /** Buffer/Window size*/
  6017. A_UINT32 buffersize;
  6018. } wmi_addba_send_cmd_fixed_param;
  6019. typedef struct {
  6020. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
  6021. /** unique id identifying the VDEV, generated by the caller */
  6022. A_UINT32 vdev_id;
  6023. /** peer MAC address */
  6024. wmi_mac_addr peer_macaddr;
  6025. /** Tid number */
  6026. A_UINT32 tid;
  6027. /** Is Initiator */
  6028. A_UINT32 initiator;
  6029. /** Reason code */
  6030. A_UINT32 reasoncode;
  6031. } wmi_delba_send_cmd_fixed_param;
  6032. typedef struct {
  6033. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
  6034. /** unique id identifying the vdev, generated by the caller */
  6035. A_UINT32 vdev_id;
  6036. /** peer mac address */
  6037. wmi_mac_addr peer_macaddr;
  6038. /** Tid number */
  6039. A_UINT32 tid;
  6040. /** status code */
  6041. A_UINT32 statuscode;
  6042. } wmi_addba_setresponse_cmd_fixed_param;
  6043. typedef struct {
  6044. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
  6045. /** unique id identifying the vdev, generated by the caller */
  6046. A_UINT32 vdev_id;
  6047. /** peer mac address */
  6048. wmi_mac_addr peer_macaddr;
  6049. /** Tid number */
  6050. A_UINT32 tid;
  6051. } wmi_send_singleamsdu_cmd_fixed_param;
  6052. /* Type of Station DTIM Power Save method */
  6053. enum {
  6054. /* For NORMAL DTIM, the parameter is the number of beacon intervals and
  6055. * also the same value as the listen interval. For this method, the
  6056. * station will wake up based on the listen interval. If this
  6057. * listen interval is not equal to DTIM, then the station may
  6058. * miss certain DTIM beacons. If this value is 1, then the
  6059. * station will wake up for every beacon.
  6060. */
  6061. WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
  6062. /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
  6063. * When this value is 1, then the station will wake at every DTIM beacon.
  6064. * If this value is >1, then the station will skip certain DTIM beacons.
  6065. * This value is the multiple of DTIM intervals that the station will
  6066. * wake up to receive the DTIM beacons.
  6067. */
  6068. WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
  6069. };
  6070. /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
  6071. typedef struct {
  6072. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
  6073. /** unique id identifying the VDEV, generated by the caller */
  6074. A_UINT32 vdev_id;
  6075. /** Station DTIM Power Save method as defined above */
  6076. A_UINT32 dtim_pwrsave_method;
  6077. /** DTIM PS value. Contents depends on the method */
  6078. A_UINT32 value;
  6079. /** Modulated DTIM value */
  6080. A_UINT32 MaxLIModulatedDTIM;
  6081. } wmi_sta_dtim_ps_method_cmd_fixed_param;
  6082. /*
  6083. * For Station UAPSD Auto Trigger feature, the Firmware monitors the
  6084. * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
  6085. * If there is no uplink/download for the specified service interval (field service_interval),
  6086. * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
  6087. * specified in the UP (field user_priority).
  6088. * Firmware also monitors the responses for these QOS-NULL triggers.
  6089. * If the peer does not have any delivery frames, it will respond with
  6090. * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
  6091. * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
  6092. * are unused and should be set to 0.
  6093. * When service_interval is 0, then the firmware will not send any trigger frames. This is for
  6094. * certain host-based implementations that don't want this firmware offload.
  6095. * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
  6096. * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
  6097. * and rest of the AC default to 300 ms.
  6098. *
  6099. * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
  6100. * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
  6101. * the more advanced monitoring method.
  6102. * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
  6103. * suspend interval (field suspend_interval), firmware will change its auto trigger interval
  6104. * to delay interval (field delay_interval). This way, when there is no traffic, the station
  6105. * will save more power by waking up less and sending less trigger frames.
  6106. * The (service_interval < suspend_interval) and (service_interval < delay_interval).
  6107. * If this variable auto trigger is not required, then the suspend_interval and delay_interval
  6108. * should be 0.
  6109. */
  6110. typedef struct {
  6111. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
  6112. /** WMM Access category from 0 to 3 */
  6113. A_UINT32 wmm_ac;
  6114. /** User priority to use in trigger frames. It is the TID
  6115. * value. This field needs to be specified and may not be
  6116. * equivalent to AC since some implementation may use the TSPEC
  6117. * to enable UAPSD and negotiate a particular user priority. */
  6118. A_UINT32 user_priority;
  6119. /** service interval in ms */
  6120. A_UINT32 service_interval;
  6121. /** Suspend interval in ms */
  6122. A_UINT32 suspend_interval;
  6123. /** delay interval in ms */
  6124. A_UINT32 delay_interval;
  6125. } wmi_sta_uapsd_auto_trig_param;
  6126. typedef struct {
  6127. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
  6128. /** unique id identifying the VDEV, generated by the caller */
  6129. A_UINT32 vdev_id;
  6130. /** peer mac address */
  6131. wmi_mac_addr peer_macaddr;
  6132. /** Number of AC to specify */
  6133. A_UINT32 num_ac;
  6134. /*
  6135. * Following this struc is the TLV:
  6136. * wmi_sta_uapsd_auto_trig_param ac_param[]; <-- Variable number of AC parameters (defined by field num_ac)
  6137. */
  6138. } wmi_sta_uapsd_auto_trig_cmd_fixed_param;
  6139. /** mimo powersave state */
  6140. #define WMI_PEER_MIMO_PS_STATE 0x1
  6141. /** enable/disable AMPDU . initial value (enabled) */
  6142. #define WMI_PEER_AMPDU 0x2
  6143. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  6144. #define WMI_PEER_AUTHORIZE 0x3
  6145. /** peer channel bandwidth */
  6146. #define WMI_PEER_CHWIDTH 0x4
  6147. /** peer NSS */
  6148. #define WMI_PEER_NSS 0x5
  6149. /** USE 4 ADDR */
  6150. #define WMI_PEER_USE_4ADDR 0x6
  6151. /* set group membership status */
  6152. #define WMI_PEER_MEMBERSHIP 0x7
  6153. #define WMI_PEER_USERPOS 0x8
  6154. /*
  6155. * A critical high-level protocol is being used with this peer. Target
  6156. * should take appropriate measures (if possible) to ensure more
  6157. * reliable link with minimal latency. This *may* include modifying the
  6158. * station power save policy, enabling more RX chains, increased
  6159. * priority of channel scheduling, etc.
  6160. *
  6161. * NOTE: This parameter should only be considered a hint as specific
  6162. * behavior will depend on many factors including current network load
  6163. * and vdev/peer configuration.
  6164. *
  6165. * For STA VDEV this peer corresponds to the AP's BSS peer.
  6166. * For AP VDEV this peer corresponds to the remote peer STA.
  6167. */
  6168. #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
  6169. /* set Tx failure count threshold for the peer - Currently unused */
  6170. #define WMI_PEER_TX_FAIL_CNT_THR 0xA
  6171. /* Enable H/W retry and Enable H/W Send CTS2S before Data */
  6172. #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
  6173. /* Set peer advertised IBSS atim window length */
  6174. #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
  6175. /** peer phy mode */
  6176. #define WMI_PEER_PHYMODE 0xD
  6177. /** Use FIXED Pwr */
  6178. #define WMI_PEER_USE_FIXED_PWR 0xE
  6179. /** Set peer fixed rate */
  6180. #define WMI_PEER_PARAM_FIXED_RATE 0xF
  6181. /** Whitelist peer TIDs */
  6182. #define WMI_PEER_SET_MU_WHITELIST 0x10
  6183. /** Set peer max tx rate (MCS) in adaptive rate ctrl */
  6184. #define WMI_PEER_SET_MAX_TX_RATE 0x11
  6185. /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
  6186. #define WMI_PEER_SET_MIN_TX_RATE 0x12
  6187. /**
  6188. * default ring routing for peer data packets,
  6189. * param_value = bit 0 for hash based routing enabled or not
  6190. * (value 1 is enabled, value 0 is disabled)
  6191. * bits 1:5 are for ring 32 (i.e. ring id value
  6192. * selected from 0 to 31 values)
  6193. */
  6194. #define WMI_PEER_SET_DEFAULT_ROUTING 0x13
  6195. /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
  6196. #define WMI_PEER_MIMO_PS_NONE 0x0
  6197. #define WMI_PEER_MIMO_PS_STATIC 0x1
  6198. #define WMI_PEER_MIMO_PS_DYNAMIC 0x2
  6199. typedef struct {
  6200. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
  6201. /** unique id identifying the VDEV, generated by the caller */
  6202. A_UINT32 vdev_id;
  6203. /** peer MAC address */
  6204. wmi_mac_addr peer_macaddr;
  6205. /** parameter id */
  6206. A_UINT32 param_id;
  6207. /** parametr value */
  6208. A_UINT32 param_value;
  6209. } wmi_peer_set_param_cmd_fixed_param;
  6210. typedef union {
  6211. /*
  6212. * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
  6213. * by the target or a little-endian host.
  6214. * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
  6215. * macros on the A_UINT32 "value" field.
  6216. */
  6217. struct {
  6218. A_UINT16 mode; /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
  6219. A_UINT16 tx_rate; /* see per-mode specs below */
  6220. };
  6221. A_UINT32 value; /* for use by big-endian host */
  6222. } wmi_peer_max_min_tx_rate;
  6223. /*
  6224. * Any access to the mode/tx_rate in an big endian system should use
  6225. * the below Macros on the wmi_peer_max_min_tx_rate.value field.
  6226. */
  6227. #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
  6228. #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
  6229. #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
  6230. #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
  6231. /* CCK max/min tx Rate description
  6232. * tx_rate = 0: 1 Mbps
  6233. * tx_rate = 1: 2 Mbps
  6234. * tx_rate = 2: 5.5 Mbps
  6235. * tx_rate = 3: 11 Mbps
  6236. * tx_rate = else: invalid
  6237. */
  6238. enum {
  6239. WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
  6240. WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
  6241. WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
  6242. WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
  6243. WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
  6244. };
  6245. /* OFDM max/min tx Rate description
  6246. * tx_rate = 0: 6 Mbps
  6247. * tx_rate = 1: 9 Mbps
  6248. * tx_rate = 2: 12 Mbps
  6249. * tx_rate = 3: 18 Mbps
  6250. * tx_rate = 4: 24 Mbps
  6251. * tx_rate = 5: 32 Mbps
  6252. * tx_rate = 6: 48 Mbps
  6253. * tx_rate = 7: 54 Mbps
  6254. * tx_rate = else: invalid
  6255. */
  6256. enum {
  6257. WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
  6258. WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
  6259. WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
  6260. WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
  6261. WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
  6262. WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
  6263. WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
  6264. WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
  6265. WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
  6266. };
  6267. /* HT max/min tx rate description
  6268. * tx_rate = 0~7 : MCS Rate 0~7
  6269. * tx_rate=else : invalid.
  6270. */
  6271. #define WMI_MAX_HT_TX_MCS 0x07
  6272. /* VHT max/min tx rate description
  6273. * tx_rate = 0~9 : MCS Rate 0~9
  6274. * tx_rate=else : invalid.
  6275. */
  6276. #define WMI_MAX_VHT_TX_MCS 0x09
  6277. #define MAX_SUPPORTED_RATES 128
  6278. typedef struct {
  6279. /** total number of rates */
  6280. A_UINT32 num_rates;
  6281. /**
  6282. * rates (each 8bit value) packed into a 32 bit word.
  6283. * the rates are filled from least significant byte to most
  6284. * significant byte.
  6285. */
  6286. A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
  6287. } wmi_rate_set;
  6288. /* NOTE: It would bea good idea to represent the Tx MCS
  6289. * info in one word and Rx in another word. This is split
  6290. * into multiple words for convenience
  6291. */
  6292. typedef struct {
  6293. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
  6294. A_UINT32 rx_max_rate; /* Max Rx data rate */
  6295. A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
  6296. A_UINT32 tx_max_rate; /* Max Tx data rate */
  6297. A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
  6298. A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
  6299. } wmi_vht_rate_set;
  6300. /*
  6301. * IMPORTANT: Make sure the bit definitions here are consistent
  6302. * with the ni_flags definitions in wlan_peer.h
  6303. */
  6304. #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
  6305. #define WMI_PEER_QOS 0x00000002 /* QoS enabled */
  6306. #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
  6307. #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
  6308. #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
  6309. #define WMI_PEER_HT 0x00001000 /* HT enabled */
  6310. #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
  6311. #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
  6312. #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
  6313. #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
  6314. #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
  6315. #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
  6316. #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
  6317. #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
  6318. #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
  6319. /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
  6320. #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
  6321. #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
  6322. #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
  6323. /**
  6324. * Peer rate capabilities.
  6325. *
  6326. * This is of interest to the ratecontrol
  6327. * module which resides in the firmware. The bit definitions are
  6328. * consistent with that defined in if_athrate.c.
  6329. *
  6330. * @todo
  6331. * Move this to a common header file later so there is no need to
  6332. * duplicate the definitions or maintain consistency.
  6333. */
  6334. #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
  6335. #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
  6336. #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  6337. #define WMI_RC_HT_FLAG 0x08 /* HT */
  6338. #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  6339. #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  6340. #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  6341. #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  6342. #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  6343. #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
  6344. #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  6345. typedef struct {
  6346. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
  6347. /** peer MAC address */
  6348. wmi_mac_addr peer_macaddr;
  6349. /** VDEV id */
  6350. A_UINT32 vdev_id;
  6351. /** assoc = 1 reassoc = 0 */
  6352. A_UINT32 peer_new_assoc;
  6353. /** peer associd (16 bits) */
  6354. A_UINT32 peer_associd;
  6355. /** peer station flags: see definition above */
  6356. A_UINT32 peer_flags;
  6357. /** negotiated capabilities (lower 16 bits)*/
  6358. A_UINT32 peer_caps;
  6359. /** Listen interval */
  6360. A_UINT32 peer_listen_intval;
  6361. /** HT capabilties of the peer */
  6362. A_UINT32 peer_ht_caps;
  6363. /** maximum rx A-MPDU length */
  6364. A_UINT32 peer_max_mpdu;
  6365. /** mpdu density of the peer in usec(0 to 16) */
  6366. A_UINT32 peer_mpdu_density;
  6367. /** peer rate capabilties see flags above */
  6368. A_UINT32 peer_rate_caps;
  6369. /** num spatial streams */
  6370. A_UINT32 peer_nss;
  6371. /** VHT capabilties of the peer */
  6372. A_UINT32 peer_vht_caps;
  6373. /** phy mode */
  6374. A_UINT32 peer_phymode;
  6375. /** HT Operation Element of the peer. Five bytes packed in 2
  6376. * INT32 array and filled from lsb to msb.
  6377. * Note that the size of array peer_ht_info[] cannotbe changed
  6378. * without breaking WMI Compatibility. */
  6379. A_UINT32 peer_ht_info[2];
  6380. /** total number of negotiated legacy rate set. Also the sizeof
  6381. * peer_legacy_rates[] */
  6382. A_UINT32 num_peer_legacy_rates;
  6383. /** total number of negotiated ht rate set. Also the sizeof
  6384. * peer_ht_rates[] */
  6385. A_UINT32 num_peer_ht_rates;
  6386. /**
  6387. * Bitmap providing customized mapping of bandwidths to max Rx NSS
  6388. * for this peer.
  6389. * This is required since 802.11 standard currently facilitates peer to be
  6390. * able to advertise only a single max Rx NSS value across all bandwidths.
  6391. * Some QCA chipsets might need to be able to advertise a different max
  6392. * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
  6393. *
  6394. * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
  6395. * bit[30:3]: Reserved
  6396. * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be set
  6397. * to 0 by host
  6398. */
  6399. A_UINT32 peer_bw_rxnss_override;
  6400. /* 802.11ax capabilities */
  6401. wmi_ppe_threshold peer_ppet;
  6402. A_UINT32 peer_he_cap_info; /* protocol-defined HE / 11ax capability flags */
  6403. A_UINT32 peer_he_ops; /* HE operation contains BSS color */
  6404. /* Following this struc are the TLV's:
  6405. * A_UINT8 peer_legacy_rates[];
  6406. * A_UINT8 peer_ht_rates[];
  6407. * wmi_vht_rate_set peer_vht_rates; <-- VHT capabilties of the peer
  6408. */
  6409. } wmi_peer_assoc_complete_cmd_fixed_param;
  6410. /* WDS Entry Flags */
  6411. #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
  6412. typedef struct {
  6413. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
  6414. /** peer MAC address */
  6415. wmi_mac_addr peer_macaddr;
  6416. /** wds MAC addr */
  6417. wmi_mac_addr wds_macaddr;
  6418. /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
  6419. A_UINT32 flags;
  6420. A_UINT32 vdev_id;
  6421. } wmi_peer_add_wds_entry_cmd_fixed_param;
  6422. typedef struct {
  6423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
  6424. /** wds MAC addr */
  6425. wmi_mac_addr wds_macaddr;
  6426. A_UINT32 vdev_id;
  6427. } wmi_peer_remove_wds_entry_cmd_fixed_param;
  6428. typedef struct {
  6429. /** peer MAC address */
  6430. wmi_mac_addr peer_macaddr;
  6431. } wmi_peer_q_empty_callback_event;
  6432. /*
  6433. * Command to update an already existing WDS entry. Different address setting
  6434. * combinations are possible.
  6435. *
  6436. * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
  6437. * Valid wds and null peer -> Associated WDS entry flags will be updated.
  6438. * Null wds and Valid peer -> Flags will be updated for all WDS entries behind the peer.
  6439. * Null wds and peer -> Flags will be updated for all WDS entries.
  6440. */
  6441. typedef struct {
  6442. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param */
  6443. /** peer MAC address */
  6444. wmi_mac_addr peer_macaddr;
  6445. /** wds MAC addr */
  6446. wmi_mac_addr wds_macaddr;
  6447. /* Flags associated with WDS entry */
  6448. A_UINT32 flags;
  6449. A_UINT32 vdev_id;
  6450. } wmi_peer_update_wds_entry_cmd_fixed_param;
  6451. /**
  6452. * Channel info WMI event
  6453. */
  6454. typedef struct {
  6455. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
  6456. /** Error code */
  6457. A_UINT32 err_code;
  6458. /** Channel freq */
  6459. A_UINT32 freq;
  6460. /** Read flags */
  6461. A_UINT32 cmd_flags;
  6462. /** Noise Floor value */
  6463. A_UINT32 noise_floor;
  6464. /** rx clear count */
  6465. A_UINT32 rx_clear_count;
  6466. /** cycle count */
  6467. A_UINT32 cycle_count;
  6468. /** channel tx power per range in 0.5dBm steps */
  6469. A_UINT32 chan_tx_pwr_range;
  6470. /** channel tx power per throughput */
  6471. A_UINT32 chan_tx_pwr_tp;
  6472. /** rx frame count (cumulative) */
  6473. A_UINT32 rx_frame_count;
  6474. /** BSS rx cycle count */
  6475. A_UINT32 my_bss_rx_cycle_count;
  6476. /** b-mode data rx time (units are microseconds) */
  6477. A_UINT32 rx_11b_mode_data_duration;
  6478. } wmi_chan_info_event_fixed_param;
  6479. /**
  6480. * Non wlan interference event
  6481. */
  6482. typedef struct {
  6483. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_cw_int */
  6484. A_UINT32 channel; /* either number or freq in mhz*/
  6485. } wlan_dcs_cw_int;
  6486. #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
  6487. /**
  6488. * wlan_dcs_im_tgt_stats
  6489. *
  6490. */
  6491. typedef struct _wlan_dcs_im_tgt_stats {
  6492. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t */
  6493. /** current running TSF from the TSF-1 */
  6494. A_UINT32 reg_tsf32;
  6495. /** Known last frame rssi, in case of multiple stations, if
  6496. * and at different ranges, this would not gaurantee that
  6497. * this is the least rssi.
  6498. */
  6499. A_UINT32 last_ack_rssi;
  6500. /** Sum of all the failed durations in the last one second interval.
  6501. */
  6502. A_UINT32 tx_waste_time;
  6503. /** count how many times the hal_rxerr_phy is marked, in this
  6504. * time period
  6505. */
  6506. A_UINT32 rx_time;
  6507. A_UINT32 phyerr_cnt;
  6508. /**
  6509. * WLAN IM stats from target to host
  6510. *
  6511. * Below statistics are sent from target to host periodically.
  6512. * These are collected at target as long as target is running
  6513. * and target chip is not in sleep.
  6514. *
  6515. */
  6516. /** listen time from ANI */
  6517. A_INT32 listen_time;
  6518. /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
  6519. A_UINT32 reg_tx_frame_cnt;
  6520. /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
  6521. A_UINT32 reg_rx_frame_cnt;
  6522. /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
  6523. A_UINT32 reg_rxclr_cnt;
  6524. /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
  6525. A_UINT32 reg_cycle_cnt; /* delta cycle count */
  6526. /** extenstion channel rx clear count */
  6527. A_UINT32 reg_rxclr_ext_cnt;
  6528. /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
  6529. A_UINT32 reg_ofdm_phyerr_cnt;
  6530. /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
  6531. A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
  6532. /** Channel noise floor (units are dBm) */
  6533. A_INT32 chan_nf;
  6534. /** BSS rx cycle count */
  6535. A_UINT32 my_bss_rx_cycle_count;
  6536. } wlan_dcs_im_tgt_stats_t;
  6537. /**
  6538. * wmi_dcs_interference_event_t
  6539. *
  6540. * Right now this is event and stats together. Partly this is
  6541. * because cw interference is handled in target now. This
  6542. * can be done at host itself, if we can carry the NF alone
  6543. * as a stats event. In future this would be done and this
  6544. * event would carry only stats.
  6545. */
  6546. typedef struct {
  6547. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
  6548. /**
  6549. * Type of the event present, either the cw interference event, or the wlan_im stats
  6550. */
  6551. A_UINT32 interference_type; /* type of interference, wlan or cw */
  6552. /** pdev_id for identifying the MAC
  6553. * See macros starting with WMI_PDEV_ID_ for values.
  6554. */
  6555. A_UINT32 pdev_id;
  6556. /*
  6557. * Following this struct are these TLVs. Note that they are both array of structures
  6558. * but can have at most one element. Which TLV is empty or has one element depends
  6559. * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
  6560. * elements (not arrays). union { wlan_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
  6561. *
  6562. * wlan_dcs_cw_int cw_int[]; <-- cw_interference event
  6563. * wlan_dcs_im_tgt_stats_t wlan_stat[]; <-- wlan im interfernce stats
  6564. */
  6565. } wmi_dcs_interference_event_fixed_param;
  6566. enum wmi_peer_mcast_group_action {
  6567. wmi_peer_mcast_group_action_add = 0,
  6568. wmi_peer_mcast_group_action_del = 1
  6569. };
  6570. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
  6571. #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
  6572. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
  6573. #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
  6574. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 /* flag to exclude an ip while filtering. set to exclude */
  6575. #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
  6576. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 /* flag to say ipv4/ipv6. Will be set for ipv6 */
  6577. #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
  6578. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 /* delete all mcast table entries. */
  6579. #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
  6580. /* multicast group membership commands */
  6581. /* TODO: Converting this will be tricky since it uses an union.
  6582. Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
  6583. typedef struct {
  6584. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
  6585. A_UINT32 flags;
  6586. wmi_mac_addr ucast_mac_addr;
  6587. /* in network byte order */
  6588. /* for ipv4, bytes (12-15) should contain ip address and other lower bytes 0. ipv6 should have all bytes valid */
  6589. A_UINT8 mcast_ip_addr[16];
  6590. /* for ipv6, all 16 bytes has to be valid; for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s */
  6591. A_UINT8 mcast_ip_mask[16];/* zero out lower bytes if ipv4*/
  6592. /* number of address filters - irrespective of ipv4/ipv6 addresses */
  6593. A_UINT32 num_filter_addr;
  6594. /* this array should contain the src IPs that are to be filtered during find
  6595. The array should be packed.
  6596. If there are 2 ipv4 addresses, there should be 8 bytes and rest all 0s */
  6597. A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
  6598. A_UINT8 vdev_id; /* vdev of this mcast group */
  6599. } wmi_peer_mcast_group_cmd_fixed_param;
  6600. /** Offload Scan and Roaming related commands */
  6601. /** The FW performs 2 different kinds of offload scans independent
  6602. * of host. One is Roam scan which is primarily performed on a
  6603. * station VDEV after association to look for a better AP that
  6604. * the station VDEV can roam to. The second scan is connect scan
  6605. * which is mainly performed when the station is not associated
  6606. * and to look for a matching AP profile from a list of
  6607. * configured profiles. */
  6608. /**
  6609. * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
  6610. * the roam scan mode is one of the periodic, rssi change, both, none.
  6611. * None : Disable Roam scan. No Roam scan at all.
  6612. * Periodic : Scan periodically with a configurable period.
  6613. * Rssi change : Scan when ever rssi to current AP changes by the threshold value
  6614. * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
  6615. * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
  6616. *
  6617. */
  6618. typedef struct {
  6619. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
  6620. A_UINT32 roam_scan_mode;
  6621. A_UINT32 vdev_id;
  6622. } wmi_roam_scan_mode_fixed_param;
  6623. #define WMI_ROAM_SCAN_MODE_NONE 0x0
  6624. #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
  6625. #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
  6626. #define WMI_ROAM_SCAN_MODE_BOTH 0x3
  6627. /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
  6628. #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
  6629. typedef struct {
  6630. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
  6631. A_UINT32 vdev_id;
  6632. A_UINT32 command_arg;
  6633. } wmi_roam_scan_cmd_fixed_param;
  6634. #define WMI_ROAM_SCAN_STOP_CMD 0x1
  6635. /**
  6636. * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
  6637. * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
  6638. * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
  6639. */
  6640. typedef struct {
  6641. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
  6642. /** unique id identifying the VDEV, generated by the caller */
  6643. A_UINT32 vdev_id;
  6644. /** roam scan rssi threshold */
  6645. A_UINT32 roam_scan_rssi_thresh;
  6646. /** When using Hw generated beacon RSSI interrupts */
  6647. A_UINT32 roam_rssi_thresh_diff;
  6648. /** 5G scan max count */
  6649. A_UINT32 hirssi_scan_max_count;
  6650. /** 5G scan rssi change threshold value */
  6651. A_UINT32 hirssi_scan_delta;
  6652. /** 5G scan upper bound */
  6653. A_UINT32 hirssi_upper_bound;
  6654. /* The TLVs will follow.
  6655. * wmi_roam_scan_extended_threshold_param extended_param;
  6656. * wmi_roam_earlystop_rssi_thres_param earlystop_param;
  6657. * wmi_roam_dense_thres_param dense_param;
  6658. */
  6659. } wmi_roam_scan_rssi_threshold_fixed_param;
  6660. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
  6661. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
  6662. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
  6663. #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
  6664. typedef struct {
  6665. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
  6666. A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
  6667. A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
  6668. A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  6669. A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
  6670. A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
  6671. A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
  6672. A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
  6673. A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
  6674. A_UINT32 good_rssi_threshold; /** RSSI below which roam is kicked in by background scan, although rssi is still good */
  6675. } wmi_roam_scan_extended_threshold_param;
  6676. /**
  6677. * WMI_ROAM_SCAN_PERIOD: period for roam scan.
  6678. * Applicable when the scan mode is Periodic or both.
  6679. */
  6680. typedef struct {
  6681. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
  6682. /** unique id identifying the VDEV, generated by the caller */
  6683. A_UINT32 vdev_id;
  6684. /** roam scan period value */
  6685. A_UINT32 roam_scan_period;
  6686. /** Aging for Roam scans */
  6687. A_UINT32 roam_scan_age;
  6688. } wmi_roam_scan_period_fixed_param;
  6689. /**
  6690. * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
  6691. * Rssi change threshold used when mode is Rssi change (or) Both.
  6692. * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
  6693. * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
  6694. */
  6695. typedef struct {
  6696. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
  6697. /** unique id identifying the VDEV, generated by the caller */
  6698. A_UINT32 vdev_id;
  6699. /** roam scan rssi change threshold value */
  6700. A_UINT32 roam_scan_rssi_change_thresh;
  6701. /** When using Hw generated beacon RSSI interrupts */
  6702. A_UINT32 bcn_rssi_weight;
  6703. /** Minimum delay between two 5G scans */
  6704. A_UINT32 hirssi_delay_btw_scans;
  6705. } wmi_roam_scan_rssi_change_threshold_fixed_param;
  6706. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
  6707. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
  6708. #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
  6709. /**
  6710. * TLV for roaming channel list
  6711. */
  6712. typedef struct {
  6713. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
  6714. /** unique id identifying the VDEV, generated by the caller */
  6715. A_UINT32 vdev_id;
  6716. /** WMI_CHAN_LIST_TAG */
  6717. A_UINT32 chan_list_type;
  6718. /** # if channels to scan */
  6719. A_UINT32 num_chan;
  6720. /**
  6721. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  6722. * structure. The TLV's are:
  6723. * A_UINT32 channel_list[];
  6724. **/
  6725. } wmi_roam_chan_list_fixed_param;
  6726. /** Authentication modes */
  6727. enum {
  6728. WMI_AUTH_NONE, /* no upper level auth */
  6729. WMI_AUTH_OPEN, /* open */
  6730. WMI_AUTH_SHARED, /* shared-key */
  6731. WMI_AUTH_8021X, /* 802.1x */
  6732. WMI_AUTH_AUTO, /* Auto */
  6733. WMI_AUTH_WPA, /* WPA */
  6734. WMI_AUTH_RSNA, /* WPA2/RSNA */
  6735. WMI_AUTH_CCKM, /* CCKM */
  6736. WMI_AUTH_WAPI, /* WAPI */
  6737. WMI_AUTH_AUTO_PSK,
  6738. WMI_AUTH_WPA_PSK,
  6739. WMI_AUTH_RSNA_PSK,
  6740. WMI_AUTH_WAPI_PSK,
  6741. WMI_AUTH_FT_RSNA, /* 11r FT */
  6742. WMI_AUTH_FT_RSNA_PSK,
  6743. WMI_AUTH_RSNA_PSK_SHA256,
  6744. WMI_AUTH_RSNA_8021X_SHA256,
  6745. WMI_AUTH_CCKM_WPA,
  6746. WMI_AUTH_CCKM_RSNA,
  6747. };
  6748. typedef struct {
  6749. /** authentication mode (defined above) */
  6750. A_UINT32 rsn_authmode;
  6751. /** unicast cipher set */
  6752. A_UINT32 rsn_ucastcipherset;
  6753. /** mcast/group cipher set */
  6754. A_UINT32 rsn_mcastcipherset;
  6755. /** mcast/group management frames cipher set */
  6756. A_UINT32 rsn_mcastmgmtcipherset;
  6757. } wmi_rsn_params;
  6758. /** looking for a wps enabled AP */
  6759. #define WMI_AP_PROFILE_FLAG_WPS 0x1
  6760. /** looking for a secure AP */
  6761. #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
  6762. /** looking for a PMF enabled AP */
  6763. #define WMI_AP_PROFILE_FLAG_PMF 0x4
  6764. /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
  6765. * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
  6766. * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
  6767. * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
  6768. */
  6769. typedef struct {
  6770. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
  6771. /** flags as defined above */
  6772. A_UINT32 flags;
  6773. /**
  6774. * rssi thresold value: the value of the the candidate AP should
  6775. * higher by this threshold than the rssi of the currrently associated AP.
  6776. */
  6777. A_UINT32 rssi_threshold;
  6778. /**
  6779. * ssid vlaue to be matched.
  6780. */
  6781. wmi_ssid ssid;
  6782. /**
  6783. * security params to be matched.
  6784. */
  6785. /** authentication mode (defined above) */
  6786. A_UINT32 rsn_authmode;
  6787. /** unicast cipher set */
  6788. A_UINT32 rsn_ucastcipherset;
  6789. /** mcast/group cipher set */
  6790. A_UINT32 rsn_mcastcipherset;
  6791. /** mcast/group management frames cipher set */
  6792. A_UINT32 rsn_mcastmgmtcipherset;
  6793. } wmi_ap_profile;
  6794. /** Support early stop roaming scanning when finding a strong candidate AP
  6795. * A 'strong' candidate is
  6796. * 1) Is eligible candidate
  6797. * (all conditions are met in existing candidate selection).
  6798. * 2) Its rssi is better than earlystop threshold.
  6799. * Earlystop threshold will be relaxed as each channel is scanned.
  6800. */
  6801. typedef struct {
  6802. A_UINT32 tlv_header;
  6803. /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
  6804. A_UINT32 roam_earlystop_thres_min;
  6805. /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
  6806. A_UINT32 roam_earlystop_thres_max;
  6807. } wmi_roam_earlystop_rssi_thres_param;
  6808. typedef struct {
  6809. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param */
  6810. A_UINT32 tlv_header;
  6811. /** rssi threshold offset under trffic and dense env */
  6812. A_UINT32 roam_dense_rssi_thres_offset;
  6813. /** minimum number of APs to determine dense env */
  6814. A_UINT32 roam_dense_min_aps;
  6815. /** initial dense status detected by host at the time of initial connection */
  6816. A_UINT32 roam_dense_status;
  6817. /* traffic threshold to enable aggressive roaming in dense env; units are percent of medium occupancy, 0 - 100 */
  6818. A_UINT32 roam_dense_traffic_thres;
  6819. } wmi_roam_dense_thres_param;
  6820. /** Beacon filter wmi command info */
  6821. #define BCN_FLT_MAX_SUPPORTED_IES 256
  6822. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES/32)
  6823. typedef struct bss_bcn_stats {
  6824. A_UINT32 vdev_id;
  6825. A_UINT32 bss_bcnsdropped;
  6826. A_UINT32 bss_bcnsdelivered;
  6827. } wmi_bss_bcn_stats_t;
  6828. typedef struct bcn_filter_stats {
  6829. A_UINT32 bcns_dropped;
  6830. A_UINT32 bcns_delivered;
  6831. A_UINT32 activefilters;
  6832. wmi_bss_bcn_stats_t bss_stats;
  6833. } wmi_bcnfilter_stats_t;
  6834. typedef struct wmi_add_bcn_filter_cmd {
  6835. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
  6836. A_UINT32 vdev_id;
  6837. /*
  6838. * Following this structure is the TLV:
  6839. * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  6840. */
  6841. } wmi_add_bcn_filter_cmd_fixed_param;
  6842. typedef struct wmi_rmv_bcn_filter_cmd {
  6843. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
  6844. A_UINT32 vdev_id;
  6845. } wmi_rmv_bcn_filter_cmd_fixed_param;
  6846. #define WMI_BCN_SEND_DTIM_ZERO 1
  6847. #define WMI_BCN_SEND_DTIM_BITCTL_SET 2
  6848. typedef struct wmi_bcn_send_from_host {
  6849. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
  6850. A_UINT32 vdev_id;
  6851. A_UINT32 data_len;
  6852. union {
  6853. A_UINT32 frag_ptr; /* Physical address of the frame */
  6854. A_UINT32 frag_ptr_lo; /* LSBs of physical address of the frame */
  6855. };
  6856. A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
  6857. A_UINT32 dtim_flag; /* to control CABQ traffic */
  6858. A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
  6859. A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
  6860. } wmi_bcn_send_from_host_cmd_fixed_param;
  6861. /* cmd to support bcn snd for all vaps at once */
  6862. typedef struct wmi_pdev_send_bcn {
  6863. A_UINT32 num_vdevs;
  6864. wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
  6865. } wmi_pdev_send_bcn_cmd_t;
  6866. /*
  6867. * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
  6868. */
  6869. typedef struct {
  6870. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
  6871. /** id of AP criteria */
  6872. A_UINT32 id;
  6873. /** unique id identifying the VDEV, generated by the caller */
  6874. A_UINT32 vdev_id;
  6875. /*
  6876. * Following this structure is the TLV:
  6877. * wmi_ap_profile ap_profile; <-- AP profile info
  6878. */
  6879. } wmi_roam_ap_profile_fixed_param;
  6880. /**
  6881. * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
  6882. */
  6883. typedef struct {
  6884. /** id of AP criteria */
  6885. A_UINT32 id;
  6886. /** unique id identifying the VDEV, generated by the caller */
  6887. A_UINT32 vdev_id;
  6888. /** AP profile info */
  6889. wmi_ap_profile ap_profile;
  6890. } wmi_ofl_scan_add_ap_profile;
  6891. /**
  6892. * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
  6893. */
  6894. typedef struct {
  6895. /** id of AP criteria */
  6896. A_UINT32 id;
  6897. /** unique id identifying the VDEV, generated by the caller */
  6898. A_UINT32 vdev_id;
  6899. } wmi_ofl_scan_remove_ap_profile;
  6900. /**
  6901. * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
  6902. * 0 will disable ofload scan and a very low value will perform a continous
  6903. * scan.
  6904. */
  6905. typedef struct {
  6906. /** offload scan period value, used for scans used when not connected */
  6907. A_UINT32 ofl_scan_period;
  6908. } wmi_ofl_scan_period;
  6909. /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
  6910. #define ROAM_OFFLOAD_PMK_BYTES (32)
  6911. #define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
  6912. #define ROAM_OFFLOAD_KRK_BYTES (16)
  6913. #define ROAM_OFFLOAD_BTK_BYTES (32)
  6914. #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
  6915. #define ROAM_OFFLOAD_NUM_MCS_SET (16)
  6916. /* This TLV will be filled only in case roam offload for wpa2-psk/okc/ese/11r is enabled */
  6917. typedef struct {
  6918. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
  6919. A_UINT32 rssi_cat_gap; /* gap for every category bucket */
  6920. A_UINT32 prefer_5g; /* prefer select 5G candidate */
  6921. A_UINT32 select_5g_margin;
  6922. A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
  6923. A_UINT32 capability;
  6924. A_UINT32 ht_caps_info;
  6925. A_UINT32 ampdu_param;
  6926. A_UINT32 ht_ext_cap;
  6927. A_UINT32 ht_txbf;
  6928. A_UINT32 asel_cap;
  6929. A_UINT32 qos_enabled;
  6930. A_UINT32 qos_caps;
  6931. A_UINT32 wmm_caps;
  6932. A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned, we don't declare it as tlv array */
  6933. } wmi_roam_offload_tlv_param;
  6934. /* flags for 11i offload */
  6935. #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
  6936. /* from bit 1 to bit 31 are reserved */
  6937. #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
  6938. (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  6939. } while (0)
  6940. #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
  6941. (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
  6942. } while (0)
  6943. #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
  6944. ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
  6945. /* This TLV will be filled only in case of wpa-psk/wpa2-psk */
  6946. typedef struct {
  6947. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
  6948. A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
  6949. A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
  6950. A_UINT32 pmk_len; /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
  6951. } wmi_roam_11i_offload_tlv_param;
  6952. /* This TLV will be filled only in case of 11R*/
  6953. typedef struct {
  6954. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
  6955. A_UINT32 mdie_present;
  6956. A_UINT32 mdid;
  6957. A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN>>2];
  6958. A_UINT32 r0kh_id_len;
  6959. 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 */
  6960. A_UINT32 psk_msk_len; /**length of psk_msk*/
  6961. } wmi_roam_11r_offload_tlv_param;
  6962. /* This TLV will be filled only in case of ESE */
  6963. typedef struct {
  6964. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
  6965. A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
  6966. A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
  6967. } wmi_roam_ese_offload_tlv_param;
  6968. /** WMI_ROAM_EVENT: roam event triggering the host roam logic.
  6969. * generated when ever a better AP is found in the recent roam scan (or)
  6970. * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
  6971. * from the current AP.
  6972. */
  6973. typedef struct {
  6974. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
  6975. /** unique id identifying the VDEV, generated by the caller */
  6976. A_UINT32 vdev_id;
  6977. /** reason for roam event */
  6978. A_UINT32 reason;
  6979. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
  6980. A_UINT32 rssi;
  6981. /** roam notification */
  6982. A_UINT32 notif;
  6983. } wmi_roam_event_fixed_param;
  6984. /* roam_reason: bits 0-3 */
  6985. #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */
  6986. #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
  6987. #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
  6988. #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
  6989. #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
  6990. #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
  6991. SSID and Security profile in
  6992. WMI_ROAM_AP_PROFILE, found during scan
  6993. triggered upon FINAL_BMISS **/
  6994. #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
  6995. /** WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
  6996. * Result code of WMI_ROAM_INVOKE_CMDID.
  6997. * Any roaming failure before reassociation will be indicated to host
  6998. * with this reason.
  6999. * Any roaming failure after reassociation will be indicated to host with
  7000. * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
  7001. */
  7002. #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
  7003. /* reserved up through 0xF */
  7004. /* subnet status: bits 4-5 */
  7005. typedef enum
  7006. {
  7007. WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
  7008. WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
  7009. WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
  7010. } wmi_roam_subnet_change_status;
  7011. #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
  7012. #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
  7013. #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
  7014. do { \
  7015. (roam_reason) |= \
  7016. (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
  7017. WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
  7018. } while (0)
  7019. #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
  7020. (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
  7021. WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
  7022. /* roaming notification */
  7023. #define WMI_ROAM_NOTIF_INVALID 0x0 /** invalid notification. Do not interpret notif field */
  7024. #define WMI_ROAM_NOTIF_ROAM_START 0x1 /** indicate that roaming is started. sent only in non WOW state */
  7025. #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 /** indicate that roaming is aborted. sent only in non WOW state */
  7026. /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
  7027. * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
  7028. */
  7029. typedef struct
  7030. {
  7031. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
  7032. A_UINT32 vdev_id; /**unique id identifying the VDEV, generated by the caller*/
  7033. A_UINT32 num_ric_request; /**number of ric request ie send to firmware.(max value is 2 now)*/
  7034. A_UINT32 is_add_ric; /**support add ric or delete ric*/
  7035. } wmi_ric_request_fixed_param;
  7036. /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
  7037. * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
  7038. */
  7039. typedef struct{
  7040. A_UINT32 tlv_header;
  7041. A_UINT32 ts_info; /** bits value of TS Info field.*/
  7042. A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
  7043. A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
  7044. A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
  7045. A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
  7046. A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
  7047. A_UINT32 suspension_interval; /**The Suspension Interval field*/
  7048. A_UINT32 svc_start_time; /**The Service Start Time field*/
  7049. A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
  7050. A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
  7051. A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
  7052. A_UINT32 max_burst_size; /**The Burst Size field*/
  7053. A_UINT32 delay_bound; /**The Delay Bound field*/
  7054. A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
  7055. A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
  7056. A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
  7057. } wmi_ric_tspec;
  7058. /* flags for roam_invoke_cmd */
  7059. /* add this channel into roam cache channel list after this command is finished */
  7060. #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
  7061. /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
  7062. #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
  7063. /* during host-invoked roaming, don't send null data frame to AP */
  7064. #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
  7065. /* from bit 3 to bit 31 are reserved */
  7066. #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  7067. (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  7068. } while (0)
  7069. #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
  7070. (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
  7071. } while (0)
  7072. #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
  7073. ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
  7074. #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
  7075. #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
  7076. #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
  7077. #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
  7078. #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
  7079. /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
  7080. *
  7081. if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
  7082. if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
  7083. This command can be used to add specific channel into roam cached channel list by following
  7084. <roam_scan_ch_mode> = 0
  7085. <roam_ap_sel_mode> = 0
  7086. <roam_delay> = 0
  7087. <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
  7088. <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
  7089. <channel_no> = channel list to be added
  7090. */
  7091. typedef struct {
  7092. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
  7093. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
  7094. A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
  7095. A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
  7096. A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
  7097. A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
  7098. A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
  7099. A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
  7100. /**
  7101. * TLV (tag length value) parameters follows roam_invoke_req
  7102. * The TLV's are:
  7103. * A_UINT32 channel_list[];
  7104. * wmi_mac_addr bssid_list[];
  7105. */
  7106. } wmi_roam_invoke_cmd_fixed_param;
  7107. /* Definition for op_bitmap */
  7108. enum {
  7109. ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
  7110. ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
  7111. ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
  7112. };
  7113. typedef struct {
  7114. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
  7115. A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming filter is adopted */
  7116. A_UINT32 flags; /** flags for filter */
  7117. A_UINT32 op_bitmap; /** 32 bit bitmap to be set on. bit0 = first param, bit 1 = second param...etc. Can be or'ed */
  7118. A_UINT32 num_bssid_black_list; /* number of blacklist in the TLV variable bssid_black_list */
  7119. A_UINT32 num_ssid_white_list; /* number of whitelist in the TLV variable ssid_white_list */
  7120. A_UINT32 num_bssid_preferred_list; /* only for lfr 3.0. number of preferred list & factor in the TLV */
  7121. /**
  7122. * TLV (tag length value) parameters follows roam_filter_list_cmd
  7123. * The TLV's are:
  7124. * wmi_mac_addr bssid_black_list[];
  7125. * wmi_ssid ssid_white_list[];
  7126. * wmi_mac_addr bssid_preferred_list[];
  7127. * A_UINT32 bssid_preferred_factor[];
  7128. */
  7129. } wmi_roam_filter_fixed_param;
  7130. typedef struct {
  7131. A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
  7132. } WMI_IPV4_ADDR;
  7133. typedef struct _WMI_IPV6_ADDR {
  7134. A_UINT8 address[16]; /* IPV6 in Network Byte Order */
  7135. } WMI_IPV6_ADDR;
  7136. /* flags for subnet change detection */
  7137. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
  7138. #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
  7139. /* bit 2 to bit 31 are reserved */
  7140. /* set IPv4 enabled/disabled flag and get the flag */
  7141. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
  7142. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  7143. } while (0)
  7144. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
  7145. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
  7146. } while (0)
  7147. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
  7148. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
  7149. /* set IPv6 enabled flag, disabled and get the flag */
  7150. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
  7151. (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  7152. } while (0)
  7153. #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
  7154. (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
  7155. } while (0)
  7156. #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
  7157. ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
  7158. /**
  7159. * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
  7160. * to FW. FW uses these parameters for subnet change detection.
  7161. */
  7162. typedef struct {
  7163. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param */
  7164. /** unique id identifying the VDEV, generated by the caller */
  7165. A_UINT32 vdev_id;
  7166. /** IPv4/IPv6 enabled/disabled */
  7167. /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/DISABLED */
  7168. A_UINT32 flag;
  7169. /** Gateway MAC address */
  7170. wmi_mac_addr inet_gw_mac_addr;
  7171. /** IP addresses */
  7172. WMI_IPV4_ADDR inet_gw_ip_v4_addr;
  7173. WMI_IPV6_ADDR inet_gw_ip_v6_addr;
  7174. /** Number of software retries for ARP/Neighbor solicitation request */
  7175. A_UINT32 max_retries;
  7176. /** timeout in milliseconds for each ARP request*/
  7177. A_UINT32 timeout;
  7178. /** number of skipped aps **/
  7179. A_UINT32 num_skip_subnet_change_detection_bssid_list;
  7180. /**
  7181. * TLV (tag length value) parameters follows roam_subnet_change_config_cmd
  7182. * structure. The TLV's are:
  7183. * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
  7184. **/
  7185. } wmi_roam_subnet_change_config_fixed_param;
  7186. /** WMI_PROFILE_MATCH_EVENT: offload scan
  7187. * generated when ever atleast one of the matching profiles is found
  7188. * in recent NLO scan. no data is carried with the event.
  7189. */
  7190. /** P2P specific commands */
  7191. /**
  7192. * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
  7193. * FW to generate P2P IE tobe carried in probe response frames.
  7194. * FW will respond to probe requests while in listen state.
  7195. */
  7196. typedef struct {
  7197. /* number of secondary device types,supported */
  7198. A_UINT32 num_secondary_dev_types;
  7199. /**
  7200. * followed by 8 bytes of primary device id and
  7201. * num_secondary_dev_types * 8 bytes of secondary device
  7202. * id.
  7203. */
  7204. } wmi_p2p_dev_set_device_info;
  7205. /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
  7206. * state. if enabled, an active STA/AP will respond to P2P probe requests on
  7207. * the operating channel of the VDEV.
  7208. */
  7209. typedef struct {
  7210. /* 1:enable disoverability, 0:disable discoverability */
  7211. A_UINT32 enable_discoverability;
  7212. } wmi_p2p_set_discoverability;
  7213. /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
  7214. * beacons generated by FW. used in FW beacon mode.
  7215. * the FW will add this IE to beacon in addition to the beacon
  7216. * template set by WMI_BCN_TMPL_CMDID command.
  7217. */
  7218. typedef struct {
  7219. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
  7220. /** unique id identifying the VDEV, generated by the caller */
  7221. A_UINT32 vdev_id;
  7222. /* ie length */
  7223. A_UINT32 ie_buf_len;
  7224. /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  7225. * A_UINT8 ie_data[]; <-- length in byte given by field num_data.
  7226. */
  7227. } wmi_p2p_go_set_beacon_ie_fixed_param;
  7228. /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
  7229. * probe response generated by FW. used in FW beacon mode.
  7230. * the FW will add this IE to probe response in addition to the probe response
  7231. * template set by WMI_PRB_TMPL_CMDID command.
  7232. */
  7233. typedef struct {
  7234. /** unique id identifying the VDEV, generated by the caller */
  7235. A_UINT32 vdev_id;
  7236. /* ie length */
  7237. A_UINT32 ie_buf_len;
  7238. /*followed by byte stream of ie data of length ie_buf_len */
  7239. } wmi_p2p_go_set_probe_resp_ie;
  7240. /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
  7241. * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
  7242. * and action frames received by the P2P Client.
  7243. * Note: This command is currently used only for Apple P2P implementation.
  7244. */
  7245. typedef struct {
  7246. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
  7247. /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
  7248. A_UINT32 p2p_ie_oui_type;
  7249. /** OS specific NoA Attribute ID */
  7250. A_UINT32 p2p_noa_attribute;
  7251. } wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
  7252. /*----P2P disc offload definition ----*/
  7253. typedef struct {
  7254. A_UINT32 pattern_type;
  7255. /**
  7256. * TLV (tag length value) paramerters follow the pattern structure.
  7257. * TLV can contain bssid list, ssid list and
  7258. * ie. the TLV tags are defined above;
  7259. */
  7260. } wmi_p2p_disc_offload_pattern_cmd;
  7261. typedef struct {
  7262. /* unique id identifying the VDEV, generated by the caller */
  7263. A_UINT32 vdev_id;
  7264. /* mgmt type of the ie*/
  7265. A_UINT32 mgmt_type;
  7266. /* ie length */
  7267. A_UINT32 ie_buf_len;
  7268. /*followed by byte stream of ie data of length ie_buf_len */
  7269. } wmi_p2p_disc_offload_appie_cmd;
  7270. typedef struct {
  7271. /* enable/disable p2p find offload*/
  7272. A_UINT32 enable;
  7273. /* unique id identifying the VDEV, generated by the caller */
  7274. A_UINT32 vdev_id;
  7275. /* p2p find type */
  7276. A_UINT32 disc_type;
  7277. /* p2p find perodic */
  7278. A_UINT32 perodic;
  7279. /* p2p find listen channel */
  7280. A_UINT32 listen_channel;
  7281. /* p2p find full channel number */
  7282. A_UINT32 num_scan_chans;
  7283. /**
  7284. * TLV (tag length value) paramerters follow the pattern structure.
  7285. * TLV contain channel list
  7286. */
  7287. } wmi_p2p_disc_offload_config_cmd;
  7288. /*----P2P OppPS definition ----*/
  7289. typedef struct {
  7290. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
  7291. A_UINT32 tlv_header;
  7292. /* unique id identifying the VDEV, generated by the caller */
  7293. A_UINT32 vdev_id;
  7294. /* OppPS attributes */
  7295. /** Bit 0: Indicate enable/disable of OppPS
  7296. * Bits 7-1: Ctwindow in TUs
  7297. * Bits 31-8: Reserved
  7298. */
  7299. A_UINT32 oppps_attr;
  7300. } wmi_p2p_set_oppps_cmd_fixed_param;
  7301. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
  7302. #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
  7303. #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
  7304. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
  7305. #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
  7306. WMI_F_RMW((hdr)->oppps_attr, 0x1, \
  7307. WMI_UNIFIED_OPPPS_ATTR_ENALBED);
  7308. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
  7309. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
  7310. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
  7311. WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
  7312. #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
  7313. WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
  7314. WMI_UNIFIED_OPPPS_ATTR_CTWIN);
  7315. typedef enum p2p_lo_start_ctrl_flags_e {
  7316. P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, /* flush prob. req when host is awake */
  7317. } p2p_lo_start_ctrl_flags;
  7318. typedef struct {
  7319. A_UINT32 tlv_header;
  7320. A_UINT32 vdev_id;
  7321. A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
  7322. A_UINT32 channel; /* MHz */
  7323. A_UINT32 period; /* ms */
  7324. A_UINT32 interval; /* ms, interval should be larger than period */
  7325. A_UINT32 count; /* 0 means forever */
  7326. /*
  7327. * device_types_len specifies the number of bytes in the
  7328. * device_types_data[] byte-array TLV that follows this TLV.
  7329. * The data in device_types_data[] is in 8-byte elements, so
  7330. * device_types_len will be a multiple of 8.
  7331. */
  7332. A_UINT32 device_types_len;
  7333. /*
  7334. * prob_resp_len specifies the number of bytes in the
  7335. * prob_resp_data[] byte-array TLV that follows this TLV.
  7336. */
  7337. A_UINT32 prob_resp_len;
  7338. /*
  7339. * Two other TLVs follow this TLV:
  7340. * A_UINT8 device_types_data[device_types_len];
  7341. * A_UINT8 prob_resp_data[prob_resp_len];
  7342. * The information in device_types_data[] and prob_resp_data[]
  7343. * needs to be provided to the target in over-the-air byte order.
  7344. * On a big-endian host, if device_types_data and prob_resp_data
  7345. * are initially in the correct over-the-air byte order,
  7346. * the automatic byteswap for endianness-correction during WMI
  7347. * message download will mess up the byte order.
  7348. * Thus, a big-endian host needs to explicitly byte-swap the bytes
  7349. * within each quad-byte segment of device_types_data[] and
  7350. * prob_resp_data[], so that the automatic byte-swap applied during
  7351. * WMI download from a big-endian host to the little-endian target
  7352. * will restore device_types_data and prob_resp_data into the
  7353. * correct byte ordering.
  7354. */
  7355. } wmi_p2p_lo_start_cmd_fixed_param;
  7356. typedef struct {
  7357. A_UINT32 tlv_header;
  7358. A_UINT32 vdev_id;
  7359. } wmi_p2p_lo_stop_cmd_fixed_param;
  7360. typedef enum p2p_lo_stopped_reason_e {
  7361. P2P_LO_STOPPED_REASON_COMPLETE = 0, /* finished as scheduled */
  7362. P2P_LO_STOPPED_REASON_RECV_STOP_CMD, /* host stops it */
  7363. P2P_LO_STOPPED_REASON_INVALID_LO_PAR, /* invalid listen offload par */
  7364. P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, /* vdev cannot support it right now */
  7365. } p2p_lo_stopped_reason;
  7366. typedef struct {
  7367. A_UINT32 tlv_header;
  7368. A_UINT32 vdev_id;
  7369. A_UINT32 reason;/* refer to p2p_lo_stopped_reason_e */
  7370. } wmi_p2p_lo_stopped_event_fixed_param;
  7371. typedef enum {
  7372. WMI_MNT_FILTER_CONFIG_MANAGER,
  7373. WMI_MNT_FILTER_CONFIG_CONTROL,
  7374. WMI_MNT_FILTER_CONFIG_DATA,
  7375. WMI_MNT_FILTER_CONFIG_ALL,
  7376. WMI_MNT_FILTER_CONFIG_UNKNOWN,
  7377. } WMI_MNT_FILTER_CONFIG_TYPE;
  7378. typedef struct {
  7379. A_UINT32 tlv_header;
  7380. A_UINT32 vdev_id;
  7381. A_UINT32 clear_or_set;
  7382. A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
  7383. } wmi_mnt_filter_cmd_fixed_param;
  7384. typedef struct {
  7385. A_UINT32 time32; /* upper 32 bits of time stamp */
  7386. A_UINT32 time0; /* lower 32 bits of time stamp */
  7387. } A_TIME64;
  7388. typedef enum wmi_peer_sta_kickout_reason {
  7389. WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
  7390. WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
  7391. WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
  7392. WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
  7393. WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
  7394. WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
  7395. } PEER_KICKOUT_REASON;
  7396. typedef struct {
  7397. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
  7398. /** peer mac address */
  7399. wmi_mac_addr peer_macaddr;
  7400. /** Reason code, defined as above */
  7401. A_UINT32 reason;
  7402. /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
  7403. A_UINT32 rssi;
  7404. } wmi_peer_sta_kickout_event_fixed_param;
  7405. #define WMI_WLAN_PROFILE_MAX_HIST 3
  7406. #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
  7407. typedef struct _wmi_wlan_profile_t {
  7408. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
  7409. A_UINT32 id;
  7410. A_UINT32 cnt;
  7411. A_UINT32 tot;
  7412. A_UINT32 min;
  7413. A_UINT32 max;
  7414. A_UINT32 hist_intvl;
  7415. A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
  7416. } wmi_wlan_profile_t;
  7417. typedef struct _wmi_wlan_profile_ctx_t {
  7418. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
  7419. A_UINT32 tot; /* time in us */
  7420. A_UINT32 tx_msdu_cnt;
  7421. A_UINT32 tx_mpdu_cnt;
  7422. A_UINT32 tx_ppdu_cnt;
  7423. A_UINT32 rx_msdu_cnt;
  7424. A_UINT32 rx_mpdu_cnt;
  7425. A_UINT32 bin_count;
  7426. } wmi_wlan_profile_ctx_t;
  7427. typedef struct {
  7428. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
  7429. A_UINT32 enable;
  7430. } wmi_wlan_profile_trigger_cmd_fixed_param;
  7431. typedef struct {
  7432. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
  7433. A_UINT32 value;
  7434. } wmi_wlan_profile_get_prof_data_cmd_fixed_param;
  7435. typedef struct {
  7436. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
  7437. A_UINT32 profile_id;
  7438. A_UINT32 value;
  7439. } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
  7440. typedef struct {
  7441. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
  7442. A_UINT32 profile_id;
  7443. A_UINT32 enable;
  7444. } wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
  7445. /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
  7446. 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
  7447. when comparing wifi header.*/
  7448. /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
  7449. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
  7450. #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
  7451. #define WOW_DEFAULT_BITMASK_SIZE 146
  7452. #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
  7453. #define WOW_MAX_BITMAP_FILTERS 32
  7454. #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
  7455. #define WOW_EXTEND_PATTERN_MATCH_CNT 16
  7456. #define WOW_SHORT_PATTERN_MATCH_CNT 8
  7457. #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
  7458. The 148 comes from (128 - 14) payload size + 8bytes LLC + 26bytes MAC header*/
  7459. #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
  7460. #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
  7461. #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
  7462. #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
  7463. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
  7464. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
  7465. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
  7466. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
  7467. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
  7468. #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
  7469. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
  7470. #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
  7471. typedef enum pattern_type_e {
  7472. WOW_PATTERN_MIN = 0,
  7473. WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
  7474. WOW_IPV4_SYNC_PATTERN,
  7475. WOW_IPV6_SYNC_PATTERN,
  7476. WOW_WILD_CARD_PATTERN,
  7477. WOW_TIMER_PATTERN,
  7478. WOW_MAGIC_PATTERN,
  7479. WOW_IPV6_RA_PATTERN,
  7480. WOW_IOAC_PKT_PATTERN,
  7481. WOW_IOAC_TMR_PATTERN,
  7482. WOW_IOAC_SOCK_PATTERN,
  7483. WOW_PATTERN_MAX
  7484. } WOW_PATTERN_TYPE;
  7485. typedef enum event_type_e {
  7486. WOW_BMISS_EVENT = 0,
  7487. WOW_BETTER_AP_EVENT,
  7488. WOW_DEAUTH_RECVD_EVENT,
  7489. WOW_MAGIC_PKT_RECVD_EVENT,
  7490. WOW_GTK_ERR_EVENT,
  7491. WOW_FOURWAY_HSHAKE_EVENT,
  7492. WOW_EAPOL_RECVD_EVENT,
  7493. WOW_NLO_DETECTED_EVENT,
  7494. WOW_DISASSOC_RECVD_EVENT,
  7495. WOW_PATTERN_MATCH_EVENT,
  7496. WOW_CSA_IE_EVENT,
  7497. WOW_PROBE_REQ_WPS_IE_EVENT,
  7498. WOW_AUTH_REQ_EVENT,
  7499. WOW_ASSOC_REQ_EVENT,
  7500. WOW_HTT_EVENT,
  7501. WOW_RA_MATCH_EVENT,
  7502. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  7503. WOW_IOAC_MAGIC_EVENT,
  7504. WOW_IOAC_SHORT_EVENT,
  7505. WOW_IOAC_EXTEND_EVENT,
  7506. WOW_IOAC_TIMER_EVENT,
  7507. WOW_DFS_PHYERR_RADAR_EVENT,
  7508. WOW_BEACON_EVENT,
  7509. WOW_CLIENT_KICKOUT_EVENT,
  7510. WOW_NAN_EVENT,
  7511. WOW_EXTSCAN_EVENT,
  7512. WOW_IOAC_REV_KA_FAIL_EVENT,
  7513. WOW_IOAC_SOCK_EVENT,
  7514. WOW_NLO_SCAN_COMPLETE_EVENT,
  7515. WOW_NAN_DATA_EVENT,
  7516. WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
  7517. WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, /* reuse deprecated event value */
  7518. WOW_TDLS_CONN_TRACKER_EVENT,
  7519. WOW_CRITICAL_LOG_EVENT,
  7520. } WOW_WAKE_EVENT_TYPE;
  7521. typedef enum wake_reason_e {
  7522. WOW_REASON_UNSPECIFIED = -1,
  7523. WOW_REASON_NLOD = 0,
  7524. WOW_REASON_AP_ASSOC_LOST,
  7525. WOW_REASON_LOW_RSSI,
  7526. WOW_REASON_DEAUTH_RECVD,
  7527. WOW_REASON_DISASSOC_RECVD,
  7528. WOW_REASON_GTK_HS_ERR,
  7529. WOW_REASON_EAP_REQ,
  7530. WOW_REASON_FOURWAY_HS_RECV,
  7531. WOW_REASON_TIMER_INTR_RECV,
  7532. WOW_REASON_PATTERN_MATCH_FOUND,
  7533. WOW_REASON_RECV_MAGIC_PATTERN,
  7534. WOW_REASON_P2P_DISC,
  7535. WOW_REASON_WLAN_HB,
  7536. WOW_REASON_CSA_EVENT,
  7537. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  7538. WOW_REASON_AUTH_REQ_RECV,
  7539. WOW_REASON_ASSOC_REQ_RECV,
  7540. WOW_REASON_HTT_EVENT,
  7541. WOW_REASON_RA_MATCH,
  7542. WOW_REASON_HOST_AUTO_SHUTDOWN,
  7543. WOW_REASON_IOAC_MAGIC_EVENT,
  7544. WOW_REASON_IOAC_SHORT_EVENT,
  7545. WOW_REASON_IOAC_EXTEND_EVENT,
  7546. WOW_REASON_IOAC_TIMER_EVENT,
  7547. WOW_REASON_ROAM_HO,
  7548. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  7549. WOW_REASON_BEACON_RECV,
  7550. WOW_REASON_CLIENT_KICKOUT_EVENT,
  7551. WOW_REASON_NAN_EVENT,
  7552. WOW_REASON_EXTSCAN,
  7553. WOW_REASON_RSSI_BREACH_EVENT,
  7554. WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
  7555. WOW_REASON_IOAC_SOCK_EVENT,
  7556. WOW_REASON_NLO_SCAN_COMPLETE,
  7557. WOW_REASON_PACKET_FILTER_MATCH,
  7558. WOW_REASON_ASSOC_RES_RECV,
  7559. WOW_REASON_REASSOC_REQ_RECV,
  7560. WOW_REASON_REASSOC_RES_RECV,
  7561. WOW_REASON_ACTION_FRAME_RECV,
  7562. WOW_REASON_BPF_ALLOW,
  7563. WOW_REASON_NAN_DATA,
  7564. WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
  7565. WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, /* reuse deprecated reason value */
  7566. WOW_REASON_TDLS_CONN_TRACKER_EVENT,
  7567. WOW_REASON_CRITICAL_LOG,
  7568. WOW_REASON_P2P_LISTEN_OFFLOAD,
  7569. WOW_REASON_NAN_EVENT_WAKE_HOST,
  7570. WOW_REASON_DEBUG_TEST = 0xFF,
  7571. } WOW_WAKE_REASON_TYPE;
  7572. typedef enum {
  7573. WOW_IFACE_PAUSE_ENABLED,
  7574. WOW_IFACE_PAUSE_DISABLED
  7575. } WOW_IFACE_STATUS;
  7576. enum {
  7577. WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, /* some win10 platfrom will not assert pcie_reset for wow.*/
  7578. /* WMI_WOW_FLAG_SEND_PM_PME
  7579. * Some platforms have issues if the PM_PME message is sent after WoW,
  7580. * so don't send PM_PME after WoW unless the host uses this flag
  7581. * to request it.
  7582. */
  7583. WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
  7584. };
  7585. typedef struct {
  7586. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
  7587. A_UINT32 enable;
  7588. A_UINT32 pause_iface_config;
  7589. A_UINT32 flags; /* WMI_WOW_FLAG enums */
  7590. } wmi_wow_enable_cmd_fixed_param;
  7591. typedef struct {
  7592. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
  7593. /** Reserved for future use */
  7594. A_UINT32 reserved0;
  7595. } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
  7596. #define WOW_ICMPV6_NA_FILTER_DISABLE 0
  7597. #define WOW_ICMPV6_NA_FILTER_ENABLE 1
  7598. typedef struct {
  7599. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param */
  7600. A_UINT32 vdev_id;
  7601. A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
  7602. } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
  7603. typedef struct bitmap_pattern_s {
  7604. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
  7605. A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
  7606. A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
  7607. A_UINT32 pattern_offset;
  7608. A_UINT32 pattern_len;
  7609. A_UINT32 bitmask_len;
  7610. A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
  7611. } WOW_BITMAP_PATTERN_T;
  7612. typedef struct ipv4_sync_s {
  7613. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
  7614. A_UINT32 ipv4_src_addr;
  7615. A_UINT32 ipv4_dst_addr;
  7616. A_UINT32 tcp_src_prt;
  7617. A_UINT32 tcp_dst_prt;
  7618. } WOW_IPV4_SYNC_PATTERN_T;
  7619. typedef struct ipv6_sync_s {
  7620. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
  7621. A_UINT32 ipv6_src_addr[4];
  7622. A_UINT32 ipv6_dst_addr[4];
  7623. A_UINT32 tcp_src_prt;
  7624. A_UINT32 tcp_dst_prt;
  7625. } WOW_IPV6_SYNC_PATTERN_T;
  7626. typedef struct WOW_MAGIC_PATTERN_CMD
  7627. {
  7628. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
  7629. wmi_mac_addr macaddr;
  7630. } WOW_MAGIC_PATTERN_CMD;
  7631. typedef enum wow_ioac_pattern_type {
  7632. WOW_IOAC_MAGIC_PATTERN = 1,
  7633. WOW_IOAC_SHORT_PATTERN,
  7634. WOW_IOAC_EXTEND_PATTERN,
  7635. } WOW_IOAC_PATTERN_TYPE;
  7636. typedef struct ioac_sock_pattern_s {
  7637. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T */
  7638. A_UINT32 id;
  7639. A_UINT32 local_ipv4;
  7640. A_UINT32 remote_ipv4;
  7641. A_UINT32 local_port;
  7642. A_UINT32 remote_port;
  7643. A_UINT32 pattern_len; /* units = bytes */
  7644. A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
  7645. WMI_IPV6_ADDR local_ipv6;
  7646. WMI_IPV6_ADDR remote_ipv6;
  7647. A_UINT32 ack_nak_len;
  7648. A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  7649. A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
  7650. } WOW_IOAC_SOCK_PATTERN_T;
  7651. typedef struct ioac_pkt_pattern_s {
  7652. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
  7653. A_UINT32 pattern_type;
  7654. A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
  7655. A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
  7656. A_UINT32 pattern_len;
  7657. A_UINT32 random_len;
  7658. } WOW_IOAC_PKT_PATTERN_T;
  7659. typedef struct ioac_tmr_pattern_s {
  7660. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
  7661. A_UINT32 wake_in_s;
  7662. A_UINT32 vdev_id;
  7663. } WOW_IOAC_TMR_PATTERN_T;
  7664. typedef struct {
  7665. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
  7666. A_UINT32 nID;
  7667. } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
  7668. typedef struct {
  7669. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
  7670. A_UINT32 nID;
  7671. } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
  7672. typedef struct ioac_keepalive_s {
  7673. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
  7674. A_UINT32 keepalive_pkt_buf[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
  7675. A_UINT32 keepalive_pkt_len;
  7676. A_UINT32 period_in_ms;
  7677. A_UINT32 vdev_id;
  7678. A_UINT32 max_loss_cnt;
  7679. A_UINT32 local_ipv4;
  7680. A_UINT32 remote_ipv4;
  7681. A_UINT32 local_port;
  7682. A_UINT32 remote_port;
  7683. A_UINT32 recv_period_in_ms;
  7684. A_UINT32 rev_ka_size;
  7685. A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
  7686. WMI_IPV6_ADDR local_ipv6;
  7687. WMI_IPV6_ADDR remote_ipv6;
  7688. } WMI_WOW_IOAC_KEEPALIVE_T;
  7689. typedef struct {
  7690. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
  7691. A_UINT32 vdev_id;
  7692. A_UINT32 pattern_type;
  7693. /*
  7694. * Following this struct are these TLVs. Note that they are all array of structures
  7695. * but can have at most one element. Which TLV is empty or has one element depends
  7696. * on the field pattern_type. This is to emulate an union.
  7697. * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
  7698. * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
  7699. */
  7700. } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
  7701. typedef struct {
  7702. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
  7703. A_UINT32 vdev_id;
  7704. A_UINT32 pattern_type;
  7705. A_UINT32 pattern_id;
  7706. } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
  7707. typedef struct {
  7708. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
  7709. A_UINT32 vdev_id;
  7710. A_UINT32 pattern_id;
  7711. A_UINT32 pattern_type;
  7712. /*
  7713. * Following this struct are these TLVs. Note that they are all array of structures
  7714. * but can have at most one element. Which TLV is empty or has one element depends
  7715. * on the field pattern_type. This is to emulate an union.
  7716. * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
  7717. * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
  7718. * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
  7719. * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
  7720. * A_UINT32 pattern_info_timeout[];
  7721. * A_UINT32 ra_ratelimit_interval;
  7722. */
  7723. } WMI_WOW_ADD_PATTERN_CMD_fixed_param;
  7724. typedef struct {
  7725. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
  7726. A_UINT32 vdev_id;
  7727. A_UINT32 pattern_id;
  7728. A_UINT32 pattern_type;
  7729. } WMI_WOW_DEL_PATTERN_CMD_fixed_param;
  7730. #define WMI_WOW_MAX_EVENT_BM_LEN 4
  7731. typedef struct {
  7732. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
  7733. A_UINT32 vdev_id;
  7734. A_UINT32 is_add;
  7735. union {
  7736. A_UINT32 event_bitmap;
  7737. A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
  7738. };
  7739. } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
  7740. /*
  7741. * This structure is used to set the pattern to check UDP packet in WOW mode.
  7742. * If match, construct a tx frame in a local buffer to send through the peer
  7743. * AP to the entity in the IP network that sent the UDP packet to this STA.
  7744. */
  7745. typedef struct {
  7746. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param */
  7747. A_UINT32 vdev_id;
  7748. A_UINT32 enable; /* 1: enable, 0: disable*/
  7749. /* dest_port -
  7750. * bits 7:0 contain the LSB of the UDP dest port,
  7751. * bits 15:8 contain the MSB of the UDP dest port
  7752. */
  7753. A_UINT32 dest_port;
  7754. A_UINT32 pattern_len; /* length in byte of pattern[] */
  7755. A_UINT32 response_len; /* length in byte of response[] */
  7756. /* Following this struct are the TLV's:
  7757. * A_UINT8 pattern[]; <-- payload of UDP packet to be checked, network byte order
  7758. * A_UINT8 response[]; <-- payload of UDP packet to be response, network byte order
  7759. */
  7760. } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
  7761. /*
  7762. * This structure is used to set the pattern for WOW host wakeup pin pulse pattern confirguration.
  7763. */
  7764. typedef struct {
  7765. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param */
  7766. A_UINT32 enable; /* 1: enable, 0: disable */
  7767. A_UINT32 pin; /* pin for host wakeup */
  7768. A_UINT32 interval_low; /* interval for keeping low voltage, unit: ms */
  7769. A_UINT32 interval_high; /* interval for keeping high voltage, unit: ms */
  7770. A_UINT32 repeat_cnt; /* repeat times for pulse (0xffffffff means forever) */
  7771. } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
  7772. #define MAX_SUPPORTED_ACTION_CATEGORY 256
  7773. #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
  7774. typedef enum {
  7775. WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
  7776. WOW_ACTION_WAKEUP_OPERATION_SET,
  7777. WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
  7778. WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
  7779. } WOW_ACTION_WAKEUP_OPERATION;
  7780. typedef struct {
  7781. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param */
  7782. A_UINT32 vdev_id;
  7783. A_UINT32 operation; /* 0 reset to fw default, 1 set the bits, 2 add the setting bits, 3 delete the setting bits */
  7784. A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
  7785. } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
  7786. typedef struct wow_event_info_s {
  7787. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
  7788. A_UINT32 vdev_id;
  7789. A_UINT32 flag; /*This is current reserved.*/
  7790. A_INT32 wake_reason;
  7791. A_UINT32 data_len;
  7792. } WOW_EVENT_INFO_fixed_param;
  7793. typedef struct wow_initial_wakeup_event_s {
  7794. A_UINT32 tlv_header; /* TLV tag and len; tag equals WOW_INITIAL_WAKEUP_EVENT_fixed_param */
  7795. A_UINT32 vdev_id;
  7796. } WOW_INITIAL_WAKEUP_EVENT_fixed_param;
  7797. typedef enum {
  7798. WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
  7799. WOW_EVENT_INFO_TYPE_BITMAP,
  7800. WOW_EVENT_INFO_TYPE_GTKIGTK,
  7801. } WOW_EVENT_INFO_TYPE;
  7802. typedef struct wow_event_info_section_s {
  7803. A_UINT32 data_type;
  7804. A_UINT32 data_len;
  7805. } WOW_EVENT_INFO_SECTION;
  7806. typedef struct wow_event_info_section_packet_s {
  7807. A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
  7808. } WOW_EVENT_INFO_SECTION_PACKET;
  7809. typedef struct wow_event_info_section_bitmap_s {
  7810. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
  7811. A_UINT32 flag; /*This is current reserved.*/
  7812. A_UINT32 value; /*This could be the pattern id for bitmap pattern.*/
  7813. A_UINT32 org_len; /*The length of the orginal packet.*/
  7814. } WOW_EVENT_INFO_SECTION_BITMAP;
  7815. /**
  7816. * This command is sent from WLAN host driver to firmware to
  7817. * enable or disable D0-WOW. D0-WOW means APSS suspend with
  7818. * PCIe link and DDR being active.
  7819. *
  7820. *
  7821. * Entering D0-WOW Mode (based on kernel suspend request):
  7822. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
  7823. * target: Take action (e.g. dbglog suspend)
  7824. * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
  7825. *
  7826. * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
  7827. * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
  7828. * target: Take action (e.g. dbglog resume)
  7829. * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
  7830. *
  7831. * This command is applicable only on the PCIE LL systems
  7832. * Host can enter either D0-WOW or WOW mode, but NOT both at same time
  7833. * Decision to enter D0-WOW or WOW is based on active interfaces
  7834. *
  7835. */
  7836. typedef struct {
  7837. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
  7838. A_UINT32 enable; /* 1 = enable, 0 = disable */
  7839. } wmi_d0_wow_enable_disable_cmd_fixed_param;
  7840. typedef enum extend_wow_type_e {
  7841. EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
  7842. EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
  7843. EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
  7844. EXTWOW_TYPE_APP_PULSETEST,
  7845. EXTWOW_DISABLED = 255,
  7846. } EXTWOW_TYPE;
  7847. typedef struct {
  7848. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
  7849. A_UINT32 vdev_id;
  7850. A_UINT32 type;
  7851. A_UINT32 wakeup_pin_num;
  7852. A_UINT32 swol_pulsetest_type;
  7853. A_UINT32 swol_pulsetest_application;
  7854. } wmi_extwow_enable_cmd_fixed_param;
  7855. #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
  7856. #define SWOL_INDOOR_KEY_LEN 16
  7857. typedef struct {
  7858. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
  7859. A_UINT32 vdev_id;
  7860. wmi_mac_addr wakee_mac;
  7861. A_UINT8 ident[8];
  7862. A_UINT8 passwd[16];
  7863. A_UINT32 ident_len;
  7864. A_UINT32 passwd_len;
  7865. /* indoor check parameters */
  7866. /* key for mac addresses specified in swol_indoor_key_mac
  7867. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  7868. * segment of this array, so the bytes will return to their original
  7869. * order when the entire WMI message contents are byte-swapped to
  7870. * convert from big-endian to little-endian format.
  7871. */
  7872. A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
  7873. /* key length for specified mac address index
  7874. * Big-endian hosts need to byte-swap the bytes within each 4-byte
  7875. * segment of this array, so the bytes will return to their original
  7876. * order when the entire WMI message contents are byte-swapped to
  7877. * convert from big-endian to little-endian format.
  7878. */
  7879. A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  7880. /* mac address array allowed to wakeup host*/
  7881. wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  7882. /* app mask for the mac addresses specified in swol_indoor_key_mac */
  7883. A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
  7884. A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
  7885. A_UINT32 swol_indoor_pw_check; /* whether to check password */
  7886. A_UINT32 swol_indoor_pattern; /* wakeup pattern */
  7887. A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
  7888. A_UINT32 swol_indoor_exception_app;
  7889. A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
  7890. } wmi_extwow_set_app_type1_params_cmd_fixed_param;
  7891. typedef struct {
  7892. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
  7893. A_UINT32 vdev_id;
  7894. A_UINT8 rc4_key[16];
  7895. A_UINT32 rc4_key_len;
  7896. /** ip header parameter */
  7897. A_UINT32 ip_id; /* NC id */
  7898. A_UINT32 ip_device_ip; /* NC IP address */
  7899. A_UINT32 ip_server_ip; /* Push server IP address */
  7900. /** tcp header parameter */
  7901. A_UINT16 tcp_src_port; /* NC TCP port */
  7902. A_UINT16 tcp_dst_port; /* Push server TCP port */
  7903. A_UINT32 tcp_seq;
  7904. A_UINT32 tcp_ack_seq;
  7905. A_UINT32 keepalive_init; /* Initial ping interval */
  7906. A_UINT32 keepalive_min; /* Minimum ping interval */
  7907. A_UINT32 keepalive_max; /* Maximum ping interval */
  7908. A_UINT32 keepalive_inc; /* Increment of ping interval */
  7909. wmi_mac_addr gateway_mac;
  7910. A_UINT32 tcp_tx_timeout_val;
  7911. A_UINT32 tcp_rx_timeout_val;
  7912. /** add extra parameter for backward-compatible */
  7913. /*
  7914. * For all byte arrays, natural order is used. E.g.
  7915. * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
  7916. * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
  7917. */
  7918. /* used to encrypt transmit packet such as keep-alive */
  7919. A_UINT8 rc4_write_sandbox[256];
  7920. A_UINT32 rc4_write_x;
  7921. A_UINT32 rc4_write_y;
  7922. /* used to decrypt received packet such as wow data */
  7923. A_UINT8 rc4_read_sandbox[256];
  7924. A_UINT32 rc4_read_x;
  7925. A_UINT32 rc4_read_y;
  7926. /* used to caculate HMAC hash for transmit packet such as keep-alive */
  7927. A_UINT8 ssl_write_seq[8];
  7928. A_UINT8 ssl_sha1_write_key[64];
  7929. A_UINT32 ssl_sha1_write_key_len;
  7930. /* used to calculate HAMC hash for receive packet such as wow data */
  7931. A_UINT8 ssl_read_seq[8];
  7932. A_UINT8 ssl_sha1_read_key[64];
  7933. A_UINT32 ssl_sha1_read_key_len;
  7934. /* optional element for specifying TCP options data to include in
  7935. * transmit packets such as keep-alive
  7936. */
  7937. A_UINT32 tcp_options_len;
  7938. A_UINT8 tcp_options[40];
  7939. A_UINT32 async_id; /* keep-alive request id */
  7940. } wmi_extwow_set_app_type2_params_cmd_fixed_param;
  7941. #define WMI_RXERR_CRC 0x01 /* CRC error on frame */
  7942. #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  7943. #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  7944. #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  7945. typedef enum {
  7946. PKT_PWR_SAVE_PAID_MATCH = 0x0001,
  7947. PKT_PWR_SAVE_GID_MATCH = 0x0002,
  7948. PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
  7949. PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
  7950. PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
  7951. PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
  7952. PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
  7953. PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
  7954. PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
  7955. PKT_PWR_SAVE_5G_EBT = 0x0200,
  7956. PKT_PWR_SAVE_2G_EBT = 0x0400,
  7957. WMI_PKT_PWR_SAVE_MAX = 0x0800,
  7958. } WMI_PKT_PWR_SAVE_TYPE;
  7959. typedef struct {
  7960. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
  7961. A_UINT32 num_data; /** length in byte of data[]. */
  7962. /** pdev_id for identifying the MAC
  7963. * See macros starting with WMI_PDEV_ID_ for values.
  7964. */
  7965. A_UINT32 pdev_id;
  7966. /* This structure is used to send Factory Test Mode [FTM] command
  7967. * from host to firmware for integrated chips which are binary blobs.
  7968. * Following this structure is the TLV:
  7969. * A_UINT8 data[]; <-- length in byte given by field num_data.
  7970. */
  7971. } wmi_ftm_intg_cmd_fixed_param;
  7972. typedef struct {
  7973. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
  7974. A_UINT32 num_data; /** length in byte of data[]. */
  7975. /* This structure is used to receive Factory Test Mode [FTM] event
  7976. * from firmware to host for integrated chips which are binary blobs.
  7977. * Following this structure is the TLV:
  7978. * A_UINT8 data[]; <-- length in byte given by field num_data.
  7979. */
  7980. } wmi_ftm_intg_event_fixed_param;
  7981. #define WMI_MAX_NS_OFFLOADS 2
  7982. #define WMI_MAX_ARP_OFFLOADS 2
  7983. #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  7984. #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  7985. #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  7986. typedef struct {
  7987. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
  7988. A_UINT32 flags; /* flags */
  7989. A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node*/
  7990. A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
  7991. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  7992. } WMI_ARP_OFFLOAD_TUPLE;
  7993. #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
  7994. #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
  7995. #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
  7996. #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) /* whether the configured IPv6 address is anycast */
  7997. #define WMI_NSOFF_MAX_TARGET_IPS 2
  7998. typedef struct {
  7999. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
  8000. A_UINT32 flags; /* flags */
  8001. /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
  8002. WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
  8003. WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
  8004. WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
  8005. wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
  8006. } WMI_NS_OFFLOAD_TUPLE;
  8007. typedef struct {
  8008. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
  8009. A_UINT32 flags;
  8010. A_UINT32 vdev_id;
  8011. A_UINT32 num_ns_ext_tuples;
  8012. /* Following this structure are the TLVs:
  8013. * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
  8014. * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
  8015. * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; <-- size based on num_ns_ext_tuples
  8016. */
  8017. } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
  8018. typedef struct {
  8019. A_UINT32 tlv_header;
  8020. A_UINT32 vdev_id;
  8021. A_UINT32 pattern_id;
  8022. A_UINT32 timeout;
  8023. A_UINT32 length;
  8024. /*Following this would be the pattern
  8025. A_UINT8 pattern[] of length specifed by length
  8026. field in the structure.*/
  8027. } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  8028. typedef struct {
  8029. A_UINT32 tlv_header;
  8030. A_UINT32 vdev_id;
  8031. A_UINT32 pattern_id;
  8032. } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
  8033. typedef struct {
  8034. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
  8035. /** unique id identifying the VDEV, generated by the caller */
  8036. A_UINT32 vdev_id;
  8037. /** peer MAC address */
  8038. wmi_mac_addr peer_macaddr;
  8039. /** Tid number */
  8040. A_UINT32 tid;
  8041. /** Initiator (1) or Responder (0) for this aggregation */
  8042. A_UINT32 initiator;
  8043. /** size of the negotiated window */
  8044. A_UINT32 window_size;
  8045. /** starting sequence number (only valid for initiator) */
  8046. A_UINT32 ssn;
  8047. /** timeout field represents the time to wait for Block Ack in
  8048. * initiator case and the time to wait for BAR in responder
  8049. * case. 0 represents no timeout. */
  8050. A_UINT32 timeout;
  8051. /* BA policy: immediate ACK (0) or delayed ACK (1) */
  8052. A_UINT32 policy;
  8053. } wmi_peer_tid_addba_cmd_fixed_param;
  8054. typedef struct {
  8055. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
  8056. /** unique id identifying the VDEV, generated by the caller */
  8057. A_UINT32 vdev_id;
  8058. /** peer MAC address */
  8059. wmi_mac_addr peer_macaddr;
  8060. /** Tid number */
  8061. A_UINT32 tid;
  8062. /** Initiator (1) or Responder (0) for this aggregation */
  8063. A_UINT32 initiator;
  8064. } wmi_peer_tid_delba_cmd_fixed_param;
  8065. typedef struct {
  8066. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
  8067. /** unique id identifying the VDEV, generated by the caller */
  8068. A_UINT32 vdev_id;
  8069. /** peer MAC address */
  8070. wmi_mac_addr peer_macaddr;
  8071. /** Tid number */
  8072. A_UINT32 tid;
  8073. /** Event status */
  8074. A_UINT32 status;
  8075. } wmi_tx_addba_complete_event_fixed_param;
  8076. typedef struct {
  8077. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
  8078. /** unique id identifying the VDEV, generated by the caller */
  8079. A_UINT32 vdev_id;
  8080. /** peer MAC address */
  8081. wmi_mac_addr peer_macaddr;
  8082. /** Tid number */
  8083. A_UINT32 tid;
  8084. /** Event status */
  8085. A_UINT32 status;
  8086. } wmi_tx_delba_complete_event_fixed_param;
  8087. /*
  8088. * Structure to request sequence numbers for a given
  8089. * peer station on different TIDs. The TIDs are
  8090. * indicated in the tidBitMap, tid 0 would
  8091. * be represented by LSB bit 0. tid 1 would be
  8092. * represented by LSB bit 1 etc.
  8093. * The target will retrieve the current sequence
  8094. * numbers for the peer on all the TIDs requested
  8095. * and send back a response in a WMI event.
  8096. */
  8097. typedef struct
  8098. {
  8099. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  8100. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
  8101. wmi_mac_addr peer_macaddr;
  8102. A_UINT32 tidBitmap;
  8103. } wmi_ba_req_ssn;
  8104. typedef struct {
  8105. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  8106. WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
  8107. /** unique id identifying the VDEV, generated by the caller */
  8108. A_UINT32 vdev_id;
  8109. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  8110. A_UINT32 num_ba_req_ssn;
  8111. /* Following this struc are the TLV's:
  8112. * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
  8113. */
  8114. } wmi_ba_req_ssn_cmd_fixed_param;
  8115. /*
  8116. * Max transmit categories
  8117. *
  8118. * Note: In future if we need to increase WMI_MAX_TC definition
  8119. * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
  8120. */
  8121. #define WMI_MAX_TC 8
  8122. /*
  8123. * Structure to send response sequence numbers
  8124. * for a give peer and tidmap.
  8125. */
  8126. typedef struct
  8127. {
  8128. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  8129. WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
  8130. wmi_mac_addr peer_macaddr;
  8131. /* A boolean to indicate if ssn is present */
  8132. A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
  8133. /* The ssn from target, valid only if
  8134. * ssn_present_for_tid[tidn] equals 1
  8135. */
  8136. A_UINT32 ssn_for_tid[WMI_MAX_TC];
  8137. } wmi_ba_event_ssn;
  8138. typedef struct {
  8139. A_UINT32 tlv_header; /* TLV tag and len; tag equals
  8140. WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
  8141. /** unique id identifying the VDEV, generated by the caller */
  8142. A_UINT32 vdev_id;
  8143. /** Event status, success or failure of the overall operation */
  8144. A_UINT32 status;
  8145. /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
  8146. A_UINT32 num_ba_event_ssn;
  8147. /* Following this struc are the TLV's:
  8148. * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
  8149. */
  8150. } wmi_ba_rsp_ssn_event_fixed_param;
  8151. enum wmi_aggr_state_req_type {
  8152. WMI_DISABLE_AGGREGATION,
  8153. WMI_ENABLE_AGGREGATION
  8154. };
  8155. /*
  8156. * This event is generated by the COEX module
  8157. * when esco call is begins the coex module in fw genrated this event to host to
  8158. * disable the RX aggregation and after completion of the esco call fw will indicate to
  8159. * enable back the Rx aggregation .
  8160. */
  8161. typedef struct {
  8162. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
  8163. /** unique id identifying the VDEV, generated by the caller */
  8164. A_UINT32 vdev_id;
  8165. /** req_type contains values from enum
  8166. * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
  8167. A_UINT32 req_type;
  8168. } wmi_aggr_state_trig_event_fixed_param;
  8169. typedef struct {
  8170. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
  8171. /** unique id identifying the VDEV, generated by the caller */
  8172. A_UINT32 vdev_id;
  8173. /** MAC address used for installing */
  8174. wmi_mac_addr peer_macaddr;
  8175. /** key index */
  8176. A_UINT32 key_ix;
  8177. /** key flags */
  8178. A_UINT32 key_flags;
  8179. /** Event status */
  8180. A_UINT32 status;
  8181. } wmi_vdev_install_key_complete_event_fixed_param;
  8182. typedef enum _WMI_NLO_AUTH_ALGORITHM {
  8183. WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
  8184. WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
  8185. WMI_NLO_AUTH_ALGO_WPA = 3,
  8186. WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
  8187. WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
  8188. WMI_NLO_AUTH_ALGO_RSNA = 6,
  8189. WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
  8190. } WMI_NLO_AUTH_ALGORITHM;
  8191. typedef enum _WMI_NLO_CIPHER_ALGORITHM {
  8192. WMI_NLO_CIPHER_ALGO_NONE = 0x00,
  8193. WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
  8194. WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
  8195. WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
  8196. WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
  8197. WMI_NLO_CIPHER_ALGO_BIP = 0x06,
  8198. WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
  8199. WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
  8200. WMI_NLO_CIPHER_ALGO_WEP = 0x101,
  8201. } WMI_NLO_CIPHER_ALGORITHM;
  8202. /* SSID broadcast type passed in NLO params */
  8203. typedef enum _WMI_NLO_SSID_BcastNwType
  8204. {
  8205. WMI_NLO_BCAST_UNKNOWN = 0,
  8206. WMI_NLO_BCAST_NORMAL = 1,
  8207. WMI_NLO_BCAST_HIDDEN = 2,
  8208. } WMI_NLO_SSID_BcastNwType;
  8209. #define WMI_NLO_MAX_SSIDS 16
  8210. #define WMI_NLO_MAX_CHAN 48
  8211. #define WMI_NLO_CONFIG_STOP (0x1 << 0)
  8212. #define WMI_NLO_CONFIG_START (0x1 << 1)
  8213. #define WMI_NLO_CONFIG_RESET (0x1 << 2)
  8214. #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
  8215. #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
  8216. #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
  8217. /* This bit is used to indicate if EPNO Profile is enabled */
  8218. #define WMI_NLO_CONFIG_ENLO (0x1 << 7)
  8219. #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
  8220. #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
  8221. /* Whether directed scan needs to be performed (for hidden SSIDs) */
  8222. #define WMI_ENLO_FLAG_DIRECTED_SCAN 1
  8223. /* Whether PNO event shall be triggered if the network is found on A band */
  8224. #define WMI_ENLO_FLAG_A_BAND 2
  8225. /* Whether PNO event shall be triggered if the network is found on G band */
  8226. #define WMI_ENLO_FLAG_G_BAND 4
  8227. /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
  8228. #define WMI_ENLO_FLAG_STRICT_MATCH 8
  8229. /* Code for matching the beacon AUTH IE - additional codes TBD */
  8230. /* open */
  8231. #define WMI_ENLO_AUTH_CODE_OPEN 1
  8232. /* WPA_PSK or WPA2PSK */
  8233. #define WMI_ENLO_AUTH_CODE_PSK 2
  8234. /* any EAPOL */
  8235. #define WMI_ENLO_AUTH_CODE_EAPOL 4
  8236. /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
  8237. typedef struct wmi_nlo_ssid_param
  8238. {
  8239. A_UINT32 valid;
  8240. wmi_ssid ssid;
  8241. } wmi_nlo_ssid_param;
  8242. /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
  8243. typedef struct wmi_nlo_enc_param
  8244. {
  8245. A_UINT32 valid;
  8246. A_UINT32 enc_type;
  8247. } wmi_nlo_enc_param;
  8248. /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
  8249. typedef struct wmi_nlo_auth_param
  8250. {
  8251. A_UINT32 valid;
  8252. A_UINT32 auth_type;
  8253. } wmi_nlo_auth_param;
  8254. /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
  8255. typedef struct wmi_nlo_bcast_nw_param
  8256. {
  8257. A_UINT32 valid;
  8258. /* If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value should be true/false
  8259. Otherwise EPNO is enabled. bcast_nw_type would be used as a bit flag contains WMI_ENLO_FLAG_XXX */
  8260. A_UINT32 bcast_nw_type;
  8261. } wmi_nlo_bcast_nw_param;
  8262. /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
  8263. typedef struct wmi_nlo_rssi_param
  8264. {
  8265. A_UINT32 valid;
  8266. A_INT32 rssi;
  8267. } wmi_nlo_rssi_param;
  8268. typedef struct nlo_configured_parameters {
  8269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
  8270. wmi_nlo_ssid_param ssid;
  8271. wmi_nlo_enc_param enc_type;
  8272. wmi_nlo_auth_param auth_type;
  8273. wmi_nlo_rssi_param rssi_cond;
  8274. wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
  8275. } nlo_configured_parameters;
  8276. /* Support channel prediction for PNO scan after scanning top_k_num channels
  8277. * if stationary_threshold is met.
  8278. */
  8279. typedef struct nlo_channel_prediction_cfg {
  8280. A_UINT32 tlv_header;
  8281. /* Enable or disable this feature. */
  8282. A_UINT32 enable;
  8283. /* Top K channels will be scanned before deciding whether to further scan
  8284. * or stop. Minimum value is 3 and maximum is 5. */
  8285. A_UINT32 top_k_num;
  8286. /* Preconfigured stationary threshold.
  8287. * Lesser value means more conservative. Bigger value means more aggressive.
  8288. * Maximum is 100 and mininum is 0. */
  8289. A_UINT32 stationary_threshold;
  8290. /* Periodic full channel scan in milliseconds unit.
  8291. * After full_scan_period_ms since last full scan, channel prediction
  8292. * scan is suppressed and will do full scan.
  8293. * This is to help detecting sudden AP power-on or -off. Value 0 means no
  8294. * full scan at all (not recommended).
  8295. */
  8296. A_UINT32 full_scan_period_ms;
  8297. } nlo_channel_prediction_cfg;
  8298. typedef struct enlo_candidate_score_params_t {
  8299. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param */
  8300. A_INT32 min5GHz_rssi; /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
  8301. A_INT32 min24GHz_rssi; /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
  8302. A_UINT32 initial_score_max; /* the maximum score that a network can have before bonuses */
  8303. /* current_connection_bonus:
  8304. * only report when there is a network's score this much higher
  8305. * than the current connection
  8306. */
  8307. A_UINT32 current_connection_bonus;
  8308. A_UINT32 same_network_bonus; /* score bonus for all networks with the same network flag */
  8309. A_UINT32 secure_bonus; /* score bonus for networks that are not open */
  8310. A_UINT32 band5GHz_bonus; /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
  8311. } enlo_candidate_score_params;
  8312. typedef struct wmi_nlo_config {
  8313. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
  8314. A_UINT32 flags;
  8315. A_UINT32 vdev_id;
  8316. A_UINT32 fast_scan_max_cycles;
  8317. A_UINT32 active_dwell_time;
  8318. A_UINT32 passive_dwell_time; /* PDT in msecs */
  8319. A_UINT32 probe_bundle_size;
  8320. A_UINT32 rest_time; /* ART = IRT */
  8321. A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
  8322. A_UINT32 scan_backoff_multiplier; /* SBM */
  8323. A_UINT32 fast_scan_period; /* SCBM */
  8324. A_UINT32 slow_scan_period; /* specific to windows */
  8325. A_UINT32 no_of_ssids;
  8326. A_UINT32 num_of_channels;
  8327. A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
  8328. /* The TLVs will follow.
  8329. * nlo_configured_parameters nlo_list[];
  8330. * A_UINT32 channel_list[];
  8331. * nlo_channel_prediction_cfg ch_prediction_cfg;
  8332. * enlo_candidate_score_params candidate_score_params;
  8333. */
  8334. } wmi_nlo_config_cmd_fixed_param;
  8335. typedef struct wmi_nlo_event
  8336. {
  8337. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
  8338. A_UINT32 vdev_id;
  8339. } wmi_nlo_event;
  8340. /* WMI_PASSPOINT_CONFIG_SET
  8341. * Sets a list for passpoint networks for PNO purposes;
  8342. * it should be matched against any passpoint networks found
  8343. * during regular PNO scan.
  8344. */
  8345. #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
  8346. /* WMI_PASSPOINT_CONFIG_RESET
  8347. * Reset passpoint network list -
  8348. * no Passpoint networks should be matched after this.
  8349. */
  8350. #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
  8351. #define PASSPOINT_REALM_LEN 256
  8352. #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
  8353. #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  8354. #define PASSPOINT_PLMN_ID_LEN 3
  8355. #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
  8356. (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
  8357. /*
  8358. * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
  8359. * A_UINT8 realm[PASSPOINT_REALM_LEN]
  8360. * array will end on a 4-byte boundary.
  8361. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  8362. */
  8363. A_COMPILE_TIME_ASSERT(
  8364. check_passpoint_realm_size,
  8365. (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
  8366. /*
  8367. * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
  8368. * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
  8369. * roaming_consortium_ids array below will end on a 4-byte boundary.
  8370. * (This 4-byte alignment simplifies endianness-correction byte swapping.)
  8371. */
  8372. A_COMPILE_TIME_ASSERT(
  8373. check_passpoint_roaming_consortium_ids_size,
  8374. ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
  8375. /* wildcard ID to allow an action (reset) to apply to all networks */
  8376. #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
  8377. typedef struct wmi_passpoint_config {
  8378. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
  8379. /* (network) id
  8380. * identifier of the matched network, report this in event
  8381. * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
  8382. * that indicates the action should be applied to all networks.
  8383. * Currently, the only action that is applied to all networks is "reset".
  8384. * If a non-wildcard ID is specified, that particular network is configured.
  8385. * If a wildcard ID is specified, all networks are reset.
  8386. */
  8387. A_UINT32 id;
  8388. A_UINT32 req_id;
  8389. A_UINT8 realm[PASSPOINT_REALM_LEN]; /*null terminated UTF8 encoded realm, 0 if unspecified*/
  8390. A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; /*roaming consortium ids to match, 0s if unspecified*/
  8391. /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
  8392. A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
  8393. } wmi_passpoint_config_cmd_fixed_param;
  8394. typedef struct {
  8395. A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_passpoint_event_hdr */
  8396. A_UINT32 id; /* identifier of the matched network */
  8397. A_UINT32 vdev_id;
  8398. A_UINT32 timestamp; /* time since boot (in microsecond) when the result was retrieved*/
  8399. wmi_ssid ssid;
  8400. wmi_mac_addr bssid; /* bssid of the network */
  8401. A_UINT32 channel_mhz; /* channel frequency in MHz */
  8402. A_UINT32 rssi; /* rssi value */
  8403. A_UINT32 rtt; /* timestamp in nanoseconds*/
  8404. A_UINT32 rtt_sd; /* standard deviation in rtt */
  8405. A_UINT32 beacon_period; /* beacon advertised in the beacon */
  8406. A_UINT32 capability; /* capabilities advertised in the beacon */
  8407. A_UINT32 ie_length; /* size of the ie_data blob */
  8408. A_UINT32 anqp_length; /* length of ANQP blob */
  8409. /* Following this structure is the byte stream of ie data of length ie_buf_len:
  8410. * A_UINT8 ie_data[]; <-- length in byte given by field ie_length, blob of ie data in beacon
  8411. * A_UINT8 anqp_ie[]; <-- length in byte given by field anqp_len, blob of anqp data of IE
  8412. * 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.
  8413. */
  8414. } wmi_passpoint_event_hdr;
  8415. #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
  8416. /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
  8417. #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
  8418. /** Disable GTK offload */
  8419. #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
  8420. /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
  8421. #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
  8422. enum wmi_chatter_mode {
  8423. /* Chatter enter/exit happens
  8424. * automatically based on preset
  8425. * params
  8426. */
  8427. WMI_CHATTER_MODE_AUTO,
  8428. /* Chatter enter is triggered
  8429. * manually by the user
  8430. */
  8431. WMI_CHATTER_MODE_MANUAL_ENTER,
  8432. /* Chatter exit is triggered
  8433. * manually by the user
  8434. */
  8435. WMI_CHATTER_MODE_MANUAL_EXIT,
  8436. /* Placeholder max value, always last*/
  8437. WMI_CHATTER_MODE_MAX
  8438. };
  8439. enum wmi_chatter_query_type {
  8440. /*query coalescing filter match counter*/
  8441. WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
  8442. WMI_CHATTER_QUERY_MAX
  8443. };
  8444. typedef struct {
  8445. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
  8446. A_UINT32 chatter_mode;
  8447. } wmi_chatter_set_mode_cmd_fixed_param;
  8448. /** maximum number of filter supported*/
  8449. #define CHATTER_MAX_COALESCING_RULES 11
  8450. /** maximum number of field tests per filter*/
  8451. #define CHATTER_MAX_FIELD_TEST 5
  8452. /** maximum field length in number of DWORDS*/
  8453. #define CHATTER_MAX_TEST_FIELD_LEN32 2
  8454. /** field test kinds*/
  8455. #define CHATTER_COALESCING_TEST_EQUAL 1
  8456. #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
  8457. #define CHATTER_COALESCING_TEST_NOT_EQUAL 3
  8458. /** packet type*/
  8459. #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
  8460. #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
  8461. #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
  8462. /** coalescing field test*/
  8463. typedef struct _chatter_pkt_coalescing_hdr_test {
  8464. /** offset from start of mac header, for windows native wifi host driver
  8465. * should assume standard 802.11 frame format without QoS info and address4
  8466. * FW would account for any non-stand fields for final offset value.
  8467. */
  8468. A_UINT32 offset;
  8469. A_UINT32 length; /* length of test field*/
  8470. A_UINT32 test; /*equal, not equal or masked equal*/
  8471. A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream*/
  8472. A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream*/
  8473. } chatter_pkt_coalescing_hdr_test;
  8474. /** packet coalescing filter*/
  8475. typedef struct _chatter_pkt_coalescing_filter {
  8476. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
  8477. A_UINT32 filter_id; /*unique id assigned by OS*/
  8478. A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold*/
  8479. A_UINT32 pkt_type; /*unicast/multicast/broadcast*/
  8480. A_UINT32 num_of_test_field; /*number of field test in table*/
  8481. chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl*/
  8482. } chatter_pkt_coalescing_filter;
  8483. /** packet coalescing filter add command*/
  8484. typedef struct {
  8485. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
  8486. A_UINT32 num_of_filters;
  8487. /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
  8488. chatter_pkt_coalescing_filter rx_filter[1];*/
  8489. } wmi_chatter_coalescing_add_filter_cmd_fixed_param;
  8490. /** packet coalescing filter delete command*/
  8491. typedef struct {
  8492. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
  8493. A_UINT32 filter_id; /*filter id which will be deleted*/
  8494. } wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
  8495. /** packet coalescing query command*/
  8496. typedef struct {
  8497. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
  8498. A_UINT32 type; /*type of query*/
  8499. } wmi_chatter_coalescing_query_cmd_fixed_param;
  8500. /** chatter query reply event*/
  8501. typedef struct {
  8502. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
  8503. A_UINT32 type; /*query type*/
  8504. A_UINT32 filter_match_cnt; /*coalescing filter match counter*/
  8505. } wmi_chatter_query_reply_event_fixed_param;
  8506. /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
  8507. * cannot be changed without breaking WMI compatibility. */
  8508. #define GTK_OFFLOAD_KEK_BYTES 16
  8509. #define GTK_OFFLOAD_KCK_BYTES 16
  8510. /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
  8511. #define GTK_REPLAY_COUNTER_BYTES 8
  8512. #define WMI_MAX_KEY_LEN 32
  8513. #define IGTK_PN_SIZE 6
  8514. typedef struct {
  8515. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
  8516. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  8517. A_UINT32 flags; /* status flags */
  8518. A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
  8519. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
  8520. A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
  8521. A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
  8522. A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
  8523. A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
  8524. } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
  8525. typedef struct {
  8526. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
  8527. A_UINT32 vdev_id; /** unique id identifying the VDEV */
  8528. A_UINT32 flags; /* control flags, GTK offload command use high byte */
  8529. /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
  8530. A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
  8531. A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
  8532. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
  8533. } WMI_GTK_OFFLOAD_CMD_fixed_param;
  8534. typedef struct {
  8535. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param */
  8536. A_UINT32 vdev_id;
  8537. A_UINT32 sa_query_retry_interval; /* in msec */
  8538. A_UINT32 sa_query_max_retry_count;
  8539. } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
  8540. typedef enum {
  8541. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
  8542. WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
  8543. WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK*/
  8544. WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, /* gratuitous ARP req*/
  8545. } WMI_STA_KEEPALIVE_METHOD;
  8546. typedef struct {
  8547. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
  8548. WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
  8549. WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
  8550. wmi_mac_addr dest_mac_addr; /* destination MAC address */
  8551. } WMI_STA_KEEPALVE_ARP_RESPONSE;
  8552. typedef struct {
  8553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
  8554. A_UINT32 vdev_id;
  8555. A_UINT32 enable; /* 1 - Enable, 0 - disable */
  8556. A_UINT32 method; /* keep alive method */
  8557. A_UINT32 interval; /* time interval in seconds */
  8558. /*
  8559. * NOTE: following this structure is the TLV for ARP Resonse:
  8560. * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; <-- ARP response
  8561. */
  8562. } WMI_STA_KEEPALIVE_CMD_fixed_param;
  8563. typedef struct {
  8564. A_UINT32 tlv_header;
  8565. A_UINT32 vdev_id;
  8566. A_UINT32 action;
  8567. } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
  8568. typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
  8569. typedef struct {
  8570. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
  8571. A_UINT32 vdev_id;
  8572. A_UINT32 keepaliveInterval; /* seconds */
  8573. A_UINT32 keepaliveMethod;
  8574. } wmi_vdev_set_keepalive_cmd_fixed_param;
  8575. typedef struct {
  8576. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
  8577. A_UINT32 vdev_id;
  8578. } wmi_vdev_get_keepalive_cmd_fixed_param;
  8579. typedef struct {
  8580. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
  8581. A_UINT32 vdev_id;
  8582. A_UINT32 keepaliveInterval; /* seconds */
  8583. A_UINT32 keepaliveMethod; /* seconds */
  8584. } wmi_vdev_get_keepalive_event_fixed_param;
  8585. typedef struct {
  8586. A_UINT32 tlv_header;
  8587. A_UINT32 vdev_id;
  8588. #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
  8589. #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
  8590. A_UINT32 action;
  8591. } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
  8592. typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
  8593. typedef struct {
  8594. A_UINT32 tlv_header;
  8595. A_UINT32 vdev_id;
  8596. A_UINT32 mcc_tbttmode;
  8597. wmi_mac_addr mcc_bssid;
  8598. } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
  8599. typedef struct {
  8600. A_UINT32 tlv_header;
  8601. A_UINT32 vdev_id; /* home vdev id */
  8602. A_UINT32 meas_token; /* from measure request frame */
  8603. A_UINT32 dialog_token;
  8604. A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
  8605. A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst*/
  8606. A_UINT32 burst_cycle; /* times cycle through within one burst */
  8607. A_UINT32 tx_power; /* for path frame */
  8608. A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
  8609. wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
  8610. A_UINT32 num_chans;
  8611. } wmi_vdev_plmreq_start_cmd_fixed_param;
  8612. typedef struct {
  8613. A_UINT32 tlv_header;
  8614. A_UINT32 vdev_id;
  8615. A_UINT32 meas_token; /* same value from req*/
  8616. } wmi_vdev_plmreq_stop_cmd_fixed_param;
  8617. typedef struct {
  8618. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
  8619. A_UINT32 tlv_header;
  8620. /* unique id identifying the VDEV, generated by the caller */
  8621. A_UINT32 vdev_id;
  8622. /* enable/disable NoA */
  8623. A_UINT32 enable;
  8624. /** number of NoA desc. In the TLV noa_descriptor[] */
  8625. A_UINT32 num_noa;
  8626. /**
  8627. * TLV (tag length value) paramerters follow the pattern structure.
  8628. * TLV contain NoA desc with num of num_noa
  8629. */
  8630. } wmi_p2p_set_noa_cmd_fixed_param;
  8631. typedef struct {
  8632. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
  8633. A_UINT32 tlv_header;
  8634. /* unique id identifying the VDEV, generated by the caller */
  8635. A_UINT32 vdev_id;
  8636. /* Identify the wlan module */
  8637. A_UINT32 module_id;
  8638. /* Num of test arguments passed */
  8639. A_UINT32 num_args;
  8640. /**
  8641. * TLV (tag length value) parameters follow the wmi_roam_chan_list
  8642. * structure. The TLV's are:
  8643. * A_UINT32 args[];
  8644. **/
  8645. } wmi_unit_test_cmd_fixed_param;
  8646. /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
  8647. * after it received WMI_ROAM_SYNCH_EVENTID.
  8648. */
  8649. typedef struct {
  8650. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
  8651. /** unique id identifying the VDEV, generated by the caller */
  8652. A_UINT32 vdev_id;
  8653. } wmi_roam_synch_complete_fixed_param;
  8654. typedef enum {
  8655. RECOVERY_SIM_ASSERT = 0x01,
  8656. RECOVERY_SIM_NO_DETECT = 0x02,
  8657. RECOVERY_SIM_CTR_EP_FULL = 0x03,
  8658. RECOVERY_SIM_EMPTY_POINT = 0x04,
  8659. RECOVERY_SIM_STACK_OV = 0x05,
  8660. RECOVERY_SIM_INFINITE_LOOP = 0x06,
  8661. RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
  8662. RECOVERY_SIM_SELF_RECOVERY = 0x08,
  8663. } RECOVERY_SIM_TYPE;
  8664. /* WMI_FORCE_FW_HANG_CMDID */
  8665. typedef struct {
  8666. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
  8667. A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
  8668. A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
  8669. } WMI_FORCE_FW_HANG_CMD_fixed_param;
  8670. typedef enum {
  8671. WMI_MCAST_FILTER_SET = 1,
  8672. WMI_MCAST_FILTER_DELETE
  8673. } WMI_SET_SINGLE_MCAST_FILTER_OP;
  8674. typedef struct {
  8675. A_UINT32 tlv_header;
  8676. A_UINT32 vdev_id;
  8677. A_UINT32 index;
  8678. A_UINT32 action;
  8679. wmi_mac_addr mcastbdcastaddr;
  8680. } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
  8681. typedef enum {
  8682. WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
  8683. WMI_MULTIPLE_MCAST_FILTER_SET, /* clear all previous mc list, and set new list */
  8684. WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
  8685. WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
  8686. } WMI_MULTIPLE_MCAST_FILTER_OP;
  8687. typedef struct {
  8688. A_UINT32 tlv_header;
  8689. A_UINT32 vdev_id;
  8690. A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
  8691. A_UINT32 num_mcastaddrs; /* number of elements in the subsequent mcast addr list */
  8692. /**
  8693. * TLV (tag length value) parameters follow the
  8694. * structure. The TLV's are:
  8695. * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
  8696. */
  8697. } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
  8698. /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
  8699. typedef enum {
  8700. WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
  8701. WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
  8702. } WMI_TIME_STAMP_SYNC_MODE;
  8703. typedef struct {
  8704. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param */
  8705. A_UINT32 mode; /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
  8706. A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
  8707. A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
  8708. } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
  8709. /* GPIO Command and Event data structures */
  8710. /* WMI_GPIO_CONFIG_CMDID */
  8711. enum {
  8712. WMI_GPIO_PULL_NONE,
  8713. WMI_GPIO_PULL_UP,
  8714. WMI_GPIO_PULL_DOWN,
  8715. };
  8716. enum {
  8717. WMI_GPIO_INTTYPE_DISABLE,
  8718. WMI_GPIO_INTTYPE_RISING_EDGE,
  8719. WMI_GPIO_INTTYPE_FALLING_EDGE,
  8720. WMI_GPIO_INTTYPE_BOTH_EDGE,
  8721. WMI_GPIO_INTTYPE_LEVEL_LOW,
  8722. WMI_GPIO_INTTYPE_LEVEL_HIGH
  8723. };
  8724. typedef struct {
  8725. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
  8726. A_UINT32 gpio_num; /* GPIO number to be setup */
  8727. A_UINT32 input; /* 0 - Output/ 1 - Input */
  8728. A_UINT32 pull_type; /* Pull type defined above */
  8729. A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
  8730. } wmi_gpio_config_cmd_fixed_param;
  8731. /* WMI_GPIO_OUTPUT_CMDID */
  8732. typedef struct {
  8733. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
  8734. A_UINT32 gpio_num; /* GPIO number to be setup */
  8735. A_UINT32 set; /* Set the GPIO pin*/
  8736. } wmi_gpio_output_cmd_fixed_param;
  8737. /* WMI_GPIO_INPUT_EVENTID */
  8738. typedef struct {
  8739. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
  8740. A_UINT32 gpio_num; /* GPIO number which changed state */
  8741. } wmi_gpio_input_event_fixed_param;
  8742. /* WMI_P2P_DISC_EVENTID */
  8743. enum {
  8744. P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
  8745. P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
  8746. };
  8747. enum {
  8748. P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload*/
  8749. P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload*/
  8750. P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload*/
  8751. };
  8752. enum {
  8753. P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
  8754. P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
  8755. };
  8756. typedef struct {
  8757. A_UINT32 vdev_id;
  8758. A_UINT32 reason; /* P2P DISC wake up reason*/
  8759. } wmi_p2p_disc_event;
  8760. typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param WOW_EVENT_INFO_SECTION_GTKIGTK;
  8761. typedef enum {
  8762. WMI_FAKE_TXBFER_SEND_NDPA,
  8763. WMI_FAKE_TXBFER_SEND_MU,
  8764. WMI_FAKE_TXBFER_NDPA_FBTYPE,
  8765. WMI_FAKE_TXBFER_NDPA_NCIDX,
  8766. WMI_FAKE_TXBFER_NDPA_POLL,
  8767. WMI_FAKE_TXBFER_NDPA_BW,
  8768. WMI_FAKE_TXBFER_NDPA_PREAMBLE,
  8769. WMI_FAKE_TXBFER_NDPA_RATE,
  8770. WMI_FAKE_TXBFER_NDP_BW,
  8771. WMI_FAKE_TXBFER_NDP_NSS,
  8772. WMI_TXBFEE_ENABLE_UPLOAD_H,
  8773. WMI_TXBFEE_ENABLE_CAPTURE_H,
  8774. WMI_TXBFEE_SET_CBF_TBL,
  8775. WMI_TXBFEE_CBF_TBL_LSIG,
  8776. WMI_TXBFEE_CBF_TBL_SIGA1,
  8777. WMI_TXBFEE_CBF_TBL_SIGA2,
  8778. WMI_TXBFEE_CBF_TBL_SIGB,
  8779. WMI_TXBFEE_CBF_TBL_PAD,
  8780. WMI_TXBFEE_CBF_TBL_DUR,
  8781. WMI_TXBFEE_SU_NCIDX,
  8782. WMI_TXBFEE_CBIDX,
  8783. WMI_TXBFEE_NGIDX,
  8784. } WMI_TXBF_PARAM_ID;
  8785. typedef struct {
  8786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
  8787. /** parameter id */
  8788. A_UINT32 param_id;
  8789. /** parameter value */
  8790. A_UINT32 param_value;
  8791. } wmi_txbf_cmd_fixed_param;
  8792. typedef struct {
  8793. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
  8794. A_UINT32 h_length;
  8795. A_UINT32 cv_length;
  8796. /* This TLV is followed by array of bytes:
  8797. * A_UINT8 bufp[]; <-- h_cv info buffer
  8798. */
  8799. } wmi_upload_h_hdr;
  8800. typedef struct {
  8801. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
  8802. A_UINT32 svd_num;
  8803. A_UINT32 tone_num;
  8804. A_UINT32 reserved;
  8805. } wmi_capture_h_event_hdr;
  8806. typedef struct {
  8807. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
  8808. A_UINT32 start_freq; /* start frequency, not channel center freq */
  8809. A_UINT32 end_freq; /* end frequency */
  8810. } wmi_avoid_freq_range_desc;
  8811. typedef struct {
  8812. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
  8813. /* bad channel range count, multi range is allowed, 0 means all channel clear */
  8814. A_UINT32 num_freq_ranges;
  8815. /* The TLVs will follow.
  8816. * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
  8817. * wmi_avoid_freq_range_desc avd_freq_range[]; <-- message buffer, NULL terminated
  8818. */
  8819. } wmi_avoid_freq_ranges_event_fixed_param;
  8820. typedef struct {
  8821. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
  8822. /** Reserved for future use */
  8823. A_UINT32 reserved0;
  8824. A_UINT32 vdev_id;
  8825. } wmi_gtk_rekey_fail_event_fixed_param;
  8826. enum wmm_ac_downgrade_policy {
  8827. WMM_AC_DOWNGRADE_DEPRIO,
  8828. WMM_AC_DOWNGRADE_DROP,
  8829. WMM_AC_DOWNGRADE_INVALID,
  8830. };
  8831. /* WMM EDCA Params type */
  8832. #define WMM_PARAM_TYPE_LEGACY 0
  8833. /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
  8834. #define WMM_PARAM_TYPE_11AX_EDCA 1
  8835. typedef struct {
  8836. A_UINT32 tlv_header;
  8837. A_UINT32 cwmin;
  8838. A_UINT32 cwmax;
  8839. A_UINT32 aifs;
  8840. A_UINT32 txoplimit;
  8841. A_UINT32 acm;
  8842. A_UINT32 no_ack;
  8843. } wmi_wmm_vparams;
  8844. typedef struct {
  8845. A_UINT32 tlv_header;
  8846. A_UINT32 vdev_id;
  8847. wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
  8848. A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
  8849. } wmi_vdev_set_wmm_params_cmd_fixed_param;
  8850. typedef struct {
  8851. A_UINT32 tlv_header;
  8852. A_UINT32 vdev_id;
  8853. A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
  8854. A_UINT32 userGtxMask; /* host request for GTX mask */
  8855. A_UINT32 gtxPERThreshold; /* default: 10% */
  8856. A_UINT32 gtxPERMargin; /* default: 2% */
  8857. A_UINT32 gtxTPCstep; /* default: 1 */
  8858. A_UINT32 gtxTPCMin; /* default: 5 */
  8859. A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
  8860. } wmi_vdev_set_gtx_params_cmd_fixed_param;
  8861. typedef struct
  8862. {
  8863. A_UINT32 tlv_header;
  8864. A_UINT32 vdev_id;
  8865. A_UINT32 ac;
  8866. A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
  8867. A_UINT32 downgrade_type;
  8868. } wmi_vdev_wmm_addts_cmd_fixed_param;
  8869. typedef struct
  8870. {
  8871. A_UINT32 tlv_header;
  8872. A_UINT32 vdev_id;
  8873. A_UINT32 ac;
  8874. } wmi_vdev_wmm_delts_cmd_fixed_param;
  8875. /* DEPRECATED */
  8876. typedef struct {
  8877. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
  8878. /** Reserved for future use */
  8879. A_UINT32 reserved0;
  8880. } wmi_pdev_dfs_enable_cmd_fixed_param;
  8881. /* DEPRECATED */
  8882. typedef struct {
  8883. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
  8884. /** pdev_id for identifying the MAC
  8885. * See macros starting with WMI_PDEV_ID_ for values.
  8886. */
  8887. A_UINT32 pdev_id;
  8888. } wmi_pdev_dfs_disable_cmd_fixed_param;
  8889. typedef struct {
  8890. /** TLV tag and len; tag equals
  8891. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
  8892. */
  8893. A_UINT32 tlv_header;
  8894. /** pdev_id for identifying the MAC
  8895. * See macros starting with WMI_PDEV_ID_ for values.
  8896. */
  8897. A_UINT32 pdev_id;
  8898. } wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
  8899. typedef struct {
  8900. /** TLV tag and len; tag equals
  8901. * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
  8902. */
  8903. A_UINT32 tlv_header;
  8904. /** pdev_id for identifying the MAC
  8905. * See macros starting with WMI_PDEV_ID_ for values.
  8906. */
  8907. A_UINT32 pdev_id;
  8908. } wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
  8909. /** TDLS COMMANDS */
  8910. /* WMI_TDLS_SET_STATE_CMDID */
  8911. /* TDLS State */
  8912. enum wmi_tdls_state {
  8913. /** TDLS disable */
  8914. WMI_TDLS_DISABLE,
  8915. /** TDLS enabled - no firmware connection tracking/notifications */
  8916. WMI_TDLS_ENABLE_PASSIVE,
  8917. /** TDLS enabled - with firmware connection tracking/notifications */
  8918. WMI_TDLS_ENABLE_ACTIVE,
  8919. /** TDLS enabled - firmware waits for peer mac for connection tracking */
  8920. WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
  8921. /** TDLS enabled - TDLS connection tracking is done in host */
  8922. WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
  8923. };
  8924. /* TDLS Options */
  8925. #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
  8926. #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
  8927. #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
  8928. typedef struct {
  8929. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
  8930. A_UINT32 tlv_header;
  8931. /** unique id identifying the VDEV */
  8932. A_UINT32 vdev_id;
  8933. /** Enable/Disable TDLS (wmi_tdls_state) */
  8934. A_UINT32 state;
  8935. /** Duration (in ms) over which to calculate tx/rx threshold to trigger TDLS Discovery */
  8936. A_UINT32 notification_interval_ms;
  8937. /** number of packets OVER which notify/suggest TDLS Discovery:
  8938. * if current tx pps counter / notification interval >= threshold
  8939. * then a notification will be sent to host to advise TDLS Discovery */
  8940. A_UINT32 tx_discovery_threshold;
  8941. /** number of packets UNDER which notify/suggest TDLS Teardown:
  8942. * if current tx pps counter / notification interval < threshold
  8943. * then a notification will be sent to host to advise TDLS Tear down */
  8944. A_UINT32 tx_teardown_threshold;
  8945. /** Absolute RSSI value under which notify/suggest TDLS Teardown */
  8946. A_INT32 rssi_teardown_threshold;
  8947. /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
  8948. A_INT32 rssi_delta;
  8949. /** TDLS Option Control
  8950. * Off-Channel, Buffer STA, (later)Sleep STA support */
  8951. A_UINT32 tdls_options;
  8952. /* Buffering time in number of beacon intervals */
  8953. A_UINT32 tdls_peer_traffic_ind_window;
  8954. /* Wait time for PTR frame */
  8955. A_UINT32 tdls_peer_traffic_response_timeout_ms;
  8956. /* Self PUAPSD mask */
  8957. A_UINT32 tdls_puapsd_mask;
  8958. /* Inactivity timeout */
  8959. A_UINT32 tdls_puapsd_inactivity_time_ms;
  8960. /* Max of rx frame during SP */
  8961. A_UINT32 tdls_puapsd_rx_frame_threshold;
  8962. /**Duration (in ms) over which to check whether TDLS link needs to be torn down */
  8963. A_UINT32 teardown_notification_ms;
  8964. /**STA kickout threshold for TDLS peer */
  8965. A_UINT32 tdls_peer_kickout_threshold;
  8966. } wmi_tdls_set_state_cmd_fixed_param;
  8967. /* WMI_TDLS_PEER_UPDATE_CMDID */
  8968. enum wmi_tdls_peer_state {
  8969. /** tx peer TDLS link setup now starting, traffic to DA should be
  8970. * paused (except TDLS frames) until state is moved to CONNECTED (or
  8971. * TEARDOWN on setup failure) */
  8972. WMI_TDLS_PEER_STATE_PEERING,
  8973. /** tx peer TDLS link established, running (all traffic to DA unpaused) */
  8974. WMI_TDLS_PEER_STATE_CONNECTED,
  8975. /** tx peer TDLS link tear down started (link paused, any frames
  8976. * queued for DA will be requeued back through the AP)*/
  8977. WMI_TDLS_PEER_STATE_TEARDOWN,
  8978. /** Add peer mac into connection table */
  8979. WMI_TDLS_PEER_ADD_MAC_ADDR,
  8980. /** Remove peer mac from connection table */
  8981. WMI_TDLS_PEER_REMOVE_MAC_ADDR,
  8982. };
  8983. /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
  8984. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  8985. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  8986. typedef struct {
  8987. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
  8988. A_UINT32 tlv_header;
  8989. /* Peer's QoS Info - for U-APSD */
  8990. /* AC FLAGS - accessed through macros below */
  8991. /* Ack, SP, More Data Ack - accessed through macros below */
  8992. A_UINT32 peer_qos;
  8993. /*TDLS Peer's U-APSD Buffer STA Support*/
  8994. A_UINT32 buff_sta_support;
  8995. /*TDLS off channel related params */
  8996. A_UINT32 off_chan_support;
  8997. A_UINT32 peer_curr_operclass;
  8998. A_UINT32 self_curr_operclass;
  8999. /* Number of channels available for off channel operation */
  9000. A_UINT32 peer_chan_len;
  9001. A_UINT32 peer_operclass_len;
  9002. A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  9003. /* Is peer initiator or responder of TDLS setup request */
  9004. A_UINT32 is_peer_responder;
  9005. /* Preferred off channel number as configured by user */
  9006. A_UINT32 pref_offchan_num;
  9007. /* Preferred off channel bandwidth as configured by user */
  9008. A_UINT32 pref_offchan_bw;
  9009. /** Followed by the variable length TLV peer_chan_list:
  9010. * wmi_channel peer_chan_list[].
  9011. * Array size would be peer_chan_len.
  9012. * This array is intersected channels which is supported by both peer
  9013. * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
  9014. * FW shall compute BW for an offchan based on peer's ht/vht cap
  9015. * received in peer_assoc cmd during change STA operation
  9016. */
  9017. } wmi_tdls_peer_capabilities;
  9018. #define WMI_TDLS_QOS_VO_FLAG 0
  9019. #define WMI_TDLS_QOS_VI_FLAG 1
  9020. #define WMI_TDLS_QOS_BK_FLAG 2
  9021. #define WMI_TDLS_QOS_BE_FLAG 3
  9022. #define WMI_TDLS_QOS_ACK_FLAG 4
  9023. #define WMI_TDLS_QOS_SP_FLAG 5
  9024. #define WMI_TDLS_QOS_MOREDATA_FLAG 7
  9025. #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \
  9026. (ppeer_caps)->peer_qos |= (1 << flag); \
  9027. } while (0)
  9028. #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \
  9029. (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
  9030. #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  9031. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  9032. #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
  9033. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
  9034. #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  9035. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  9036. #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
  9037. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
  9038. #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  9039. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  9040. #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
  9041. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
  9042. #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  9043. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  9044. #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
  9045. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
  9046. #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  9047. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  9048. #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
  9049. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
  9050. /* SP has 2 bits */
  9051. #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \
  9052. (ppeer_caps)->peer_qos |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  9053. } while (0)
  9054. #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
  9055. (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  9056. #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  9057. WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  9058. #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
  9059. WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
  9060. #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \
  9061. (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
  9062. } while (0)
  9063. #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \
  9064. (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
  9065. #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  9066. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  9067. #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
  9068. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
  9069. #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  9070. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  9071. #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
  9072. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
  9073. #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
  9074. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  9075. #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
  9076. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
  9077. #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  9078. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  9079. #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
  9080. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
  9081. #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  9082. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  9083. #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
  9084. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
  9085. /* SP has 2 bits */
  9086. #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \
  9087. (pset_cmd)->tdls_puapsd_mask |= (((val) & 0x3) << WMI_TDLS_QOS_SP_FLAG); \
  9088. } while (0)
  9089. #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
  9090. (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
  9091. #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  9092. WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  9093. #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
  9094. WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
  9095. typedef struct {
  9096. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
  9097. A_UINT32 tlv_header;
  9098. /** unique id identifying the VDEV */
  9099. A_UINT32 vdev_id;
  9100. /** peer MAC address */
  9101. wmi_mac_addr peer_macaddr;
  9102. /** new TDLS state for peer (wmi_tdls_peer_state) */
  9103. A_UINT32 peer_state;
  9104. /* The TLV for wmi_tdls_peer_capabilities will follow.
  9105. * wmi_tdls_peer_capabilities peer_caps;
  9106. */
  9107. /** Followed by the variable length TLV chan_info:
  9108. * wmi_channel chan_info[] */
  9109. } wmi_tdls_peer_update_cmd_fixed_param;
  9110. /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
  9111. /* bitmap 20, 40, 80 or 160 MHz wide channel */
  9112. #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
  9113. #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
  9114. #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
  9115. #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
  9116. enum wmi_tdls_offchan_mode {
  9117. WMI_TDLS_ENABLE_OFFCHANNEL,
  9118. WMI_TDLS_DISABLE_OFFCHANNEL
  9119. };
  9120. typedef struct {
  9121. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
  9122. A_UINT32 tlv_header;
  9123. /** unique id identifying the VDEV */
  9124. A_UINT32 vdev_id;
  9125. /** Enable/Disable TDLS offchannel */
  9126. A_UINT32 offchan_mode;
  9127. /** peer MAC address */
  9128. wmi_mac_addr peer_macaddr;
  9129. /* Is peer initiator or responder of TDLS setup request */
  9130. A_UINT32 is_peer_responder;
  9131. /* off channel number*/
  9132. A_UINT32 offchan_num;
  9133. /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
  9134. A_UINT32 offchan_bw_bitmap;
  9135. /* operating class for offchan */
  9136. A_UINT32 offchan_oper_class;
  9137. } wmi_tdls_set_offchan_mode_cmd_fixed_param;
  9138. /** TDLS EVENTS */
  9139. enum wmi_tdls_peer_notification {
  9140. /** tdls discovery recommended for peer (based
  9141. * on tx bytes per second > tx_discover threshold) */
  9142. WMI_TDLS_SHOULD_DISCOVER,
  9143. /** tdls link tear down recommended for peer
  9144. * due to tx bytes per second below tx_teardown_threshold
  9145. * NB: this notification sent once */
  9146. WMI_TDLS_SHOULD_TEARDOWN,
  9147. /** tx peer TDLS link tear down complete */
  9148. WMI_TDLS_PEER_DISCONNECTED,
  9149. /** TDLS/BT role change notification for connection tracker */
  9150. WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
  9151. };
  9152. enum wmi_tdls_peer_reason {
  9153. /** tdls teardown recommended due to low transmits */
  9154. WMI_TDLS_TEARDOWN_REASON_TX,
  9155. /** tdls link tear down recommended due to poor RSSI */
  9156. WMI_TDLS_TEARDOWN_REASON_RSSI,
  9157. /** tdls link tear down recommended due to offchannel scan */
  9158. WMI_TDLS_TEARDOWN_REASON_SCAN,
  9159. /** tdls peer disconnected due to peer deletion */
  9160. WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
  9161. /** tdls peer disconnected due to PTR timeout */
  9162. WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
  9163. /** tdls peer disconnected due wrong PTR format */
  9164. WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
  9165. /** tdls peer not responding */
  9166. WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
  9167. /** tdls entered buffer STA role, TDLS connection tracker needs to handle this */
  9168. WMI_TDLS_ENTER_BUF_STA,
  9169. /** tdls exited buffer STA role, TDLS connection tracker needs to handle this */
  9170. WMI_TDLS_EXIT_BUF_STA,
  9171. /** BT entered busy mode, TDLS connection tracker needs to handle this */
  9172. WMI_TDLS_ENTER_BT_BUSY_MODE,
  9173. /** BT exited busy mode, TDLS connection tracker needs to handle this */
  9174. WMI_TDLS_EXIT_BT_BUSY_MODE,
  9175. /** TDLS module received a scan start event, TDLS connection tracker needs to handle this */
  9176. WMI_TDLS_SCAN_STARTED_EVENT,
  9177. /** TDLS module received a scan complete event, TDLS connection tracker needs to handle this */
  9178. WMI_TDLS_SCAN_COMPLETED_EVENT,
  9179. };
  9180. /* WMI_TDLS_PEER_EVENTID */
  9181. typedef struct {
  9182. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
  9183. A_UINT32 tlv_header;
  9184. /** peer MAC address */
  9185. wmi_mac_addr peer_macaddr;
  9186. /** TDLS peer status (wmi_tdls_peer_notification)*/
  9187. A_UINT32 peer_status;
  9188. /** TDLS peer reason (wmi_tdls_peer_reason) */
  9189. A_UINT32 peer_reason;
  9190. /** unique id identifying the VDEV */
  9191. A_UINT32 vdev_id;
  9192. } wmi_tdls_peer_event_fixed_param;
  9193. /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
  9194. don't use this for any new implementations */
  9195. typedef struct {
  9196. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
  9197. /** unique id identifying the VDEV, generated by the caller */
  9198. A_UINT32 vdev_id;
  9199. /* New beacon interval to be used for the specified VDEV suggested by firmware */
  9200. A_UINT32 new_bcn_intvl;
  9201. } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
  9202. /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
  9203. typedef struct {
  9204. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
  9205. A_UINT32 tlv_header;
  9206. /** 1: enable fw based adaptive ocs,
  9207. * 0: disable fw based adaptive ocs
  9208. */
  9209. A_UINT32 enable;
  9210. /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
  9211. union {
  9212. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  9213. /** pdev_id for identifying the MAC
  9214. * See macros starting with WMI_PDEV_ID_ for values.
  9215. */
  9216. A_UINT32 pdev_id;
  9217. };
  9218. } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
  9219. /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
  9220. typedef struct {
  9221. /* Frequency of the channel for which the quota is set */
  9222. A_UINT32 chan_mhz;
  9223. /* Requested channel time quota expressed as percentage */
  9224. A_UINT32 channel_time_quota;
  9225. } wmi_resmgr_chan_time_quota;
  9226. typedef struct {
  9227. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
  9228. A_UINT32 tlv_header;
  9229. /** number of channel time quota command structures
  9230. * (wmi_resmgr_chan_time_quota) 1 or 2
  9231. */
  9232. A_UINT32 num_chans;
  9233. /* This TLV is followed by another TLV of array of bytes
  9234. * A_UINT8 data[];
  9235. * This data array contains
  9236. * num_chans * size of(struct wmi_resmgr_chan_time_quota)
  9237. */
  9238. } wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
  9239. /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
  9240. typedef struct {
  9241. /* Frequency of the channel for which the latency is set */
  9242. A_UINT32 chan_mhz;
  9243. /* Requested channel latency in milliseconds */
  9244. A_UINT32 latency;
  9245. } wmi_resmgr_chan_latency;
  9246. typedef struct {
  9247. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
  9248. A_UINT32 tlv_header;
  9249. /** number of channel latency command structures
  9250. * (wmi_resmgr_chan_latency) 1 or 2
  9251. */
  9252. A_UINT32 num_chans;
  9253. /* This TLV is followed by another TLV of array of bytes
  9254. * A_UINT8 data[];
  9255. * This data array contains
  9256. * num_chans * size of(struct wmi_resmgr_chan_latency)
  9257. */
  9258. } wmi_resmgr_set_chan_latency_cmd_fixed_param;
  9259. /* WMI_STA_SMPS_FORCE_MODE_CMDID */
  9260. /** STA SMPS Forced Mode */
  9261. typedef enum {
  9262. WMI_SMPS_FORCED_MODE_NONE = 0,
  9263. WMI_SMPS_FORCED_MODE_DISABLED,
  9264. WMI_SMPS_FORCED_MODE_STATIC,
  9265. WMI_SMPS_FORCED_MODE_DYNAMIC
  9266. } wmi_sta_smps_forced_mode;
  9267. typedef struct {
  9268. /** TLV tag and len; tag equals
  9269. * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
  9270. A_UINT32 tlv_header;
  9271. /** Unique id identifying the VDEV */
  9272. A_UINT32 vdev_id;
  9273. /** The mode of SMPS that is to be forced in the FW. */
  9274. A_UINT32 forced_mode;
  9275. } wmi_sta_smps_force_mode_cmd_fixed_param;
  9276. /** wlan HB commands */
  9277. #define WMI_WLAN_HB_ITEM_UDP 0x1
  9278. #define WMI_WLAN_HB_ITEM_TCP 0x2
  9279. #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE,
  9280. must be a multiple of 4 bytes */
  9281. typedef struct {
  9282. /** TLV tag and len; tag equals
  9283. * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
  9284. A_UINT32 tlv_header;
  9285. A_UINT32 vdev_id;
  9286. A_UINT32 enable;
  9287. A_UINT32 item;
  9288. A_UINT32 session;
  9289. } wmi_hb_set_enable_cmd_fixed_param;
  9290. typedef struct {
  9291. /** TLV tag and len; tag equals
  9292. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
  9293. A_UINT32 tlv_header;
  9294. A_UINT32 vdev_id;
  9295. A_UINT32 srv_ip;
  9296. A_UINT32 dev_ip;
  9297. A_UINT32 seq;
  9298. A_UINT32 src_port;
  9299. A_UINT32 dst_port;
  9300. A_UINT32 interval;
  9301. A_UINT32 timeout;
  9302. A_UINT32 session;
  9303. wmi_mac_addr gateway_mac;
  9304. } wmi_hb_set_tcp_params_cmd_fixed_param;
  9305. typedef struct {
  9306. /** TLV tag and len; tag equals
  9307. * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
  9308. A_UINT32 tlv_header;
  9309. A_UINT32 vdev_id;
  9310. A_UINT32 length;
  9311. A_UINT32 offset;
  9312. A_UINT32 session;
  9313. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  9314. } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
  9315. typedef struct {
  9316. /** TLV tag and len; tag equals
  9317. * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
  9318. A_UINT32 tlv_header;
  9319. A_UINT32 vdev_id;
  9320. A_UINT32 srv_ip;
  9321. A_UINT32 dev_ip;
  9322. A_UINT32 src_port;
  9323. A_UINT32 dst_port;
  9324. A_UINT32 interval;
  9325. A_UINT32 timeout;
  9326. A_UINT32 session;
  9327. wmi_mac_addr gateway_mac;
  9328. } wmi_hb_set_udp_params_cmd_fixed_param;
  9329. typedef struct {
  9330. /** TLV tag and len; tag equals
  9331. * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
  9332. A_UINT32 tlv_header;
  9333. A_UINT32 vdev_id;
  9334. A_UINT32 length;
  9335. A_UINT32 offset;
  9336. A_UINT32 session;
  9337. A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
  9338. } wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
  9339. /** wlan HB events */
  9340. typedef enum {
  9341. WMI_WLAN_HB_REASON_UNKNOWN = 0,
  9342. WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
  9343. WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
  9344. } WMI_HB_WAKEUP_REASON;
  9345. typedef struct {
  9346. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
  9347. A_UINT32 vdev_id; /* unique id identifying the VDEV */
  9348. A_UINT32 session; /* Session ID from driver */
  9349. A_UINT32 reason; /* wakeup reason */
  9350. } wmi_hb_ind_event_fixed_param;
  9351. /** WMI_STA_SMPS_PARAM_CMDID */
  9352. typedef enum {
  9353. /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
  9354. WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
  9355. /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
  9356. * to enter D-SMPS mode from Stalled-D-SMPS mode */
  9357. WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
  9358. /** RSSI threshold to disable SMPS modes */
  9359. WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
  9360. /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
  9361. WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
  9362. /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
  9363. WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
  9364. /** Enable/Disable DTIM 1chRx feature */
  9365. WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
  9366. } wmi_sta_smps_param;
  9367. typedef struct {
  9368. /** TLV tag and len; tag equals
  9369. * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
  9370. A_UINT32 tlv_header;
  9371. /** Unique id identifying the VDEV */
  9372. A_UINT32 vdev_id;
  9373. /** SMPS parameter (see wmi_sta_smps_param) */
  9374. A_UINT32 param;
  9375. /** Value of SMPS parameter */
  9376. A_UINT32 value;
  9377. } wmi_sta_smps_param_cmd_fixed_param;
  9378. typedef struct {
  9379. /** TLV tag and len; tag equals
  9380. * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
  9381. A_UINT32 tlv_header;
  9382. /* TX stats */
  9383. A_UINT32 txBytesPushed;
  9384. A_UINT32 txPacketsPushed;
  9385. /* RX stats */
  9386. A_UINT32 rxBytesRcvd;
  9387. A_UINT32 rxPacketsRcvd;
  9388. A_UINT32 rxTimeTotal;
  9389. /** peer MAC address */
  9390. wmi_mac_addr peer_macaddr;
  9391. } wmi_mcc_sched_sta_traffic_stats;
  9392. typedef struct {
  9393. /** TLV tag and len; tag equals
  9394. * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
  9395. A_UINT32 tlv_header;
  9396. /** Duration over which the host stats were collected */
  9397. A_UINT32 duration;
  9398. /** Number of stations filled in following stats array */
  9399. A_UINT32 num_sta;
  9400. /* Following this struct are the TLVs:
  9401. * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
  9402. */
  9403. } wmi_mcc_sched_traffic_stats_cmd_fixed_param;
  9404. typedef struct
  9405. {
  9406. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
  9407. /* unique id identifying the VDEV, generated by the caller */
  9408. A_UINT32 vdev_id;
  9409. /*Batch scan enable command parameters*/
  9410. A_UINT32 scanInterval;
  9411. A_UINT32 numScan2Batch;
  9412. A_UINT32 bestNetworks;
  9413. A_UINT32 rfBand;
  9414. A_UINT32 rtt;
  9415. } wmi_batch_scan_enable_cmd_fixed_param;
  9416. typedef struct
  9417. {
  9418. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
  9419. A_UINT32 supportedMscan;
  9420. } wmi_batch_scan_enabled_event_fixed_param;
  9421. typedef struct
  9422. {
  9423. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
  9424. /* unique id identifying the VDEV, generated by the caller */
  9425. A_UINT32 vdev_id;
  9426. A_UINT32 param;
  9427. } wmi_batch_scan_disable_cmd_fixed_param;
  9428. typedef struct
  9429. {
  9430. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
  9431. /** unique id identifying the VDEV, generated by the caller */
  9432. A_UINT32 vdev_id;
  9433. A_UINT32 param;
  9434. } wmi_batch_scan_trigger_result_cmd_fixed_param;
  9435. typedef struct
  9436. {
  9437. A_UINT32 tlv_header;
  9438. wmi_mac_addr bssid; /* BSSID */
  9439. wmi_ssid ssid; /* SSID */
  9440. A_UINT32 ch; /* Channel */
  9441. A_UINT32 rssi; /* RSSI or Level */
  9442. /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
  9443. A_UINT32 timestamp;
  9444. } wmi_batch_scan_result_network_info;
  9445. typedef struct
  9446. {
  9447. A_UINT32 tlv_header;
  9448. A_UINT32 scanId; /* Scan List ID. */
  9449. /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
  9450. A_UINT32 numNetworksInScanList;
  9451. A_UINT32 netWorkStartIndex; /* indicate the start index of network info*/
  9452. } wmi_batch_scan_result_scan_list;
  9453. #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. */
  9454. #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /* send true or false based on scan response frame being a Probe Rsp or not */
  9455. #define LPI_IE_BITMAP_SSID 0x00000004 /* send ssid from received scan response frame */
  9456. #define LPI_IE_BITMAP_RSSI 0x00000008 /* send RSSI value reported by HW for the received scan response after adjusting with noise floor */
  9457. #define LPI_IE_BITMAP_CHAN 0x00000010 /* send channel number from the received scan response */
  9458. #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* send Tx power from TPC IE of scan rsp */
  9459. #define LPI_IE_BITMAP_TX_RATE 0x00000040 /* send rate of the received frame as reported by HW. */
  9460. #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. */
  9461. #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /* send timestamp reported in the received scan rsp frame. */
  9462. #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. */
  9463. /*
  9464. * TEMPORARY alias of incorrect old name the correct name.
  9465. * This alias will be removed once all references to the old name have been fixed.
  9466. */
  9467. #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
  9468. #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false. */
  9469. #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP */
  9470. #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled */
  9471. #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device. */
  9472. #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel */
  9473. #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received. */
  9474. #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz */
  9475. #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above */
  9476. #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations */
  9477. #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan */
  9478. #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. */
  9479. #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 */
  9480. #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 */
  9481. #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. */
  9482. #define LPI_IE_BITMAP_ALL 0xFFFFFFFF
  9483. typedef struct {
  9484. A_UINT32 tlv_header;
  9485. /**A_BOOL indicates LPI mgmt snooping enable/disable*/
  9486. A_UINT32 enable;
  9487. /**LPI snooping mode*/
  9488. A_UINT32 snooping_mode;
  9489. /** LPI interested IEs in snooping context */
  9490. A_UINT32 ie_bitmap;
  9491. } wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
  9492. typedef struct {
  9493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
  9494. /** Scan ID */
  9495. A_UINT32 scan_id;
  9496. /** Scan requestor ID */
  9497. A_UINT32 scan_req_id;
  9498. /** VDEV id(interface) that is requesting scan */
  9499. A_UINT32 vdev_id;
  9500. /** LPI interested IEs in scan context */
  9501. A_UINT32 ie_bitmap;
  9502. /** Scan Priority, input to scan scheduler */
  9503. A_UINT32 scan_priority;
  9504. /** dwell time in msec on active channels */
  9505. A_UINT32 dwell_time_active;
  9506. /** dwell time in msec on passive channels */
  9507. A_UINT32 dwell_time_passive;
  9508. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  9509. A_UINT32 min_rest_time;
  9510. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  9511. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  9512. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  9513. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  9514. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  9515. * irrespective of activity. activity is determined by the idle_time parameter.
  9516. */
  9517. A_UINT32 max_rest_time;
  9518. /** time before sending next set of probe requests.
  9519. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  9520. * The number of probe requests specified depends on the ssid_list and bssid_list
  9521. */
  9522. A_UINT32 repeat_probe_time;
  9523. /** time in msec between 2 consequetive probe requests with in a set. */
  9524. A_UINT32 probe_spacing_time;
  9525. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  9526. A_UINT32 idle_time;
  9527. /** maximum time in msec allowed for scan */
  9528. A_UINT32 max_scan_time;
  9529. /** delay in msec before sending first probe request after switching to a channel */
  9530. A_UINT32 probe_delay;
  9531. /** Scan control flags */
  9532. A_UINT32 scan_ctrl_flags;
  9533. /** Burst duration time in msec*/
  9534. A_UINT32 burst_duration;
  9535. /** # if channels to scan. In the TLV channel_list[] */
  9536. A_UINT32 num_chan;
  9537. /** number of bssids. In the TLV bssid_list[] */
  9538. A_UINT32 num_bssid;
  9539. /** number of ssid. In the TLV ssid_list[] */
  9540. A_UINT32 num_ssids;
  9541. /** number of bytes in ie data. In the TLV ie_data[] */
  9542. A_UINT32 ie_len;
  9543. /**
  9544. * TLV (tag length value) parameters follow the scan_cmd
  9545. * structure. The TLV's are:
  9546. * A_UINT32 channel_list[];
  9547. * wmi_ssid ssid_list[];
  9548. * wmi_mac_addr bssid_list[];
  9549. * A_UINT8 ie_data[];
  9550. */
  9551. } wmi_lpi_start_scan_cmd_fixed_param;
  9552. typedef struct {
  9553. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
  9554. /** Scan requestor ID */
  9555. A_UINT32 scan_req_id;
  9556. /** Scan ID */
  9557. A_UINT32 scan_id;
  9558. /**
  9559. * Req Type
  9560. * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
  9561. * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
  9562. * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
  9563. * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
  9564. */
  9565. A_UINT32 req_type;
  9566. /**
  9567. * vDev ID
  9568. * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
  9569. */
  9570. A_UINT32 vdev_id;
  9571. } wmi_lpi_stop_scan_cmd_fixed_param;
  9572. typedef enum {
  9573. WMI_LPI_DEVICE_TYPE_AP = 1,
  9574. WMI_LPI_DEVICE_TYPE_P2P = 2,
  9575. WMI_LPI_DEVICE_TYPE_NAN = 3,
  9576. } wmi_lpi_device_type;
  9577. typedef struct
  9578. {
  9579. A_UINT32 tlv_header;
  9580. /** Scan requestor ID */
  9581. A_UINT32 scan_req_id;
  9582. A_UINT32 ie_bitmap;
  9583. A_UINT32 data_len;
  9584. } wmi_lpi_result_event_fixed_param;
  9585. typedef enum {
  9586. /** User scan Request completed */
  9587. WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
  9588. /** User Request was never serviced */
  9589. WMI_LPI_STATUS_DROPPED_REQ = 1,
  9590. /** Illegal channel Req */
  9591. WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
  9592. /** Illegal Operation Req */
  9593. WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
  9594. /** Request Aborted */
  9595. WMI_LPI_STATUS_REQ_ABORTED = 4,
  9596. /** Request Timed Out */
  9597. WMI_LPI_STATUS_REQ_TIME_OUT = 5,
  9598. /** Medium Busy, already there
  9599. * is a scan is going on */
  9600. WMI_LPI_STATUS_MEDIUM_BUSY = 6,
  9601. /** Extscan is the scan client whose scan complete event is triggered */
  9602. WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
  9603. } wmi_lpi_staus;
  9604. typedef struct
  9605. {
  9606. A_UINT32 tlv_header;
  9607. wmi_lpi_staus status;
  9608. /** Scan requestor ID */
  9609. A_UINT32 scan_req_id;
  9610. } wmi_lpi_status_event_fixed_param;
  9611. typedef struct
  9612. {
  9613. A_UINT32 tlv_header;
  9614. wmi_mac_addr bssid;
  9615. wmi_ssid ssid;
  9616. A_UINT32 freq;
  9617. A_UINT32 rssi;
  9618. A_UINT32 vdev_id;
  9619. } wmi_lpi_handoff_event_fixed_param;
  9620. typedef struct
  9621. {
  9622. A_UINT32 tlv_header;
  9623. A_UINT32 timestamp; /*timestamp of batch scan event*/
  9624. A_UINT32 numScanLists; /*number of scan in this event*/
  9625. A_UINT32 isLastResult; /*is this event a last event of the whole batch scan*/
  9626. } wmi_batch_scan_result_event_fixed_param;
  9627. typedef struct {
  9628. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
  9629. A_UINT32 vdev_id;
  9630. /* This TLV is followed by p2p_noa_info for vdev :
  9631. * wmi_p2p_noa_info p2p_noa_info;
  9632. */
  9633. } wmi_p2p_noa_event_fixed_param;
  9634. #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
  9635. #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
  9636. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
  9637. #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
  9638. #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
  9639. #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
  9640. typedef struct {
  9641. /** TLV tag and len; tag equals
  9642. * */
  9643. A_UINT32 tlv_header;
  9644. /** gpip pin number */
  9645. A_UINT32 gpio_pin_num;
  9646. /** gpio interupt type */
  9647. A_UINT32 int_type;
  9648. /** RF radio status */
  9649. A_UINT32 radio_state;
  9650. } wmi_rfkill_mode_param;
  9651. typedef enum {
  9652. WMI_SET_LED_SYS_POWEROFF,
  9653. WMI_SET_LED_SYS_S3_SUSPEND,
  9654. WMI_SET_LED_SYS_S4_S5,
  9655. WMI_SET_LED_SYS_DRIVER_DISABLE,
  9656. WMI_SET_LED_SYS_WAKEUP,
  9657. WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
  9658. WMI_SET_LED_SYS_POWERON,
  9659. } wmi_led_sys_state_param;
  9660. typedef enum {
  9661. WMI_CONFIG_LED_TO_VDD = 0,
  9662. WMI_CONFIG_LED_TO_GND = 1,
  9663. } wmi_config_led_connect_type;
  9664. typedef enum {
  9665. WMI_CONFIG_LED_NOT_WITH_BT = 0,
  9666. WMI_CONFIG_LED_WITH_BT = 1,
  9667. } wmi_config_led_with_bt_flag;
  9668. typedef enum {
  9669. WMI_CONFIG_LED_DISABLE = 0,
  9670. WMI_CONFIG_LED_ENABLE = 1,
  9671. } wmi_config_led_enable_flag;
  9672. typedef enum {
  9673. WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
  9674. WMI_CONFIG_LED_HIGH_OFF = 1,
  9675. WMI_CONFIG_LED_HIGH_ON = 2,
  9676. } wmi_config_led_on_flag;
  9677. typedef enum {
  9678. WMI_CONFIG_LED_UNSPECIFIED = 0,
  9679. WMI_CONFIG_LED_ON = 1,
  9680. WMI_CONFIG_LED_OFF = 2,
  9681. WMI_CONFIG_LED_DIM = 3,
  9682. WMI_CONFIG_LED_BLINK = 4,
  9683. WMI_CONFIG_LED_TXRX = 5,
  9684. } wmi_config_led_operation_type;
  9685. typedef struct {
  9686. /** TLV tag and len; tag equals
  9687. * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
  9688. A_UINT32 tlv_header;
  9689. /* Set GPIO pin */
  9690. A_UINT32 led_gpio_pin;
  9691. /* Set connect type defined in wmi_config_led_connect_type */
  9692. A_UINT32 connect_type;
  9693. /* Set flag defined in wmi_config_led_with_bt_flag*/
  9694. A_UINT32 with_bt;
  9695. /* Set LED enablement defined in wmi_config_led_enable_flag */
  9696. A_UINT32 led_enable;
  9697. /** pdev_id for identifying the MAC
  9698. * See macros starting with WMI_PDEV_ID_ for values.
  9699. */
  9700. A_UINT32 pdev_id;
  9701. /* see wmi_config_led_operation_type enum */
  9702. A_UINT32 led_operation_type;
  9703. /* see wmi_config_led_on_flag enum */
  9704. A_UINT32 led_on_flag; /* configure high/low on/off sense */
  9705. A_UINT32 led_on_interval; /* for blink function; unit: ms */
  9706. A_UINT32 led_off_interval; /* for blink function; unit: ms */
  9707. A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
  9708. } wmi_pdev_set_led_config_cmd_fixed_param;
  9709. #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
  9710. #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
  9711. /** WMI_PEER_INFO_REQ_CMDID
  9712. * Request FW to provide peer info */
  9713. typedef struct {
  9714. /** TLV tag and len; tag equals
  9715. * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
  9716. A_UINT32 tlv_header;
  9717. /** In order to get the peer info for a single peer, host shall
  9718. * issue the peer_mac_address of that peer. For getting the
  9719. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  9720. * address. The firmware will return the peer info for all the
  9721. * peers on the specified vdev_id */
  9722. wmi_mac_addr peer_mac_address;
  9723. /** vdev id */
  9724. A_UINT32 vdev_id;
  9725. } wmi_peer_info_req_cmd_fixed_param;
  9726. typedef struct {
  9727. /** TLV tag and len; tag equals
  9728. * WMITLV_TAG_STRUC_wmi_peer_info */
  9729. A_UINT32 tlv_header;
  9730. /** mac addr of the peer */
  9731. wmi_mac_addr peer_mac_address;
  9732. /** data_rate of the peer */
  9733. A_UINT32 data_rate;
  9734. /** rssi of the peer */
  9735. A_UINT32 rssi;
  9736. /** tx fail count */
  9737. A_UINT32 tx_fail_cnt;
  9738. } wmi_peer_info;
  9739. /** FW response with the peer info */
  9740. typedef struct {
  9741. /** TLV tag and len; tag equals
  9742. * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
  9743. A_UINT32 tlv_header;
  9744. /** number of peers in peer_info */
  9745. A_UINT32 num_peers;
  9746. /* Set to 1 only if vdev_id field is valid */
  9747. A_UINT32 valid_vdev_id;
  9748. /* VDEV to which the peer belongs to */
  9749. A_UINT32 vdev_id;
  9750. /* This TLV is followed by another TLV of array of structs
  9751. * wmi_peer_info peer_info[];
  9752. */
  9753. } wmi_peer_info_event_fixed_param;
  9754. /** WMI_PEER_ANTDIV_INFO_REQ_CMDID
  9755. * Request FW to provide peer info */
  9756. typedef struct {
  9757. /** TLV tag and len; tag equals
  9758. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param */
  9759. A_UINT32 tlv_header;
  9760. /** In order to get the peer antdiv info for a single peer, host shall
  9761. * issue the peer_mac_address of that peer. For getting the
  9762. * info all peers, the host shall issue 0xFFFFFFFF as the mac
  9763. * address. The firmware will return the peer info for all the
  9764. * peers on the specified vdev_id */
  9765. wmi_mac_addr peer_mac_address;
  9766. /** vdev id */
  9767. A_UINT32 vdev_id;
  9768. } wmi_peer_antdiv_info_req_cmd_fixed_param;
  9769. /** FW response with the peer antdiv info */
  9770. typedef struct {
  9771. /** TLV tag and len; tag equals
  9772. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param */
  9773. A_UINT32 tlv_header;
  9774. /** number of peers in peer_info */
  9775. A_UINT32 num_peers;
  9776. /* VDEV to which the peer belongs to */
  9777. A_UINT32 vdev_id;
  9778. /* This TLV is followed by another TLV of array of structs
  9779. * wmi_peer_antdiv_info peer_antdiv_info[];
  9780. */
  9781. } wmi_peer_antdiv_info_event_fixed_param;
  9782. typedef struct {
  9783. /** TLV tag and len; tag equals
  9784. * WMITLV_TAG_STRUC_wmi_peer_antdiv_info */
  9785. A_UINT32 tlv_header;
  9786. /** mac addr of the peer */
  9787. wmi_mac_addr peer_mac_address;
  9788. /** per chain rssi of the peer, for up to 8 chains.
  9789. * Each chain's entry reports the RSSI for different bandwidths:
  9790. * bits 7:0 -> primary 20 MHz
  9791. * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
  9792. * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
  9793. * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
  9794. * Each of these 8-bit RSSI reports is in dB units, with respect to
  9795. * the noise floor.
  9796. * 0x80 means invalid.
  9797. * All unused bytes within used chain_rssi indices shall be set to 0x80.
  9798. * All unused chain_rssi indices shall be set to 0x80808080.
  9799. */
  9800. A_INT32 chain_rssi[8];
  9801. } wmi_peer_antdiv_info;
  9802. /** FW response when tx failure count has reached threshold
  9803. * for a peer */
  9804. typedef struct {
  9805. /** TLV tag and len; tag equals
  9806. * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
  9807. A_UINT32 tlv_header;
  9808. /** vdev id*/
  9809. A_UINT32 vdev_id;
  9810. /** mac address */
  9811. wmi_mac_addr peer_mac_address;
  9812. /** tx failure count - will eventually be removed and not used */
  9813. A_UINT32 tx_fail_cnt;
  9814. /** seq number of the nth tx_fail_event */
  9815. A_UINT32 seq_no;
  9816. } wmi_peer_tx_fail_cnt_thr_event_fixed_param;
  9817. enum wmi_rmc_mode {
  9818. /** Disable RMC */
  9819. WMI_RMC_MODE_DISABLED = 0,
  9820. /** Enable RMC */
  9821. WMI_RMC_MODE_ENABLED = 1,
  9822. };
  9823. /** Enable RMC transmitter functionality. Upon
  9824. * receiving this, the FW shall mutlicast frames with
  9825. * reliablity. This is a vendor
  9826. * proprietary feature. */
  9827. typedef struct {
  9828. /** TLV tag and len; tag equals
  9829. * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
  9830. A_UINT32 tlv_header;
  9831. /** vdev id*/
  9832. A_UINT32 vdev_id;
  9833. /** enable_rmc contains values from enum wmi_rmc_mode;
  9834. * Default value: 0 (disabled) */
  9835. A_UINT32 enable_rmc;
  9836. } wmi_rmc_set_mode_cmd_fixed_param;
  9837. /** Configure transmission periodicity of action frames in a
  9838. * RMC network for the multicast transmitter */
  9839. typedef struct {
  9840. /** TLV tag and len; tag equals
  9841. * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
  9842. A_UINT32 tlv_header;
  9843. /** vdev id */
  9844. A_UINT32 vdev_id;
  9845. /** time period in milliseconds. Default: 300 ms.
  9846. An action frame indicating the current leader is transmitted by the
  9847. RMC transmitter once every 'periodity_msec' */
  9848. A_UINT32 periodicity_msec;
  9849. } wmi_rmc_set_action_period_cmd_fixed_param;
  9850. /** Optimise Leader selection process in RMC functionality. For
  9851. * Enhancement/Debug purposes only */
  9852. typedef struct {
  9853. /** TLV tag and len; tag equals
  9854. * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
  9855. A_UINT32 tlv_header;
  9856. /** vdev id */
  9857. A_UINT32 vdev_id;
  9858. /** flags ::
  9859. * 0x0001 - Enable beacon averaging
  9860. * 0x0002 - Force leader selection
  9861. * 0x0004 - Enable Timer based leader switch
  9862. * 0x0008 - Use qos/NULL based for multicast reliability */
  9863. A_UINT32 flags;
  9864. /** control leader change timeperiod (in seconds) */
  9865. A_UINT32 peridocity_leader_switch;
  9866. /** control activity timeout value for data rx (in seconds) */
  9867. A_UINT32 data_activity_timeout;
  9868. /** mac address of leader */
  9869. wmi_mac_addr forced_leader_mac_addr;
  9870. } wmi_rmc_config_cmd_fixed_param;
  9871. /** MHF is generally implemented in
  9872. * the kernel. To decrease system power consumption, the
  9873. * driver can enable offloading this to the chipset. In
  9874. * order for the offload, the firmware needs the routing table.
  9875. * The host shall plumb the routing table into FW. The firmware
  9876. * shall perform an IP address lookup and forward the packet to
  9877. * the next hop using next hop's mac address. This is a vendor
  9878. * proprietary feature. */
  9879. enum wmi_mhf_ofl_mode {
  9880. /** Disable MHF offload */
  9881. WMI_MHF_OFL_MODE_DISABLED = 0,
  9882. /** Enable MHF offload */
  9883. WMI_MHF_OFL_MODE_ENABLED = 1,
  9884. };
  9885. typedef struct {
  9886. /** TLV tag and len; tag equals
  9887. * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
  9888. A_UINT32 tlv_header;
  9889. /** vdev id*/
  9890. A_UINT32 vdev_id;
  9891. /** enable_mhf_ofl contains values from enum
  9892. * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
  9893. A_UINT32 enable_mhf_ofl;
  9894. } wmi_mhf_offload_set_mode_cmd_fixed_param;
  9895. enum wmi_mhf_ofl_table_action {
  9896. /** Create MHF offload table in FW */
  9897. WMI_MHF_OFL_TBL_CREATE = 0,
  9898. /** Append to existing MHF offload table */
  9899. WMI_MHF_OFL_TBL_APPEND = 1,
  9900. /** Flush entire MHF offload table in FW */
  9901. WMI_MHF_OFL_TBL_FLUSH = 2,
  9902. };
  9903. typedef struct {
  9904. /** TLV tag and len; tag equals
  9905. * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
  9906. A_UINT32 tlv_header;
  9907. /** vdev id*/
  9908. A_UINT32 vdev_id;
  9909. /** action corresponds to values from enum
  9910. * wmi_mhf_ofl_table_action */
  9911. A_UINT32 action;
  9912. /** number of entries in the table */
  9913. A_UINT32 num_entries;
  9914. /** Followed by the variable length TLV
  9915. * wmi_mhf_offload_routing_table_entry entries[] */
  9916. } wmi_mhf_offload_plumb_routing_table_cmd;
  9917. typedef struct {
  9918. /** TLV tag and len; tag equals
  9919. * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
  9920. A_UINT32 tlv_header;
  9921. /** Destination node's IP address */
  9922. WMI_IPV4_ADDR dest_ipv4_addr;
  9923. /** Next hop node's MAC address */
  9924. wmi_mac_addr next_hop_mac_addr;
  9925. } wmi_mhf_offload_routing_table_entry;
  9926. typedef struct {
  9927. /** tlv tag and len, tag equals
  9928. * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
  9929. A_UINT32 tlv_header;
  9930. /** full 64 tsf timestamp get from MAC tsf timer indicates
  9931. * the time that the radar event uploading to host, split
  9932. * it to high 32 bit and lower 32 bit in fulltsf_high and
  9933. * full_tsf_low
  9934. */
  9935. A_UINT32 upload_fullts_low;
  9936. A_UINT32 upload_fullts_high;
  9937. /** timestamp indicates the time when DFS pulse is detected
  9938. * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
  9939. */
  9940. A_UINT32 pulse_detect_ts;
  9941. /** the duaration of the pulse in us */
  9942. A_UINT32 pulse_duration;
  9943. /** the center frequency of the radar pulse detected, KHz */
  9944. A_UINT32 pulse_center_freq;
  9945. /** bandwidth of current DFS channel, MHz */
  9946. A_UINT32 ch_bandwidth;
  9947. /** center channel frequency1 of current DFS channel, MHz */
  9948. A_UINT16 ch_center_freq1;
  9949. /** center channel frequency2 of current DFS channel, MHz,
  9950. * reserved for 160 BW mode
  9951. */
  9952. A_UINT16 ch_center_freq2;
  9953. /** flag to indicate if this pulse is chirp */
  9954. A_UINT8 pulse_is_chirp;
  9955. /** RSSI recorded in the ppdu */
  9956. A_UINT8 rssi;
  9957. /** extened RSSI info */
  9958. A_UINT8 rssi_ext;
  9959. union {
  9960. A_UINT8 pmac_id; /* OBSOLETE - will be removed once all refs are gone */
  9961. /** pdev_id for identifying the MAC
  9962. * See macros starting with WMI_PDEV_ID_ for values.
  9963. */
  9964. A_UINT8 pdev_id;
  9965. };
  9966. /** index of peak magnitude bin (signed) */
  9967. A_INT32 peak_sidx;
  9968. } wmi_dfs_radar_event_fixed_param;
  9969. typedef struct {
  9970. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
  9971. /*Thermal thresholds*/
  9972. A_UINT32 lower_thresh_degreeC; /* in degree C*/
  9973. A_UINT32 upper_thresh_degreeC; /* in degree C*/
  9974. /*Enable/Disable Thermal Monitoring for Mitigation*/
  9975. A_UINT32 enable;
  9976. } wmi_thermal_mgmt_cmd_fixed_param;
  9977. typedef struct {
  9978. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
  9979. A_UINT32 temperature_degreeC;/* temperature in degree C*/
  9980. } wmi_thermal_mgmt_event_fixed_param;
  9981. /**
  9982. * This command is sent from WLAN host driver to firmware to
  9983. * request firmware to configure auto shutdown timer in fw
  9984. * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
  9985. */
  9986. typedef struct {
  9987. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
  9988. A_UINT32 timer_value; /** timer value; 0=disable */
  9989. } wmi_host_auto_shutdown_cfg_cmd_fixed_param;
  9990. enum wmi_host_auto_shutdown_reason {
  9991. WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
  9992. WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
  9993. WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
  9994. };
  9995. /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
  9996. typedef struct{
  9997. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
  9998. A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
  9999. } wmi_host_auto_shutdown_event_fixed_param;
  10000. /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
  10001. * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
  10002. * This command is only used by some customer for verification test. It is not for end-user.
  10003. *
  10004. * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
  10005. *
  10006. * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
  10007. * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
  10008. * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
  10009. * <channel, ack_offset> pair is unique.
  10010. *
  10011. * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
  10012. * called basic_config_info by bitmap
  10013. * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
  10014. *
  10015. * '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
  10016. * is ignored.
  10017. * disable will remove preious conditions from FW.
  10018. * conditions from the later command will over write conditions stored from a previous command.
  10019. *
  10020. */
  10021. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
  10022. #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
  10023. #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
  10024. #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
  10025. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
  10026. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
  10027. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
  10028. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
  10029. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
  10030. #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
  10031. #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
  10032. #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
  10033. #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
  10034. #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
  10035. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
  10036. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
  10037. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
  10038. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
  10039. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
  10040. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
  10041. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
  10042. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
  10043. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
  10044. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
  10045. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
  10046. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
  10047. #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
  10048. #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
  10049. /** Bit map definition for basic_config_info starts */
  10050. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
  10051. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
  10052. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  10053. #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
  10054. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
  10055. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
  10056. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  10057. #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
  10058. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
  10059. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
  10060. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  10061. #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
  10062. #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
  10063. #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
  10064. #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT)
  10065. #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
  10066. #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
  10067. #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
  10068. #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC)
  10069. #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
  10070. #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
  10071. #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
  10072. #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND)
  10073. #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
  10074. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
  10075. #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
  10076. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM)
  10077. #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
  10078. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
  10079. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
  10080. #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  10081. #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z) & 0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
  10082. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
  10083. /*
  10084. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
  10085. * is temporarily maintained as an alias for the correct name
  10086. * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  10087. */
  10088. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
  10089. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
  10090. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  10091. #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
  10092. #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
  10093. /*
  10094. * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
  10095. * is temporarily maintained as an alias for the correct name
  10096. * (WMI_TPC_CHAINMASK_CONFIG_RATE)
  10097. */
  10098. #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
  10099. #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
  10100. #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
  10101. #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
  10102. /** Bit map definition for basic_config_info ends */
  10103. typedef struct{
  10104. A_UINT32 tlv_header;
  10105. /** Basic condition defined as bit map above, bitmap is chosen to save memory.
  10106. * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
  10107. * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
  10108. * 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
  10109. * 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
  10110. * 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
  10111. * Bit16 : band condition b'0: 2G, b'1: 5G
  10112. * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
  10113. * 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
  10114. * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
  10115. * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
  10116. * Bit23 ~ Bit31: reserved
  10117. */
  10118. A_UINT32 basic_config_info;
  10119. /** channel mapping bit rule: The lower bit corresponds with smaller channel.
  10120. * it depends on Bit14 of basic_config_info
  10121. * Total 24 channels for 5G
  10122. * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
  10123. * Total 14 channels for 2G
  10124. * 1 ~ 14
  10125. */
  10126. A_UINT32 channel;
  10127. /** rate mapping bit rule: The lower bit corresponds with lower rate.
  10128. * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
  10129. * Legacy rates , 11b, 11g, 11A
  10130. * 11n one stream (ht20, ht40) 8+8
  10131. * 11n two streams (ht20, ht40) 8+8
  10132. * 11ac one stream (vht20, vht40, vht80) 10+10+10
  10133. * 11ac two streams (vht20, vht40, vht80) 10+10+10
  10134. */
  10135. A_UINT32 rate0;
  10136. /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
  10137. * 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
  10138. */
  10139. /** 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
  10140. */
  10141. A_UINT32 rate1;
  10142. } wmi_tpc_chainmask_config;
  10143. #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
  10144. #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
  10145. typedef struct{
  10146. A_UINT32 tlv_header;
  10147. A_UINT32 enable; /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
  10148. A_UINT32 num_tpc_chainmask_configs;
  10149. /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
  10150. } wmi_tpc_chainmask_config_cmd_fixed_param;
  10151. typedef struct {
  10152. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
  10153. A_UINT32 data_len; /** length in byte of data[]. */
  10154. /* This structure is used to send REQ binary blobs
  10155. * from application/service to firmware where Host drv is pass through .
  10156. * Following this structure is the TLV:
  10157. * A_UINT8 data[]; <-- length in byte given by field data_len.
  10158. */
  10159. } wmi_nan_cmd_param;
  10160. typedef struct {
  10161. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
  10162. A_UINT32 data_len; /** length in byte of data[]. */
  10163. /* This structure is used to send REQ binary blobs
  10164. * from firmware to application/service where Host drv is pass through .
  10165. * Following this structure is the TLV:
  10166. * A_UINT8 data[]; <-- length in byte given by field data_len.
  10167. */
  10168. } wmi_nan_event_hdr;
  10169. /**
  10170. * Event to indicate NAN discovery interface created
  10171. */
  10172. typedef struct {
  10173. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param */
  10174. A_UINT32 tlv_header;
  10175. /** Unique id identifying the VDEV */
  10176. A_UINT32 vdev_id;
  10177. /** NAN interface MAC address */
  10178. wmi_mac_addr nan_interface_macaddr;
  10179. } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
  10180. #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
  10181. /**
  10182. * Event to indicate NAN discovery interface deleted
  10183. */
  10184. typedef struct {
  10185. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param */
  10186. A_UINT32 tlv_header;
  10187. /** Unique id identifying the VDEV */
  10188. A_UINT32 vdev_id;
  10189. } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
  10190. #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
  10191. /**
  10192. * Event to indicate NAN device started new cluster
  10193. */
  10194. typedef struct {
  10195. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param */
  10196. A_UINT32 tlv_header;
  10197. /** Unique id identifying the VDEV */
  10198. A_UINT32 vdev_id;
  10199. /** NAN Cluster ID */
  10200. A_UINT32 nan_cluster_id;
  10201. } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
  10202. #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
  10203. /**
  10204. * Event to indicate NAN device joined to cluster
  10205. */
  10206. typedef struct {
  10207. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param */
  10208. A_UINT32 tlv_header;
  10209. /** Unique id identifying the VDEV */
  10210. A_UINT32 vdev_id;
  10211. /** NAN Cluster ID */
  10212. A_UINT32 nan_cluster_id;
  10213. } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
  10214. #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
  10215. /** NAN DATA CMD's */
  10216. /**
  10217. * NAN Data get capabilities req
  10218. */
  10219. typedef struct {
  10220. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param */
  10221. A_UINT32 tlv_header;
  10222. /** unique id generated in upper layer for the transaction */
  10223. A_UINT32 transaction_id;
  10224. } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
  10225. #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
  10226. /**
  10227. * NDP Response code
  10228. */
  10229. typedef enum {
  10230. NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
  10231. NDP_RSP_CODE_REQUEST_REJECT = 0x01,
  10232. NDP_RSP_CODE_REQUEST_DEFER = 0x02,
  10233. } wmi_ndp_rsp_code_PROTOTYPE;
  10234. #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
  10235. /**
  10236. * NDP Initiator requesting a data session
  10237. */
  10238. typedef struct {
  10239. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param */
  10240. A_UINT32 tlv_header;
  10241. /** Unique id identifying the VDEV */
  10242. A_UINT32 vdev_id;
  10243. /** unique id generated in upper layer for the transaction */
  10244. A_UINT32 transaction_id;
  10245. /** Unique Instance Id identifying the Responder's service */
  10246. A_UINT32 service_instance_id;
  10247. /** Discovery MAC addr of the publisher/peer */
  10248. wmi_mac_addr peer_discovery_mac_addr;
  10249. /** Actual number of bytes in TLV ndp_cfg */
  10250. A_UINT32 ndp_cfg_len;
  10251. /** Actual number of bytes in TLV ndp_app_info */
  10252. A_UINT32 ndp_app_info_len;
  10253. /**
  10254. * TLV (tag length value) parameters follow the ndp_initiator_req
  10255. * structure. The TLV's are:
  10256. * wmi_channel channel;
  10257. * A_UINT8 ndp_cfg[];
  10258. * A_UINT8 ndp_app_info[];
  10259. */
  10260. } wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
  10261. #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
  10262. /**
  10263. * Initiate a data response on the responder side
  10264. * for data request indication from the peer
  10265. */
  10266. typedef struct {
  10267. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param */
  10268. A_UINT32 tlv_header;
  10269. /** Unique id identifying the VDEV */
  10270. A_UINT32 vdev_id;
  10271. /** unique id generated in upper layer for the transaction */
  10272. A_UINT32 transaction_id;
  10273. /**
  10274. * Unique token Id generated on the initiator/responder
  10275. * side used for a NDP session between two NAN devices
  10276. */
  10277. A_UINT32 ndp_instance_id;
  10278. /** Response Code defined in wmi_ndp_rsp_code */
  10279. A_UINT32 rsp_code;
  10280. /** Number of bytes in TLV ndp_cfg */
  10281. A_UINT32 ndp_cfg_len;
  10282. /** Number of bytes in TLV ndp_app_info */
  10283. A_UINT32 ndp_app_info_len;
  10284. /**
  10285. * TLV (tag length value) parameters follow the ndp_responder_req
  10286. * structure. The TLV's are:
  10287. * A_UINT8 ndp_cfg[];
  10288. * A_UINT8 ndp_app_info[];
  10289. */
  10290. } wmi_ndp_responder_req_fixed_param_PROTOTYPE;
  10291. #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
  10292. /**
  10293. * NDP end type
  10294. */
  10295. typedef enum {
  10296. WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
  10297. WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
  10298. WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
  10299. } wmi_ndp_end_type_PROTOTYPE;
  10300. #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
  10301. /**
  10302. * NDP end reason code
  10303. */
  10304. typedef enum {
  10305. WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
  10306. WMI_NDP_END_REASON_INACTIVITY = 0x01,
  10307. WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
  10308. } wmi_ndp_end_reason_code_PROTOTYPE;
  10309. #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
  10310. /**
  10311. * NDP end request
  10312. */
  10313. typedef struct {
  10314. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
  10315. A_UINT32 tlv_header;
  10316. /** NDP instance id */
  10317. A_UINT32 ndp_instance_id;
  10318. } wmi_ndp_end_req_PROTOTYPE;
  10319. #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
  10320. /**
  10321. * NDP End request
  10322. */
  10323. typedef struct {
  10324. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param */
  10325. A_UINT32 tlv_header;
  10326. /** unique id generated in upper layer for the transaction */
  10327. A_UINT32 transaction_id;
  10328. /**
  10329. * TLV (tag length value) parameters follow the ndp_end_req
  10330. * structure. The TLV's are:
  10331. * wmi_ndp_end_req ndp_end_req_list[];
  10332. */
  10333. } wmi_ndp_end_req_fixed_param_PROTOTYPE;
  10334. #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
  10335. /* NAN DATA RSP EVENTS */
  10336. /**
  10337. * Event to indicate NAN Data Interface capabilities cmd
  10338. */
  10339. typedef struct {
  10340. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param */
  10341. A_UINT32 tlv_header;
  10342. /** Copy of transaction_id received in wmi_ndi_get_cap_req */
  10343. A_UINT32 transaction_id;
  10344. /** Max ndi interface support */
  10345. A_UINT32 max_ndi_interfaces;
  10346. /** Max ndp sessions can support */
  10347. A_UINT32 max_ndp_sessions;
  10348. /** Max number of peer's per ndi */
  10349. A_UINT32 max_peers_per_ndi;
  10350. /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
  10351. A_UINT32 nan_data_supported_bands;
  10352. } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
  10353. #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
  10354. /**
  10355. * NDP command response code
  10356. */
  10357. typedef enum {
  10358. NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
  10359. NDP_CMD_RSP_STATUS_ERROR = 0x01,
  10360. } wmi_ndp_cmd_rsp_status_PROTOTYPE;
  10361. #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
  10362. /**
  10363. * Event response for wmi_ndp_initiator_req
  10364. */
  10365. typedef struct {
  10366. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param */
  10367. A_UINT32 tlv_header;
  10368. /** Unique id identifying the VDEV */
  10369. A_UINT32 vdev_id;
  10370. /** Copy of transaction_id received in wmi_ndp_initiator_req */
  10371. A_UINT32 transaction_id;
  10372. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  10373. A_UINT32 rsp_status;
  10374. A_UINT32 reason_code;
  10375. /**
  10376. * Unique token Id generated on the initiator/responder
  10377. * side used for a NDP session between two NAN devices
  10378. */
  10379. A_UINT32 ndp_instance_id;
  10380. } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
  10381. #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
  10382. /**
  10383. * Event response for wmi_ndp_responder_req cmd
  10384. */
  10385. typedef struct {
  10386. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param */
  10387. A_UINT32 tlv_header;
  10388. /** Unique id identifying the VDEV */
  10389. A_UINT32 vdev_id;
  10390. /** Copy of transaction_id received in wmi_ndp_responder_req */
  10391. A_UINT32 transaction_id;
  10392. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  10393. A_UINT32 rsp_status;
  10394. A_UINT32 reason_code;
  10395. /**
  10396. * Unique token Id generated on the initiator/responder
  10397. * side used for a NDP session between two NAN devices
  10398. */
  10399. A_UINT32 ndp_instance_id;
  10400. /** NDI mac address of the peer */
  10401. wmi_mac_addr peer_ndi_mac_addr;
  10402. } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
  10403. #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
  10404. /**
  10405. * Active ndp instance id
  10406. */
  10407. typedef struct {
  10408. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_active_ndp_instance_id */
  10409. A_UINT32 tlv_header;
  10410. /** NDP instance id */
  10411. A_UINT32 ndp_instance_id;
  10412. } wmi_active_ndp_instance_id_PROTOTYPE;
  10413. #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
  10414. /**
  10415. * NDP end response per ndi
  10416. */
  10417. typedef struct {
  10418. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi */
  10419. A_UINT32 tlv_header;
  10420. /** Unique id identifying the VDEV */
  10421. A_UINT32 vdev_id;
  10422. /** Peer MAC addr */
  10423. wmi_mac_addr peer_mac_addr;
  10424. /** Number of active ndps on this ndi */
  10425. A_UINT32 num_active_ndps_on_ndi;
  10426. } wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
  10427. #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
  10428. /**
  10429. * Event response for wmi_ndp_end_req cmd
  10430. */
  10431. typedef struct {
  10432. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param */
  10433. A_UINT32 tlv_header;
  10434. /** Copy of transaction_id received in wmi_ndp_end_req */
  10435. A_UINT32 transaction_id;
  10436. /** Response status defined in wmi_ndp_cmd_rsp_status*/
  10437. A_UINT32 rsp_status;
  10438. A_UINT32 reason_code;
  10439. /**
  10440. * TLV (tag length value) parameters follow the ndp_end_rsp
  10441. * structure. The TLV's are:
  10442. * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
  10443. * wmi_active_ndp_instance_id active_ndp_instances_id[];
  10444. */
  10445. } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
  10446. #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
  10447. /** NAN DATA EVENTS */
  10448. /**
  10449. * NDP self role
  10450. */
  10451. typedef enum {
  10452. WMI_NDP_INITIATOR_ROLE,
  10453. WMI_NDP_RESPONDER_ROLE,
  10454. } wmi_ndp_self_role_PROTOTYPE;
  10455. #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
  10456. /**
  10457. * NDP accept policy
  10458. */
  10459. typedef enum {
  10460. WMI_NDP_ACCEPT_POLICY_NONE,
  10461. WMI_NDP_ACCEPT_POLICY_ALL,
  10462. } wmi_ndp_accept_policy_PROTOTYPE;
  10463. #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
  10464. /**
  10465. * Event indication received on the responder side when a NDP Initiator request/
  10466. * NDP session is initiated on the Initiator side (self role will be NDP_RESPONDER_ROLE)
  10467. *
  10468. * Event indication received on the initiator side when a
  10469. * NDP responder request on the Initiator side (self role will be NDP_INITIATOR_ROLE)
  10470. */
  10471. typedef struct {
  10472. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param */
  10473. A_UINT32 tlv_header;
  10474. /** Unique id identifying the VDEV */
  10475. A_UINT32 vdev_id;
  10476. /** Self NDP Role defined in wmi_ndp_self_role */
  10477. A_UINT32 self_ndp_role;
  10478. /** Accept policy defined in wmi_ndp_accept_policy */
  10479. A_UINT32 accept_policy;
  10480. /** Unique Instance Id corresponding to a service/session. */
  10481. A_UINT32 service_instance_id;
  10482. /** Discovery MAC addr of the peer/initiator */
  10483. wmi_mac_addr peer_discovery_mac_addr;
  10484. /** NDI mac address of the peer */
  10485. wmi_mac_addr peer_ndi_mac_addr;
  10486. /**
  10487. * Unique token Id generated on the initiator/responder
  10488. * side used for a NDP session between two NAN devices
  10489. */
  10490. A_UINT32 ndp_instance_id;
  10491. /** Number of bytes in TLV wmi_ndp_cfg */
  10492. A_UINT32 ndp_cfg_len;
  10493. /** Number of bytes in TLV wmi_ndp_app_info */
  10494. A_UINT32 ndp_app_info_len;
  10495. /**
  10496. * TLV (tag length value) parameters follow the ndp_indication
  10497. * structure. The TLV's are:
  10498. * A_UINT8 ndp_cfg[];
  10499. * A_UINT8 ndp_app_info[];
  10500. */
  10501. } wmi_ndp_indication_event_fixed_param_PROTOTYPE;
  10502. #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
  10503. /**
  10504. * Event indication of data confirm is received on both
  10505. * initiator and responder side confirming a NDP session
  10506. */
  10507. typedef struct {
  10508. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param */
  10509. A_UINT32 tlv_header;
  10510. /** Unique id identifying the VDEV */
  10511. A_UINT32 vdev_id;
  10512. /**
  10513. * Unique token Id generated on the initiator/responder
  10514. * side used for a NDP session between two NAN devices
  10515. */
  10516. A_UINT32 ndp_instance_id;
  10517. /** NDI mac address of the peer (required to derive target ipv6 address) */
  10518. wmi_mac_addr peer_ndi_mac_addr;
  10519. /** Response Code defined in wmi_ndp_rsp_code */
  10520. A_UINT32 rsp_code;
  10521. /** Number of bytes in TLV wmi_ndp_cfg */
  10522. A_UINT32 ndp_cfg_len;
  10523. /** Number of bytes in TLV wmi_ndp_app_info */
  10524. A_UINT32 ndp_app_info_len;
  10525. /** Reason Code */
  10526. A_UINT32 reason_code;
  10527. /** Number of active ndps on this peer */
  10528. A_UINT32 num_active_ndps_on_peer;
  10529. /**
  10530. * TLV (tag length value) parameters follow the ndp_confirm
  10531. * structure. The TLV's are:
  10532. * A_UINT8 ndp_cfg[];
  10533. * A_UINT8 ndp_app_info[];
  10534. */
  10535. } wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
  10536. #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
  10537. /**
  10538. * Event indication received on the initiator/responder side terminating a NDP session
  10539. */
  10540. typedef struct {
  10541. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_indication */
  10542. A_UINT32 tlv_header;
  10543. /** type defined in wmi_ndp_end_type */
  10544. A_UINT32 type;
  10545. /** Unique id identifying the VDEV */
  10546. A_UINT32 vdev_id;
  10547. /** reason_code defined in wmi_ndp_end_reason_code */
  10548. A_UINT32 reason_code;
  10549. /** NDP instance id */
  10550. A_UINT32 ndp_instance_id;
  10551. /** NDI MAC addr of the peer */
  10552. wmi_mac_addr peer_ndi_mac_addr;
  10553. /** Number of active ndps on this peer */
  10554. A_UINT32 num_active_ndps_on_peer;
  10555. } wmi_ndp_end_indication_PROTOTYPE;
  10556. #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
  10557. typedef struct {
  10558. A_UINT32 tlv_header;
  10559. A_UINT32 num_data;
  10560. /* followed by WMITLV_TAG_ARRAY_BYTE */
  10561. } wmi_diag_data_container_event_fixed_param;
  10562. enum {
  10563. WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
  10564. WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
  10565. WMI_PDEV_PARAM_TXPOWER_REASON_MAX
  10566. };
  10567. #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
  10568. #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
  10569. #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
  10570. #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
  10571. #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
  10572. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
  10573. #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
  10574. ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
  10575. #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
  10576. (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
  10577. #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
  10578. (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
  10579. /**
  10580. * This command is sent from WLAN host driver to firmware to
  10581. * notify the current modem power state. Host would receive a
  10582. * message from modem when modem is powered on. Host driver
  10583. * would then send this command to firmware. Firmware would then
  10584. * power on WCI-2 (UART) interface for LTE/MWS Coex.
  10585. *
  10586. * This command is only applicable for APQ platform which has
  10587. * modem on the platform. If firmware doesn't support MWS Coex,
  10588. * this command can be dropped by firmware.
  10589. *
  10590. * This is a requirement from modem team that WCN can't toggle
  10591. * UART before modem is powered on.
  10592. */
  10593. typedef struct {
  10594. /** TLV tag and len; tag equals
  10595. * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
  10596. A_UINT32 tlv_header;
  10597. /** Modem power state parameter */
  10598. A_UINT32 modem_power_state;
  10599. } wmi_modem_power_state_cmd_param;
  10600. enum {
  10601. WMI_MODEM_STATE_OFF = 0,
  10602. WMI_MODEM_STATE_ON
  10603. };
  10604. #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
  10605. #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
  10606. /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
  10607. generated whenever firmware roamed to new AP silently and
  10608. (a) If the host is awake, FW sends the event to the host immediately .
  10609. (b) If host is in sleep then either
  10610. (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
  10611. command to FW (part of host wake up sequence from low power mode) before sending the event host.
  10612. (2) data/mgmt frame is received from roamed AP, which needs to return to host
  10613. */
  10614. typedef struct {
  10615. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
  10616. A_UINT32 tlv_header;
  10617. A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
  10618. A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
  10619. A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
  10620. } wmi_key_material;
  10621. typedef struct {
  10622. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
  10623. /** Unique id identifying the VDEV on which roaming is done by firmware */
  10624. A_UINT32 vdev_id;
  10625. /** auth_status: connected or authorized */
  10626. A_UINT32 auth_status;
  10627. /** roam_reason:
  10628. * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
  10629. * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
  10630. */
  10631. A_UINT32 roam_reason;
  10632. /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
  10633. A_UINT32 rssi;
  10634. /** MAC address of roamed AP */
  10635. wmi_mac_addr bssid; /* BSSID */
  10636. /** whether the frame is beacon or probe rsp */
  10637. A_UINT32 is_beacon;
  10638. /** the length of beacon/probe rsp */
  10639. A_UINT32 bcn_probe_rsp_len;
  10640. /** the length of reassoc rsp */
  10641. A_UINT32 reassoc_rsp_len;
  10642. /** the length of reassoc req */
  10643. A_UINT32 reassoc_req_len;
  10644. /**
  10645. * TLV (tag length value) parameters follows roam_synch_event
  10646. * The TLV's are:
  10647. * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
  10648. * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
  10649. * wmi_channel chan;
  10650. * wmi_key_material key;
  10651. * A_UINT32 status; subnet changed status not being used currently.
  10652. * will pass the information using roam_status.
  10653. * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
  10654. *
  10655. **/
  10656. } wmi_roam_synch_event_fixed_param;
  10657. #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
  10658. typedef struct {
  10659. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
  10660. A_UINT32 tlv_header;
  10661. /** MAC address of the peer for which the estimated link speed is required. */
  10662. wmi_mac_addr peer_macaddr;
  10663. /* Set to 1 only if vdev_id field is valid */
  10664. A_UINT32 valid_vdev_id;
  10665. /* VDEV to which the peer belongs to */
  10666. A_UINT32 vdev_id;
  10667. } wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
  10668. typedef struct {
  10669. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
  10670. A_UINT32 tlv_header;
  10671. /** MAC address of the peer for which the estimated link speed is required.
  10672. */
  10673. wmi_mac_addr peer_macaddr;
  10674. /* Estimated link speed in kbps.
  10675. * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
  10676. */
  10677. A_UINT32 est_linkspeed_kbps;
  10678. /* Set to 1 only if vdev_id field is valid */
  10679. A_UINT32 valid_vdev_id;
  10680. /* VDEV to which the peer belongs to */
  10681. A_UINT32 vdev_id;
  10682. } wmi_peer_estimated_linkspeed_event_fixed_param;
  10683. typedef struct {
  10684. A_UINT32 tlv_header; /* TLV tag and len; tag equals */
  10685. /* vdev ID */
  10686. A_UINT32 vdev_id;
  10687. A_UINT32 data_len; /** length in byte of data[]. */
  10688. /* This structure is used to send REQ binary blobs
  10689. * from application/service to firmware where Host drv is pass through .
  10690. * Following this structure is the TLV:
  10691. * A_UINT8 data[]; <-- length in byte given by field data_len.
  10692. */
  10693. } wmi_req_stats_ext_cmd_fixed_param;
  10694. typedef struct {
  10695. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
  10696. A_UINT32 vdev_id; /** vdev ID */
  10697. A_UINT32 data_len; /** length in byte of data[]. */
  10698. /* This structure is used to send REQ binary blobs
  10699. * from firmware to application/service where Host drv is pass through .
  10700. * Following this structure is the TLV:
  10701. * A_UINT8 data[]; <-- length in byte given by field data_len.
  10702. */
  10703. } wmi_stats_ext_event_fixed_param;
  10704. typedef struct {
  10705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
  10706. /** unique id identifying the VDEV, generated by the caller */
  10707. A_UINT32 vdev_id;
  10708. /** peer MAC address */
  10709. wmi_mac_addr peer_macaddr;
  10710. } wmi_peer_delete_resp_event_fixed_param;
  10711. typedef struct {
  10712. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
  10713. A_UINT32 tlv_header;
  10714. A_UINT32 vdev_id; /* vdev ID */
  10715. /* MAC address of the peer for which the estimated link speed is required.*/
  10716. wmi_mac_addr peer_macaddr;
  10717. A_UINT32 state; /* peer state */
  10718. } wmi_peer_state_event_fixed_param;
  10719. typedef struct {
  10720. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param */
  10721. A_UINT32 tlv_header;
  10722. /* unique id identifying the VDEV, generated by the caller */
  10723. A_UINT32 vdev_id;
  10724. /* peer MAC address */
  10725. wmi_mac_addr peer_macaddr;
  10726. } wmi_peer_assoc_conf_event_fixed_param;
  10727. enum {
  10728. WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, /** scan_type: passive */
  10729. WMI_2G4_HT40_OBSS_SCAN_ACTIVE, /** scan_type: active */
  10730. };
  10731. typedef struct {
  10732. /**
  10733. * TLV tag and len;
  10734. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
  10735. */
  10736. A_UINT32 tlv_header;
  10737. A_UINT32 vdev_id;
  10738. /**
  10739. * active or passive. if active all the channels are actively scanned.
  10740. * if passive then all the channels are passively scanned
  10741. */
  10742. A_UINT32 scan_type;
  10743. /**
  10744. * FW can perform multiple scans with in a OBSS scan interval.
  10745. * For each scan,
  10746. * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
  10747. * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
  10748. * The unit for these 2 parameters is TUs.
  10749. */
  10750. A_UINT32 obss_scan_passive_dwell;
  10751. A_UINT32 obss_scan_active_dwell;
  10752. /**
  10753. * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
  10754. * both min and total per channel dwell time requirement
  10755. */
  10756. A_UINT32 bss_channel_width_trigger_scan_interval;
  10757. /**
  10758. * FW can perform multiple scans with in a OBSS scan interval.
  10759. * For each scan,
  10760. * the total per channel dwell time across all scans with in OBSS scan interval should be
  10761. * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
  10762. * for active scans and ,
  10763. * The unit for these 2 parameters is TUs.
  10764. */
  10765. A_UINT32 obss_scan_passive_total_per_channel;
  10766. A_UINT32 obss_scan_active_total_per_channel;
  10767. A_UINT32 bss_width_channel_transition_delay_factor; /** parameter to check exemption from scan */
  10768. A_UINT32 obss_scan_activity_threshold; /** parameter to check exemption from scan */
  10769. /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
  10770. A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */
  10771. A_UINT32 current_operating_class; /** STA current operating class */
  10772. /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
  10773. A_UINT32 channel_len;
  10774. /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
  10775. A_UINT32 ie_len;
  10776. } wmi_obss_scan_enable_cmd_fixed_param;
  10777. typedef struct {
  10778. /**
  10779. * TLV tag and len;
  10780. * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
  10781. */
  10782. A_UINT32 tlv_header;
  10783. A_UINT32 vdev_id;
  10784. } wmi_obss_scan_disable_cmd_fixed_param;
  10785. typedef struct {
  10786. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
  10787. A_UINT32 tlv_header;
  10788. /** unique id identifying the VDEV */
  10789. A_UINT32 vdev_id;
  10790. /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
  10791. A_UINT32 tx_status;
  10792. } wmi_offload_prb_rsp_tx_status_event_fixed_param;
  10793. typedef enum {
  10794. WMI_FRAME_TX_OK, /* frame tx ok */
  10795. WMI_FRAME_TX_XRETRY, /* excessivley retried */
  10796. WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
  10797. WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
  10798. } WMI_FRAME_TX_STATUS;
  10799. /**
  10800. * This command is sent from WLAN host driver to firmware to
  10801. * request firmware to send the latest channel avoidance range
  10802. * to host.
  10803. *
  10804. * This command is only applicable for APQ platform which has
  10805. * modem on the platform. If firmware doesn't support MWS Coex,
  10806. * this command can be dropped by firmware.
  10807. *
  10808. * Host would send this command to firmware to request a channel
  10809. * avoidance information update.
  10810. */
  10811. typedef struct {
  10812. /** TLV tag and len; tag equals
  10813. * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
  10814. A_UINT32 tlv_header;
  10815. } wmi_chan_avoid_update_cmd_param;
  10816. /* ExtScan operation mode */
  10817. typedef enum {
  10818. WMI_EXTSCAN_MODE_NONE = 0x0000,
  10819. WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
  10820. WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
  10821. WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
  10822. } wmi_extscan_operation_mode;
  10823. /* Channel Mask */
  10824. typedef enum {
  10825. WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
  10826. WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
  10827. WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
  10828. WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
  10829. } wmi_channel_band_mask;
  10830. typedef enum {
  10831. WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
  10832. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
  10833. WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
  10834. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
  10835. WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
  10836. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
  10837. WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
  10838. WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
  10839. WMI_EXTSCAN_EVENT_MAX = 0x8000
  10840. } wmi_extscan_event_type;
  10841. #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
  10842. WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
  10843. #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
  10844. WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
  10845. WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
  10846. WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
  10847. typedef enum {
  10848. WMI_EXTSCAN_NO_FORWARDING = 0x0000,
  10849. WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
  10850. } wmi_extscan_forwarding_flags;
  10851. typedef enum {
  10852. WMI_EXTSCAN_USE_MSD = 0x0001, /* Use Motion Sensor Detection */
  10853. WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, /* Extscan LPASS extended batching feature is supported and enabled */
  10854. } wmi_extscan_configuration_flags;
  10855. typedef enum {
  10856. WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, /* Cache the results of bucket whose configuration flags has this bit set */
  10857. WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, /* Report ext scan results to context hub or not. */
  10858. } wmi_extscan_bucket_configuration_flags;
  10859. typedef enum {
  10860. WMI_EXTSCAN_STATUS_OK = 0,
  10861. WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
  10862. WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
  10863. WMI_EXTSCAN_STATUS_INTERNAL_ERROR
  10864. } wmi_extscan_start_stop_status;
  10865. typedef struct {
  10866. /** Request ID - to identify command. Cannot be 0 */
  10867. A_UINT32 request_id;
  10868. /** Requestor ID - client requesting ExtScan */
  10869. A_UINT32 requestor_id;
  10870. /** VDEV id(interface) that is requesting scan */
  10871. A_UINT32 vdev_id;
  10872. } wmi_extscan_command_id;
  10873. typedef struct {
  10874. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  10875. /** channel number */
  10876. A_UINT32 channel;
  10877. /** dwell time in msec - use defaults if 0 */
  10878. A_UINT32 min_dwell_time;
  10879. A_UINT32 max_dwell_time;
  10880. /** passive/active channel and other flags */
  10881. A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
  10882. } wmi_extscan_bucket_channel;
  10883. /* Scan Bucket specification */
  10884. typedef struct {
  10885. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  10886. /** Bucket ID - 0-based */
  10887. A_UINT32 bucket_id;
  10888. /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
  10889. A_UINT32 notify_extscan_events;
  10890. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  10891. A_UINT32 forwarding_flags;
  10892. /** ExtScan configuration flags - wmi_extscan_bucket_configuration_flags */
  10893. A_UINT32 configuration_flags;
  10894. /** DEPRECATED member: multiplier to be applied to the periodic scan's base period */
  10895. A_UINT32 base_period_multiplier;
  10896. /** dwell time in msec on active channels - use defaults if 0 */
  10897. A_UINT32 min_dwell_time_active;
  10898. A_UINT32 max_dwell_time_active;
  10899. /** dwell time in msec on passive channels - use defaults if 0 */
  10900. A_UINT32 min_dwell_time_passive;
  10901. A_UINT32 max_dwell_time_passive;
  10902. /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
  10903. A_UINT32 channel_band;
  10904. /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
  10905. A_UINT32 num_channels;
  10906. /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
  10907. A_UINT32 min_period;
  10908. /** period above which exponent is not applied anymore */
  10909. A_UINT32 max_period;
  10910. /** back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
  10911. * new_bucket_period = last_bucket_period + last_exponent_period * exp_backoff
  10912. */
  10913. A_UINT32 exp_backoff;
  10914. /** number of scans performed at a given periodicity after which exponential back off value is
  10915. * applied to current periodicity to obtain a newer one
  10916. */
  10917. A_UINT32 exp_max_step_count;
  10918. /** Followed by the variable length TLV chan_list:
  10919. * wmi_extscan_bucket_channel chan_list[] */
  10920. } wmi_extscan_bucket;
  10921. typedef struct {
  10922. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
  10923. /** Request ID - to identify command. Cannot be 0 */
  10924. A_UINT32 request_id;
  10925. /** Requestor ID - client requesting ExtScan */
  10926. A_UINT32 requestor_id;
  10927. /** VDEV id(interface) that is requesting scan */
  10928. A_UINT32 vdev_id;
  10929. /** table ID - to allow support for multiple simultaneous requests */
  10930. A_UINT32 table_id;
  10931. /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
  10932. A_UINT32 base_period;
  10933. /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
  10934. A_UINT32 max_iterations;
  10935. /** Options to forward scan results - see wmi_extscan_forwarding_flags */
  10936. A_UINT32 forwarding_flags;
  10937. /** ExtScan configuration flags - wmi_extscan_configuration_flags */
  10938. A_UINT32 configuration_flags;
  10939. /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
  10940. A_UINT32 notify_extscan_events;
  10941. /** Scan Priority, input to scan scheduler */
  10942. A_UINT32 scan_priority;
  10943. /** Maximum number of BSSIDs to cache on each scan cycle */
  10944. A_UINT32 max_bssids_per_scan_cycle;
  10945. /** Minimum RSSI value to report */
  10946. A_UINT32 min_rssi;
  10947. /** Maximum table usage in percentage */
  10948. A_UINT32 max_table_usage;
  10949. /** default dwell time in msec on active channels */
  10950. A_UINT32 min_dwell_time_active;
  10951. A_UINT32 max_dwell_time_active;
  10952. /** default dwell time in msec on passive channels */
  10953. A_UINT32 min_dwell_time_passive;
  10954. A_UINT32 max_dwell_time_passive;
  10955. /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
  10956. A_UINT32 min_rest_time;
  10957. /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
  10958. /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
  10959. * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
  10960. * switch to off channel. if there is activity the scanner will let the radio on the bss channel
  10961. * until max_rest_time expires.at max_rest_time scanner will switch to off channel
  10962. * irrespective of activity. activity is determined by the idle_time parameter.
  10963. */
  10964. A_UINT32 max_rest_time;
  10965. /** time before sending next set of probe requests.
  10966. * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
  10967. * The number of probe requests specified depends on the ssid_list and bssid_list
  10968. */
  10969. /** Max number of probes to be sent */
  10970. A_UINT32 n_probes;
  10971. /** time in msec between 2 sets of probe requests. */
  10972. A_UINT32 repeat_probe_time;
  10973. /** time in msec between 2 consequetive probe requests with in a set. */
  10974. A_UINT32 probe_spacing_time;
  10975. /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
  10976. A_UINT32 idle_time;
  10977. /** maximum time in msec allowed for scan */
  10978. A_UINT32 max_scan_time;
  10979. /** delay in msec before sending first probe request after switching to a channel */
  10980. A_UINT32 probe_delay;
  10981. /** Scan control flags */
  10982. A_UINT32 scan_ctrl_flags;
  10983. /** Burst duration time in msec*/
  10984. A_UINT32 burst_duration;
  10985. /** number of bssids in the TLV bssid_list[] */
  10986. A_UINT32 num_bssid;
  10987. /** number of ssid in the TLV ssid_list[] */
  10988. A_UINT32 num_ssids;
  10989. /** number of bytes in TLV ie_data[] */
  10990. A_UINT32 ie_len;
  10991. /** number of buckets in the TLV bucket_list[] */
  10992. A_UINT32 num_buckets;
  10993. /** in number of scans, send notifications to host after these many scans */
  10994. A_UINT32 report_threshold_num_scans;
  10995. /** number of channels in channel_list[] determined by the
  10996. sum of wmi_extscan_bucket.num_channels in array */
  10997. /**
  10998. * TLV (tag length value) parameters follow the extscan_cmd
  10999. * structure. The TLV's are:
  11000. * wmi_ssid ssid_list[];
  11001. * wmi_mac_addr bssid_list[];
  11002. * A_UINT8 ie_data[];
  11003. * wmi_extscan_bucket bucket_list[];
  11004. * wmi_extscan_bucket_channel channel_list[];
  11005. */
  11006. } wmi_extscan_start_cmd_fixed_param;
  11007. typedef struct {
  11008. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
  11009. /** Request ID - to match running command. 0 matches any request */
  11010. A_UINT32 request_id;
  11011. /** Requestor ID - client requesting stop */
  11012. A_UINT32 requestor_id;
  11013. /** VDEV id(interface) that is requesting scan */
  11014. A_UINT32 vdev_id;
  11015. /** table ID - to allow support for multiple simultaneous requests */
  11016. A_UINT32 table_id;
  11017. } wmi_extscan_stop_cmd_fixed_param;
  11018. enum wmi_extscan_get_cached_results_flags {
  11019. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
  11020. WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
  11021. };
  11022. typedef struct {
  11023. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
  11024. /** request ID - used to correlate command with events */
  11025. A_UINT32 request_id;
  11026. /** Requestor ID - client that requested results */
  11027. A_UINT32 requestor_id;
  11028. /** VDEV id(interface) that is requesting scan */
  11029. A_UINT32 vdev_id;
  11030. /** table ID - to allow support for multiple simultaneous requests */
  11031. A_UINT32 table_id;
  11032. /** maximum number of results to be returned */
  11033. A_UINT32 max_results;
  11034. /** flush BSSID list - wmi_extscan_get_cached_results_flags */
  11035. A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
  11036. } wmi_extscan_get_cached_results_cmd_fixed_param;
  11037. typedef struct {
  11038. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
  11039. /** request ID - used to correlate command with events */
  11040. A_UINT32 request_id;
  11041. /** Requestor ID - client that requested results */
  11042. A_UINT32 requestor_id;
  11043. /** VDEV id(interface) that is requesting scan */
  11044. A_UINT32 vdev_id;
  11045. /** table ID - to allow support for multiple simultaneous requests */
  11046. A_UINT32 table_id;
  11047. } wmi_extscan_get_wlan_change_results_cmd_fixed_param;
  11048. typedef struct {
  11049. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11050. /**bssid */
  11051. wmi_mac_addr bssid;
  11052. /**channel number */
  11053. A_UINT32 channel;
  11054. /**upper RSSI limit */
  11055. A_UINT32 upper_rssi_limit;
  11056. /**lower RSSI limit */
  11057. A_UINT32 lower_rssi_limit;
  11058. } wmi_extscan_wlan_change_bssid_param;
  11059. typedef struct {
  11060. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
  11061. /** Request ID - to identify command. Cannot be 0 */
  11062. A_UINT32 request_id;
  11063. /** Requestor ID - client requesting wlan change monitoring */
  11064. A_UINT32 requestor_id;
  11065. /** VDEV id(interface) that is requesting scan */
  11066. A_UINT32 vdev_id;
  11067. /** table ID - to allow support for multiple simultaneous tables */
  11068. A_UINT32 table_id;
  11069. /** operation mode: start/stop */
  11070. A_UINT32 mode; /* wmi_extscan_operation_mode */
  11071. /** number of rssi samples to store */
  11072. A_UINT32 max_rssi_samples;
  11073. /** number of samples to use to calculate RSSI average */
  11074. A_UINT32 rssi_averaging_samples;
  11075. /** number of scans to confirm loss of contact with RSSI */
  11076. A_UINT32 lost_ap_scan_count;
  11077. /** number of out-of-range BSSIDs necessary to send event */
  11078. A_UINT32 max_out_of_range_count;
  11079. /** total number of bssid signal descriptors (in all pages) */
  11080. A_UINT32 total_entries;
  11081. /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
  11082. A_UINT32 first_entry_index;
  11083. /** number of bssid signal descriptors in this page */
  11084. A_UINT32 num_entries_in_page;
  11085. /* Following this structure is the TLV:
  11086. * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[];
  11087. * (number of elements given by field num_page_entries)
  11088. */
  11089. } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
  11090. typedef struct {
  11091. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11092. /**bssid */
  11093. wmi_mac_addr bssid;
  11094. /**RSSI min threshold for reporting */
  11095. A_UINT32 min_rssi;
  11096. /**Deprecated entry - channel number */
  11097. A_UINT32 channel;
  11098. /** RSSI max threshold for reporting */
  11099. A_UINT32 max_rssi;
  11100. } wmi_extscan_hotlist_entry;
  11101. typedef struct {
  11102. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
  11103. /** Request ID - to identify command. Cannot be 0 */
  11104. A_UINT32 request_id;
  11105. /** Requestor ID - client requesting hotlist monitoring */
  11106. A_UINT32 requestor_id;
  11107. /** VDEV id(interface) that is requesting scan */
  11108. A_UINT32 vdev_id;
  11109. /** table ID - to allow support for multiple simultaneous tables */
  11110. A_UINT32 table_id;
  11111. /** operation mode: start/stop */
  11112. A_UINT32 mode; /* wmi_extscan_operation_mode */
  11113. /** total number of bssids (in all pages) */
  11114. A_UINT32 total_entries;
  11115. /** index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry */
  11116. A_UINT32 first_entry_index;
  11117. /** number of bssids in this page */
  11118. A_UINT32 num_entries_in_page;
  11119. /** number of consecutive scans to confirm loss of contact with AP */
  11120. A_UINT32 lost_ap_scan_count;
  11121. /* Following this structure is the TLV:
  11122. * wmi_extscan_hotlist_entry hotlist[]; <-- number of elements given by field num_page_entries.
  11123. */
  11124. } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
  11125. typedef struct {
  11126. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11127. /**ssid */
  11128. wmi_ssid ssid;
  11129. /**band */
  11130. A_UINT32 band;
  11131. /**RSSI threshold for reporting */
  11132. A_UINT32 min_rssi;
  11133. A_UINT32 max_rssi;
  11134. } wmi_extscan_hotlist_ssid_entry;
  11135. typedef struct {
  11136. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param */
  11137. /** Request ID - to identify command. Cannot be 0 */
  11138. A_UINT32 request_id;
  11139. /** Requestor ID - client requesting hotlist ssid monitoring */
  11140. A_UINT32 requestor_id;
  11141. /** VDEV id(interface) that is requesting scan */
  11142. A_UINT32 vdev_id;
  11143. /** table ID - to allow support for multiple simultaneous tables */
  11144. A_UINT32 table_id;
  11145. /** operation mode: start/stop */
  11146. A_UINT32 mode; /* wmi_extscan_operation_mode */
  11147. /**total number of ssids (in all pages) */
  11148. A_UINT32 total_entries;
  11149. /**index of the first ssid entry found in the TLV wmi_extscan_hotlist_ssid_entry*/
  11150. A_UINT32 first_entry_index;
  11151. /**number of ssids in this page */
  11152. A_UINT32 num_entries_in_page;
  11153. /** number of consecutive scans to confirm loss of an ssid **/
  11154. A_UINT32 lost_ap_scan_count;
  11155. /* Following this structure is the TLV:
  11156. * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; <-- number of elements given by field num_page_entries.
  11157. */
  11158. } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
  11159. typedef struct {
  11160. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11161. /** table ID - to allow support for multiple simultaneous tables */
  11162. A_UINT32 table_id;
  11163. /** size in bytes of scan cache entry */
  11164. A_UINT32 scan_cache_entry_size;
  11165. /** maximum number of scan cache entries */
  11166. A_UINT32 max_scan_cache_entries;
  11167. /** maximum number of buckets per extscan request */
  11168. A_UINT32 max_buckets;
  11169. /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
  11170. A_UINT32 max_bssid_per_scan;
  11171. /** table usage level at which indication must be sent to host */
  11172. A_UINT32 max_table_usage_threshold;
  11173. } wmi_extscan_cache_capabilities;
  11174. typedef struct {
  11175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11176. /** table ID - to allow support for multiple simultaneous tables */
  11177. A_UINT32 table_id;
  11178. /** size in bytes of wlan change entry */
  11179. A_UINT32 wlan_change_entry_size;
  11180. /** maximum number of entries in wlan change table */
  11181. A_UINT32 max_wlan_change_entries;
  11182. /** number of RSSI samples used for averaging RSSI */
  11183. A_UINT32 max_rssi_averaging_samples;
  11184. /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
  11185. A_UINT32 max_rssi_history_entries;
  11186. } wmi_extscan_wlan_change_monitor_capabilities;
  11187. typedef struct {
  11188. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11189. /** table ID - to allow support for multiple simultaneous tables */
  11190. A_UINT32 table_id;
  11191. /** size in bytes of hotlist entry */
  11192. A_UINT32 wlan_hotlist_entry_size;
  11193. /** maximum number of entries in wlan change table */
  11194. A_UINT32 max_hotlist_entries;
  11195. } wmi_extscan_hotlist_monitor_capabilities;
  11196. typedef struct {
  11197. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
  11198. /** Request ID - matches request ID used to start hot list monitoring */
  11199. A_UINT32 request_id;
  11200. /** Requestor ID - client requesting stop */
  11201. A_UINT32 requestor_id;
  11202. /** number of extscan caches */
  11203. A_UINT32 num_extscan_cache_tables;
  11204. /** number of wlan change lists */
  11205. A_UINT32 num_wlan_change_monitor_tables;
  11206. /** number of hotlists */
  11207. A_UINT32 num_hotlist_monitor_tables;
  11208. /** if one sided rtt data collection is supported */
  11209. A_UINT32 rtt_one_sided_supported;
  11210. /** if 11v data collection is supported */
  11211. A_UINT32 rtt_11v_supported;
  11212. /** if 11mc data collection is supported */
  11213. A_UINT32 rtt_ftm_supported;
  11214. /** number of extscan cache capabilities (one per table) */
  11215. A_UINT32 num_extscan_cache_capabilities;
  11216. /** number of wlan change capabilities (one per table) */
  11217. A_UINT32 num_extscan_wlan_change_capabilities;
  11218. /** number of extscan hotlist capabilities (one per table) */
  11219. A_UINT32 num_extscan_hotlist_capabilities;
  11220. /* Following this structure is the TLV:
  11221. * wmi_extscan_cache_capabilities extscan_cache_capabilities; <-- number of capabilities given by num_extscan_caches
  11222. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; <-- number of capabilities given by num_wlan_change_monitor_tables
  11223. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; <-- number of capabilities given by num_hotlist_monitor_tables
  11224. */
  11225. } wmi_extscan_set_capabilities_cmd_fixed_param;
  11226. typedef struct {
  11227. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
  11228. /** Request ID - matches request ID used to start hot list monitoring */
  11229. A_UINT32 request_id;
  11230. /** Requestor ID - client requesting capabilities */
  11231. A_UINT32 requestor_id;
  11232. } wmi_extscan_get_capabilities_cmd_fixed_param;
  11233. typedef struct {
  11234. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
  11235. /** Request ID of the operation that was started/stopped */
  11236. A_UINT32 request_id;
  11237. /** Requestor ID of the operation that was started/stopped */
  11238. A_UINT32 requestor_id;
  11239. /** VDEV id(interface) of the operation that was started/stopped */
  11240. A_UINT32 vdev_id;
  11241. /** extscan WMI command */
  11242. A_UINT32 command;
  11243. /** operation mode: start/stop */
  11244. A_UINT32 mode; /* wmi_extscan_operation_mode */
  11245. /**success/failure */
  11246. A_UINT32 status; /* enum wmi_extscan_start_stop_status */
  11247. /** table ID - to allow support for multiple simultaneous requests */
  11248. A_UINT32 table_id;
  11249. } wmi_extscan_start_stop_event_fixed_param;
  11250. typedef struct {
  11251. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
  11252. /** Request ID of the extscan operation that is currently running */
  11253. A_UINT32 request_id;
  11254. /** Requestor ID of the extscan operation that is currently running */
  11255. A_UINT32 requestor_id;
  11256. /** VDEV id(interface) of the extscan operation that is currently running */
  11257. A_UINT32 vdev_id;
  11258. /** scan event (wmi_scan_event_type) */
  11259. A_UINT32 event; /* wmi_extscan_event_type */
  11260. /** table ID - to allow support for multiple simultaneous requests */
  11261. A_UINT32 table_id;
  11262. /**number of buckets */
  11263. A_UINT32 num_buckets;
  11264. /* Following this structure is the TLV:
  11265. * A_UINT32 bucket_id[]; <-- number of elements given by field num_buckets.
  11266. */
  11267. } wmi_extscan_operation_event_fixed_param;
  11268. /* Types of extscan tables */
  11269. typedef enum {
  11270. EXTSCAN_TABLE_NONE = 0,
  11271. EXTSCAN_TABLE_BSSID = 1,
  11272. EXTSCAN_TABLE_RSSI = 2,
  11273. } wmi_extscan_table_type;
  11274. typedef struct {
  11275. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
  11276. /** Request ID of the extscan operation that is currently running */
  11277. A_UINT32 request_id;
  11278. /** Requestor ID of the extscan operation that is currently running */
  11279. A_UINT32 requestor_id;
  11280. /** VDEV id(interface) of the extscan operation that is currently running */
  11281. A_UINT32 vdev_id;
  11282. /** table ID - to allow support for multiple simultaneous tables */
  11283. A_UINT32 table_id;
  11284. /**see wmi_extscan_table_type for table reporting usage */
  11285. A_UINT32 table_type;
  11286. /**number of entries in use */
  11287. A_UINT32 entries_in_use;
  11288. /**maximum number of entries in table */
  11289. A_UINT32 maximum_entries;
  11290. } wmi_extscan_table_usage_event_fixed_param;
  11291. typedef enum {
  11292. WMI_SCAN_STATUS_INTERRUPTED = 1 /* Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
  11293. this can be used to discard scan results */
  11294. } wmi_scan_status_flags;
  11295. typedef struct {
  11296. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11297. /** RSSI */
  11298. A_UINT32 rssi;
  11299. /** time stamp in milliseconds */
  11300. A_UINT32 tstamp;
  11301. /** Extscan cycle during which this entry was scanned */
  11302. A_UINT32 scan_cycle_id;
  11303. /** flag to indicate if the given result was obtained as part of interrupted (aborted/large time gap preempted) scan */
  11304. A_UINT32 flags;
  11305. /** Bitmask of buckets (i.e. sets of channels) scanned */
  11306. A_UINT32 buckets_scanned;
  11307. } wmi_extscan_rssi_info;
  11308. typedef struct {
  11309. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11310. /**bssid */
  11311. wmi_mac_addr bssid;
  11312. /**ssid */
  11313. wmi_ssid ssid;
  11314. /**channel number */
  11315. A_UINT32 channel;
  11316. /* capabilities */
  11317. A_UINT32 capabilities;
  11318. /* beacon interval in TUs */
  11319. A_UINT32 beacon_interval;
  11320. /**time stamp in milliseconds - time last seen */
  11321. A_UINT32 tstamp;
  11322. /**flags - _tExtScanEntryFlags */
  11323. A_UINT32 flags;
  11324. /**RTT in ns */
  11325. A_UINT32 rtt;
  11326. /**rtt standard deviation */
  11327. A_UINT32 rtt_sd;
  11328. /* rssi information */
  11329. A_UINT32 number_rssi_samples;
  11330. /** IE length */
  11331. A_UINT32 ie_length; /* length of IE data */
  11332. } wmi_extscan_wlan_descriptor;
  11333. typedef struct {
  11334. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
  11335. /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  11336. A_UINT32 request_id;
  11337. /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  11338. A_UINT32 requestor_id;
  11339. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
  11340. A_UINT32 vdev_id;
  11341. /** Request ID of the extscan operation that is currently running */
  11342. A_UINT32 extscan_request_id;
  11343. /** Requestor ID of the extscan operation that is currently running */
  11344. A_UINT32 extscan_requestor_id;
  11345. /** VDEV id(interface) of the extscan operation that is currently running */
  11346. A_UINT32 extscan_vdev_id;
  11347. /** table ID - to allow support for multiple simultaneous tables */
  11348. A_UINT32 table_id;
  11349. /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
  11350. A_UINT32 current_tstamp;
  11351. /**total number of bssids (in all pages) */
  11352. A_UINT32 total_entries;
  11353. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  11354. A_UINT32 first_entry_index;
  11355. /**number of bssids in this page */
  11356. A_UINT32 num_entries_in_page;
  11357. /** number of buckets scanned**/
  11358. A_UINT32 buckets_scanned;
  11359. /* Followed by the variable length TLVs
  11360. * wmi_extscan_wlan_descriptor bssid_list[]
  11361. * wmi_extscan_rssi_info rssi_list[]
  11362. * A_UINT8 ie_list[]
  11363. */
  11364. } wmi_extscan_cached_results_event_fixed_param;
  11365. typedef enum {
  11366. EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
  11367. EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
  11368. EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
  11369. } wmi_extscan_wlan_change_flags;
  11370. typedef struct {
  11371. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
  11372. /**bssid */
  11373. wmi_mac_addr bssid;
  11374. /**time stamp in milliseconds */
  11375. A_UINT32 tstamp;
  11376. /**upper RSSI limit */
  11377. A_UINT32 upper_rssi_limit;
  11378. /**lower RSSI limit */
  11379. A_UINT32 lower_rssi_limit;
  11380. /** channel */
  11381. A_UINT32 channel; /* in MHz */
  11382. /**current RSSI average */
  11383. A_UINT32 rssi_average;
  11384. /**flags - wmi_extscan_wlan_change_flags */
  11385. A_UINT32 flags;
  11386. /**legnth of RSSI history to follow (number of values) */
  11387. A_UINT32 num_rssi_samples;
  11388. } wmi_extscan_wlan_change_result_bssid;
  11389. typedef struct {
  11390. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
  11391. /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  11392. A_UINT32 request_id;
  11393. /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  11394. A_UINT32 requestor_id;
  11395. /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
  11396. A_UINT32 vdev_id;
  11397. /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  11398. A_UINT32 config_request_id;
  11399. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  11400. A_UINT32 config_requestor_id;
  11401. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
  11402. A_UINT32 config_vdev_id;
  11403. /** table ID - to allow support for multiple simultaneous tables */
  11404. A_UINT32 table_id;
  11405. /**number of entries with RSSI out of range or BSSID not detected */
  11406. A_UINT32 change_count;
  11407. /**total number of bssid signal descriptors (in all pages) */
  11408. A_UINT32 total_entries;
  11409. /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
  11410. A_UINT32 first_entry_index;
  11411. /**number of bssids signal descriptors in this page */
  11412. A_UINT32 num_entries_in_page;
  11413. /* Following this structure is the TLV:
  11414. * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[];
  11415. * (number of descriptors given by field num_entries_in_page)
  11416. * Following this structure is the list of RSSI values (each is an A_UINT8):
  11417. * A_UINT8 rssi_list[]; <-- last N RSSI values.
  11418. */
  11419. } wmi_extscan_wlan_change_results_event_fixed_param;
  11420. enum _tExtScanEntryFlags
  11421. {
  11422. WMI_HOTLIST_FLAG_NONE = 0x00,
  11423. WMI_HOTLIST_FLAG_PRESENCE = 0x01,
  11424. WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
  11425. };
  11426. typedef struct {
  11427. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  11428. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  11429. A_UINT32 config_request_id;
  11430. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  11431. A_UINT32 config_requestor_id;
  11432. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
  11433. A_UINT32 config_vdev_id;
  11434. /** table ID - to allow support for multiple simultaneous tables */
  11435. A_UINT32 table_id;
  11436. /**total number of bssids (in all pages) */
  11437. A_UINT32 total_entries;
  11438. /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  11439. A_UINT32 first_entry_index;
  11440. /**number of bssids in this page */
  11441. A_UINT32 num_entries_in_page;
  11442. /* Following this structure is the TLV:
  11443. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  11444. */
  11445. } wmi_extscan_hotlist_match_event_fixed_param;
  11446. typedef struct {
  11447. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
  11448. /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  11449. A_UINT32 config_request_id;
  11450. /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  11451. A_UINT32 config_requestor_id;
  11452. /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
  11453. A_UINT32 config_vdev_id;
  11454. /** table ID - to allow support for multiple simultaneous tables */
  11455. A_UINT32 table_id;
  11456. /**total number of ssids (in all pages) */
  11457. A_UINT32 total_entries;
  11458. /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
  11459. A_UINT32 first_entry_index;
  11460. /**number of ssids in this page */
  11461. A_UINT32 num_entries_in_page;
  11462. /* Following this structure is the TLV:
  11463. * wmi_extscan_wlan_descriptor hotlist_match[]; <-- number of descriptors given by field num_entries_in_page.
  11464. */
  11465. } wmi_extscan_hotlist_ssid_match_event_fixed_param;
  11466. typedef struct {
  11467. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
  11468. /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  11469. A_UINT32 request_id;
  11470. /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  11471. A_UINT32 requestor_id;
  11472. /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
  11473. A_UINT32 vdev_id;
  11474. /** number of extscan caches */
  11475. A_UINT32 num_extscan_cache_tables;
  11476. /** number of wlan change lists */
  11477. A_UINT32 num_wlan_change_monitor_tables;
  11478. /** number of hotlists */
  11479. A_UINT32 num_hotlist_monitor_tables;
  11480. /** if one sided rtt data collection is supported */
  11481. A_UINT32 rtt_one_sided_supported;
  11482. /** if 11v data collection is supported */
  11483. A_UINT32 rtt_11v_supported;
  11484. /** if 11mc data collection is supported */
  11485. A_UINT32 rtt_ftm_supported;
  11486. /** number of extscan cache capabilities (one per table) */
  11487. A_UINT32 num_extscan_cache_capabilities;
  11488. /** number of wlan change capabilities (one per table) */
  11489. A_UINT32 num_extscan_wlan_change_capabilities;
  11490. /** number of extscan hotlist capabilities (one per table) */
  11491. A_UINT32 num_extscan_hotlist_capabilities;
  11492. /* max number of roaming ssid whitelist firmware can support */
  11493. A_UINT32 num_roam_ssid_whitelist;
  11494. /* max number of blacklist bssid firmware can support */
  11495. A_UINT32 num_roam_bssid_blacklist;
  11496. /* max number of preferred list firmware can support */
  11497. A_UINT32 num_roam_bssid_preferred_list;
  11498. /* max number of hotlist ssids firmware can support */
  11499. A_UINT32 num_extscan_hotlist_ssid;
  11500. /* max number of epno networks firmware can support */
  11501. A_UINT32 num_epno_networks;
  11502. /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
  11503. * supports multiple lists of each type.
  11504. *
  11505. * wmi_extscan_cache_capabilities extscan_cache_capabilities[] <-- capabilities of extscan cache (BSSID/RSSI lists)
  11506. * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] <-- capabilities of wlan_change_monitor_tables
  11507. * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] <-- capabilities of hotlist_monitor_tables
  11508. */
  11509. } wmi_extscan_capabilities_event_fixed_param;
  11510. /* WMI_D0_WOW_DISABLE_ACK_EVENTID */
  11511. typedef struct{
  11512. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
  11513. A_UINT32 reserved0; /* for future need */
  11514. } wmi_d0_wow_disable_ack_event_fixed_param;
  11515. /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
  11516. typedef struct {
  11517. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
  11518. /** pdev_id for identifying the MAC
  11519. * See macros starting with WMI_PDEV_ID_ for values.
  11520. */
  11521. A_UINT32 pdev_id;
  11522. } wmi_pdev_resume_event_fixed_param;
  11523. /** value representing all modules */
  11524. #define WMI_DEBUG_LOG_MODULE_ALL 0xffff
  11525. /* param definitions */
  11526. /**
  11527. * Log level for a given module. Value contains both module id and log level.
  11528. * here is the bitmap definition for value.
  11529. * module Id : 16
  11530. * Flags : reserved
  11531. * Level : 8
  11532. * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
  11533. * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
  11534. */
  11535. #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
  11536. #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \
  11537. (val) |= (lvl & 0xff); \
  11538. } while (0)
  11539. #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
  11540. #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \
  11541. (val) |= ((mid & 0xffff) << 16); \
  11542. } while (0)
  11543. #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
  11544. /**
  11545. * Enable the debug log for a given vdev. Value is vdev id
  11546. */
  11547. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
  11548. /**
  11549. * Disable the debug log for a given vdev. Value is vdev id
  11550. * All the log level for a given VDEV is disabled except the ERROR log messages
  11551. */
  11552. #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
  11553. /**
  11554. * set vdev enable bitmap. value is the vden enable bitmap
  11555. */
  11556. #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
  11557. /**
  11558. * set a given log level to all the modules specified in the module bitmap.
  11559. * and set the log levle for all other modules to DBGLOG_ERR.
  11560. * value: log levelt to be set.
  11561. * module_id_bitmap : identifies the modules for which the log level should be set and
  11562. * modules for which the log level should be reset to DBGLOG_ERR.
  11563. */
  11564. #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
  11565. #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
  11566. #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \
  11567. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
  11568. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
  11569. #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \
  11570. ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
  11571. (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
  11572. #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \
  11573. (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
  11574. (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
  11575. #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
  11576. typedef struct {
  11577. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
  11578. A_UINT32 dbg_log_param; /** param types are defined above */
  11579. A_UINT32 value;
  11580. /* The below array will follow this tlv ->fixed length module_id_bitmap[]
  11581. A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
  11582. */
  11583. } wmi_debug_log_config_cmd_fixed_param;
  11584. typedef struct {
  11585. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
  11586. A_UINT32 param; /* Reserved for future use */
  11587. /** pdev_id for identifying the MAC
  11588. * See macros starting with WMI_PDEV_ID_ for values.
  11589. */
  11590. A_UINT32 pdev_id;
  11591. } wmi_pdev_get_temperature_cmd_fixed_param;
  11592. typedef struct {
  11593. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
  11594. A_INT32 value; /* temprature value in Celcius degree */
  11595. /** pdev_id for identifying the MAC
  11596. * See macros starting with WMI_PDEV_ID_ for values.
  11597. */
  11598. A_UINT32 pdev_id;
  11599. } wmi_pdev_temperature_event_fixed_param;
  11600. typedef enum {
  11601. ANTDIV_HW_CFG_STATUS,
  11602. ANTDIV_SW_CFG_STATUS,
  11603. ANTDIV_MAX_STATUS_TYPE_NUM
  11604. } ANTDIV_STATUS_TYPE;
  11605. typedef struct {
  11606. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param */
  11607. A_UINT32 status_event_id; /* Status event ID - see ANTDIV_STATUS_TYPE */
  11608. /** pdev_id for identifying the MAC
  11609. * See macros starting with WMI_PDEV_ID_ for values.
  11610. */
  11611. A_UINT32 pdev_id;
  11612. } wmi_pdev_get_antdiv_status_cmd_fixed_param;
  11613. typedef struct {
  11614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param */
  11615. A_UINT32 support; /* ANT DIV feature enabled or not */
  11616. A_UINT32 chain_num; /* how many chain supported */
  11617. A_UINT32 ant_num; /* how many ANT supported, 32 max */
  11618. /*
  11619. * Each entry is for a tx/rx chain, and contains a bitmap identifying
  11620. * the antennas attached to that tx/rx chain.
  11621. */
  11622. A_UINT32 selectable_ant_mask[8];
  11623. /** pdev_id for identifying the MAC
  11624. * See macros starting with WMI_PDEV_ID_ for values.
  11625. */
  11626. A_UINT32 pdev_id;
  11627. } wmi_pdev_antdiv_status_event_fixed_param;
  11628. typedef struct {
  11629. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
  11630. A_UINT32 vdev_id;
  11631. A_UINT32 enable;
  11632. A_UINT32 srv_ipv4; /* server IP */
  11633. A_UINT32 start_lsb; /* starting address assigned to client */
  11634. A_UINT32 num_client; /* number of clients we support */
  11635. } wmi_set_dhcp_server_offload_cmd_fixed_param;
  11636. typedef enum {
  11637. AP_RX_DATA_OFFLOAD = 0x00,
  11638. STA_RX_DATA_OFFLOAD = 0x01,
  11639. } wmi_ipa_offload_types;
  11640. /**
  11641. * This command is sent from WLAN host driver to firmware for
  11642. * enabling/disabling IPA data-path offload features.
  11643. *
  11644. *
  11645. * Enabling data path offload to IPA(based on host INI configuration), example:
  11646. * when STA interface comes up,
  11647. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  11648. * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  11649. *
  11650. * Disabling data path offload to IPA, example:
  11651. * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
  11652. * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
  11653. *
  11654. *
  11655. * This command is applicable only on the PCIE LL systems
  11656. *
  11657. */
  11658. typedef struct {
  11659. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
  11660. A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
  11661. A_UINT32 vdev_id;
  11662. A_UINT32 enable; /* 1 == enable, 0 == disable */
  11663. } wmi_ipa_offload_enable_disable_cmd_fixed_param;
  11664. typedef enum {
  11665. WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
  11666. WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
  11667. WMI_LED_FLASHING_PATTERN_RESERVED = 2,
  11668. } wmi_set_led_flashing_type;
  11669. /**
  11670. 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.
  11671. Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
  11672. remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
  11673. 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
  11674. pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
  11675. High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
  11676. Zero is reached, it is skipped and moves on to the next interval.
  11677. */
  11678. typedef struct{
  11679. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
  11680. A_UINT32 pattern_id; /* pattern identifier */
  11681. A_UINT32 led_x0; /* led flashing parameter0 */
  11682. A_UINT32 led_x1; /* led flashing parameter1 */
  11683. A_UINT32 gpio_num; /* GPIO number */
  11684. } wmi_set_led_flashing_cmd_fixed_param;
  11685. /**
  11686. * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
  11687. * within small networks that do not include a local name server.
  11688. * It utilizes essentially the same programming interfaces, packet formats and operating semantics
  11689. * as the unicast DNS, and the advantage is zero configuration service while no need for central or
  11690. * global server.
  11691. * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
  11692. * by type in a specified domain using standard DNS queries.
  11693. * Here, we provide the ability to advertise the available services by responding to mDNS queries.
  11694. */
  11695. typedef struct {
  11696. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
  11697. A_UINT32 vdev_id;
  11698. A_UINT32 enable;
  11699. } wmi_mdns_offload_cmd_fixed_param;
  11700. #define WMI_MAX_MDNS_FQDN_LEN 64
  11701. #define WMI_MAX_MDNS_RESP_LEN 512
  11702. #define WMI_MDNS_FQDN_TYPE_GENERAL 0
  11703. #define WMI_MDNS_FQDN_TYPE_UNIQUE 1
  11704. typedef struct {
  11705. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
  11706. A_UINT32 vdev_id;
  11707. /** type of fqdn, general or unique */
  11708. A_UINT32 type;
  11709. /** length of fqdn */
  11710. A_UINT32 fqdn_len;
  11711. /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
  11712. * A_UINT8 fqdn_data[]; <-- fully-qualified domain name to check if match with the received queries
  11713. */
  11714. } wmi_mdns_set_fqdn_cmd_fixed_param;
  11715. typedef struct {
  11716. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
  11717. A_UINT32 vdev_id;
  11718. /** Answer Resource Record count */
  11719. A_UINT32 AR_count;
  11720. /** length of response */
  11721. A_UINT32 resp_len;
  11722. /* Following this structure is the TLV byte stream of resp data of length resp_len
  11723. * A_UINT8 resp_data[]; <-- responses consisits of Resource Records
  11724. */
  11725. } wmi_mdns_set_resp_cmd_fixed_param;
  11726. typedef struct {
  11727. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
  11728. A_UINT32 vdev_id;
  11729. } wmi_mdns_get_stats_cmd_fixed_param;
  11730. typedef struct {
  11731. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
  11732. A_UINT32 vdev_id;
  11733. /** curTimestamp in milliseconds */
  11734. A_UINT32 curTimestamp;
  11735. /** last received Query in milliseconds */
  11736. A_UINT32 lastQueryTimestamp;
  11737. /** last sent Response in milliseconds */
  11738. A_UINT32 lastResponseTimestamp;
  11739. /** stats of received queries */
  11740. A_UINT32 totalQueries;
  11741. /** stats of macth queries */
  11742. A_UINT32 totalMatches;
  11743. /** stats of responses */
  11744. A_UINT32 totalResponses;
  11745. /** indicate the current status of mDNS offload */
  11746. A_UINT32 status;
  11747. } wmi_mdns_stats_event_fixed_param;
  11748. /**
  11749. * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
  11750. * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
  11751. * request and create/remove connection even host is suspended.
  11752. * 3 major components are offloaded:
  11753. * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
  11754. * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
  11755. * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
  11756. * Current implementation only supports WPA2 CCMP.
  11757. */
  11758. typedef struct {
  11759. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
  11760. /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
  11761. A_UINT32 vdev_id;
  11762. /** enable/disable sap auth offload */
  11763. A_UINT32 enable;
  11764. /** sap ssid */
  11765. wmi_ssid ap_ssid;
  11766. /** authentication mode (defined above) */
  11767. A_UINT32 rsn_authmode;
  11768. /** unicast cipher set */
  11769. A_UINT32 rsn_ucastcipherset;
  11770. /** mcast/group cipher set */
  11771. A_UINT32 rsn_mcastcipherset;
  11772. /** mcast/group management frames cipher set */
  11773. A_UINT32 rsn_mcastmgmtcipherset;
  11774. /** sap channel */
  11775. A_UINT32 channel;
  11776. /** length of psk */
  11777. A_UINT32 psk_len;
  11778. /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
  11779. * A_UINT8 psk[];
  11780. */
  11781. } wmi_sap_ofl_enable_cmd_fixed_param;
  11782. typedef struct {
  11783. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
  11784. /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
  11785. A_UINT32 vdev_id;
  11786. /** aid (association id) of this station */
  11787. A_UINT32 assoc_id;
  11788. /** peer station's mac addr */
  11789. wmi_mac_addr peer_macaddr;
  11790. /** length of association request frame */
  11791. A_UINT32 data_len;
  11792. /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
  11793. * A_UINT8 bufp[];
  11794. */
  11795. } wmi_sap_ofl_add_sta_event_fixed_param;
  11796. typedef enum {
  11797. SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
  11798. SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
  11799. } wmi_sap_ofl_del_sta_flags;
  11800. typedef struct {
  11801. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
  11802. /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
  11803. A_UINT32 vdev_id;
  11804. /** aid (association id) of this station */
  11805. A_UINT32 assoc_id;
  11806. /** peer station's mac addr */
  11807. wmi_mac_addr peer_macaddr;
  11808. /** disassociation reason */
  11809. A_UINT32 reason;
  11810. /** flags - wmi_sap_ofl_del_sta_flags */
  11811. A_UINT32 flags;
  11812. } wmi_sap_ofl_del_sta_event_fixed_param;
  11813. typedef struct {
  11814. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param */
  11815. A_UINT32 vdev_id;
  11816. /* Number of client failure connection attempt */
  11817. A_UINT32 num_retry;
  11818. /* Time in milliseconds to record the client's failure connection attempts */
  11819. A_UINT32 retry_allow_time_ms;
  11820. /* Time in milliseconds to drop the connection request if client is blacklisted */
  11821. A_UINT32 blackout_time_ms;
  11822. } wmi_sap_set_blacklist_param_cmd_fixed_param;
  11823. typedef struct {
  11824. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
  11825. A_UINT32 data_len; /** length in byte of data[]. */
  11826. /** This structure is used to send REQ binary blobs
  11827. * from application/service to firmware where Host drv is pass through .
  11828. * Following this structure is the TLV:
  11829. * A_UINT8 data[]; <-- length in byte given by field data_len.
  11830. */
  11831. } wmi_apfind_cmd_param;
  11832. typedef enum apfind_event_type_e {
  11833. APFIND_MATCH_EVENT = 0,
  11834. APFIND_WAKEUP_EVENT,
  11835. } APFIND_EVENT_TYPE;
  11836. typedef struct {
  11837. A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
  11838. A_UINT32 event_type; /** APFIND_EVENT_TYPE */
  11839. A_UINT32 data_len; /** length in byte of data[]. */
  11840. /** This structure is used to send event binary blobs
  11841. * from firmware to application/service and Host drv.
  11842. * Following this structure is the TLV:
  11843. * A_UINT8 data[]; <-- length in byte given by field data_len.
  11844. */
  11845. } wmi_apfind_event_hdr;
  11846. /**
  11847. * OCB DCC types and structures.
  11848. */
  11849. /**
  11850. * DCC types as described in ETSI TS 102 687
  11851. * Type Format stepSize referenceValue numBits
  11852. * -------------------------------------------------------------------------
  11853. * ndlType_acPrio INTEGER (0...7) 1 number 3
  11854. * ndlType_controlLoop INTEGER (0...7) 1 0 3
  11855. * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
  11856. * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
  11857. * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
  11858. * ndlType_datarate INTEGER (0..7) Table 8 3
  11859. * ndlType_distance INTEGER (0..4095) 1 m 0 12
  11860. * ndlType_numberElements INTEGER (0..63) number 6
  11861. * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
  11862. * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
  11863. * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
  11864. * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
  11865. * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
  11866. * ndlType_timing INTEGER (0..4095) 10 ms 0 12
  11867. * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
  11868. * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
  11869. * ndlType_exponent INTEGER (0..100) 0.1 0 7
  11870. * ndlType_queueStatus Enumeration Table A.2 1
  11871. * ndlType_dccMechanism Bitset Table A.2 6
  11872. *
  11873. * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
  11874. * cannot be changed without breaking WMI compatibility.
  11875. *
  11876. * NOTE: For each of the types, one additional bit is allocated. This
  11877. * leftmost bit is used to indicate that the value is invalid. */
  11878. #define SIZE_NDLTYPE_ACPRIO (1 + 3)
  11879. #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
  11880. #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
  11881. #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
  11882. #define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
  11883. #define SIZE_NDLTYPE_DATARATE (1 + 3)
  11884. #define SIZE_NDLTYPE_DISTANCE (1 + 12)
  11885. #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
  11886. #define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
  11887. #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
  11888. #define SIZE_NDLTYPE_PATHLOSS (1 + 5)
  11889. #define SIZE_NDLTYPE_RXPOWER (1 + 7)
  11890. #define SIZE_NDLTYPE_SNR (1 + 7)
  11891. #define SIZE_NDLTYPE_TIMING (1 + 12)
  11892. #define SIZE_NDLTYPE_TXPOWER (1 + 7)
  11893. #define SIZE_NDLTYPE_RATIO (1 + 7)
  11894. #define SIZE_NDLTYPE_EXPONENT (1 + 7)
  11895. #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
  11896. #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
  11897. #define SIZE_BYTE (8)
  11898. #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
  11899. #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
  11900. #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
  11901. #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
  11902. #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
  11903. #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
  11904. #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
  11905. #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
  11906. #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
  11907. #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
  11908. #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
  11909. #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
  11910. #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
  11911. #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
  11912. #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
  11913. #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
  11914. #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
  11915. #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
  11916. #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
  11917. /** The MCS_COUNT macro cannot be modified without breaking
  11918. * WMI compatibility. */
  11919. #define MCS_COUNT (8)
  11920. /** Flags for ndlType_dccMechanism. */
  11921. typedef enum {
  11922. DCC_MECHANISM_TPC = 1,
  11923. DCC_MECHANISM_TRC = 2,
  11924. DCC_MECHANISM_TDC = 4,
  11925. DCC_MECHANISM_DSC = 8,
  11926. DCC_MECHANISM_TAC = 16,
  11927. DCC_MECHANISM_RESERVED = 32,
  11928. DCC_MECHANISM_ALL = 0x3f,
  11929. } wmi_dcc_ndl_type_dcc_mechanism;
  11930. /** Values for ndlType_queueStatus. */
  11931. typedef enum {
  11932. DCC_QUEUE_CLOSED = 0,
  11933. DCC_QUEUE_OPEN = 1,
  11934. } wmi_dcc_ndl_type_queue_status;
  11935. /** For ndlType_acPrio, use the values in wmi_traffic_ac. */
  11936. /** Values for ndlType_datarate */
  11937. typedef enum {
  11938. DCC_DATARATE_3_MBPS = 0,
  11939. DCC_DATARATE_4_5_MBPS = 1,
  11940. DCC_DATARATE_6_MBPS = 2,
  11941. DCC_DATARATE_9_MBPS = 3,
  11942. DCC_DATARATE_12_MBPS = 4,
  11943. DCC_DATARATE_18_MBPS = 5,
  11944. DCC_DATARATE_24_MBPS = 6,
  11945. DCC_DATARATE_27_MBPS = 7,
  11946. } wmi_dcc_ndl_type_datarate;
  11947. /** Data structure for active state configuration. */
  11948. typedef struct {
  11949. /** TLV tag and len; tag equals
  11950. * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config */
  11951. A_UINT32 tlv_header;
  11952. /**
  11953. * NDL_asStateId, ndlType_numberElements, 1+6 bits.
  11954. * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
  11955. */
  11956. A_UINT32 state_info;
  11957. /**
  11958. * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
  11959. * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
  11960. * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
  11961. * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
  11962. */
  11963. A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
  11964. /**
  11965. * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  11966. * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  11967. * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  11968. * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  11969. */
  11970. A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  11971. /**
  11972. * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  11973. * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  11974. * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  11975. * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  11976. */
  11977. A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
  11978. /**
  11979. * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  11980. * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  11981. * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  11982. * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  11983. */
  11984. A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
  11985. /**
  11986. * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
  11987. * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
  11988. * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
  11989. * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
  11990. */
  11991. A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
  11992. } wmi_dcc_ndl_active_state_config;
  11993. #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
  11994. #define WMI_NDL_AS_STATE_ID_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
  11995. #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
  11996. #define WMI_NDL_AS_CHAN_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
  11997. #define WMI_NDL_AS_DCC_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
  11998. #define WMI_NDL_AS_DCC_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
  11999. #define WMI_NDL_AS_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  12000. #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)
  12001. #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  12002. #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)
  12003. #define WMI_NDL_AS_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  12004. #define WMI_NDL_AS_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  12005. #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
  12006. #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)
  12007. /** Data structure for EDCA/QOS parameters. */
  12008. typedef struct
  12009. {
  12010. /** TLV tag and len; tag equals
  12011. * WMITLV_TAG_STRUC_wmi_qos_parameter */
  12012. A_UINT32 tlv_header;
  12013. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  12014. A_UINT32 aifsn;
  12015. /** Contention Window minimum. Range: 1 - 10 */
  12016. A_UINT32 cwmin;
  12017. /** Contention Window maximum. Range: 1 - 10 */
  12018. A_UINT32 cwmax;
  12019. } wmi_qos_parameter;
  12020. /** Data structure for information specific to a channel. */
  12021. typedef struct {
  12022. /** TLV tag and len; tag equals
  12023. * WMITLV_TAG_STRUC_wmi_ocb_channel */
  12024. A_UINT32 tlv_header;
  12025. A_UINT32 bandwidth; /* MHz units */
  12026. wmi_mac_addr mac_address;
  12027. } wmi_ocb_channel;
  12028. /** Data structure for an element of the schedule array. */
  12029. typedef struct {
  12030. /** TLV tag and len; tag equals
  12031. * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
  12032. A_UINT32 tlv_header;
  12033. A_UINT32 channel_freq; /* MHz units */
  12034. A_UINT32 total_duration; /* ms units */
  12035. A_UINT32 guard_interval; /* ms units */
  12036. } wmi_ocb_schedule_element;
  12037. /** Data structure for OCB configuration. */
  12038. typedef struct {
  12039. /** TLV tag and len; tag equals
  12040. * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
  12041. A_UINT32 tlv_header;
  12042. /** VDEV id(interface) that is being configured */
  12043. A_UINT32 vdev_id;
  12044. A_UINT32 channel_count;
  12045. A_UINT32 schedule_size;
  12046. A_UINT32 flags;
  12047. A_UINT32 ta_max_duration; /* Max duration of continuing multichannel operation without receiving a TA frame (units = seconds) */
  12048. /** This is followed by a TLV array of wmi_channel. */
  12049. /** This is followed by a TLV array of wmi_ocb_channel. */
  12050. /** This is followed by a TLV array of wmi_qos_parameter. */
  12051. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  12052. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  12053. /** This is followed by a TLV array of wmi_ocb_schedule_element. */
  12054. } wmi_ocb_set_config_cmd_fixed_param;
  12055. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
  12056. #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
  12057. #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
  12058. /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
  12059. typedef struct {
  12060. /** TLV tag and len; tag equals
  12061. * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param */
  12062. A_UINT32 tlv_header;
  12063. /* VDEV identifier */
  12064. A_UINT32 vdev_id;
  12065. A_UINT32 status;
  12066. } wmi_ocb_set_config_resp_event_fixed_param;
  12067. /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
  12068. WMI compatibility. */
  12069. #define SIZE_UTC_TIME (10) /* The size of the utc time in bytes. */
  12070. #define SIZE_UTC_TIME_ERROR (5) /* The size of the utc time error in bytes. */
  12071. /** Data structure to set the UTC time. */
  12072. typedef struct {
  12073. /** TLV tag and len; tag equals
  12074. * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
  12075. A_UINT32 tlv_header;
  12076. /* VDEV identifier */
  12077. A_UINT32 vdev_id;
  12078. /** 10 bytes of the utc time. */
  12079. A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME,SIZE_BYTE)];
  12080. /** 5 bytes of the time error. */
  12081. A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR,SIZE_BYTE)];
  12082. } wmi_ocb_set_utc_time_cmd_fixed_param;
  12083. #define WMI_UTC_TIME_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
  12084. #define WMI_UTC_TIME_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
  12085. #define WMI_TIME_ERROR_GET(ptr,byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
  12086. #define WMI_TIME_ERROR_SET(ptr,byte_index,val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
  12087. /** Data structure start the timing advertisement. The template for the
  12088. * timing advertisement frame follows this structure in the WMI command.
  12089. */
  12090. typedef struct {
  12091. /** TLV tag and len; tag equals
  12092. * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
  12093. A_UINT32 tlv_header;
  12094. /* VDEV identifier */
  12095. A_UINT32 vdev_id;
  12096. /** Number of times the TA is sent every 5 seconds. */
  12097. A_UINT32 repeat_rate;
  12098. /** The frequency on which to transmit. */
  12099. A_UINT32 channel_freq; /* MHz units */
  12100. /** The offset into the template of the timestamp. */
  12101. A_UINT32 timestamp_offset;
  12102. /** The offset into the template of the time value. */
  12103. A_UINT32 time_value_offset;
  12104. /** The length of the timing advertisement template. The
  12105. * template is in the TLV data. */
  12106. A_UINT32 timing_advert_template_length;
  12107. /** This is followed by a binary array containing the TA template. */
  12108. } wmi_ocb_start_timing_advert_cmd_fixed_param;
  12109. /** Data structure to stop the timing advertisement. */
  12110. typedef struct {
  12111. /** TLV tag and len; tag equals
  12112. * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
  12113. A_UINT32 tlv_header;
  12114. /* VDEV identifier */
  12115. A_UINT32 vdev_id;
  12116. A_UINT32 channel_freq; /* MHz units */
  12117. } wmi_ocb_stop_timing_advert_cmd_fixed_param;
  12118. /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
  12119. typedef struct {
  12120. /** TLV tag and len; tag equals
  12121. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
  12122. A_UINT32 tlv_header;
  12123. /* VDEV identifier */
  12124. A_UINT32 vdev_id;
  12125. A_UINT32 reserved;
  12126. } wmi_ocb_get_tsf_timer_cmd_fixed_param;
  12127. /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
  12128. typedef struct {
  12129. /** TLV tag and len; tag equals
  12130. * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
  12131. A_UINT32 tlv_header;
  12132. /* VDEV identifier */
  12133. A_UINT32 vdev_id;
  12134. A_UINT32 tsf_timer_high;
  12135. A_UINT32 tsf_timer_low;
  12136. } wmi_ocb_get_tsf_timer_resp_event_fixed_param;
  12137. /** Data structure for DCC stats configuration per channel. */
  12138. typedef struct {
  12139. /** TLV tag and len; tag equals
  12140. * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
  12141. A_UINT32 tlv_header;
  12142. /** The channel for which this applies, 16 bits. */
  12143. /** The dcc_stats_bitmap, 8 bits. */
  12144. A_UINT32 chan_info;
  12145. /** Demodulation model parameters. */
  12146. /**
  12147. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  12148. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  12149. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  12150. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  12151. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  12152. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  12153. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  12154. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  12155. */
  12156. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  12157. /** Communication ranges. */
  12158. /**
  12159. * tx_power, ndlType_txPower, 1+7 bits.
  12160. * datarate, ndlType_datarate, 1+3 bits.
  12161. */
  12162. A_UINT32 tx_power_datarate;
  12163. /**
  12164. * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
  12165. * NDL_estCommRange, ndlType_distance, 1+12 bits.
  12166. */
  12167. A_UINT32 carrier_sense_est_comm_range;
  12168. /** Channel load measures. */
  12169. /**
  12170. * dccSensitivity, ndlType_rxPower, 1+7 bits.
  12171. * carrierSense, ndlType_rxPower, 1+7 bits.
  12172. * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
  12173. */
  12174. A_UINT32 dcc_stats;
  12175. /**
  12176. * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
  12177. * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
  12178. */
  12179. A_UINT32 packet_stats;
  12180. /**
  12181. * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
  12182. */
  12183. A_UINT32 channel_busy_time;
  12184. /** Transmit packet statistics. */
  12185. /**
  12186. * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  12187. * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  12188. * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  12189. * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  12190. */
  12191. A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_ARRIVALRATE)];
  12192. /**
  12193. * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  12194. * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  12195. * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  12196. * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  12197. */
  12198. A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  12199. /**
  12200. * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  12201. * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  12202. * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  12203. * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  12204. */
  12205. A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_CHANNELUSE)];
  12206. /**
  12207. * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  12208. * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  12209. * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  12210. * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  12211. */
  12212. A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  12213. } wmi_dcc_ndl_stats_per_channel;
  12214. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  12215. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  12216. #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  12217. #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  12218. #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
  12219. #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
  12220. #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  12221. #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  12222. #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
  12223. #define WMI_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
  12224. #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
  12225. #define WMI_TX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
  12226. #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
  12227. #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
  12228. #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
  12229. #define WMI_NDL_EST_COMM_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
  12230. #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
  12231. #define WMI_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
  12232. #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
  12233. #define WMI_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
  12234. #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
  12235. #define WMI_NDL_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
  12236. #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
  12237. #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
  12238. #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
  12239. #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr,val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
  12240. #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
  12241. #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr,val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
  12242. #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)
  12243. #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)
  12244. #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)
  12245. #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)
  12246. #define WMI_NDL_TX_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  12247. #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)
  12248. #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)
  12249. #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)
  12250. /** Bitmap for DCC stats. */
  12251. typedef enum {
  12252. DCC_STATS_DEMODULATION_MODEL = 1,
  12253. DCC_STATS_COMMUNICATION_RANGES = 2,
  12254. DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
  12255. DCC_STATS_TRANSMIT_PACKET_STATS = 8,
  12256. DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
  12257. DCC_STATS_ALL = 0xff,
  12258. } wmi_dcc_stats_bitmap;
  12259. /** Data structure for getting the DCC stats. */
  12260. typedef struct {
  12261. /** TLV tag and len; tag equals
  12262. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param */
  12263. A_UINT32 tlv_header;
  12264. /* VDEV identifier */
  12265. A_UINT32 vdev_id;
  12266. /** The number of channels for which stats are being requested. */
  12267. A_UINT32 num_channels;
  12268. /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
  12269. } wmi_dcc_get_stats_cmd_fixed_param;
  12270. typedef struct {
  12271. /** TLV tag and len; tag equals
  12272. * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request */
  12273. A_UINT32 tlv_header;
  12274. /** The channel for which this applies. */
  12275. A_UINT32 chan_freq; /* MHz units */
  12276. /** The DCC stats being requested. */
  12277. A_UINT32 dcc_stats_bitmap;
  12278. } wmi_dcc_channel_stats_request;
  12279. /** Data structure for the response with the DCC stats. */
  12280. typedef struct {
  12281. /** TLV tag and len; tag equals
  12282. * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param */
  12283. A_UINT32 tlv_header;
  12284. /* VDEV identifier */
  12285. A_UINT32 vdev_id;
  12286. /** Number of channels in the response. */
  12287. A_UINT32 num_channels;
  12288. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  12289. } wmi_dcc_get_stats_resp_event_fixed_param;
  12290. /** Data structure for clearing the DCC stats. */
  12291. typedef struct {
  12292. /** TLV tag and len; tag equals
  12293. * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param */
  12294. A_UINT32 tlv_header;
  12295. /* VDEV identifier */
  12296. A_UINT32 vdev_id;
  12297. A_UINT32 dcc_stats_bitmap;
  12298. } wmi_dcc_clear_stats_cmd_fixed_param;
  12299. /** Data structure for the pushed DCC stats */
  12300. typedef struct {
  12301. /** TLV tag and len; tag equals
  12302. * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param */
  12303. A_UINT32 tlv_header;
  12304. /* VDEV identifier */
  12305. A_UINT32 vdev_id;
  12306. /** The number of channels in the response. */
  12307. A_UINT32 num_channels;
  12308. /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
  12309. } wmi_dcc_stats_event_fixed_param;
  12310. /** Data structure for updating NDL per channel. */
  12311. typedef struct {
  12312. /** TLV tag and len; tag equals
  12313. * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan */
  12314. A_UINT32 tlv_header;
  12315. /**
  12316. * Channel frequency, 16 bits
  12317. * NDL_numActiveState, ndlType_numberElements, 1+6 bits
  12318. */
  12319. A_UINT32 chan_info;
  12320. /**
  12321. * NDL_minDccSampling, 10 bits.
  12322. * Maximum time interval between subsequent checks of the DCC rules.
  12323. */
  12324. A_UINT32 ndl_min_dcc_sampling;
  12325. /**
  12326. * dcc_enable, 1 bit.
  12327. * dcc_stats_enable, 1 bit.
  12328. * dcc_stats_interval, 16 bits.
  12329. */
  12330. A_UINT32 dcc_flags;
  12331. /** General DCC configuration. */
  12332. /**
  12333. * NDL_timeUp, ndlType_timing, 1+12 bits.
  12334. * NDL_timeDown, ndlType_timing, 1+12 bits.
  12335. */
  12336. A_UINT32 general_config;
  12337. /** Transmit power thresholds. */
  12338. /**
  12339. * NDL_minTxPower, ndlType_txPower, 1+7 bits.
  12340. * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
  12341. */
  12342. A_UINT32 min_max_tx_power; /* see "ETSI TS 102 687" table above for units */
  12343. /**
  12344. * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
  12345. * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
  12346. * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
  12347. * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
  12348. */
  12349. /* see "ETSI TS 102 687" table above for units */
  12350. A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_TXPOWER)];
  12351. /** Packet timing thresholds. */
  12352. /**
  12353. * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  12354. * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  12355. * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  12356. * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  12357. */
  12358. A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETDURATION)];
  12359. /**
  12360. * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
  12361. * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
  12362. */
  12363. A_UINT32 min_max_packet_interval;
  12364. /**
  12365. * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
  12366. * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
  12367. * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
  12368. * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
  12369. */
  12370. A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_PACKETINTERVAL)];
  12371. /** Packet datarate thresholds. */
  12372. /**
  12373. * NDL_minDatarate, ndlType_datarate, 1+3 bits.
  12374. * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
  12375. */
  12376. A_UINT32 min_max_datarate;
  12377. /**
  12378. * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
  12379. * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
  12380. * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
  12381. * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
  12382. */
  12383. A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC,SIZE_NDLTYPE_DATARATE)];
  12384. /** Receive signal thresholds. */
  12385. /**
  12386. * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
  12387. * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
  12388. * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
  12389. */
  12390. A_UINT32 min_max_def_carrier_sense;
  12391. /** Receive model parameter. */
  12392. /**
  12393. * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
  12394. * NDL_maxCsRange, ndlType_distance, 1+12 bits.
  12395. * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
  12396. */
  12397. A_UINT32 receive_model_parameter;
  12398. /**
  12399. * NDL_minSNR, ndlType_snr, 1+7 bits.
  12400. */
  12401. A_UINT32 receive_model_parameter_2;
  12402. /** Demodulation model parameters. */
  12403. /**
  12404. * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
  12405. * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
  12406. * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
  12407. * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
  12408. * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
  12409. * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
  12410. * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
  12411. * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
  12412. */
  12413. A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT,SIZE_NDLTYPE_SNR)];
  12414. /** Transmit model parameters. */
  12415. /**
  12416. * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
  12417. * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
  12418. * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
  12419. * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
  12420. */
  12421. A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
  12422. /**
  12423. * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
  12424. * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
  12425. * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
  12426. * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
  12427. */
  12428. A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
  12429. /**
  12430. * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
  12431. * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
  12432. * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
  12433. * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
  12434. */
  12435. A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
  12436. /**
  12437. * NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits.
  12438. */
  12439. A_UINT32 tm_max_channel_use;
  12440. /**
  12441. * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
  12442. * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
  12443. * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
  12444. * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
  12445. */
  12446. A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
  12447. /** Channel load thresholds. */
  12448. /**
  12449. * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
  12450. * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
  12451. */
  12452. A_UINT32 min_max_channel_load;
  12453. /** Transmit queue parameters. */
  12454. /**
  12455. * NDL_numQueue, ndlType_acPrio, 1+3 bits.
  12456. * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
  12457. * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
  12458. * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
  12459. * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
  12460. */
  12461. A_UINT32 transmit_queue_parameters;
  12462. /**
  12463. * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
  12464. * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
  12465. * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
  12466. * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
  12467. */
  12468. A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
  12469. } wmi_dcc_ndl_chan;
  12470. #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
  12471. #define WMI_CHAN_FREQ_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
  12472. #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
  12473. #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr,val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
  12474. #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
  12475. #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
  12476. #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
  12477. #define WMI_NDL_MEASURE_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
  12478. #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
  12479. #define WMI_NDL_DCC_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
  12480. #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
  12481. #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
  12482. #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
  12483. #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
  12484. #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
  12485. #define WMI_NDL_TIME_UP_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
  12486. #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
  12487. #define WMI_NDL_TIME_DOWN_SET(ptr,val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
  12488. #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
  12489. #define WMI_NDL_MIN_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
  12490. #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
  12491. #define WMI_NDL_MAX_TX_POWER_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
  12492. #define WMI_NDL_DEF_TX_POWER_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
  12493. #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)
  12494. #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
  12495. #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)
  12496. #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
  12497. #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
  12498. #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
  12499. #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
  12500. #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
  12501. #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)
  12502. #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
  12503. #define WMI_NDL_MIN_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
  12504. #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
  12505. #define WMI_NDL_MAX_DATARATE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
  12506. #define WMI_NDL_DEF_DATARATE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
  12507. #define WMI_NDL_DEF_DATARATE_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
  12508. #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
  12509. #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
  12510. #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
  12511. #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
  12512. #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
  12513. #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
  12514. #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
  12515. #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
  12516. #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
  12517. #define WMI_NDL_MAX_CS_RANGE_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
  12518. #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
  12519. #define WMI_NDL_REF_PATH_LOSS_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
  12520. #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
  12521. #define WMI_NDL_MIN_SNR_SET(ptr,val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
  12522. #define WMI_NDL_SNR_BACKOFF_GET(ptr,mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
  12523. #define WMI_NDL_SNR_BACKOFF_SET(ptr,mcs,val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
  12524. #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)
  12525. #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)
  12526. #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)
  12527. #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)
  12528. #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)
  12529. #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)
  12530. #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
  12531. #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr,val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
  12532. #define WMI_NDL_TM_CHANNEL_USE_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
  12533. #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)
  12534. #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
  12535. #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
  12536. #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
  12537. #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr,val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
  12538. #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
  12539. #define WMI_NDL_NUM_QUEUE_SET(ptr,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
  12540. #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr,acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
  12541. #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr,acprio,val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
  12542. #define WMI_NDL_REF_QUEUE_LEN_GET(ptr,acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
  12543. #define WMI_NDL_REF_QUEUE_LEN_SET(ptr,acprio,val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
  12544. /** Data structure for updating the NDL. */
  12545. typedef struct {
  12546. /** TLV tag and len; tag equals
  12547. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
  12548. A_UINT32 tlv_header;
  12549. /* VDEV identifier */
  12550. A_UINT32 vdev_id;
  12551. /** The number of channels in the request. */
  12552. A_UINT32 num_channel;
  12553. /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
  12554. /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
  12555. } wmi_dcc_update_ndl_cmd_fixed_param;
  12556. typedef struct {
  12557. /** TLV tag and len; tag equals
  12558. * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param */
  12559. A_UINT32 tlv_header;
  12560. /* VDEV identifier */
  12561. A_UINT32 vdev_id;
  12562. A_UINT32 status;
  12563. } wmi_dcc_update_ndl_resp_event_fixed_param;
  12564. /* Actions for TSF timestamp */
  12565. typedef enum {
  12566. TSF_TSTAMP_CAPTURE_REQ = 1,
  12567. TSF_TSTAMP_CAPTURE_RESET = 2,
  12568. TSF_TSTAMP_READ_VALUE = 3,
  12569. TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
  12570. } wmi_tsf_tstamp_action;
  12571. typedef struct {
  12572. /** TLV tag and len; tag equals
  12573. * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
  12574. A_UINT32 tlv_header;
  12575. /** unique id identifying the VDEV, generated by the caller */
  12576. A_UINT32 vdev_id;
  12577. /* action type, refer to wmi_tsf_tstamp_action */
  12578. A_UINT32 tsf_action;
  12579. } wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
  12580. typedef struct {
  12581. /* TLV tag and len; tag equals
  12582. * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
  12583. A_UINT32 tlv_header;
  12584. /* VDEV identifier */
  12585. A_UINT32 vdev_id;
  12586. /* low 32bit of tsf */
  12587. A_UINT32 tsf_low;
  12588. /* high 32 bit of tsf */
  12589. A_UINT32 tsf_high;
  12590. /* low 32 bits of qtimer */
  12591. A_UINT32 qtimer_low;
  12592. /* high 32 bits of qtimer */
  12593. A_UINT32 qtimer_high;
  12594. } wmi_vdev_tsf_report_event_fixed_param;
  12595. /* ie_id values:
  12596. * 0 to 255 are used for individual IEEE802.11 Information Element types
  12597. */
  12598. #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
  12599. /* source values: */
  12600. #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
  12601. /* band values: */
  12602. typedef enum {
  12603. WMI_SET_VDEV_IE_BAND_ALL = 0,
  12604. WMI_SET_VDEV_IE_BAND_2_4GHZ,
  12605. WMI_SET_VDEV_IE_BAND_5GHZ,
  12606. } wmi_set_vdev_ie_band;
  12607. typedef struct {
  12608. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
  12609. A_UINT32 tlv_header;
  12610. /** unique id identifying the VDEV, generated by the caller */
  12611. A_UINT32 vdev_id;
  12612. /** unique id to identify the ie_data as defined by ieee 802.11 spec */
  12613. A_UINT32 ie_id;
  12614. /** ie_len corresponds to num of bytes in ie_data[] */
  12615. A_UINT32 ie_len;
  12616. /** source of this command */
  12617. A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
  12618. /** band for this IE - se wmi_set_vdev_ie_band enum */
  12619. A_UINT32 band;
  12620. /**
  12621. * Following this structure is the TLV byte stream of ie data of length ie_buf_len:
  12622. * A_UINT8 ie_data[];
  12623. *
  12624. */
  12625. } wmi_vdev_set_ie_cmd_fixed_param;
  12626. /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
  12627. typedef struct {
  12628. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param */
  12629. /** Set Preferred Channel List **/
  12630. /** # of channels to scan */
  12631. A_UINT32 num_chan;
  12632. /**
  12633. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  12634. * structure. The TLV's are:
  12635. * A_UINT32 channel_list[];
  12636. **/
  12637. } wmi_soc_set_pcl_cmd_fixed_param;
  12638. /* Values for channel_weight */
  12639. typedef enum {
  12640. WMI_PCL_WEIGHT_DISALLOW = 0,
  12641. WMI_PCL_WEIGHT_LOW = 1,
  12642. WMI_PCL_WEIGHT_MEDIUM = 2,
  12643. WMI_PCL_WEIGHT_HIGH = 3,
  12644. WMI_PCL_WEIGHT_VERY_HIGH = 4,
  12645. } wmi_pcl_chan_weight;
  12646. typedef struct {
  12647. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param */
  12648. /** Set Preferred Channel List **/
  12649. /** pdev_id for identifying the MAC
  12650. * See macros starting with WMI_PDEV_ID_ for values.
  12651. */
  12652. A_UINT32 pdev_id;
  12653. /** # of channels to scan */
  12654. A_UINT32 num_chan;
  12655. /**
  12656. * TLV (tag length value) parameters follow the wmi_soc_set_pcl_cmd
  12657. 12930 * structure. The TLV's are:
  12658. * A_UINT32 channel_weight[]; channel order & size will be as per the list provided in WMI_SCAN_CHAN_LIST_CMDID
  12659. **/
  12660. } wmi_pdev_set_pcl_cmd_fixed_param;
  12661. /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
  12662. typedef struct {
  12663. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param */
  12664. /** Set Hardware Mode **/
  12665. /* Hardware Mode Index */
  12666. A_UINT32 hw_mode_index;
  12667. } wmi_soc_set_hw_mode_cmd_fixed_param;
  12668. typedef struct {
  12669. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param */
  12670. /** Set Hardware Mode **/
  12671. /** pdev_id for identifying the MAC
  12672. * See macros starting with WMI_PDEV_ID_ for values.
  12673. */
  12674. A_UINT32 pdev_id;
  12675. /* Hardware Mode Index */
  12676. A_UINT32 hw_mode_index;
  12677. } wmi_pdev_set_hw_mode_cmd_fixed_param;
  12678. /* DEPRECATED - use wmi_pdev_set_dual_mac_config_cmd_fixed_param instead */
  12679. typedef struct {
  12680. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param */
  12681. /** Set Dual MAC Firmware Configuration **/
  12682. /* Concurrent scan configuration bits */
  12683. A_UINT32 concurrent_scan_config_bits;
  12684. /* Firmware mode configuration bits */
  12685. A_UINT32 fw_mode_config_bits;
  12686. } wmi_soc_set_dual_mac_config_cmd_fixed_param;
  12687. typedef struct {
  12688. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param */
  12689. /** Set Dual MAC Firmware Configuration **/
  12690. /** pdev_id for identifying the MAC
  12691. * See macros starting with WMI_PDEV_ID_ for values.
  12692. */
  12693. A_UINT32 pdev_id;
  12694. /* Concurrent scan configuration bits */
  12695. A_UINT32 concurrent_scan_config_bits;
  12696. /* Firmware mode configuration bits */
  12697. A_UINT32 fw_mode_config_bits;
  12698. } wmi_pdev_set_mac_config_cmd_fixed_param;
  12699. typedef struct { /* DEPRECATED */
  12700. A_UINT32 num_tx_chains;
  12701. A_UINT32 num_rx_chains;
  12702. A_UINT32 reserved[2];
  12703. } soc_num_tx_rx_chains;
  12704. typedef struct {
  12705. A_UINT32 num_tx_chains_2g;
  12706. A_UINT32 num_rx_chains_2g;
  12707. A_UINT32 num_tx_chains_5g;
  12708. A_UINT32 num_rx_chains_5g;
  12709. } band_num_tx_rx_chains;
  12710. typedef union { /* DEPRECATED */
  12711. soc_num_tx_rx_chains soc_txrx_chain_setting;
  12712. band_num_tx_rx_chains band_txrx_chain_setting;
  12713. } antenna_num_tx_rx_chains;
  12714. typedef enum {
  12715. ANTENNA_MODE_DISABLED = 0x0,
  12716. ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
  12717. /* reserved */
  12718. } antenna_mode_reason;
  12719. /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
  12720. typedef struct {
  12721. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param */
  12722. /* the reason for setting antenna mode, refer antenna_mode_reason */
  12723. A_UINT32 reason;
  12724. /*
  12725. * The above reason parameter will select whether the following union
  12726. * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
  12727. */
  12728. antenna_num_tx_rx_chains num_txrx_chains_setting;
  12729. } wmi_soc_set_antenna_mode_cmd_fixed_param;
  12730. typedef struct {
  12731. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param */
  12732. /** pdev_id for identifying the MAC
  12733. * See macros starting with WMI_PDEV_ID_ for values.
  12734. */
  12735. A_UINT32 pdev_id;
  12736. /* Bits 0-15 is the number of RX chains and 16-31 is the number of TX chains */
  12737. A_UINT32 num_txrx_chains;
  12738. } wmi_pdev_set_antenna_mode_cmd_fixed_param;
  12739. /** Data structure for information specific to a VDEV to MAC mapping. */
  12740. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
  12741. typedef struct {
  12742. /** TLV tag and len; tag equals
  12743. * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
  12744. A_UINT32 tlv_header;
  12745. A_UINT32 vdev_id; /* VDEV ID */
  12746. A_UINT32 mac_id; /* MAC ID */
  12747. } wmi_soc_set_hw_mode_response_vdev_mac_entry;
  12748. /** Data structure for information specific to a VDEV to MAC mapping. */
  12749. typedef struct {
  12750. /** TLV tag and len; tag equals
  12751. * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
  12752. A_UINT32 tlv_header;
  12753. /** pdev_id for identifying the MAC
  12754. * See macros starting with WMI_PDEV_ID_ for values.
  12755. */
  12756. A_UINT32 pdev_id;
  12757. A_UINT32 vdev_id;
  12758. } wmi_pdev_set_hw_mode_response_vdev_mac_entry;
  12759. /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
  12760. typedef struct {
  12761. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param */
  12762. /** Set Hardware Mode Response Event **/
  12763. /* Status of set_hw_mode command */
  12764. /*
  12765. * Values for Status:
  12766. * 0 - OK; command successful
  12767. * 1 - EINVAL; Requested invalid hw_mode
  12768. * 2 - ECANCELED; HW mode change canceled
  12769. * 3 - ENOTSUP; HW mode not supported
  12770. * 4 - EHARDWARE; HW mode change prevented by hardware
  12771. * 5 - EPENDING; HW mode change is pending
  12772. * 6 - ECOEX; HW mode change conflict with Coex
  12773. */
  12774. A_UINT32 status;
  12775. /* Configured Hardware Mode */
  12776. A_UINT32 cfgd_hw_mode_index;
  12777. /* Number of Vdev to Mac entries */
  12778. A_UINT32 num_vdev_mac_entries;
  12779. /**
  12780. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  12781. * structure. The TLV's are:
  12782. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  12783. */
  12784. } wmi_soc_set_hw_mode_response_event_fixed_param;
  12785. typedef struct {
  12786. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param */
  12787. /** Set Hardware Mode Response Event **/
  12788. /** pdev_id for identifying the MAC
  12789. * See macros starting with WMI_PDEV_ID_ for values.
  12790. */
  12791. A_UINT32 pdev_id;
  12792. /* Status of set_hw_mode command */
  12793. /*
  12794. * Values for Status:
  12795. * 0 - OK; command successful
  12796. * 1 - EINVAL; Requested invalid hw_mode
  12797. * 2 - ECANCELED; HW mode change canceled
  12798. * 3 - ENOTSUP; HW mode not supported
  12799. * 4 - EHARDWARE; HW mode change prevented by hardware
  12800. * 5 - EPENDING; HW mode change is pending
  12801. * 6 - ECOEX; HW mode change conflict with Coex
  12802. */
  12803. A_UINT32 status;
  12804. /* Configured Hardware Mode */
  12805. A_UINT32 cfgd_hw_mode_index;
  12806. /* Number of Vdev to Mac entries */
  12807. A_UINT32 num_vdev_mac_entries;
  12808. /**
  12809. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  12810. * structure. The TLV's are:
  12811. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  12812. */
  12813. } wmi_pdev_set_hw_mode_response_event_fixed_param;
  12814. /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
  12815. typedef struct {
  12816. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param */
  12817. /** Hardware Mode Transition Event **/
  12818. /* Original or old Hardware mode */
  12819. A_UINT32 old_hw_mode_index;
  12820. /* New Hardware Mode */
  12821. A_UINT32 new_hw_mode_index;
  12822. /* Number of Vdev to Mac entries */
  12823. A_UINT32 num_vdev_mac_entries;
  12824. /**
  12825. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  12826. * structure. The TLV's are:
  12827. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  12828. */
  12829. } wmi_soc_hw_mode_transition_event_fixed_param;
  12830. typedef struct {
  12831. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param */
  12832. /** Hardware Mode Transition Event **/
  12833. /** pdev_id for identifying the MAC
  12834. * See macros starting with WMI_PDEV_ID_ for values.
  12835. */
  12836. A_UINT32 pdev_id;
  12837. /* Original or old Hardware mode */
  12838. A_UINT32 old_hw_mode_index;
  12839. /* New Hardware Mode */
  12840. A_UINT32 new_hw_mode_index;
  12841. /* Number of Vdev to Mac entries */
  12842. A_UINT32 num_vdev_mac_entries;
  12843. /**
  12844. * TLV (tag length value) parameters follow the soc_set_hw_mode_response_event
  12845. * structure. The TLV's are:
  12846. * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
  12847. */
  12848. } wmi_pdev_hw_mode_transition_event_fixed_param;
  12849. /**
  12850. * This command is sent from WLAN host driver to firmware for
  12851. * plugging in reorder queue desc to lithium hw.
  12852. *
  12853. * Example: plug-in queue desc for TID 5
  12854. * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
  12855. * (vdev_id = PEER vdev id,
  12856. * peer_macaddr = PEER mac addr,
  12857. * tid = 5,
  12858. * queue_ptr_lo = queue desc addr lower 32 bits,
  12859. * queue_ptr_hi = queue desc addr higher 32 bits,
  12860. * queue_no = 16-bit number assigned by host for queue,
  12861. * stored in bits 15:0 of queue_no field)
  12862. */
  12863. typedef struct {
  12864. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param */
  12865. A_UINT32 vdev_id;
  12866. wmi_mac_addr peer_macaddr; /* peer mac address */
  12867. A_UINT32 tid; /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
  12868. A_UINT32 queue_ptr_lo; /* lower 32 bits of queue desc adddress */
  12869. A_UINT32 queue_ptr_hi; /* upper 32 bits of queue desc adddress */
  12870. A_UINT32 queue_no; /* 16-bit number assigned by host for queue,
  12871. stored in bits 15:0 of queue_no field */
  12872. } wmi_peer_reorder_queue_setup_cmd_fixed_param;
  12873. /**
  12874. * This command is sent from WLAN host driver to firmware for
  12875. * removing one or more reorder queue desc to lithium hw.
  12876. *
  12877. * Example: remove queue desc for all TIDs
  12878. * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
  12879. * (vdev_id = PEER vdev id,
  12880. * peer_macaddr = PEER mac addr,
  12881. * tid = 0x1FFFF,
  12882. */
  12883. typedef struct {
  12884. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param */
  12885. A_UINT32 vdev_id;
  12886. wmi_mac_addr peer_macaddr; /* peer mac address */
  12887. A_UINT32 tid_mask; /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
  12888. } wmi_peer_reorder_queue_remove_cmd_fixed_param;
  12889. /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param instead */
  12890. typedef struct {
  12891. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param */
  12892. /** Set Dual MAC Config Response Event **/
  12893. /* Status for set_dual_mac_config command */
  12894. /*
  12895. * Values for Status:
  12896. * 0 - OK; command successful
  12897. * 1 - EINVAL; Requested invalid hw_mode
  12898. * 3 - ENOTSUP; HW mode not supported
  12899. * 4 - EHARDWARE; HW mode change prevented by hardware
  12900. * 6 - ECOEX; HW mode change conflict with Coex
  12901. */
  12902. A_UINT32 status;
  12903. } wmi_soc_set_dual_mac_config_response_event_fixed_param;
  12904. typedef struct {
  12905. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param */
  12906. /** Set Dual MAC Config Response Event **/
  12907. /** pdev_id for identifying the MAC
  12908. * See macros starting with WMI_PDEV_ID_ for values.
  12909. */
  12910. A_UINT32 pdev_id;
  12911. /* Status for set_dual_mac_config command */
  12912. /*
  12913. * Values for Status:
  12914. * 0 - OK; command successful
  12915. * 1 - EINVAL; Requested invalid hw_mode
  12916. * 3 - ENOTSUP; HW mode not supported
  12917. * 4 - EHARDWARE; HW mode change prevented by hardware
  12918. * 6 - ECOEX; HW mode change conflict with Coex
  12919. */
  12920. A_UINT32 status;
  12921. } wmi_pdev_set_mac_config_response_event_fixed_param;
  12922. typedef enum {
  12923. MAWC_MOTION_STATE_UNKNOWN,
  12924. MAWC_MOTION_STATE_STATIONARY,
  12925. MAWC_MOTION_STATE_WALK,
  12926. MAWC_MOTION_STATE_TRANSIT,
  12927. } MAWC_MOTION_STATE;
  12928. typedef enum {
  12929. MAWC_SENSOR_STATUS_OK,
  12930. MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
  12931. MAWC_SENSOR_STATUS_SHUTDOWN,
  12932. } MAWC_SENSOR_STATUS;
  12933. typedef struct {
  12934. /* TLV tag and len; tag equals
  12935. * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
  12936. A_UINT32 tlv_header;
  12937. /** new motion state, MAWC_MOTION_STATE */
  12938. A_UINT32 motion_state;
  12939. /** status code of sensor, MAWC_SENSOR_STATUS */
  12940. A_UINT32 sensor_status;
  12941. } wmi_mawc_sensor_report_ind_cmd_fixed_param;
  12942. /* MBO flag field definition */
  12943. /* Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
  12944. * 1 - Allow to connect to MBO AP only
  12945. * Bit 1-31 : reserved.
  12946. */
  12947. #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
  12948. typedef struct {
  12949. /* TLV tag and len; tag equals
  12950. * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param */
  12951. A_UINT32 tlv_header;
  12952. /** vdev id */
  12953. A_UINT32 vdev_id;
  12954. /** enable or disable MBO */
  12955. A_UINT32 enable;
  12956. /** MBO flags, refer to definition of MBO flags*/
  12957. A_UINT32 flags;
  12958. } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
  12959. typedef struct {
  12960. /* TLV tag and len; tag equals
  12961. * WMITLV_TAG_ARRAY_STRUC */
  12962. A_UINT32 tlv_header;
  12963. /** Current operating class number */
  12964. A_UINT32 cur_op_class;
  12965. /** Country string of current reg domain,
  12966. * the expected value should be same as country str defined
  12967. * in country IE.
  12968. * 3 octets (COUNTRY_STR) + 1 octet (always 0)
  12969. * The ordering of this array must be maintained,
  12970. * even when a big-endian host's WMI messages undergo
  12971. * automatic byte reordering for conversion to the
  12972. * little-endian ordering required by the target.
  12973. * On big-endian hosts, this array may need to be byte-swapped
  12974. * by the host, so the subsequent automatic byte-swap
  12975. * will result in the correct final byte order.
  12976. * global operating class: set country_str[0]=0
  12977. */
  12978. A_UINT8 country_str[4];
  12979. /** Supported operating class number in current regdomain */
  12980. A_UINT32 supp_op_class_num;
  12981. /* The TLVs will follow. */
  12982. /* A_UINT32 supp_op_class_list[] */
  12983. } wmi_supported_operating_class_param;
  12984. typedef struct {
  12985. /* TLV tag and len; tag equals
  12986. * WMITLV_TAG_ARRAY_STRUC */
  12987. A_UINT32 tlv_header;
  12988. /** non preferred channel attribute length */
  12989. A_UINT32 non_prefer_ch_attr_len;
  12990. /* The TLVs will follow. */
  12991. /** A_UINT8 non_prefer_ch_attr[];*/
  12992. } wmi_mbo_non_preferred_channel_report_param;
  12993. typedef struct {
  12994. /* TLV tag and len; tag equals
  12995. * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
  12996. A_UINT32 tlv_header;
  12997. /* enable(1) or disable(0) */
  12998. A_UINT32 enable;
  12999. } wmi_mawc_enable_sensor_event_fixed_param;
  13000. typedef struct {
  13001. /* TLV tag and len; tag equals
  13002. * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
  13003. A_UINT32 tlv_header;
  13004. /* Unique id identifying the VDEV */
  13005. A_UINT32 vdev_id;
  13006. /* enable(1) or disable(0) MAWC */
  13007. A_UINT32 enable;
  13008. /* ratio of skipping suppressing scan, skip one out of x */
  13009. A_UINT32 suppress_ratio;
  13010. } wmi_extscan_configure_mawc_cmd_fixed_param;
  13011. typedef struct {
  13012. /* TLV tag and len; tag equals
  13013. * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
  13014. A_UINT32 tlv_header;
  13015. /* Unique id identifying the VDEV */
  13016. A_UINT32 vdev_id;
  13017. /* enable(1) or disable(0) MAWC */
  13018. A_UINT32 enable;
  13019. /* ratio of exponential backoff, next = current + current*ratio/100 */
  13020. A_UINT32 exp_backoff_ratio;
  13021. /* initial scan interval(msec) */
  13022. A_UINT32 init_scan_interval;
  13023. /* max scan interval(msec) */
  13024. A_UINT32 max_scan_interval;
  13025. } wmi_nlo_configure_mawc_cmd_fixed_param;
  13026. typedef struct {
  13027. /* TLV tag and len; tag equals
  13028. * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
  13029. A_UINT32 tlv_header;
  13030. /* Unique id identifying the VDEV */
  13031. A_UINT32 vdev_id;
  13032. /* enable(1) or disable(0) MAWC */
  13033. A_UINT32 enable;
  13034. /* data traffic load (kBps) to register CMC */
  13035. A_UINT32 traffic_load_threshold;
  13036. /* RSSI threshold (dBm) to scan for Best AP */
  13037. A_UINT32 best_ap_rssi_threshold;
  13038. /* high RSSI threshold adjustment in Stationary to suppress scan */
  13039. A_UINT32 rssi_stationary_high_adjust;
  13040. /* low RSSI threshold adjustment in Stationary to suppress scan */
  13041. A_UINT32 rssi_stationary_low_adjust;
  13042. } wmi_roam_configure_mawc_cmd_fixed_param;
  13043. #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
  13044. #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
  13045. typedef enum {
  13046. PACKET_FILTER_TYPE_INVALID = 0,
  13047. PACKET_FILTER_TYPE_FILTER_PKT,
  13048. PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
  13049. PACKET_FILTER_TYPE_MAX_ENUM_SIZE
  13050. } WMI_PACKET_FILTER_FILTER_TYPE;
  13051. typedef enum {
  13052. PACKET_FILTER_PROTO_TYPE_INVALID = 0,
  13053. /* L2 header */
  13054. PACKET_FILTER_PROTO_TYPE_MAC,
  13055. PACKET_FILTER_PROTO_TYPE_SNAP,
  13056. /* L3 header (EtherType) */
  13057. PACKET_FILTER_PROTO_TYPE_IPV4,
  13058. PACKET_FILTER_PROTO_TYPE_IPV6,
  13059. /* L4 header (IP protocol) */
  13060. PACKET_FILTER_PROTO_TYPE_UDP,
  13061. PACKET_FILTER_PROTO_TYPE_TCP,
  13062. PACKET_FILTER_PROTO_TYPE_ICMPV6,
  13063. PACKET_FILTER_PROTO_TYPE_MAX
  13064. } WMI_PACKET_FILTER_PROTO_TYPE;
  13065. typedef enum {
  13066. PACKET_FILTER_CMP_TYPE_INVALID = 0,
  13067. PACKET_FILTER_CMP_TYPE_EQUAL,
  13068. PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
  13069. PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
  13070. PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  13071. PACKET_FILTER_CMP_TYPE_ADDRTYPE,
  13072. PACKET_FILTER_CMP_TYPE_MAX
  13073. } WMI_PACKET_FILTER_CMP_TYPE;
  13074. typedef enum {
  13075. PACKET_FILTER_SET_INACTIVE = 0,
  13076. PACKET_FILTER_SET_ACTIVE
  13077. } WMI_PACKET_FILTER_ACTION;
  13078. typedef enum {
  13079. PACKET_FILTER_SET_DISABLE = 0,
  13080. PACKET_FILTER_SET_ENABLE
  13081. } WMI_PACKET_FILTER_RUNTIME_ENABLE;
  13082. typedef struct {
  13083. A_UINT32 proto_type;
  13084. A_UINT32 cmp_type;
  13085. A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
  13086. A_UINT32 data_offset; /* from start of the respective frame header (units = bytes) */
  13087. A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Data to compare, little-endian order */
  13088. A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; /* Mask to be applied on rcvd packet data before compare, little-endian order */
  13089. } WMI_PACKET_FILTER_PARAMS_TYPE;
  13090. typedef struct {
  13091. A_UINT32 tlv_header;
  13092. A_UINT32 vdev_id;
  13093. A_UINT32 filter_id;
  13094. A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
  13095. A_UINT32 filter_type;
  13096. A_UINT32 num_params; /* how many entries in paramsData are valid */
  13097. A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
  13098. WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
  13099. /* deprecated0:
  13100. * This field simply provides filler space to retain the original message
  13101. * format while reducing WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER
  13102. * from 10 to 5.
  13103. */
  13104. WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
  13105. } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
  13106. /* enable / disable all filters within the specified vdev */
  13107. typedef struct {
  13108. A_UINT32 tlv_header;
  13109. A_UINT32 vdev_id;
  13110. A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
  13111. } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
  13112. #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
  13113. #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
  13114. #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
  13115. WMI_SET_BITS(tcp_flag_u32, \
  13116. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  13117. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
  13118. tcp_flag_values)
  13119. #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
  13120. WMI_GET_BITS(tcp_flag_u32, \
  13121. WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
  13122. WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
  13123. #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
  13124. #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
  13125. #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
  13126. WMI_SET_BITS(tcp_flag_u32, \
  13127. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  13128. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
  13129. tcp_flags_mask)
  13130. #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
  13131. WMI_GET_BITS(tcp_flag_u32, \
  13132. WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
  13133. WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
  13134. typedef struct {
  13135. A_UINT32 tlv_header;
  13136. /**
  13137. * @brief lro_enable - indicates whether lro is enabled
  13138. * [0] LRO Enable
  13139. */
  13140. A_UINT32 lro_enable;
  13141. /**
  13142. * @brief tcp_flag_u32 - mask of which TCP flags to check and
  13143. * values to check for
  13144. * [8:0] TCP flag values - If the TCP flags from the packet do not match
  13145. * the values in this field after masking with TCP flags mask below,
  13146. * LRO eligible will not be set
  13147. * [17:9] TCP flags mask - Mask field for comparing the TCP values
  13148. * provided above with the TCP flags field in the received packet
  13149. * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
  13150. * macros to isolate the mask field and values field that are packed
  13151. * into this u32 "word".
  13152. */
  13153. A_UINT32 tcp_flag_u32;
  13154. /**
  13155. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  13156. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  13157. * bytes 0 to 3
  13158. *
  13159. * In this and all the below toeplitz_hash fields, the bytes are
  13160. * specified in little-endian order. For example:
  13161. * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
  13162. * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
  13163. * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
  13164. * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
  13165. */
  13166. A_UINT32 toeplitz_hash_ipv4_0_3;
  13167. /**
  13168. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  13169. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  13170. * bytes 4 to 7
  13171. */
  13172. A_UINT32 toeplitz_hash_ipv4_4_7;
  13173. /**
  13174. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  13175. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  13176. * bytes 8 to 11
  13177. */
  13178. A_UINT32 toeplitz_hash_ipv4_8_11;
  13179. /**
  13180. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  13181. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  13182. * bytes 12 to 15
  13183. */
  13184. A_UINT32 toeplitz_hash_ipv4_12_15;
  13185. /**
  13186. * @brief toeplitz_hash_ipv4 - contains seed needed to compute
  13187. * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
  13188. * byte 16
  13189. */
  13190. A_UINT32 toeplitz_hash_ipv4_16;
  13191. /**
  13192. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13193. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13194. * bytes 0 to 3
  13195. */
  13196. A_UINT32 toeplitz_hash_ipv6_0_3;
  13197. /**
  13198. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13199. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13200. * bytes 4 to 7
  13201. */
  13202. A_UINT32 toeplitz_hash_ipv6_4_7;
  13203. /**
  13204. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13205. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13206. * bytes 8 to 11
  13207. */
  13208. A_UINT32 toeplitz_hash_ipv6_8_11;
  13209. /**
  13210. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13211. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13212. * bytes 12 to 15
  13213. */
  13214. A_UINT32 toeplitz_hash_ipv6_12_15;
  13215. /**
  13216. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13217. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13218. * bytes 16 to 19
  13219. */
  13220. A_UINT32 toeplitz_hash_ipv6_16_19;
  13221. /**
  13222. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13223. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13224. * bytes 20 to 22
  13225. */
  13226. A_UINT32 toeplitz_hash_ipv6_20_23;
  13227. /**
  13228. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13229. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13230. * bytes 24 to 27
  13231. */
  13232. A_UINT32 toeplitz_hash_ipv6_24_27;
  13233. /**
  13234. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13235. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13236. * bytes 28 to 31
  13237. */
  13238. A_UINT32 toeplitz_hash_ipv6_28_31;
  13239. /**
  13240. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13241. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13242. * bytes 32 to 35
  13243. */
  13244. A_UINT32 toeplitz_hash_ipv6_32_35;
  13245. /**
  13246. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13247. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13248. * bytes 36 to 39
  13249. */
  13250. A_UINT32 toeplitz_hash_ipv6_36_39;
  13251. /**
  13252. * @brief toeplitz_hash_ipv6 - contains seed needed to compute
  13253. * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
  13254. * byte 40
  13255. */
  13256. A_UINT32 toeplitz_hash_ipv6_40;
  13257. } wmi_lro_info_cmd_fixed_param;
  13258. typedef struct {
  13259. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param */
  13260. A_UINT32 offset; /* flash offset to write, starting from 0 */
  13261. A_UINT32 length; /* vaild data length in buffer, unit: byte */
  13262. } wmi_transfer_data_to_flash_cmd_fixed_param;
  13263. typedef struct {
  13264. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param */
  13265. /** Return status. 0 for success, non-zero otherwise */
  13266. A_UINT32 status;
  13267. } wmi_transfer_data_to_flash_complete_event_fixed_param;
  13268. typedef struct {
  13269. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param */
  13270. A_UINT32 offset; /* flash offset to read, starting from 0 */
  13271. A_UINT32 length; /* data length to read, unit: byte */
  13272. } wmi_read_data_from_flash_cmd_fixed_param;
  13273. typedef struct {
  13274. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param */
  13275. A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
  13276. A_UINT32 offset; /* flash offset reading from, starting from 0 */
  13277. A_UINT32 length; /* length of data being reported, unit: byte */
  13278. } wmi_read_data_from_flash_event_fixed_param;
  13279. typedef enum {
  13280. ENHANCED_MCAST_FILTER_DISABLED,
  13281. ENHANCED_MCAST_FILTER_ENABLED
  13282. } ENHANCED_MCAST_FILTER_CONFIG;
  13283. /*
  13284. * Command to enable/disable filtering of multicast IP with unicast mac
  13285. */
  13286. typedef struct {
  13287. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param */
  13288. /* Unique id identifying the VDEV */
  13289. A_UINT32 vdev_id;
  13290. /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
  13291. A_UINT32 enable;
  13292. } wmi_config_enhanced_mcast_filter_cmd_fixed_param;
  13293. typedef struct {
  13294. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param */
  13295. A_UINT32 tlv_header;
  13296. /** unique id identifying the VDEV, generated by the caller */
  13297. A_UINT32 vdev_id;
  13298. /** WISA enable / disable mode */
  13299. A_UINT32 wisa_mode;
  13300. } wmi_vdev_wisa_cmd_fixed_param;
  13301. /*
  13302. * This structure is used to report SMPS force mode set complete to host.
  13303. */
  13304. typedef struct {
  13305. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param */
  13306. /* Unique id identifying the VDEV */
  13307. A_UINT32 vdev_id;
  13308. /* Return status. 0 for success, non-zero otherwise */
  13309. A_UINT32 status;
  13310. } wmi_sta_smps_force_mode_complete_event_fixed_param;
  13311. /*
  13312. * This structure is used to report SCPC calibrated data to host.
  13313. */
  13314. typedef struct {
  13315. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param */
  13316. /** number of BDF patches. Each patch contains offset, length and data */
  13317. A_UINT32 num_patch;
  13318. /* This TLV is followed by another TLV of array of bytes
  13319. * A_UINT8 data[];
  13320. * This data array contains, for example
  13321. * patch1 offset(byte3~0), patch1 data length(byte7~4), patch1 data(byte11~8)
  13322. * patch2 offset(byte15~12), patch2 data length(byte19~16), patch2 data(byte47~20)
  13323. *
  13324. */
  13325. } wmi_scpc_event_fixed_param;
  13326. /* bpf interface structure */
  13327. typedef struct wmi_bpf_get_capability_cmd_s {
  13328. A_UINT32 tlv_header;
  13329. A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
  13330. } wmi_bpf_get_capability_cmd_fixed_param;
  13331. typedef struct wmi_bpf_capability_info_evt_s {
  13332. A_UINT32 tlv_header;
  13333. A_UINT32 bpf_version; /* fw's implement version */
  13334. A_UINT32 max_bpf_filters; /* max filters that fw supports */
  13335. A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
  13336. } wmi_bpf_capability_info_evt_fixed_param;
  13337. /* bit 0 of flags: report counters */
  13338. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
  13339. #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
  13340. typedef struct wmi_bpf_get_vdev_stats_cmd_s {
  13341. A_UINT32 tlv_header;
  13342. A_UINT32 flags;
  13343. A_UINT32 vdev_id;
  13344. } wmi_bpf_get_vdev_stats_cmd_fixed_param;
  13345. typedef struct wmi_bpf_vdev_stats_info_evt_s {
  13346. A_UINT32 tlv_header;
  13347. A_UINT32 vdev_id;
  13348. A_UINT32 num_filters;
  13349. A_UINT32 num_checked_pkts;
  13350. A_UINT32 num_dropped_pkts;
  13351. } wmi_bpf_vdev_stats_info_evt_fixed_param;
  13352. typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
  13353. A_UINT32 tlv_header;
  13354. A_UINT32 vdev_id;
  13355. A_UINT32 filter_id;
  13356. A_UINT32 bpf_version; /* host bpf version */
  13357. A_UINT32 total_length;
  13358. A_UINT32 current_offset;
  13359. A_UINT32 current_length;
  13360. /*
  13361. * The TLV follows:
  13362. * A_UINT8 buf_inst[]; <-- Variable length buffer for the instuctions
  13363. */
  13364. } wmi_bpf_set_vdev_instructions_cmd_fixed_param;
  13365. #define BPF_FILTER_ID_ALL 0xFFFFFFFF
  13366. typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
  13367. A_UINT32 tlv_header;
  13368. A_UINT32 vdev_id;
  13369. A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
  13370. } wmi_bpf_del_vdev_instructions_cmd_fixed_param;
  13371. #define AES_BLOCK_LEN 16 /* in bytes */
  13372. #define FIPS_KEY_LENGTH_128 16 /* in bytes */
  13373. #define FIPS_KEY_LENGTH_256 32 /* in bytes */
  13374. #define FIPS_ENCRYPT_CMD 0
  13375. #define FIPS_DECRYPT_CMD 1
  13376. #define FIPS_ENGINE_AES_CTR 0
  13377. #define FIPS_ENGINE_AES_MIC 1
  13378. #define FIPS_ERROR_OPER_TIMEOUT 1
  13379. /* WMI_PDEV_FIPS_CMDID */
  13380. typedef struct {
  13381. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param */
  13382. union {
  13383. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13384. /** pdev_id for identifying the MAC
  13385. * See macros starting with WMI_PDEV_ID_ for values.
  13386. */
  13387. A_UINT32 pdev_id;
  13388. };
  13389. A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
  13390. A_UINT32 mode; /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
  13391. A_UINT32 key_len; /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
  13392. A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
  13393. A_UINT32 data_len; /* data length */
  13394. /*
  13395. * Following this structure is the TLV:
  13396. * A_UINT32 data[1]; <-- In Data (keep this in the end)
  13397. */
  13398. } wmi_pdev_fips_cmd_fixed_param;
  13399. typedef struct {
  13400. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param */
  13401. union {
  13402. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13403. /** pdev_id for identifying the MAC
  13404. * See macros starting with WMI_PDEV_ID_ for values.
  13405. */
  13406. A_UINT32 pdev_id;
  13407. };
  13408. A_UINT32 enable; /* 1:enable, 0:disable */
  13409. A_UINT32 mode; /* 1:GPIO parallel mode, 0:GPIO serial mode */
  13410. A_UINT32 rx_antenna; /* rx antenna */
  13411. A_UINT32 tx_default_antenna; /* tx default antenna */
  13412. /*
  13413. * Following this structure is the TLV:
  13414. * wmi_pdev_smart_ant_gpio_handle
  13415. */
  13416. } wmi_pdev_smart_ant_enable_cmd_fixed_param;
  13417. /** GPIO pins/function values to control antennas */
  13418. typedef struct {
  13419. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle */
  13420. A_UINT32 gpio_pin; /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
  13421. A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
  13422. /** pdev_id for identifying the MAC
  13423. * See macros starting with WMI_PDEV_ID_ for values.
  13424. */
  13425. A_UINT32 pdev_id;
  13426. } wmi_pdev_smart_ant_gpio_handle;
  13427. typedef struct {
  13428. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param */
  13429. union {
  13430. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13431. /** pdev_id for identifying the MAC
  13432. * See macros starting with WMI_PDEV_ID_ for values.
  13433. */
  13434. A_UINT32 pdev_id;
  13435. };
  13436. A_UINT32 rx_antenna;
  13437. } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
  13438. typedef struct {
  13439. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param */
  13440. /** unique id identifying the vdev, generated by the caller */
  13441. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13442. /** peer MAC address */
  13443. wmi_mac_addr peer_macaddr;
  13444. /*
  13445. * Following this structure is the TLV:
  13446. * wmi_peer_smart_ant_set_tx_antenna_series
  13447. */
  13448. } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
  13449. typedef struct {
  13450. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series */
  13451. /* antenna array */
  13452. A_UINT32 antenna_series;
  13453. } wmi_peer_smart_ant_set_tx_antenna_series;
  13454. typedef struct {
  13455. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */
  13456. /* rate array */
  13457. A_UINT32 train_rate_series;
  13458. /* antenna array */
  13459. A_UINT32 train_antenna_series;
  13460. /* Rate flags */
  13461. /* TODO: For future use? */
  13462. A_UINT32 rc_flags;
  13463. } wmi_peer_smart_ant_set_train_antenna_param;
  13464. typedef struct {
  13465. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param */
  13466. /** unique id identifying the VDEV, generated by the caller */
  13467. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13468. /** peer MAC address */
  13469. wmi_mac_addr peer_macaddr;
  13470. /* num packets; 0-stop training */
  13471. A_UINT32 num_pkts;
  13472. /*
  13473. * Following this structure is the TLV:
  13474. * wmi_peer_smart_ant_set_train_antenna_param
  13475. */
  13476. } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
  13477. typedef struct {
  13478. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param */
  13479. /** unique id identifying the vdev, generated by the caller */
  13480. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13481. /** peer MAC address */
  13482. wmi_mac_addr peer_macaddr;
  13483. /* command id*/
  13484. A_UINT32 cmd_id;
  13485. /* number of arguments passed */
  13486. A_UINT32 args_count;
  13487. /*
  13488. * Following this structure is the TLV:
  13489. * A_UINT32 args[]; <-- argument list
  13490. */
  13491. } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
  13492. typedef struct {
  13493. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain */
  13494. A_UINT32 antCtrlChain;
  13495. /** pdev_id for identifying the MAC
  13496. * See macros starting with WMI_PDEV_ID_ for values.
  13497. */
  13498. A_UINT32 pdev_id;
  13499. } wmi_pdev_set_ant_ctrl_chain;
  13500. typedef struct {
  13501. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param */
  13502. A_UINT32 mac_id; /* MAC ID */
  13503. A_UINT32 antCtrlCommon1;
  13504. A_UINT32 antCtrlCommon2;
  13505. /*
  13506. * Following this structure is the TLV:
  13507. * wmi_pdev_set_ant_ctrl_chain
  13508. */
  13509. } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
  13510. typedef struct {
  13511. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param */
  13512. union {
  13513. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13514. /** pdev_id for identifying the MAC
  13515. * See macros starting with WMI_PDEV_ID_ for values.
  13516. */
  13517. A_UINT32 pdev_id;
  13518. };
  13519. /** len of CTL info */
  13520. A_UINT32 ctl_len;
  13521. /* ctl array (len adjusted to number of words).
  13522. * Following this structure is the TLV:
  13523. * A_UINT32 ctl_info[1];
  13524. */
  13525. } wmi_pdev_set_ctl_table_cmd_fixed_param;
  13526. typedef struct {
  13527. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param */
  13528. union {
  13529. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13530. /** pdev_id for identifying the MAC
  13531. * See macros starting with WMI_PDEV_ID_ for values.
  13532. */
  13533. A_UINT32 pdev_id;
  13534. };
  13535. A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
  13536. /*
  13537. * Bit 7:0 len of array gain table
  13538. * Bit 8 bypass multi chain gain or not
  13539. */
  13540. /* array gain table(s) (len adjusted to number of words).
  13541. * Following this structure is the TLV:
  13542. * A_UINT32 arraygain_tbl[1];
  13543. */
  13544. } wmi_pdev_set_mimogain_table_cmd_fixed_param;
  13545. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
  13546. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
  13547. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  13548. #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_ARRAY_GAIN_LEN)
  13549. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
  13550. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
  13551. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  13552. #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x,z) WMI_F_RMW(x,z,WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
  13553. typedef struct {
  13554. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param */
  13555. /** parameter id */
  13556. A_UINT32 param_id;
  13557. /** parameter value */
  13558. A_UINT32 param_value;
  13559. } wmi_fwtest_set_param_cmd_fixed_param;
  13560. #define WMI_ATF_DENOMINATION 1000 /* Expressed in 1 part in 1000 (permille) */
  13561. #define WMI_ATF_SSID_FAIR_SCHED 0 /** fair ATF scheduling for vdev */
  13562. #define WMI_ATF_SSID_STRICT_SCHED 1 /** strict ATF scheduling for vdev */
  13563. typedef struct {
  13564. /** TLV tag and len; tag equals
  13565. * WMITLV_TAG_STRUC_wmi_atf_peer_info */
  13566. A_UINT32 tlv_header;
  13567. wmi_mac_addr peer_macaddr;
  13568. A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
  13569. A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
  13570. A_UINT32 atf_units_reserved; /* Peer congestion threshold for future use */
  13571. } wmi_atf_peer_info;
  13572. typedef struct {
  13573. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */
  13574. A_UINT32 num_peers;
  13575. /*
  13576. * Following this structure is the TLV:
  13577. * struct wmi_atf_peer_info peer_info[num_peers];
  13578. */
  13579. } wmi_peer_atf_request_fixed_param;
  13580. /* Structure for Bandwidth Fairness peer information */
  13581. typedef struct {
  13582. /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bwf_peer_info */
  13583. A_UINT32 tlv_header;
  13584. wmi_mac_addr peer_macaddr;
  13585. A_UINT32 bwf_guaranteed_bandwidth; /* BWF guaranteed_bandwidth for the peers in mbps */
  13586. A_UINT32 bwf_max_airtime; /* BWF Maximum airtime percentage that can be allocated to the peer to meet the guaranteed_bandwidth */
  13587. A_UINT32 bwf_peer_priority; /* BWF priority of the peer to allocate the tokens dynamically */
  13588. } wmi_bwf_peer_info;
  13589. /* Structure for Bandwidth Fairness peer request */
  13590. typedef struct {
  13591. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param */
  13592. A_UINT32 num_peers;
  13593. /*
  13594. * Following this structure is the TLV:
  13595. * struct wmi_bwf_peer_info peer_info[num_peers];
  13596. */
  13597. } wmi_peer_bwf_request_fixed_param;
  13598. /* Equal distribution of ATF air time within an VDEV. */
  13599. typedef struct {
  13600. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param */
  13601. A_UINT32 vdev_id;
  13602. A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
  13603. } wmi_vdev_atf_request_fixed_param;
  13604. typedef struct {
  13605. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param */
  13606. /** pdev_id for identifying the MAC
  13607. * See macros starting with WMI_PDEV_ID_ for values.
  13608. */
  13609. A_UINT32 pdev_id;
  13610. /** parameter */
  13611. A_UINT32 param;
  13612. } wmi_pdev_get_ani_cck_config_cmd_fixed_param;
  13613. typedef struct {
  13614. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param */
  13615. /** pdev_id for identifying the MAC
  13616. * See macros starting with WMI_PDEV_ID_ for values.
  13617. */
  13618. A_UINT32 pdev_id;
  13619. /** parameter */
  13620. A_UINT32 param;
  13621. } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
  13622. typedef struct {
  13623. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param */
  13624. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13625. A_UINT32 qb_enable;
  13626. wmi_mac_addr peer_macaddr;
  13627. } WMI_QBOOST_CFG_CMD_fixed_param;
  13628. #define WMI_INST_STATS_INVALID_RSSI 0
  13629. typedef struct {
  13630. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param */
  13631. A_UINT32 iRSSI; /* dBm above the noise floor */
  13632. /* peer MAC address */
  13633. wmi_mac_addr peer_macaddr;
  13634. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13635. } wmi_inst_rssi_stats_resp_fixed_param;
  13636. typedef struct {
  13637. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info */
  13638. A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
  13639. } wmi_peer_cck_ofdm_rate_info;
  13640. typedef struct {
  13641. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info */
  13642. A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
  13643. A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
  13644. A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
  13645. } wmi_peer_mcs_rate_info;
  13646. typedef struct {
  13647. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param */
  13648. wmi_mac_addr peer_macaddr;
  13649. A_UINT32 ratecount; /* Max Rate count for each mode */
  13650. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13651. /*
  13652. * Following this structure are the TLV:
  13653. * struct wmi_peer_cck_ofdm_rate_info;
  13654. * struct wmi_peer_mcs_rate_info;
  13655. */
  13656. } wmi_peer_ratecode_list_event_fixed_param;
  13657. typedef struct wmi_wds_addr_event {
  13658. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param */
  13659. A_UINT32 event_type[4];
  13660. wmi_mac_addr peer_mac;
  13661. wmi_mac_addr dest_mac;
  13662. A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
  13663. } wmi_wds_addr_event_fixed_param;
  13664. typedef struct {
  13665. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param */
  13666. wmi_mac_addr peer_macaddr;
  13667. A_UINT32 peer_ps_state;
  13668. } wmi_peer_sta_ps_statechange_event_fixed_param;
  13669. /* WMI_PDEV_FIPS_EVENTID */
  13670. typedef struct {
  13671. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param */
  13672. union {
  13673. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13674. /** pdev_id for identifying the MAC
  13675. * See macros starting with WMI_PDEV_ID_ for values.
  13676. */
  13677. A_UINT32 pdev_id;
  13678. };
  13679. A_UINT32 error_status; /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
  13680. A_UINT32 data_len; /* Data length */
  13681. /*
  13682. * Following this structure is the TLV:
  13683. * A_UINT32 data[1]; <-- Out Data (keep this in the end)
  13684. */
  13685. } wmi_pdev_fips_event_fixed_param;
  13686. typedef struct {
  13687. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param */
  13688. union {
  13689. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13690. /** pdev_id for identifying the MAC
  13691. * See macros starting with WMI_PDEV_ID_ for values.
  13692. */
  13693. A_UINT32 pdev_id;
  13694. };
  13695. /* Noise threshold iterations with high values */
  13696. A_UINT32 noise_floor_report_iter;
  13697. /* Total noise threshold iterations */
  13698. A_UINT32 noise_floor_total_iter;
  13699. } wmi_pdev_channel_hopping_event_fixed_param;
  13700. enum {
  13701. WMI_PDEV_RESERVE_AST_ENTRY_OK,
  13702. WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
  13703. WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
  13704. };
  13705. typedef struct {
  13706. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param */
  13707. union {
  13708. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13709. /** pdev_id for identifying the MAC
  13710. * See macros starting with WMI_PDEV_ID_ for values.
  13711. */
  13712. A_UINT32 pdev_id;
  13713. };
  13714. A_UINT32 rate_flags;
  13715. /**
  13716. * FLAG_ONE_CHAIN 0x001 - one chain mask
  13717. * FLAG_TWO_CHAIN 0x005 - two chain mask
  13718. * FLAG_THREE_CHAIN 0x007 - three chain mask
  13719. * FLAG_FOUR_CHAIN 0x00F - four chain mask
  13720. * FLAG_STBC 0x010 - STBC is set
  13721. * FLAG_40MHZ 0x020
  13722. * FLAG_80MHZ 0x040
  13723. * FLAG_160MHZ 0x080
  13724. * FLAG_TXBF 0x0100 - Tx Bf enabled
  13725. * FLAG_RTSENA 0x0200 - RTS enabled
  13726. * FLAG_CTSENA 0x0400 - CTS enabled
  13727. * FLAG_LDPC 0x0800 - LDPC set
  13728. * FLAG_SERIES1 0x1000 -
  13729. * FLAG_SGI 0x2000 - Short gaurd interval
  13730. * FLAG_MU2 0x4000 - MU2 data
  13731. * FLAG_MU3 0x8000 - MU3 data
  13732. * */
  13733. A_UINT32 nss;
  13734. /**
  13735. * NSS 0x0 - 0x3
  13736. * */
  13737. A_UINT32 preamble;
  13738. /**
  13739. * PREAM_OFDM - 0x0
  13740. * PREAM_CCK - 0x1
  13741. * PREAM_HT - 0x2
  13742. * PREAM_VHT - 0x3
  13743. * */
  13744. A_UINT32 hw_rate;
  13745. /**
  13746. * *** HW_OFDM_RATE ***
  13747. * OFDM_48_MBPS - 0x0
  13748. * OFDM_24_MBPS - 0x1
  13749. * OFDM_12_MBPS - 0x2
  13750. * OFDM_6_MBPS - 0x3
  13751. * OFDM_54_MBPS - 0x4
  13752. * OFDM_36_MBPS - 0x5
  13753. * OFDM_18_MBPS - 0x6
  13754. * OFDM_9_MBPS - 0x7
  13755. *
  13756. * *** HW_CCK_RATE ***
  13757. * CCK_11_LONG_MBPS - 0x0
  13758. * CCK_5_5_LONG_MBPS - 0x1
  13759. * CCK_2_LONG_MBPS - 0x2
  13760. * CCK_1_LONG_MBPS - 0x3
  13761. * CCK_11_SHORT_MBPS - 0x4
  13762. * CCK_5_5_SHORT_MBPS - 0x5
  13763. * CCK_2_SHORT_MBPS - 0x6
  13764. *
  13765. * *** HW_HT / VHT_RATE ***
  13766. * MCS 0x0 - 0x9
  13767. * */
  13768. } wmi_pdev_get_tpc_cmd_fixed_param;
  13769. typedef struct {
  13770. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
  13771. /** pdev_id for identifying the MAC
  13772. * See macros starting with WMI_PDEV_ID_ for values.
  13773. */
  13774. A_UINT32 pdev_id;
  13775. } wmi_pdev_get_chip_power_stats_cmd_fixed_param;
  13776. typedef struct {
  13777. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */
  13778. /** pdev_id for identifying the MAC
  13779. * See macros starting with WMI_PDEV_ID_ for values.
  13780. */
  13781. A_UINT32 pdev_id;
  13782. /*
  13783. * Following this structure is the TLV:
  13784. * A_UINT32 tpc[1];
  13785. */
  13786. } wmi_pdev_tpc_event_fixed_param;
  13787. typedef struct {
  13788. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param */
  13789. union {
  13790. A_UINT32 mac_id; /* OBSOLETE - will be removed once all refs are gone */
  13791. /** pdev_id for identifying the MAC
  13792. * See macros starting with WMI_PDEV_ID_ for values.
  13793. */
  13794. A_UINT32 pdev_id;
  13795. };
  13796. A_UINT32 nfdBr_len;
  13797. A_UINT32 nfdBm_len;
  13798. A_UINT32 freqNum_len;
  13799. /*
  13800. * Following this structure is the TLV:
  13801. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
  13802. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
  13803. * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
  13804. */
  13805. } wmi_pdev_nfcal_power_all_channels_event_fixed_param;
  13806. typedef struct {
  13807. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr */
  13808. A_UINT32 nfdBr;
  13809. } wmi_pdev_nfcal_power_all_channels_nfdBr;
  13810. typedef struct {
  13811. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm */
  13812. A_UINT32 nfdBm;
  13813. } wmi_pdev_nfcal_power_all_channels_nfdBm;
  13814. typedef struct {
  13815. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum */
  13816. A_UINT32 freqNum;
  13817. } wmi_pdev_nfcal_power_all_channels_freqNum;
  13818. typedef struct {
  13819. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param */
  13820. A_UINT32 cck_level;
  13821. } wmi_ani_cck_event_fixed_param;
  13822. typedef enum wmi_power_debug_reg_fmt_type {
  13823. /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
  13824. * SOC_SYSTEM_SLEEP
  13825. * WLAN_SYSTEM_SLEEP
  13826. * RTC_SYNC_FORCE_WAKE
  13827. * MAC_DMA_ISR
  13828. * MAC_DMA_TXRX_ISR
  13829. * MAC_DMA_ISR_S1
  13830. * MAC_DMA_ISR_S2
  13831. * MAC_DMA_ISR_S3
  13832. * MAC_DMA_ISR_S4
  13833. * MAC_DMA_ISR_S5
  13834. * MAC_DMA_ISR_S6
  13835. * MAC_DMA_ISR_S7
  13836. */
  13837. WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
  13838. WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
  13839. } WMI_POWER_DEBUG_REG_FMT_TYPE;
  13840. typedef struct {
  13841. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
  13842. A_UINT32 cumulative_sleep_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  13843. A_UINT32 cumulative_total_on_time_ms; /* maximum range is 35 hours, due to conversion from internal 0.03215 ms units to ms */
  13844. A_UINT32 deep_sleep_enter_counter; /* count of number of times chip enterred deep sleep */
  13845. A_UINT32 last_deep_sleep_enter_tstamp_ms; /* Last Timestamp when Chip went to deep sleep */
  13846. A_UINT32 debug_register_fmt; /* WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers being dumped as part of the event */
  13847. A_UINT32 num_debug_register; /* number of debug registers being sent to host */
  13848. /*
  13849. * Following this structure is the TLV:
  13850. * A_UINT32 debug_registers[num_debug_registers];
  13851. */
  13852. } wmi_pdev_chip_power_stats_event_fixed_param;
  13853. typedef struct {
  13854. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param */
  13855. A_UINT32 ofdm_level;
  13856. } wmi_ani_ofdm_event_fixed_param;
  13857. typedef enum wmi_coex_config_type {
  13858. WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
  13859. WMI_COEX_CONFIG_PAGE_STA_TDM = 2, /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
  13860. WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
  13861. WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, /* config during WLAN connection */
  13862. WMI_COEX_CONFIG_BTC_ENABLE = 5, /* config to enable/disable BTC */
  13863. } WMI_COEX_CONFIG_TYPE;
  13864. typedef struct {
  13865. A_UINT32 tlv_header;
  13866. A_UINT32 vdev_id;
  13867. A_UINT32 config_type; /* wmi_coex_config_type enum */
  13868. A_UINT32 config_arg1;
  13869. A_UINT32 config_arg2;
  13870. } WMI_COEX_CONFIG_CMD_fixed_param;
  13871. /**
  13872. * This command is sent from WLAN host driver to firmware to
  13873. * request firmware to enable/disable channel avoidance report
  13874. * to host.
  13875. *
  13876. */
  13877. enum {
  13878. WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
  13879. WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
  13880. };
  13881. typedef struct {
  13882. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param */
  13883. /** Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
  13884. A_UINT32 rpt_allow;
  13885. } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
  13886. /*
  13887. * Periodic channel stats WMI command structure
  13888. * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
  13889. */
  13890. typedef struct {
  13891. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param */
  13892. /** 1 = enable, 0 = disable */
  13893. A_UINT32 enable;
  13894. /** periodic stats duration (units are milliseconds) */
  13895. A_UINT32 stats_period;
  13896. } wmi_set_periodic_channel_stats_config_fixed_param;
  13897. typedef struct {
  13898. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param */
  13899. /** pdev_id for identifying the MAC
  13900. * See macros starting with WMI_PDEV_ID_ for values.
  13901. */
  13902. A_UINT32 pdev_id;
  13903. /* Identify the wlan module */
  13904. A_UINT32 module_id;
  13905. /* Num of elements in the following args[] array */
  13906. A_UINT32 num_args;
  13907. /**
  13908. * Following this structure are the TLVs:
  13909. * A_UINT32 args[];
  13910. **/
  13911. } wmi_pdev_wal_power_debug_cmd_fixed_param;
  13912. typedef struct {
  13913. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param */
  13914. /**
  13915. * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
  13916. * @details
  13917. * Each WMM access category (voice, video, best-effort, background)
  13918. * will have its own timeout value to dictate how long to wait for
  13919. * missing rx MPDUs to arrive before releasing subsequent MPDUs that
  13920. * have already been received.
  13921. * This parameter specifies the timeout in milliseconds for each
  13922. * access category.
  13923. * The array elements are indexed by the WMI_AC enum to identify
  13924. * which array element corresponds to which AC / traffic type.
  13925. */
  13926. A_UINT32 rx_timeout_pri[WMI_AC_MAX];
  13927. } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
  13928. /**
  13929. * wlan stats shall be understood as per period.
  13930. * Generally, it is reported periodically based on the period specified by host.
  13931. * But if the variation of one stats of compared to the
  13932. * pervious notification exceeds a threshold,
  13933. * FW will report the wlan stats immediately.
  13934. * The values of the stats becomes the new reference to compute variations.
  13935. * This threshold can be a global setting or per category.
  13936. * Host can enable/disable the mechanism for any stats per bitmap.
  13937. * TX/RX thresholds (percentage value) are shared across ACs,
  13938. * and TX/RX stats comprisons are processed per AC of each peer.
  13939. * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
  13940. * and the detailed tx_mpdus threshold value is set to 10%,
  13941. * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
  13942. * and it reaches 110 during the second period,
  13943. * FW will generate and send out a wlan stats event immediately.
  13944. */
  13945. typedef struct {
  13946. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
  13947. /** Indicate if threshold mechnism is enabled or disabled.
  13948. * It is disabled by default.
  13949. * Host can enable and disable it dynamically.
  13950. */
  13951. A_UINT32 enable_thresh;
  13952. /** use_thresh_bitmap equals 0 means gbl_thresh is used.
  13953. * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
  13954. */
  13955. A_UINT32 use_thresh_bitmap;
  13956. /** global threshold, valid when use_thresh_bitmap equals 0.
  13957. * It takes effect for all counters.
  13958. * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
  13959. */
  13960. A_UINT32 gbl_thresh;
  13961. /** Enable/disable bitmap for threshold mechanism of CCA stats */
  13962. A_UINT32 cca_thresh_bitmap;
  13963. /** Enable/disable bitmap for threshold mechanism of signal stats */
  13964. A_UINT32 signal_thresh_bitmap;
  13965. /** Enable/disable bitmap for threshold mechanism of TX stats */
  13966. A_UINT32 tx_thresh_bitmap;
  13967. /** Enable/disable bitmap for threshold mechanism of RX stats */
  13968. A_UINT32 rx_thresh_bitmap;
  13969. /* This TLV is followed by TLVs below:
  13970. * wmi_chan_cca_stats_thresh cca_thresh;
  13971. * wmi_peer_signal_stats_thresh signal_thresh;
  13972. * wmi_tx_stats_thresh tx_thresh;
  13973. * wmi_rx_stats_thresh rx_thresh;
  13974. */
  13975. } wmi_pdev_set_stats_threshold_cmd_fixed_param;
  13976. typedef enum {
  13977. WMI_REQUEST_WLAN_TX_STAT = 0x01,
  13978. WMI_REQUEST_WLAN_RX_STAT = 0x02,
  13979. WMI_REQUEST_WLAN_CCA_STAT = 0x04,
  13980. WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
  13981. } wmi_wlan_stats_id;
  13982. typedef struct {
  13983. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
  13984. wmi_wlan_stats_id stats_id;
  13985. } wmi_request_wlan_stats_cmd_fixed_param;
  13986. typedef struct {
  13987. /** TLV tag and len; tag equals
  13988. * WMITLV_TAG_STRUC_wmi_rmc_set_leader_cmd_fixed_param */
  13989. A_UINT32 tlv_header;
  13990. /* VDEV identifier */
  13991. A_UINT32 vdev_id;
  13992. /* Leader's mac address */
  13993. wmi_mac_addr leader_mac_addr;
  13994. } wmi_rmc_set_leader_cmd_fixed_param;
  13995. typedef struct {
  13996. /** TLV tag and len; tag equals
  13997. * WMITLV_TAG_STRUC_wmi_rmc_manual_leader_event_fixed_param */
  13998. A_UINT32 tlv_header;
  13999. /* VDEV identifier */
  14000. A_UINT32 vdev_id;
  14001. /* 0: success
  14002. * 1: selected leader not found in network, able to find using auto selection
  14003. * -1: error
  14004. * non zero value should be return to userspace in case of failure */
  14005. A_INT32 status;
  14006. /* bssid of new leader */
  14007. wmi_mac_addr leader_mac_addr;
  14008. } wmi_rmc_manual_leader_event_fixed_param;
  14009. typedef enum {
  14010. WLAN_2G_CAPABILITY = 0x1,
  14011. WLAN_5G_CAPABILITY = 0x2,
  14012. } WLAN_BAND_CAPABILITY;
  14013. typedef enum wmi_hw_mode_config_type {
  14014. WMI_HW_MODE_SINGLE = 0, /* Only one PHY is active. */
  14015. WMI_HW_MODE_DBS = 1, /* Both PHYs are active in different bands, one in 2G and another in 5G. */
  14016. WMI_HW_MODE_SBS_PASSIVE = 2, /* Both PHYs are in passive mode (only rx) in same band; no tx allowed. */
  14017. WMI_HW_MODE_SBS = 3, /* Both PHYs are active in the same band.
  14018. * Support for both PHYs within one band is planned for 5G only
  14019. * (as indicated in WMI_MAC_PHY_CAPABILITIES),
  14020. * but could be extended to other bands in the future.
  14021. * The separation of the band between the two PHYs needs to be communicated separately.
  14022. */
  14023. WMI_HW_MODE_DBS_SBS = 4, /* 3 PHYs, with 2 on the same band doing SBS
  14024. * as in WMI_HW_MODE_SBS, and 3rd on the other band
  14025. */
  14026. } WMI_HW_MODE_CONFIG_TYPE;
  14027. #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
  14028. #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
  14029. #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
  14030. #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
  14031. #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
  14032. #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
  14033. #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
  14034. #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
  14035. #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
  14036. #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
  14037. #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
  14038. #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
  14039. #define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
  14040. #define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
  14041. typedef struct {
  14042. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES */
  14043. /* hw_mode_id - identify a particular set of HW characteristics, as specified
  14044. * by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element must be mapped
  14045. * to its parent WMI_HW_MODE_CAPABILITIES element using hw_mode_id.
  14046. * No particular ordering of WMI_MAC_PHY_CAPABILITIES elements should be assumed,
  14047. * though in practice the elements may always be ordered by hw_mode_id */
  14048. A_UINT32 hw_mode_id;
  14049. /* pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 */
  14050. A_UINT32 pdev_id;
  14051. /* phy id. Starts with 0 */
  14052. A_UINT32 phy_id;
  14053. /* supported modulations and number of MU beamformees */
  14054. union {
  14055. struct {
  14056. A_UINT32 supports_11b:1,
  14057. supports_11g:1,
  14058. supports_11a:1,
  14059. supports_11n:1,
  14060. supports_11ac:1,
  14061. supports_11ax:1,
  14062. unused: 22,
  14063. max_mubfee: 4; /* max MU beamformees supported per MAC */
  14064. };
  14065. A_UINT32 supported_flags;
  14066. };
  14067. /* supported bands, enum WLAN_BAND_CAPABILITY */
  14068. A_UINT32 supported_bands;
  14069. /* ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
  14070. * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us */
  14071. A_UINT32 ampdu_density;
  14072. /* max bw supported 2G, enum wmi_channel_width */
  14073. A_UINT32 max_bw_supported_2G;
  14074. /* WMI HT Capability, WMI_HT_CAP defines */
  14075. A_UINT32 ht_cap_info_2G;
  14076. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  14077. A_UINT32 vht_cap_info_2G;
  14078. /* VHT Supported MCS Set field Rx/Tx same
  14079. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  14080. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  14081. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  14082. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  14083. * - 3 indicates that n spatial streams is not supported */
  14084. A_UINT32 vht_supp_mcs_2G;
  14085. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  14086. A_UINT32 he_cap_info_2G;
  14087. /* HE Supported MCS Set field Rx/Tx same */
  14088. A_UINT32 he_supp_mcs_2G;
  14089. /* Valid Transmit chain mask */
  14090. A_UINT32 tx_chain_mask_2G;
  14091. /* Valid Receive chain mask */
  14092. A_UINT32 rx_chain_mask_2G;
  14093. /* max bw supported 5G, enum wmi_channel_width */
  14094. A_UINT32 max_bw_supported_5G;
  14095. /* WMI HT Capability, WMI_HT_CAP defines */
  14096. A_UINT32 ht_cap_info_5G;
  14097. /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
  14098. A_UINT32 vht_cap_info_5G;
  14099. /* VHT Supported MCS Set field Rx/Tx same
  14100. * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as follows
  14101. * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
  14102. * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
  14103. * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
  14104. * - 3 indicates that n spatial streams is not supported */
  14105. A_UINT32 vht_supp_mcs_5G;
  14106. /*HE capability info field of 802.11ax, WMI_HE_CAP defines */
  14107. A_UINT32 he_cap_info_5G;
  14108. /* HE Supported MCS Set field Rx/Tx same */
  14109. A_UINT32 he_supp_mcs_5G;
  14110. /* Valid Transmit chain mask */
  14111. A_UINT32 tx_chain_mask_5G;
  14112. /* Valid Receive chain mask */
  14113. A_UINT32 rx_chain_mask_5G;
  14114. } WMI_MAC_PHY_CAPABILITIES;
  14115. typedef struct {
  14116. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES */
  14117. /* hw_mode_id - identify a particular set of HW characteristics,
  14118. * as specified by the subsequent fields */
  14119. A_UINT32 hw_mode_id;
  14120. /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
  14121. * number of bits set in phy_id_map represents number of WMI_MAC_PHY_CAPABILITIES TLV's
  14122. * one for each active PHY for current HW mode identified by hw_mode_id. For example for
  14123. * DBS/SBS mode there will be 2 WMI_MAC_PHY_CAPABILITIES TLVs and for single MAC modes it
  14124. * will be 1 WMI_MAC_PHY_CAPABILITIES TLVs */
  14125. A_UINT32 phy_id_map;
  14126. /* hw_mode_config_type
  14127. * Identify a particular type of HW mode such as SBS, DBS etc.
  14128. * Refer to WMI_HW_MODE_CONFIG_TYPE values.
  14129. */
  14130. A_UINT32 hw_mode_config_type;
  14131. } WMI_HW_MODE_CAPABILITIES;
  14132. typedef struct {
  14133. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS */
  14134. /* num HW modes */
  14135. A_UINT32 num_hw_modes;
  14136. /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
  14137. } WMI_SOC_MAC_PHY_HW_MODE_CAPS;
  14138. /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
  14139. typedef struct {
  14140. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT */
  14141. /* phy id */
  14142. A_UINT32 phy_id;
  14143. /* regdomain value specified in EEPROM */
  14144. A_UINT32 eeprom_reg_domain;
  14145. /* regdomain */
  14146. A_UINT32 eeprom_reg_domain_ext;
  14147. /* CAP1 capabilities bit map, see REGDMN_CAP1_ defines */
  14148. A_UINT32 regcap1;
  14149. /* REGDMN EEPROM CAP, see REGDMN_EEPROM_EEREGCAP_ defines */
  14150. A_UINT32 regcap2;
  14151. /* REGDMN MODE, see REGDMN_MODE_ enum */
  14152. A_UINT32 wireless_modes;
  14153. A_UINT32 low_2ghz_chan;
  14154. A_UINT32 high_2ghz_chan;
  14155. A_UINT32 low_5ghz_chan;
  14156. A_UINT32 high_5ghz_chan;
  14157. } WMI_HAL_REG_CAPABILITIES_EXT;
  14158. typedef struct {
  14159. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES */
  14160. A_UINT32 num_phy;
  14161. /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
  14162. } WMI_SOC_HAL_REG_CAPABILITIES;
  14163. typedef struct {
  14164. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv */
  14165. /** global default adaptive dwell mode, used when WMI_SCAN_DWELL_MODE_DEFAULT */
  14166. A_UINT32 default_adaptive_dwell_mode;
  14167. /** the weight to calculate the average low pass filter for channel congestion. 0-100 */
  14168. A_UINT32 adapative_lpf_weight;
  14169. /** interval to monitor passive scan in msec */
  14170. A_UINT32 passive_monitor_interval_ms;
  14171. /** % of wifi activity to switch from passive to active 0-100 */
  14172. A_UINT32 wifi_activity_threshold_pct;
  14173. } wmi_scan_adaptive_dwell_parameters_tlv;
  14174. typedef struct {
  14175. A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param */
  14176. /* globally enable/disable adaptive dwell */
  14177. A_UINT32 enable;
  14178. /**
  14179. * followed by TLV (tag length value) parameters array
  14180. * The TLV's are:
  14181. * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
  14182. */
  14183. } wmi_scan_adaptive_dwell_config_fixed_param;
  14184. typedef struct {
  14185. /** TLV tag and len; tag equals
  14186. * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
  14187. A_UINT32 tlv_header;
  14188. /* Currently there are no parameters for this message. */
  14189. } wmi_coex_get_antenna_isolation_cmd_fixed_param;
  14190. typedef struct {
  14191. /** TLV tag and len; tag equals
  14192. * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
  14193. A_UINT32 tlv_header;
  14194. /** 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.
  14195. * Currently the HW descriptor only supports 4 chains at most.
  14196. * Further isolation_chainX elements can be added in the future
  14197. * for additional chains, if needed.
  14198. */
  14199. A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
  14200. isolation_chain1:8, /* [15:8], isolation value for chain 1 */
  14201. isolation_chain2:8, /* [23:16], isolation value for chain 2 */
  14202. isolation_chain3:8; /* [31:24], isolation value for chain 3 */
  14203. } wmi_coex_report_isolation_event_fixed_param;
  14204. /* ADD NEW DEFS HERE */
  14205. /*****************************************************************************
  14206. * The following structures are deprecated. DO NOT USE THEM!
  14207. */
  14208. /** Max number of channels in the schedule. */
  14209. #define OCB_CHANNEL_MAX (5)
  14210. /* NOTE: Make sure these data structures are identical to those 9235
  14211. * defined in sirApi.h */
  14212. typedef struct
  14213. {
  14214. /** Arbitration Inter-Frame Spacing. Range: 2-15 */
  14215. A_UINT32 aifsn;
  14216. /** Contention Window minimum. Range: 1 - 10 */
  14217. A_UINT32 cwmin;
  14218. /** Contention Window maximum. Range: 1 - 10 */
  14219. A_UINT32 cwmax;
  14220. } wmi_qos_params_t;
  14221. typedef struct
  14222. {
  14223. /** Channel frequency in MHz */
  14224. A_UINT32 chan_freq;
  14225. /** Channel duration in ms */
  14226. A_UINT32 duration;
  14227. /** Start guard interval in ms */
  14228. A_UINT32 start_guard_interval;
  14229. /** End guard interval in ms */
  14230. A_UINT32 end_guard_interval;
  14231. /** Transmit power in dBm, range 0 - 23 */
  14232. A_UINT32 tx_power;
  14233. /** Transmit datarate in Mbps */
  14234. A_UINT32 tx_rate;
  14235. /** QoS parameters for each AC */
  14236. wmi_qos_params_t qos_params[WLAN_MAX_AC];
  14237. /** 1 to enable RX stats for this channel, 0 otherwise */
  14238. A_UINT32 rx_stats;
  14239. } wmi_ocb_channel_t;
  14240. typedef struct {
  14241. /** TLV tag and len; tag equals
  14242. * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
  14243. A_UINT32 tlv_header;
  14244. /* VDEV identifier */
  14245. A_UINT32 vdev_id;
  14246. /** Number of valid channels in the channels array */
  14247. A_UINT32 num_channels;
  14248. /** The array of channels */
  14249. wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
  14250. /** 1 to allow off-channel tx, 0 otherwise */
  14251. A_UINT32 off_channel_tx; /* Not supported */
  14252. } wmi_ocb_set_sched_cmd_fixed_param;
  14253. typedef struct {
  14254. /** Return status. 0 for success, non-zero otherwise */
  14255. A_UINT32 status;
  14256. } wmi_ocb_set_sched_event_fixed_param;
  14257. /*****************************************************************************
  14258. * END DEPRECATED
  14259. */
  14260. /* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */
  14261. #ifdef __cplusplus
  14262. }
  14263. #endif
  14264. #endif /*_WMI_UNIFIED_H_*/
  14265. /**@}*/