wmi.h 185 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504
  1. /*
  2. * Copyright (c) 2005-2011 Atheros Communications Inc.
  3. * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. #ifndef _WMI_H_
  18. #define _WMI_H_
  19. #include <linux/types.h>
  20. #include <net/mac80211.h>
  21. /*
  22. * This file specifies the WMI interface for the Unified Software
  23. * Architecture.
  24. *
  25. * It includes definitions of all the commands and events. Commands are
  26. * messages from the host to the target. Events and Replies are messages
  27. * from the target to the host.
  28. *
  29. * Ownership of correctness in regards to WMI commands belongs to the host
  30. * driver and the target is not required to validate parameters for value,
  31. * proper range, or any other checking.
  32. *
  33. * Guidelines for extending this interface are below.
  34. *
  35. * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
  36. *
  37. * 2. Use ONLY u32 type for defining member variables within WMI
  38. * command/event structures. Do not use u8, u16, bool or
  39. * enum types within these structures.
  40. *
  41. * 3. DO NOT define bit fields within structures. Implement bit fields
  42. * using masks if necessary. Do not use the programming language's bit
  43. * field definition.
  44. *
  45. * 4. Define macros for encode/decode of u8, u16 fields within
  46. * the u32 variables. Use these macros for set/get of these fields.
  47. * Try to use this to optimize the structure without bloating it with
  48. * u32 variables for every lower sized field.
  49. *
  50. * 5. Do not use PACK/UNPACK attributes for the structures as each member
  51. * variable is already 4-byte aligned by virtue of being a u32
  52. * type.
  53. *
  54. * 6. Comment each parameter part of the WMI command/event structure by
  55. * using the 2 stars at the begining of C comment instead of one star to
  56. * enable HTML document generation using Doxygen.
  57. *
  58. */
  59. /* Control Path */
  60. struct wmi_cmd_hdr {
  61. __le32 cmd_id;
  62. } __packed;
  63. #define WMI_CMD_HDR_CMD_ID_MASK 0x00FFFFFF
  64. #define WMI_CMD_HDR_CMD_ID_LSB 0
  65. #define WMI_CMD_HDR_PLT_PRIV_MASK 0xFF000000
  66. #define WMI_CMD_HDR_PLT_PRIV_LSB 24
  67. #define HTC_PROTOCOL_VERSION 0x0002
  68. #define WMI_PROTOCOL_VERSION 0x0002
  69. /*
  70. * There is no signed version of __le32, so for a temporary solution come
  71. * up with our own version. The idea is from fs/ntfs/types.h.
  72. *
  73. * Use a_ prefix so that it doesn't conflict if we get proper support to
  74. * linux/types.h.
  75. */
  76. typedef __s32 __bitwise a_sle32;
  77. static inline a_sle32 a_cpu_to_sle32(s32 val)
  78. {
  79. return (__force a_sle32)cpu_to_le32(val);
  80. }
  81. static inline s32 a_sle32_to_cpu(a_sle32 val)
  82. {
  83. return le32_to_cpu((__force __le32)val);
  84. }
  85. enum wmi_service {
  86. WMI_SERVICE_BEACON_OFFLOAD = 0,
  87. WMI_SERVICE_SCAN_OFFLOAD,
  88. WMI_SERVICE_ROAM_OFFLOAD,
  89. WMI_SERVICE_BCN_MISS_OFFLOAD,
  90. WMI_SERVICE_STA_PWRSAVE,
  91. WMI_SERVICE_STA_ADVANCED_PWRSAVE,
  92. WMI_SERVICE_AP_UAPSD,
  93. WMI_SERVICE_AP_DFS,
  94. WMI_SERVICE_11AC,
  95. WMI_SERVICE_BLOCKACK,
  96. WMI_SERVICE_PHYERR,
  97. WMI_SERVICE_BCN_FILTER,
  98. WMI_SERVICE_RTT,
  99. WMI_SERVICE_RATECTRL,
  100. WMI_SERVICE_WOW,
  101. WMI_SERVICE_RATECTRL_CACHE,
  102. WMI_SERVICE_IRAM_TIDS,
  103. WMI_SERVICE_ARPNS_OFFLOAD,
  104. WMI_SERVICE_NLO,
  105. WMI_SERVICE_GTK_OFFLOAD,
  106. WMI_SERVICE_SCAN_SCH,
  107. WMI_SERVICE_CSA_OFFLOAD,
  108. WMI_SERVICE_CHATTER,
  109. WMI_SERVICE_COEX_FREQAVOID,
  110. WMI_SERVICE_PACKET_POWER_SAVE,
  111. WMI_SERVICE_FORCE_FW_HANG,
  112. WMI_SERVICE_GPIO,
  113. WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
  114. WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
  115. WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
  116. WMI_SERVICE_STA_KEEP_ALIVE,
  117. WMI_SERVICE_TX_ENCAP,
  118. WMI_SERVICE_BURST,
  119. WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  120. WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  121. WMI_SERVICE_ROAM_SCAN_OFFLOAD,
  122. WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
  123. WMI_SERVICE_EARLY_RX,
  124. WMI_SERVICE_STA_SMPS,
  125. WMI_SERVICE_FWTEST,
  126. WMI_SERVICE_STA_WMMAC,
  127. WMI_SERVICE_TDLS,
  128. WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE,
  129. WMI_SERVICE_ADAPTIVE_OCS,
  130. WMI_SERVICE_BA_SSN_SUPPORT,
  131. WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
  132. WMI_SERVICE_WLAN_HB,
  133. WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,
  134. WMI_SERVICE_BATCH_SCAN,
  135. WMI_SERVICE_QPOWER,
  136. WMI_SERVICE_PLMREQ,
  137. WMI_SERVICE_THERMAL_MGMT,
  138. WMI_SERVICE_RMC,
  139. WMI_SERVICE_MHF_OFFLOAD,
  140. WMI_SERVICE_COEX_SAR,
  141. WMI_SERVICE_BCN_TXRATE_OVERRIDE,
  142. WMI_SERVICE_NAN,
  143. WMI_SERVICE_L1SS_STAT,
  144. WMI_SERVICE_ESTIMATE_LINKSPEED,
  145. WMI_SERVICE_OBSS_SCAN,
  146. WMI_SERVICE_TDLS_OFFCHAN,
  147. WMI_SERVICE_TDLS_UAPSD_BUFFER_STA,
  148. WMI_SERVICE_TDLS_UAPSD_SLEEP_STA,
  149. WMI_SERVICE_IBSS_PWRSAVE,
  150. WMI_SERVICE_LPASS,
  151. WMI_SERVICE_EXTSCAN,
  152. WMI_SERVICE_D0WOW,
  153. WMI_SERVICE_HSOFFLOAD,
  154. WMI_SERVICE_ROAM_HO_OFFLOAD,
  155. WMI_SERVICE_RX_FULL_REORDER,
  156. WMI_SERVICE_DHCP_OFFLOAD,
  157. WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT,
  158. WMI_SERVICE_MDNS_OFFLOAD,
  159. WMI_SERVICE_SAP_AUTH_OFFLOAD,
  160. WMI_SERVICE_ATF,
  161. WMI_SERVICE_COEX_GPIO,
  162. WMI_SERVICE_ENHANCED_PROXY_STA,
  163. WMI_SERVICE_TT,
  164. WMI_SERVICE_PEER_CACHING,
  165. WMI_SERVICE_AUX_SPECTRAL_INTF,
  166. WMI_SERVICE_AUX_CHAN_LOAD_INTF,
  167. WMI_SERVICE_BSS_CHANNEL_INFO_64,
  168. WMI_SERVICE_EXT_RES_CFG_SUPPORT,
  169. WMI_SERVICE_MESH_11S,
  170. WMI_SERVICE_MESH_NON_11S,
  171. WMI_SERVICE_PEER_STATS,
  172. WMI_SERVICE_RESTRT_CHNL_SUPPORT,
  173. /* keep last */
  174. WMI_SERVICE_MAX,
  175. };
  176. enum wmi_10x_service {
  177. WMI_10X_SERVICE_BEACON_OFFLOAD = 0,
  178. WMI_10X_SERVICE_SCAN_OFFLOAD,
  179. WMI_10X_SERVICE_ROAM_OFFLOAD,
  180. WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
  181. WMI_10X_SERVICE_STA_PWRSAVE,
  182. WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
  183. WMI_10X_SERVICE_AP_UAPSD,
  184. WMI_10X_SERVICE_AP_DFS,
  185. WMI_10X_SERVICE_11AC,
  186. WMI_10X_SERVICE_BLOCKACK,
  187. WMI_10X_SERVICE_PHYERR,
  188. WMI_10X_SERVICE_BCN_FILTER,
  189. WMI_10X_SERVICE_RTT,
  190. WMI_10X_SERVICE_RATECTRL,
  191. WMI_10X_SERVICE_WOW,
  192. WMI_10X_SERVICE_RATECTRL_CACHE,
  193. WMI_10X_SERVICE_IRAM_TIDS,
  194. WMI_10X_SERVICE_BURST,
  195. /* introduced in 10.2 */
  196. WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  197. WMI_10X_SERVICE_FORCE_FW_HANG,
  198. WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  199. WMI_10X_SERVICE_ATF,
  200. WMI_10X_SERVICE_COEX_GPIO,
  201. WMI_10X_SERVICE_AUX_SPECTRAL_INTF,
  202. WMI_10X_SERVICE_AUX_CHAN_LOAD_INTF,
  203. WMI_10X_SERVICE_BSS_CHANNEL_INFO_64,
  204. WMI_10X_SERVICE_MESH,
  205. WMI_10X_SERVICE_EXT_RES_CFG_SUPPORT,
  206. WMI_10X_SERVICE_PEER_STATS,
  207. };
  208. enum wmi_main_service {
  209. WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0,
  210. WMI_MAIN_SERVICE_SCAN_OFFLOAD,
  211. WMI_MAIN_SERVICE_ROAM_OFFLOAD,
  212. WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
  213. WMI_MAIN_SERVICE_STA_PWRSAVE,
  214. WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
  215. WMI_MAIN_SERVICE_AP_UAPSD,
  216. WMI_MAIN_SERVICE_AP_DFS,
  217. WMI_MAIN_SERVICE_11AC,
  218. WMI_MAIN_SERVICE_BLOCKACK,
  219. WMI_MAIN_SERVICE_PHYERR,
  220. WMI_MAIN_SERVICE_BCN_FILTER,
  221. WMI_MAIN_SERVICE_RTT,
  222. WMI_MAIN_SERVICE_RATECTRL,
  223. WMI_MAIN_SERVICE_WOW,
  224. WMI_MAIN_SERVICE_RATECTRL_CACHE,
  225. WMI_MAIN_SERVICE_IRAM_TIDS,
  226. WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
  227. WMI_MAIN_SERVICE_NLO,
  228. WMI_MAIN_SERVICE_GTK_OFFLOAD,
  229. WMI_MAIN_SERVICE_SCAN_SCH,
  230. WMI_MAIN_SERVICE_CSA_OFFLOAD,
  231. WMI_MAIN_SERVICE_CHATTER,
  232. WMI_MAIN_SERVICE_COEX_FREQAVOID,
  233. WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
  234. WMI_MAIN_SERVICE_FORCE_FW_HANG,
  235. WMI_MAIN_SERVICE_GPIO,
  236. WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
  237. WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
  238. WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
  239. WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
  240. WMI_MAIN_SERVICE_TX_ENCAP,
  241. };
  242. enum wmi_10_4_service {
  243. WMI_10_4_SERVICE_BEACON_OFFLOAD = 0,
  244. WMI_10_4_SERVICE_SCAN_OFFLOAD,
  245. WMI_10_4_SERVICE_ROAM_OFFLOAD,
  246. WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
  247. WMI_10_4_SERVICE_STA_PWRSAVE,
  248. WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
  249. WMI_10_4_SERVICE_AP_UAPSD,
  250. WMI_10_4_SERVICE_AP_DFS,
  251. WMI_10_4_SERVICE_11AC,
  252. WMI_10_4_SERVICE_BLOCKACK,
  253. WMI_10_4_SERVICE_PHYERR,
  254. WMI_10_4_SERVICE_BCN_FILTER,
  255. WMI_10_4_SERVICE_RTT,
  256. WMI_10_4_SERVICE_RATECTRL,
  257. WMI_10_4_SERVICE_WOW,
  258. WMI_10_4_SERVICE_RATECTRL_CACHE,
  259. WMI_10_4_SERVICE_IRAM_TIDS,
  260. WMI_10_4_SERVICE_BURST,
  261. WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  262. WMI_10_4_SERVICE_GTK_OFFLOAD,
  263. WMI_10_4_SERVICE_SCAN_SCH,
  264. WMI_10_4_SERVICE_CSA_OFFLOAD,
  265. WMI_10_4_SERVICE_CHATTER,
  266. WMI_10_4_SERVICE_COEX_FREQAVOID,
  267. WMI_10_4_SERVICE_PACKET_POWER_SAVE,
  268. WMI_10_4_SERVICE_FORCE_FW_HANG,
  269. WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  270. WMI_10_4_SERVICE_GPIO,
  271. WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
  272. WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
  273. WMI_10_4_SERVICE_STA_KEEP_ALIVE,
  274. WMI_10_4_SERVICE_TX_ENCAP,
  275. WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
  276. WMI_10_4_SERVICE_EARLY_RX,
  277. WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
  278. WMI_10_4_SERVICE_TT,
  279. WMI_10_4_SERVICE_ATF,
  280. WMI_10_4_SERVICE_PEER_CACHING,
  281. WMI_10_4_SERVICE_COEX_GPIO,
  282. WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
  283. WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
  284. WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
  285. WMI_10_4_SERVICE_EXT_RES_CFG_SUPPORT,
  286. WMI_10_4_SERVICE_MESH_NON_11S,
  287. WMI_10_4_SERVICE_RESTRT_CHNL_SUPPORT,
  288. WMI_10_4_SERVICE_PEER_STATS,
  289. WMI_10_4_SERVICE_MESH_11S,
  290. };
  291. static inline char *wmi_service_name(int service_id)
  292. {
  293. #define SVCSTR(x) case x: return #x
  294. switch (service_id) {
  295. SVCSTR(WMI_SERVICE_BEACON_OFFLOAD);
  296. SVCSTR(WMI_SERVICE_SCAN_OFFLOAD);
  297. SVCSTR(WMI_SERVICE_ROAM_OFFLOAD);
  298. SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD);
  299. SVCSTR(WMI_SERVICE_STA_PWRSAVE);
  300. SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE);
  301. SVCSTR(WMI_SERVICE_AP_UAPSD);
  302. SVCSTR(WMI_SERVICE_AP_DFS);
  303. SVCSTR(WMI_SERVICE_11AC);
  304. SVCSTR(WMI_SERVICE_BLOCKACK);
  305. SVCSTR(WMI_SERVICE_PHYERR);
  306. SVCSTR(WMI_SERVICE_BCN_FILTER);
  307. SVCSTR(WMI_SERVICE_RTT);
  308. SVCSTR(WMI_SERVICE_RATECTRL);
  309. SVCSTR(WMI_SERVICE_WOW);
  310. SVCSTR(WMI_SERVICE_RATECTRL_CACHE);
  311. SVCSTR(WMI_SERVICE_IRAM_TIDS);
  312. SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD);
  313. SVCSTR(WMI_SERVICE_NLO);
  314. SVCSTR(WMI_SERVICE_GTK_OFFLOAD);
  315. SVCSTR(WMI_SERVICE_SCAN_SCH);
  316. SVCSTR(WMI_SERVICE_CSA_OFFLOAD);
  317. SVCSTR(WMI_SERVICE_CHATTER);
  318. SVCSTR(WMI_SERVICE_COEX_FREQAVOID);
  319. SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE);
  320. SVCSTR(WMI_SERVICE_FORCE_FW_HANG);
  321. SVCSTR(WMI_SERVICE_GPIO);
  322. SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM);
  323. SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG);
  324. SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG);
  325. SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE);
  326. SVCSTR(WMI_SERVICE_TX_ENCAP);
  327. SVCSTR(WMI_SERVICE_BURST);
  328. SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
  329. SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
  330. SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
  331. SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
  332. SVCSTR(WMI_SERVICE_EARLY_RX);
  333. SVCSTR(WMI_SERVICE_STA_SMPS);
  334. SVCSTR(WMI_SERVICE_FWTEST);
  335. SVCSTR(WMI_SERVICE_STA_WMMAC);
  336. SVCSTR(WMI_SERVICE_TDLS);
  337. SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
  338. SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
  339. SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
  340. SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
  341. SVCSTR(WMI_SERVICE_WLAN_HB);
  342. SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
  343. SVCSTR(WMI_SERVICE_BATCH_SCAN);
  344. SVCSTR(WMI_SERVICE_QPOWER);
  345. SVCSTR(WMI_SERVICE_PLMREQ);
  346. SVCSTR(WMI_SERVICE_THERMAL_MGMT);
  347. SVCSTR(WMI_SERVICE_RMC);
  348. SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
  349. SVCSTR(WMI_SERVICE_COEX_SAR);
  350. SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
  351. SVCSTR(WMI_SERVICE_NAN);
  352. SVCSTR(WMI_SERVICE_L1SS_STAT);
  353. SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
  354. SVCSTR(WMI_SERVICE_OBSS_SCAN);
  355. SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
  356. SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
  357. SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
  358. SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
  359. SVCSTR(WMI_SERVICE_LPASS);
  360. SVCSTR(WMI_SERVICE_EXTSCAN);
  361. SVCSTR(WMI_SERVICE_D0WOW);
  362. SVCSTR(WMI_SERVICE_HSOFFLOAD);
  363. SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
  364. SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
  365. SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
  366. SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
  367. SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
  368. SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
  369. SVCSTR(WMI_SERVICE_ATF);
  370. SVCSTR(WMI_SERVICE_COEX_GPIO);
  371. SVCSTR(WMI_SERVICE_ENHANCED_PROXY_STA);
  372. SVCSTR(WMI_SERVICE_TT);
  373. SVCSTR(WMI_SERVICE_PEER_CACHING);
  374. SVCSTR(WMI_SERVICE_AUX_SPECTRAL_INTF);
  375. SVCSTR(WMI_SERVICE_AUX_CHAN_LOAD_INTF);
  376. SVCSTR(WMI_SERVICE_BSS_CHANNEL_INFO_64);
  377. SVCSTR(WMI_SERVICE_EXT_RES_CFG_SUPPORT);
  378. SVCSTR(WMI_SERVICE_MESH_11S);
  379. SVCSTR(WMI_SERVICE_MESH_NON_11S);
  380. SVCSTR(WMI_SERVICE_PEER_STATS);
  381. SVCSTR(WMI_SERVICE_RESTRT_CHNL_SUPPORT);
  382. default:
  383. return NULL;
  384. }
  385. #undef SVCSTR
  386. }
  387. #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
  388. ((svc_id) < (len) && \
  389. __le32_to_cpu((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
  390. BIT((svc_id)%(sizeof(u32))))
  391. #define SVCMAP(x, y, len) \
  392. do { \
  393. if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \
  394. __set_bit(y, out); \
  395. } while (0)
  396. static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
  397. size_t len)
  398. {
  399. SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD,
  400. WMI_SERVICE_BEACON_OFFLOAD, len);
  401. SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD,
  402. WMI_SERVICE_SCAN_OFFLOAD, len);
  403. SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD,
  404. WMI_SERVICE_ROAM_OFFLOAD, len);
  405. SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
  406. WMI_SERVICE_BCN_MISS_OFFLOAD, len);
  407. SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE,
  408. WMI_SERVICE_STA_PWRSAVE, len);
  409. SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
  410. WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
  411. SVCMAP(WMI_10X_SERVICE_AP_UAPSD,
  412. WMI_SERVICE_AP_UAPSD, len);
  413. SVCMAP(WMI_10X_SERVICE_AP_DFS,
  414. WMI_SERVICE_AP_DFS, len);
  415. SVCMAP(WMI_10X_SERVICE_11AC,
  416. WMI_SERVICE_11AC, len);
  417. SVCMAP(WMI_10X_SERVICE_BLOCKACK,
  418. WMI_SERVICE_BLOCKACK, len);
  419. SVCMAP(WMI_10X_SERVICE_PHYERR,
  420. WMI_SERVICE_PHYERR, len);
  421. SVCMAP(WMI_10X_SERVICE_BCN_FILTER,
  422. WMI_SERVICE_BCN_FILTER, len);
  423. SVCMAP(WMI_10X_SERVICE_RTT,
  424. WMI_SERVICE_RTT, len);
  425. SVCMAP(WMI_10X_SERVICE_RATECTRL,
  426. WMI_SERVICE_RATECTRL, len);
  427. SVCMAP(WMI_10X_SERVICE_WOW,
  428. WMI_SERVICE_WOW, len);
  429. SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE,
  430. WMI_SERVICE_RATECTRL_CACHE, len);
  431. SVCMAP(WMI_10X_SERVICE_IRAM_TIDS,
  432. WMI_SERVICE_IRAM_TIDS, len);
  433. SVCMAP(WMI_10X_SERVICE_BURST,
  434. WMI_SERVICE_BURST, len);
  435. SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  436. WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
  437. SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG,
  438. WMI_SERVICE_FORCE_FW_HANG, len);
  439. SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  440. WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
  441. SVCMAP(WMI_10X_SERVICE_ATF,
  442. WMI_SERVICE_ATF, len);
  443. SVCMAP(WMI_10X_SERVICE_COEX_GPIO,
  444. WMI_SERVICE_COEX_GPIO, len);
  445. SVCMAP(WMI_10X_SERVICE_AUX_SPECTRAL_INTF,
  446. WMI_SERVICE_AUX_SPECTRAL_INTF, len);
  447. SVCMAP(WMI_10X_SERVICE_AUX_CHAN_LOAD_INTF,
  448. WMI_SERVICE_AUX_CHAN_LOAD_INTF, len);
  449. SVCMAP(WMI_10X_SERVICE_BSS_CHANNEL_INFO_64,
  450. WMI_SERVICE_BSS_CHANNEL_INFO_64, len);
  451. SVCMAP(WMI_10X_SERVICE_MESH,
  452. WMI_SERVICE_MESH_11S, len);
  453. SVCMAP(WMI_10X_SERVICE_EXT_RES_CFG_SUPPORT,
  454. WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
  455. SVCMAP(WMI_10X_SERVICE_PEER_STATS,
  456. WMI_SERVICE_PEER_STATS, len);
  457. }
  458. static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
  459. size_t len)
  460. {
  461. SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD,
  462. WMI_SERVICE_BEACON_OFFLOAD, len);
  463. SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD,
  464. WMI_SERVICE_SCAN_OFFLOAD, len);
  465. SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD,
  466. WMI_SERVICE_ROAM_OFFLOAD, len);
  467. SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
  468. WMI_SERVICE_BCN_MISS_OFFLOAD, len);
  469. SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE,
  470. WMI_SERVICE_STA_PWRSAVE, len);
  471. SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
  472. WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
  473. SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD,
  474. WMI_SERVICE_AP_UAPSD, len);
  475. SVCMAP(WMI_MAIN_SERVICE_AP_DFS,
  476. WMI_SERVICE_AP_DFS, len);
  477. SVCMAP(WMI_MAIN_SERVICE_11AC,
  478. WMI_SERVICE_11AC, len);
  479. SVCMAP(WMI_MAIN_SERVICE_BLOCKACK,
  480. WMI_SERVICE_BLOCKACK, len);
  481. SVCMAP(WMI_MAIN_SERVICE_PHYERR,
  482. WMI_SERVICE_PHYERR, len);
  483. SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER,
  484. WMI_SERVICE_BCN_FILTER, len);
  485. SVCMAP(WMI_MAIN_SERVICE_RTT,
  486. WMI_SERVICE_RTT, len);
  487. SVCMAP(WMI_MAIN_SERVICE_RATECTRL,
  488. WMI_SERVICE_RATECTRL, len);
  489. SVCMAP(WMI_MAIN_SERVICE_WOW,
  490. WMI_SERVICE_WOW, len);
  491. SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE,
  492. WMI_SERVICE_RATECTRL_CACHE, len);
  493. SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS,
  494. WMI_SERVICE_IRAM_TIDS, len);
  495. SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
  496. WMI_SERVICE_ARPNS_OFFLOAD, len);
  497. SVCMAP(WMI_MAIN_SERVICE_NLO,
  498. WMI_SERVICE_NLO, len);
  499. SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD,
  500. WMI_SERVICE_GTK_OFFLOAD, len);
  501. SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH,
  502. WMI_SERVICE_SCAN_SCH, len);
  503. SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD,
  504. WMI_SERVICE_CSA_OFFLOAD, len);
  505. SVCMAP(WMI_MAIN_SERVICE_CHATTER,
  506. WMI_SERVICE_CHATTER, len);
  507. SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID,
  508. WMI_SERVICE_COEX_FREQAVOID, len);
  509. SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
  510. WMI_SERVICE_PACKET_POWER_SAVE, len);
  511. SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG,
  512. WMI_SERVICE_FORCE_FW_HANG, len);
  513. SVCMAP(WMI_MAIN_SERVICE_GPIO,
  514. WMI_SERVICE_GPIO, len);
  515. SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
  516. WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len);
  517. SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
  518. WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
  519. SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
  520. WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
  521. SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
  522. WMI_SERVICE_STA_KEEP_ALIVE, len);
  523. SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP,
  524. WMI_SERVICE_TX_ENCAP, len);
  525. }
  526. static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
  527. size_t len)
  528. {
  529. SVCMAP(WMI_10_4_SERVICE_BEACON_OFFLOAD,
  530. WMI_SERVICE_BEACON_OFFLOAD, len);
  531. SVCMAP(WMI_10_4_SERVICE_SCAN_OFFLOAD,
  532. WMI_SERVICE_SCAN_OFFLOAD, len);
  533. SVCMAP(WMI_10_4_SERVICE_ROAM_OFFLOAD,
  534. WMI_SERVICE_ROAM_OFFLOAD, len);
  535. SVCMAP(WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
  536. WMI_SERVICE_BCN_MISS_OFFLOAD, len);
  537. SVCMAP(WMI_10_4_SERVICE_STA_PWRSAVE,
  538. WMI_SERVICE_STA_PWRSAVE, len);
  539. SVCMAP(WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
  540. WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
  541. SVCMAP(WMI_10_4_SERVICE_AP_UAPSD,
  542. WMI_SERVICE_AP_UAPSD, len);
  543. SVCMAP(WMI_10_4_SERVICE_AP_DFS,
  544. WMI_SERVICE_AP_DFS, len);
  545. SVCMAP(WMI_10_4_SERVICE_11AC,
  546. WMI_SERVICE_11AC, len);
  547. SVCMAP(WMI_10_4_SERVICE_BLOCKACK,
  548. WMI_SERVICE_BLOCKACK, len);
  549. SVCMAP(WMI_10_4_SERVICE_PHYERR,
  550. WMI_SERVICE_PHYERR, len);
  551. SVCMAP(WMI_10_4_SERVICE_BCN_FILTER,
  552. WMI_SERVICE_BCN_FILTER, len);
  553. SVCMAP(WMI_10_4_SERVICE_RTT,
  554. WMI_SERVICE_RTT, len);
  555. SVCMAP(WMI_10_4_SERVICE_RATECTRL,
  556. WMI_SERVICE_RATECTRL, len);
  557. SVCMAP(WMI_10_4_SERVICE_WOW,
  558. WMI_SERVICE_WOW, len);
  559. SVCMAP(WMI_10_4_SERVICE_RATECTRL_CACHE,
  560. WMI_SERVICE_RATECTRL_CACHE, len);
  561. SVCMAP(WMI_10_4_SERVICE_IRAM_TIDS,
  562. WMI_SERVICE_IRAM_TIDS, len);
  563. SVCMAP(WMI_10_4_SERVICE_BURST,
  564. WMI_SERVICE_BURST, len);
  565. SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
  566. WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
  567. SVCMAP(WMI_10_4_SERVICE_GTK_OFFLOAD,
  568. WMI_SERVICE_GTK_OFFLOAD, len);
  569. SVCMAP(WMI_10_4_SERVICE_SCAN_SCH,
  570. WMI_SERVICE_SCAN_SCH, len);
  571. SVCMAP(WMI_10_4_SERVICE_CSA_OFFLOAD,
  572. WMI_SERVICE_CSA_OFFLOAD, len);
  573. SVCMAP(WMI_10_4_SERVICE_CHATTER,
  574. WMI_SERVICE_CHATTER, len);
  575. SVCMAP(WMI_10_4_SERVICE_COEX_FREQAVOID,
  576. WMI_SERVICE_COEX_FREQAVOID, len);
  577. SVCMAP(WMI_10_4_SERVICE_PACKET_POWER_SAVE,
  578. WMI_SERVICE_PACKET_POWER_SAVE, len);
  579. SVCMAP(WMI_10_4_SERVICE_FORCE_FW_HANG,
  580. WMI_SERVICE_FORCE_FW_HANG, len);
  581. SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
  582. WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
  583. SVCMAP(WMI_10_4_SERVICE_GPIO,
  584. WMI_SERVICE_GPIO, len);
  585. SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
  586. WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
  587. SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
  588. WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
  589. SVCMAP(WMI_10_4_SERVICE_STA_KEEP_ALIVE,
  590. WMI_SERVICE_STA_KEEP_ALIVE, len);
  591. SVCMAP(WMI_10_4_SERVICE_TX_ENCAP,
  592. WMI_SERVICE_TX_ENCAP, len);
  593. SVCMAP(WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
  594. WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, len);
  595. SVCMAP(WMI_10_4_SERVICE_EARLY_RX,
  596. WMI_SERVICE_EARLY_RX, len);
  597. SVCMAP(WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
  598. WMI_SERVICE_ENHANCED_PROXY_STA, len);
  599. SVCMAP(WMI_10_4_SERVICE_TT,
  600. WMI_SERVICE_TT, len);
  601. SVCMAP(WMI_10_4_SERVICE_ATF,
  602. WMI_SERVICE_ATF, len);
  603. SVCMAP(WMI_10_4_SERVICE_PEER_CACHING,
  604. WMI_SERVICE_PEER_CACHING, len);
  605. SVCMAP(WMI_10_4_SERVICE_COEX_GPIO,
  606. WMI_SERVICE_COEX_GPIO, len);
  607. SVCMAP(WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
  608. WMI_SERVICE_AUX_SPECTRAL_INTF, len);
  609. SVCMAP(WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
  610. WMI_SERVICE_AUX_CHAN_LOAD_INTF, len);
  611. SVCMAP(WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
  612. WMI_SERVICE_BSS_CHANNEL_INFO_64, len);
  613. SVCMAP(WMI_10_4_SERVICE_EXT_RES_CFG_SUPPORT,
  614. WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
  615. SVCMAP(WMI_10_4_SERVICE_MESH_NON_11S,
  616. WMI_SERVICE_MESH_NON_11S, len);
  617. SVCMAP(WMI_10_4_SERVICE_RESTRT_CHNL_SUPPORT,
  618. WMI_SERVICE_RESTRT_CHNL_SUPPORT, len);
  619. SVCMAP(WMI_10_4_SERVICE_PEER_STATS,
  620. WMI_SERVICE_PEER_STATS, len);
  621. SVCMAP(WMI_10_4_SERVICE_MESH_11S,
  622. WMI_SERVICE_MESH_11S, len);
  623. }
  624. #undef SVCMAP
  625. /* 2 word representation of MAC addr */
  626. struct wmi_mac_addr {
  627. union {
  628. u8 addr[6];
  629. struct {
  630. u32 word0;
  631. u32 word1;
  632. } __packed;
  633. } __packed;
  634. } __packed;
  635. struct wmi_cmd_map {
  636. u32 init_cmdid;
  637. u32 start_scan_cmdid;
  638. u32 stop_scan_cmdid;
  639. u32 scan_chan_list_cmdid;
  640. u32 scan_sch_prio_tbl_cmdid;
  641. u32 pdev_set_regdomain_cmdid;
  642. u32 pdev_set_channel_cmdid;
  643. u32 pdev_set_param_cmdid;
  644. u32 pdev_pktlog_enable_cmdid;
  645. u32 pdev_pktlog_disable_cmdid;
  646. u32 pdev_set_wmm_params_cmdid;
  647. u32 pdev_set_ht_cap_ie_cmdid;
  648. u32 pdev_set_vht_cap_ie_cmdid;
  649. u32 pdev_set_dscp_tid_map_cmdid;
  650. u32 pdev_set_quiet_mode_cmdid;
  651. u32 pdev_green_ap_ps_enable_cmdid;
  652. u32 pdev_get_tpc_config_cmdid;
  653. u32 pdev_set_base_macaddr_cmdid;
  654. u32 vdev_create_cmdid;
  655. u32 vdev_delete_cmdid;
  656. u32 vdev_start_request_cmdid;
  657. u32 vdev_restart_request_cmdid;
  658. u32 vdev_up_cmdid;
  659. u32 vdev_stop_cmdid;
  660. u32 vdev_down_cmdid;
  661. u32 vdev_set_param_cmdid;
  662. u32 vdev_install_key_cmdid;
  663. u32 peer_create_cmdid;
  664. u32 peer_delete_cmdid;
  665. u32 peer_flush_tids_cmdid;
  666. u32 peer_set_param_cmdid;
  667. u32 peer_assoc_cmdid;
  668. u32 peer_add_wds_entry_cmdid;
  669. u32 peer_remove_wds_entry_cmdid;
  670. u32 peer_mcast_group_cmdid;
  671. u32 bcn_tx_cmdid;
  672. u32 pdev_send_bcn_cmdid;
  673. u32 bcn_tmpl_cmdid;
  674. u32 bcn_filter_rx_cmdid;
  675. u32 prb_req_filter_rx_cmdid;
  676. u32 mgmt_tx_cmdid;
  677. u32 prb_tmpl_cmdid;
  678. u32 addba_clear_resp_cmdid;
  679. u32 addba_send_cmdid;
  680. u32 addba_status_cmdid;
  681. u32 delba_send_cmdid;
  682. u32 addba_set_resp_cmdid;
  683. u32 send_singleamsdu_cmdid;
  684. u32 sta_powersave_mode_cmdid;
  685. u32 sta_powersave_param_cmdid;
  686. u32 sta_mimo_ps_mode_cmdid;
  687. u32 pdev_dfs_enable_cmdid;
  688. u32 pdev_dfs_disable_cmdid;
  689. u32 roam_scan_mode;
  690. u32 roam_scan_rssi_threshold;
  691. u32 roam_scan_period;
  692. u32 roam_scan_rssi_change_threshold;
  693. u32 roam_ap_profile;
  694. u32 ofl_scan_add_ap_profile;
  695. u32 ofl_scan_remove_ap_profile;
  696. u32 ofl_scan_period;
  697. u32 p2p_dev_set_device_info;
  698. u32 p2p_dev_set_discoverability;
  699. u32 p2p_go_set_beacon_ie;
  700. u32 p2p_go_set_probe_resp_ie;
  701. u32 p2p_set_vendor_ie_data_cmdid;
  702. u32 ap_ps_peer_param_cmdid;
  703. u32 ap_ps_peer_uapsd_coex_cmdid;
  704. u32 peer_rate_retry_sched_cmdid;
  705. u32 wlan_profile_trigger_cmdid;
  706. u32 wlan_profile_set_hist_intvl_cmdid;
  707. u32 wlan_profile_get_profile_data_cmdid;
  708. u32 wlan_profile_enable_profile_id_cmdid;
  709. u32 wlan_profile_list_profile_id_cmdid;
  710. u32 pdev_suspend_cmdid;
  711. u32 pdev_resume_cmdid;
  712. u32 add_bcn_filter_cmdid;
  713. u32 rmv_bcn_filter_cmdid;
  714. u32 wow_add_wake_pattern_cmdid;
  715. u32 wow_del_wake_pattern_cmdid;
  716. u32 wow_enable_disable_wake_event_cmdid;
  717. u32 wow_enable_cmdid;
  718. u32 wow_hostwakeup_from_sleep_cmdid;
  719. u32 rtt_measreq_cmdid;
  720. u32 rtt_tsf_cmdid;
  721. u32 vdev_spectral_scan_configure_cmdid;
  722. u32 vdev_spectral_scan_enable_cmdid;
  723. u32 request_stats_cmdid;
  724. u32 set_arp_ns_offload_cmdid;
  725. u32 network_list_offload_config_cmdid;
  726. u32 gtk_offload_cmdid;
  727. u32 csa_offload_enable_cmdid;
  728. u32 csa_offload_chanswitch_cmdid;
  729. u32 chatter_set_mode_cmdid;
  730. u32 peer_tid_addba_cmdid;
  731. u32 peer_tid_delba_cmdid;
  732. u32 sta_dtim_ps_method_cmdid;
  733. u32 sta_uapsd_auto_trig_cmdid;
  734. u32 sta_keepalive_cmd;
  735. u32 echo_cmdid;
  736. u32 pdev_utf_cmdid;
  737. u32 dbglog_cfg_cmdid;
  738. u32 pdev_qvit_cmdid;
  739. u32 pdev_ftm_intg_cmdid;
  740. u32 vdev_set_keepalive_cmdid;
  741. u32 vdev_get_keepalive_cmdid;
  742. u32 force_fw_hang_cmdid;
  743. u32 gpio_config_cmdid;
  744. u32 gpio_output_cmdid;
  745. u32 pdev_get_temperature_cmdid;
  746. u32 vdev_set_wmm_params_cmdid;
  747. u32 tdls_set_state_cmdid;
  748. u32 tdls_peer_update_cmdid;
  749. u32 adaptive_qcs_cmdid;
  750. u32 scan_update_request_cmdid;
  751. u32 vdev_standby_response_cmdid;
  752. u32 vdev_resume_response_cmdid;
  753. u32 wlan_peer_caching_add_peer_cmdid;
  754. u32 wlan_peer_caching_evict_peer_cmdid;
  755. u32 wlan_peer_caching_restore_peer_cmdid;
  756. u32 wlan_peer_caching_print_all_peers_info_cmdid;
  757. u32 peer_update_wds_entry_cmdid;
  758. u32 peer_add_proxy_sta_entry_cmdid;
  759. u32 rtt_keepalive_cmdid;
  760. u32 oem_req_cmdid;
  761. u32 nan_cmdid;
  762. u32 vdev_ratemask_cmdid;
  763. u32 qboost_cfg_cmdid;
  764. u32 pdev_smart_ant_enable_cmdid;
  765. u32 pdev_smart_ant_set_rx_antenna_cmdid;
  766. u32 peer_smart_ant_set_tx_antenna_cmdid;
  767. u32 peer_smart_ant_set_train_info_cmdid;
  768. u32 peer_smart_ant_set_node_config_ops_cmdid;
  769. u32 pdev_set_antenna_switch_table_cmdid;
  770. u32 pdev_set_ctl_table_cmdid;
  771. u32 pdev_set_mimogain_table_cmdid;
  772. u32 pdev_ratepwr_table_cmdid;
  773. u32 pdev_ratepwr_chainmsk_table_cmdid;
  774. u32 pdev_fips_cmdid;
  775. u32 tt_set_conf_cmdid;
  776. u32 fwtest_cmdid;
  777. u32 vdev_atf_request_cmdid;
  778. u32 peer_atf_request_cmdid;
  779. u32 pdev_get_ani_cck_config_cmdid;
  780. u32 pdev_get_ani_ofdm_config_cmdid;
  781. u32 pdev_reserve_ast_entry_cmdid;
  782. u32 pdev_get_nfcal_power_cmdid;
  783. u32 pdev_get_tpc_cmdid;
  784. u32 pdev_get_ast_info_cmdid;
  785. u32 vdev_set_dscp_tid_map_cmdid;
  786. u32 pdev_get_info_cmdid;
  787. u32 vdev_get_info_cmdid;
  788. u32 vdev_filter_neighbor_rx_packets_cmdid;
  789. u32 mu_cal_start_cmdid;
  790. u32 set_cca_params_cmdid;
  791. u32 pdev_bss_chan_info_request_cmdid;
  792. u32 pdev_enable_adaptive_cca_cmdid;
  793. };
  794. /*
  795. * wmi command groups.
  796. */
  797. enum wmi_cmd_group {
  798. /* 0 to 2 are reserved */
  799. WMI_GRP_START = 0x3,
  800. WMI_GRP_SCAN = WMI_GRP_START,
  801. WMI_GRP_PDEV,
  802. WMI_GRP_VDEV,
  803. WMI_GRP_PEER,
  804. WMI_GRP_MGMT,
  805. WMI_GRP_BA_NEG,
  806. WMI_GRP_STA_PS,
  807. WMI_GRP_DFS,
  808. WMI_GRP_ROAM,
  809. WMI_GRP_OFL_SCAN,
  810. WMI_GRP_P2P,
  811. WMI_GRP_AP_PS,
  812. WMI_GRP_RATE_CTRL,
  813. WMI_GRP_PROFILE,
  814. WMI_GRP_SUSPEND,
  815. WMI_GRP_BCN_FILTER,
  816. WMI_GRP_WOW,
  817. WMI_GRP_RTT,
  818. WMI_GRP_SPECTRAL,
  819. WMI_GRP_STATS,
  820. WMI_GRP_ARP_NS_OFL,
  821. WMI_GRP_NLO_OFL,
  822. WMI_GRP_GTK_OFL,
  823. WMI_GRP_CSA_OFL,
  824. WMI_GRP_CHATTER,
  825. WMI_GRP_TID_ADDBA,
  826. WMI_GRP_MISC,
  827. WMI_GRP_GPIO,
  828. };
  829. #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
  830. #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
  831. #define WMI_CMD_UNSUPPORTED 0
  832. /* Command IDs and command events for MAIN FW. */
  833. enum wmi_cmd_id {
  834. WMI_INIT_CMDID = 0x1,
  835. /* Scan specific commands */
  836. WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
  837. WMI_STOP_SCAN_CMDID,
  838. WMI_SCAN_CHAN_LIST_CMDID,
  839. WMI_SCAN_SCH_PRIO_TBL_CMDID,
  840. /* PDEV (physical device) specific commands */
  841. WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
  842. WMI_PDEV_SET_CHANNEL_CMDID,
  843. WMI_PDEV_SET_PARAM_CMDID,
  844. WMI_PDEV_PKTLOG_ENABLE_CMDID,
  845. WMI_PDEV_PKTLOG_DISABLE_CMDID,
  846. WMI_PDEV_SET_WMM_PARAMS_CMDID,
  847. WMI_PDEV_SET_HT_CAP_IE_CMDID,
  848. WMI_PDEV_SET_VHT_CAP_IE_CMDID,
  849. WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
  850. WMI_PDEV_SET_QUIET_MODE_CMDID,
  851. WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  852. WMI_PDEV_GET_TPC_CONFIG_CMDID,
  853. WMI_PDEV_SET_BASE_MACADDR_CMDID,
  854. /* VDEV (virtual device) specific commands */
  855. WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
  856. WMI_VDEV_DELETE_CMDID,
  857. WMI_VDEV_START_REQUEST_CMDID,
  858. WMI_VDEV_RESTART_REQUEST_CMDID,
  859. WMI_VDEV_UP_CMDID,
  860. WMI_VDEV_STOP_CMDID,
  861. WMI_VDEV_DOWN_CMDID,
  862. WMI_VDEV_SET_PARAM_CMDID,
  863. WMI_VDEV_INSTALL_KEY_CMDID,
  864. /* peer specific commands */
  865. WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
  866. WMI_PEER_DELETE_CMDID,
  867. WMI_PEER_FLUSH_TIDS_CMDID,
  868. WMI_PEER_SET_PARAM_CMDID,
  869. WMI_PEER_ASSOC_CMDID,
  870. WMI_PEER_ADD_WDS_ENTRY_CMDID,
  871. WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
  872. WMI_PEER_MCAST_GROUP_CMDID,
  873. /* beacon/management specific commands */
  874. WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
  875. WMI_PDEV_SEND_BCN_CMDID,
  876. WMI_BCN_TMPL_CMDID,
  877. WMI_BCN_FILTER_RX_CMDID,
  878. WMI_PRB_REQ_FILTER_RX_CMDID,
  879. WMI_MGMT_TX_CMDID,
  880. WMI_PRB_TMPL_CMDID,
  881. /* commands to directly control BA negotiation directly from host. */
  882. WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
  883. WMI_ADDBA_SEND_CMDID,
  884. WMI_ADDBA_STATUS_CMDID,
  885. WMI_DELBA_SEND_CMDID,
  886. WMI_ADDBA_SET_RESP_CMDID,
  887. WMI_SEND_SINGLEAMSDU_CMDID,
  888. /* Station power save specific config */
  889. WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
  890. WMI_STA_POWERSAVE_PARAM_CMDID,
  891. WMI_STA_MIMO_PS_MODE_CMDID,
  892. /** DFS-specific commands */
  893. WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
  894. WMI_PDEV_DFS_DISABLE_CMDID,
  895. /* Roaming specific commands */
  896. WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
  897. WMI_ROAM_SCAN_RSSI_THRESHOLD,
  898. WMI_ROAM_SCAN_PERIOD,
  899. WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  900. WMI_ROAM_AP_PROFILE,
  901. /* offload scan specific commands */
  902. WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
  903. WMI_OFL_SCAN_REMOVE_AP_PROFILE,
  904. WMI_OFL_SCAN_PERIOD,
  905. /* P2P specific commands */
  906. WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
  907. WMI_P2P_DEV_SET_DISCOVERABILITY,
  908. WMI_P2P_GO_SET_BEACON_IE,
  909. WMI_P2P_GO_SET_PROBE_RESP_IE,
  910. WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
  911. /* AP power save specific config */
  912. WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
  913. WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
  914. /* Rate-control specific commands */
  915. WMI_PEER_RATE_RETRY_SCHED_CMDID =
  916. WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
  917. /* WLAN Profiling commands. */
  918. WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
  919. WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  920. WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  921. WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  922. WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  923. /* Suspend resume command Ids */
  924. WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
  925. WMI_PDEV_RESUME_CMDID,
  926. /* Beacon filter commands */
  927. WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
  928. WMI_RMV_BCN_FILTER_CMDID,
  929. /* WOW Specific WMI commands*/
  930. WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
  931. WMI_WOW_DEL_WAKE_PATTERN_CMDID,
  932. WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  933. WMI_WOW_ENABLE_CMDID,
  934. WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  935. /* RTT measurement related cmd */
  936. WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
  937. WMI_RTT_TSF_CMDID,
  938. /* spectral scan commands */
  939. WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
  940. WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  941. /* F/W stats */
  942. WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
  943. /* ARP OFFLOAD REQUEST*/
  944. WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
  945. /* NS offload confid*/
  946. WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
  947. /* GTK offload Specific WMI commands*/
  948. WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
  949. /* CSA offload Specific WMI commands*/
  950. WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
  951. WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
  952. /* Chatter commands*/
  953. WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
  954. /* addba specific commands */
  955. WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
  956. WMI_PEER_TID_DELBA_CMDID,
  957. /* set station mimo powersave method */
  958. WMI_STA_DTIM_PS_METHOD_CMDID,
  959. /* Configure the Station UAPSD AC Auto Trigger Parameters */
  960. WMI_STA_UAPSD_AUTO_TRIG_CMDID,
  961. /* STA Keep alive parameter configuration,
  962. Requires WMI_SERVICE_STA_KEEP_ALIVE */
  963. WMI_STA_KEEPALIVE_CMD,
  964. /* misc command group */
  965. WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
  966. WMI_PDEV_UTF_CMDID,
  967. WMI_DBGLOG_CFG_CMDID,
  968. WMI_PDEV_QVIT_CMDID,
  969. WMI_PDEV_FTM_INTG_CMDID,
  970. WMI_VDEV_SET_KEEPALIVE_CMDID,
  971. WMI_VDEV_GET_KEEPALIVE_CMDID,
  972. WMI_FORCE_FW_HANG_CMDID,
  973. /* GPIO Configuration */
  974. WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
  975. WMI_GPIO_OUTPUT_CMDID,
  976. };
  977. enum wmi_event_id {
  978. WMI_SERVICE_READY_EVENTID = 0x1,
  979. WMI_READY_EVENTID,
  980. /* Scan specific events */
  981. WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
  982. /* PDEV specific events */
  983. WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
  984. WMI_CHAN_INFO_EVENTID,
  985. WMI_PHYERR_EVENTID,
  986. /* VDEV specific events */
  987. WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
  988. WMI_VDEV_STOPPED_EVENTID,
  989. WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
  990. /* peer specific events */
  991. WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
  992. /* beacon/mgmt specific events */
  993. WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
  994. WMI_HOST_SWBA_EVENTID,
  995. WMI_TBTTOFFSET_UPDATE_EVENTID,
  996. /* ADDBA Related WMI Events*/
  997. WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
  998. WMI_TX_ADDBA_COMPLETE_EVENTID,
  999. /* Roam event to trigger roaming on host */
  1000. WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
  1001. WMI_PROFILE_MATCH,
  1002. /* WoW */
  1003. WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
  1004. /* RTT */
  1005. WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
  1006. WMI_TSF_MEASUREMENT_REPORT_EVENTID,
  1007. WMI_RTT_ERROR_REPORT_EVENTID,
  1008. /* GTK offload */
  1009. WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
  1010. WMI_GTK_REKEY_FAIL_EVENTID,
  1011. /* CSA IE received event */
  1012. WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
  1013. /* Misc events */
  1014. WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
  1015. WMI_PDEV_UTF_EVENTID,
  1016. WMI_DEBUG_MESG_EVENTID,
  1017. WMI_UPDATE_STATS_EVENTID,
  1018. WMI_DEBUG_PRINT_EVENTID,
  1019. WMI_DCS_INTERFERENCE_EVENTID,
  1020. WMI_PDEV_QVIT_EVENTID,
  1021. WMI_WLAN_PROFILE_DATA_EVENTID,
  1022. WMI_PDEV_FTM_INTG_EVENTID,
  1023. WMI_WLAN_FREQ_AVOID_EVENTID,
  1024. WMI_VDEV_GET_KEEPALIVE_EVENTID,
  1025. /* GPIO Event */
  1026. WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
  1027. };
  1028. /* Command IDs and command events for 10.X firmware */
  1029. enum wmi_10x_cmd_id {
  1030. WMI_10X_START_CMDID = 0x9000,
  1031. WMI_10X_END_CMDID = 0x9FFF,
  1032. /* initialize the wlan sub system */
  1033. WMI_10X_INIT_CMDID,
  1034. /* Scan specific commands */
  1035. WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
  1036. WMI_10X_STOP_SCAN_CMDID,
  1037. WMI_10X_SCAN_CHAN_LIST_CMDID,
  1038. WMI_10X_ECHO_CMDID,
  1039. /* PDEV(physical device) specific commands */
  1040. WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
  1041. WMI_10X_PDEV_SET_CHANNEL_CMDID,
  1042. WMI_10X_PDEV_SET_PARAM_CMDID,
  1043. WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
  1044. WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
  1045. WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
  1046. WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
  1047. WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
  1048. WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
  1049. WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
  1050. WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
  1051. WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  1052. WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
  1053. /* VDEV(virtual device) specific commands */
  1054. WMI_10X_VDEV_CREATE_CMDID,
  1055. WMI_10X_VDEV_DELETE_CMDID,
  1056. WMI_10X_VDEV_START_REQUEST_CMDID,
  1057. WMI_10X_VDEV_RESTART_REQUEST_CMDID,
  1058. WMI_10X_VDEV_UP_CMDID,
  1059. WMI_10X_VDEV_STOP_CMDID,
  1060. WMI_10X_VDEV_DOWN_CMDID,
  1061. WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
  1062. WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
  1063. WMI_10X_VDEV_SET_PARAM_CMDID,
  1064. WMI_10X_VDEV_INSTALL_KEY_CMDID,
  1065. /* peer specific commands */
  1066. WMI_10X_PEER_CREATE_CMDID,
  1067. WMI_10X_PEER_DELETE_CMDID,
  1068. WMI_10X_PEER_FLUSH_TIDS_CMDID,
  1069. WMI_10X_PEER_SET_PARAM_CMDID,
  1070. WMI_10X_PEER_ASSOC_CMDID,
  1071. WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
  1072. WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
  1073. WMI_10X_PEER_MCAST_GROUP_CMDID,
  1074. /* beacon/management specific commands */
  1075. WMI_10X_BCN_TX_CMDID,
  1076. WMI_10X_BCN_PRB_TMPL_CMDID,
  1077. WMI_10X_BCN_FILTER_RX_CMDID,
  1078. WMI_10X_PRB_REQ_FILTER_RX_CMDID,
  1079. WMI_10X_MGMT_TX_CMDID,
  1080. /* commands to directly control ba negotiation directly from host. */
  1081. WMI_10X_ADDBA_CLEAR_RESP_CMDID,
  1082. WMI_10X_ADDBA_SEND_CMDID,
  1083. WMI_10X_ADDBA_STATUS_CMDID,
  1084. WMI_10X_DELBA_SEND_CMDID,
  1085. WMI_10X_ADDBA_SET_RESP_CMDID,
  1086. WMI_10X_SEND_SINGLEAMSDU_CMDID,
  1087. /* Station power save specific config */
  1088. WMI_10X_STA_POWERSAVE_MODE_CMDID,
  1089. WMI_10X_STA_POWERSAVE_PARAM_CMDID,
  1090. WMI_10X_STA_MIMO_PS_MODE_CMDID,
  1091. /* set debug log config */
  1092. WMI_10X_DBGLOG_CFG_CMDID,
  1093. /* DFS-specific commands */
  1094. WMI_10X_PDEV_DFS_ENABLE_CMDID,
  1095. WMI_10X_PDEV_DFS_DISABLE_CMDID,
  1096. /* QVIT specific command id */
  1097. WMI_10X_PDEV_QVIT_CMDID,
  1098. /* Offload Scan and Roaming related commands */
  1099. WMI_10X_ROAM_SCAN_MODE,
  1100. WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
  1101. WMI_10X_ROAM_SCAN_PERIOD,
  1102. WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  1103. WMI_10X_ROAM_AP_PROFILE,
  1104. WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
  1105. WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
  1106. WMI_10X_OFL_SCAN_PERIOD,
  1107. /* P2P specific commands */
  1108. WMI_10X_P2P_DEV_SET_DEVICE_INFO,
  1109. WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
  1110. WMI_10X_P2P_GO_SET_BEACON_IE,
  1111. WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
  1112. /* AP power save specific config */
  1113. WMI_10X_AP_PS_PEER_PARAM_CMDID,
  1114. WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
  1115. /* Rate-control specific commands */
  1116. WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
  1117. /* WLAN Profiling commands. */
  1118. WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
  1119. WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  1120. WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  1121. WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  1122. WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  1123. /* Suspend resume command Ids */
  1124. WMI_10X_PDEV_SUSPEND_CMDID,
  1125. WMI_10X_PDEV_RESUME_CMDID,
  1126. /* Beacon filter commands */
  1127. WMI_10X_ADD_BCN_FILTER_CMDID,
  1128. WMI_10X_RMV_BCN_FILTER_CMDID,
  1129. /* WOW Specific WMI commands*/
  1130. WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
  1131. WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
  1132. WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  1133. WMI_10X_WOW_ENABLE_CMDID,
  1134. WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  1135. /* RTT measurement related cmd */
  1136. WMI_10X_RTT_MEASREQ_CMDID,
  1137. WMI_10X_RTT_TSF_CMDID,
  1138. /* transmit beacon by value */
  1139. WMI_10X_PDEV_SEND_BCN_CMDID,
  1140. /* F/W stats */
  1141. WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
  1142. WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1143. WMI_10X_REQUEST_STATS_CMDID,
  1144. /* GPIO Configuration */
  1145. WMI_10X_GPIO_CONFIG_CMDID,
  1146. WMI_10X_GPIO_OUTPUT_CMDID,
  1147. WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
  1148. };
  1149. enum wmi_10x_event_id {
  1150. WMI_10X_SERVICE_READY_EVENTID = 0x8000,
  1151. WMI_10X_READY_EVENTID,
  1152. WMI_10X_START_EVENTID = 0x9000,
  1153. WMI_10X_END_EVENTID = 0x9FFF,
  1154. /* Scan specific events */
  1155. WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
  1156. WMI_10X_ECHO_EVENTID,
  1157. WMI_10X_DEBUG_MESG_EVENTID,
  1158. WMI_10X_UPDATE_STATS_EVENTID,
  1159. /* Instantaneous RSSI event */
  1160. WMI_10X_INST_RSSI_STATS_EVENTID,
  1161. /* VDEV specific events */
  1162. WMI_10X_VDEV_START_RESP_EVENTID,
  1163. WMI_10X_VDEV_STANDBY_REQ_EVENTID,
  1164. WMI_10X_VDEV_RESUME_REQ_EVENTID,
  1165. WMI_10X_VDEV_STOPPED_EVENTID,
  1166. /* peer specific events */
  1167. WMI_10X_PEER_STA_KICKOUT_EVENTID,
  1168. /* beacon/mgmt specific events */
  1169. WMI_10X_HOST_SWBA_EVENTID,
  1170. WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
  1171. WMI_10X_MGMT_RX_EVENTID,
  1172. /* Channel stats event */
  1173. WMI_10X_CHAN_INFO_EVENTID,
  1174. /* PHY Error specific WMI event */
  1175. WMI_10X_PHYERR_EVENTID,
  1176. /* Roam event to trigger roaming on host */
  1177. WMI_10X_ROAM_EVENTID,
  1178. /* matching AP found from list of profiles */
  1179. WMI_10X_PROFILE_MATCH,
  1180. /* debug print message used for tracing FW code while debugging */
  1181. WMI_10X_DEBUG_PRINT_EVENTID,
  1182. /* VI spoecific event */
  1183. WMI_10X_PDEV_QVIT_EVENTID,
  1184. /* FW code profile data in response to profile request */
  1185. WMI_10X_WLAN_PROFILE_DATA_EVENTID,
  1186. /*RTT related event ID*/
  1187. WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
  1188. WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
  1189. WMI_10X_RTT_ERROR_REPORT_EVENTID,
  1190. WMI_10X_WOW_WAKEUP_HOST_EVENTID,
  1191. WMI_10X_DCS_INTERFERENCE_EVENTID,
  1192. /* TPC config for the current operating channel */
  1193. WMI_10X_PDEV_TPC_CONFIG_EVENTID,
  1194. WMI_10X_GPIO_INPUT_EVENTID,
  1195. WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1,
  1196. };
  1197. enum wmi_10_2_cmd_id {
  1198. WMI_10_2_START_CMDID = 0x9000,
  1199. WMI_10_2_END_CMDID = 0x9FFF,
  1200. WMI_10_2_INIT_CMDID,
  1201. WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID,
  1202. WMI_10_2_STOP_SCAN_CMDID,
  1203. WMI_10_2_SCAN_CHAN_LIST_CMDID,
  1204. WMI_10_2_ECHO_CMDID,
  1205. WMI_10_2_PDEV_SET_REGDOMAIN_CMDID,
  1206. WMI_10_2_PDEV_SET_CHANNEL_CMDID,
  1207. WMI_10_2_PDEV_SET_PARAM_CMDID,
  1208. WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID,
  1209. WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID,
  1210. WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID,
  1211. WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID,
  1212. WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID,
  1213. WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID,
  1214. WMI_10_2_PDEV_SET_QUIET_MODE_CMDID,
  1215. WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  1216. WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID,
  1217. WMI_10_2_VDEV_CREATE_CMDID,
  1218. WMI_10_2_VDEV_DELETE_CMDID,
  1219. WMI_10_2_VDEV_START_REQUEST_CMDID,
  1220. WMI_10_2_VDEV_RESTART_REQUEST_CMDID,
  1221. WMI_10_2_VDEV_UP_CMDID,
  1222. WMI_10_2_VDEV_STOP_CMDID,
  1223. WMI_10_2_VDEV_DOWN_CMDID,
  1224. WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID,
  1225. WMI_10_2_VDEV_RESUME_RESPONSE_CMDID,
  1226. WMI_10_2_VDEV_SET_PARAM_CMDID,
  1227. WMI_10_2_VDEV_INSTALL_KEY_CMDID,
  1228. WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID,
  1229. WMI_10_2_PEER_CREATE_CMDID,
  1230. WMI_10_2_PEER_DELETE_CMDID,
  1231. WMI_10_2_PEER_FLUSH_TIDS_CMDID,
  1232. WMI_10_2_PEER_SET_PARAM_CMDID,
  1233. WMI_10_2_PEER_ASSOC_CMDID,
  1234. WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID,
  1235. WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID,
  1236. WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID,
  1237. WMI_10_2_PEER_MCAST_GROUP_CMDID,
  1238. WMI_10_2_BCN_TX_CMDID,
  1239. WMI_10_2_BCN_PRB_TMPL_CMDID,
  1240. WMI_10_2_BCN_FILTER_RX_CMDID,
  1241. WMI_10_2_PRB_REQ_FILTER_RX_CMDID,
  1242. WMI_10_2_MGMT_TX_CMDID,
  1243. WMI_10_2_ADDBA_CLEAR_RESP_CMDID,
  1244. WMI_10_2_ADDBA_SEND_CMDID,
  1245. WMI_10_2_ADDBA_STATUS_CMDID,
  1246. WMI_10_2_DELBA_SEND_CMDID,
  1247. WMI_10_2_ADDBA_SET_RESP_CMDID,
  1248. WMI_10_2_SEND_SINGLEAMSDU_CMDID,
  1249. WMI_10_2_STA_POWERSAVE_MODE_CMDID,
  1250. WMI_10_2_STA_POWERSAVE_PARAM_CMDID,
  1251. WMI_10_2_STA_MIMO_PS_MODE_CMDID,
  1252. WMI_10_2_DBGLOG_CFG_CMDID,
  1253. WMI_10_2_PDEV_DFS_ENABLE_CMDID,
  1254. WMI_10_2_PDEV_DFS_DISABLE_CMDID,
  1255. WMI_10_2_PDEV_QVIT_CMDID,
  1256. WMI_10_2_ROAM_SCAN_MODE,
  1257. WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD,
  1258. WMI_10_2_ROAM_SCAN_PERIOD,
  1259. WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  1260. WMI_10_2_ROAM_AP_PROFILE,
  1261. WMI_10_2_OFL_SCAN_ADD_AP_PROFILE,
  1262. WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE,
  1263. WMI_10_2_OFL_SCAN_PERIOD,
  1264. WMI_10_2_P2P_DEV_SET_DEVICE_INFO,
  1265. WMI_10_2_P2P_DEV_SET_DISCOVERABILITY,
  1266. WMI_10_2_P2P_GO_SET_BEACON_IE,
  1267. WMI_10_2_P2P_GO_SET_PROBE_RESP_IE,
  1268. WMI_10_2_AP_PS_PEER_PARAM_CMDID,
  1269. WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID,
  1270. WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID,
  1271. WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID,
  1272. WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  1273. WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  1274. WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  1275. WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  1276. WMI_10_2_PDEV_SUSPEND_CMDID,
  1277. WMI_10_2_PDEV_RESUME_CMDID,
  1278. WMI_10_2_ADD_BCN_FILTER_CMDID,
  1279. WMI_10_2_RMV_BCN_FILTER_CMDID,
  1280. WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID,
  1281. WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID,
  1282. WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  1283. WMI_10_2_WOW_ENABLE_CMDID,
  1284. WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  1285. WMI_10_2_RTT_MEASREQ_CMDID,
  1286. WMI_10_2_RTT_TSF_CMDID,
  1287. WMI_10_2_RTT_KEEPALIVE_CMDID,
  1288. WMI_10_2_PDEV_SEND_BCN_CMDID,
  1289. WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
  1290. WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1291. WMI_10_2_REQUEST_STATS_CMDID,
  1292. WMI_10_2_GPIO_CONFIG_CMDID,
  1293. WMI_10_2_GPIO_OUTPUT_CMDID,
  1294. WMI_10_2_VDEV_RATEMASK_CMDID,
  1295. WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID,
  1296. WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  1297. WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  1298. WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  1299. WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  1300. WMI_10_2_FORCE_FW_HANG_CMDID,
  1301. WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  1302. WMI_10_2_PDEV_SET_CTL_TABLE_CMDID,
  1303. WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  1304. WMI_10_2_PDEV_RATEPWR_TABLE_CMDID,
  1305. WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
  1306. WMI_10_2_PDEV_GET_INFO,
  1307. WMI_10_2_VDEV_GET_INFO,
  1308. WMI_10_2_VDEV_ATF_REQUEST_CMDID,
  1309. WMI_10_2_PEER_ATF_REQUEST_CMDID,
  1310. WMI_10_2_PDEV_GET_TEMPERATURE_CMDID,
  1311. WMI_10_2_MU_CAL_START_CMDID,
  1312. WMI_10_2_SET_LTEU_CONFIG_CMDID,
  1313. WMI_10_2_SET_CCA_PARAMS,
  1314. WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
  1315. };
  1316. enum wmi_10_2_event_id {
  1317. WMI_10_2_SERVICE_READY_EVENTID = 0x8000,
  1318. WMI_10_2_READY_EVENTID,
  1319. WMI_10_2_DEBUG_MESG_EVENTID,
  1320. WMI_10_2_START_EVENTID = 0x9000,
  1321. WMI_10_2_END_EVENTID = 0x9FFF,
  1322. WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID,
  1323. WMI_10_2_ECHO_EVENTID,
  1324. WMI_10_2_UPDATE_STATS_EVENTID,
  1325. WMI_10_2_INST_RSSI_STATS_EVENTID,
  1326. WMI_10_2_VDEV_START_RESP_EVENTID,
  1327. WMI_10_2_VDEV_STANDBY_REQ_EVENTID,
  1328. WMI_10_2_VDEV_RESUME_REQ_EVENTID,
  1329. WMI_10_2_VDEV_STOPPED_EVENTID,
  1330. WMI_10_2_PEER_STA_KICKOUT_EVENTID,
  1331. WMI_10_2_HOST_SWBA_EVENTID,
  1332. WMI_10_2_TBTTOFFSET_UPDATE_EVENTID,
  1333. WMI_10_2_MGMT_RX_EVENTID,
  1334. WMI_10_2_CHAN_INFO_EVENTID,
  1335. WMI_10_2_PHYERR_EVENTID,
  1336. WMI_10_2_ROAM_EVENTID,
  1337. WMI_10_2_PROFILE_MATCH,
  1338. WMI_10_2_DEBUG_PRINT_EVENTID,
  1339. WMI_10_2_PDEV_QVIT_EVENTID,
  1340. WMI_10_2_WLAN_PROFILE_DATA_EVENTID,
  1341. WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID,
  1342. WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID,
  1343. WMI_10_2_RTT_ERROR_REPORT_EVENTID,
  1344. WMI_10_2_RTT_KEEPALIVE_EVENTID,
  1345. WMI_10_2_WOW_WAKEUP_HOST_EVENTID,
  1346. WMI_10_2_DCS_INTERFERENCE_EVENTID,
  1347. WMI_10_2_PDEV_TPC_CONFIG_EVENTID,
  1348. WMI_10_2_GPIO_INPUT_EVENTID,
  1349. WMI_10_2_PEER_RATECODE_LIST_EVENTID,
  1350. WMI_10_2_GENERIC_BUFFER_EVENTID,
  1351. WMI_10_2_MCAST_BUF_RELEASE_EVENTID,
  1352. WMI_10_2_MCAST_LIST_AGEOUT_EVENTID,
  1353. WMI_10_2_WDS_PEER_EVENTID,
  1354. WMI_10_2_PEER_STA_PS_STATECHG_EVENTID,
  1355. WMI_10_2_PDEV_TEMPERATURE_EVENTID,
  1356. WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1,
  1357. };
  1358. enum wmi_10_4_cmd_id {
  1359. WMI_10_4_START_CMDID = 0x9000,
  1360. WMI_10_4_END_CMDID = 0x9FFF,
  1361. WMI_10_4_INIT_CMDID,
  1362. WMI_10_4_START_SCAN_CMDID = WMI_10_4_START_CMDID,
  1363. WMI_10_4_STOP_SCAN_CMDID,
  1364. WMI_10_4_SCAN_CHAN_LIST_CMDID,
  1365. WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID,
  1366. WMI_10_4_SCAN_UPDATE_REQUEST_CMDID,
  1367. WMI_10_4_ECHO_CMDID,
  1368. WMI_10_4_PDEV_SET_REGDOMAIN_CMDID,
  1369. WMI_10_4_PDEV_SET_CHANNEL_CMDID,
  1370. WMI_10_4_PDEV_SET_PARAM_CMDID,
  1371. WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID,
  1372. WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID,
  1373. WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID,
  1374. WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID,
  1375. WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID,
  1376. WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID,
  1377. WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID,
  1378. WMI_10_4_PDEV_SET_QUIET_MODE_CMDID,
  1379. WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID,
  1380. WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID,
  1381. WMI_10_4_VDEV_CREATE_CMDID,
  1382. WMI_10_4_VDEV_DELETE_CMDID,
  1383. WMI_10_4_VDEV_START_REQUEST_CMDID,
  1384. WMI_10_4_VDEV_RESTART_REQUEST_CMDID,
  1385. WMI_10_4_VDEV_UP_CMDID,
  1386. WMI_10_4_VDEV_STOP_CMDID,
  1387. WMI_10_4_VDEV_DOWN_CMDID,
  1388. WMI_10_4_VDEV_STANDBY_RESPONSE_CMDID,
  1389. WMI_10_4_VDEV_RESUME_RESPONSE_CMDID,
  1390. WMI_10_4_VDEV_SET_PARAM_CMDID,
  1391. WMI_10_4_VDEV_INSTALL_KEY_CMDID,
  1392. WMI_10_4_WLAN_PEER_CACHING_ADD_PEER_CMDID,
  1393. WMI_10_4_WLAN_PEER_CACHING_EVICT_PEER_CMDID,
  1394. WMI_10_4_WLAN_PEER_CACHING_RESTORE_PEER_CMDID,
  1395. WMI_10_4_WLAN_PEER_CACHING_PRINT_ALL_PEERS_INFO_CMDID,
  1396. WMI_10_4_PEER_CREATE_CMDID,
  1397. WMI_10_4_PEER_DELETE_CMDID,
  1398. WMI_10_4_PEER_FLUSH_TIDS_CMDID,
  1399. WMI_10_4_PEER_SET_PARAM_CMDID,
  1400. WMI_10_4_PEER_ASSOC_CMDID,
  1401. WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID,
  1402. WMI_10_4_PEER_UPDATE_WDS_ENTRY_CMDID,
  1403. WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID,
  1404. WMI_10_4_PEER_ADD_PROXY_STA_ENTRY_CMDID,
  1405. WMI_10_4_PEER_MCAST_GROUP_CMDID,
  1406. WMI_10_4_BCN_TX_CMDID,
  1407. WMI_10_4_PDEV_SEND_BCN_CMDID,
  1408. WMI_10_4_BCN_PRB_TMPL_CMDID,
  1409. WMI_10_4_BCN_FILTER_RX_CMDID,
  1410. WMI_10_4_PRB_REQ_FILTER_RX_CMDID,
  1411. WMI_10_4_MGMT_TX_CMDID,
  1412. WMI_10_4_PRB_TMPL_CMDID,
  1413. WMI_10_4_ADDBA_CLEAR_RESP_CMDID,
  1414. WMI_10_4_ADDBA_SEND_CMDID,
  1415. WMI_10_4_ADDBA_STATUS_CMDID,
  1416. WMI_10_4_DELBA_SEND_CMDID,
  1417. WMI_10_4_ADDBA_SET_RESP_CMDID,
  1418. WMI_10_4_SEND_SINGLEAMSDU_CMDID,
  1419. WMI_10_4_STA_POWERSAVE_MODE_CMDID,
  1420. WMI_10_4_STA_POWERSAVE_PARAM_CMDID,
  1421. WMI_10_4_STA_MIMO_PS_MODE_CMDID,
  1422. WMI_10_4_DBGLOG_CFG_CMDID,
  1423. WMI_10_4_PDEV_DFS_ENABLE_CMDID,
  1424. WMI_10_4_PDEV_DFS_DISABLE_CMDID,
  1425. WMI_10_4_PDEV_QVIT_CMDID,
  1426. WMI_10_4_ROAM_SCAN_MODE,
  1427. WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD,
  1428. WMI_10_4_ROAM_SCAN_PERIOD,
  1429. WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
  1430. WMI_10_4_ROAM_AP_PROFILE,
  1431. WMI_10_4_OFL_SCAN_ADD_AP_PROFILE,
  1432. WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE,
  1433. WMI_10_4_OFL_SCAN_PERIOD,
  1434. WMI_10_4_P2P_DEV_SET_DEVICE_INFO,
  1435. WMI_10_4_P2P_DEV_SET_DISCOVERABILITY,
  1436. WMI_10_4_P2P_GO_SET_BEACON_IE,
  1437. WMI_10_4_P2P_GO_SET_PROBE_RESP_IE,
  1438. WMI_10_4_P2P_SET_VENDOR_IE_DATA_CMDID,
  1439. WMI_10_4_AP_PS_PEER_PARAM_CMDID,
  1440. WMI_10_4_AP_PS_PEER_UAPSD_COEX_CMDID,
  1441. WMI_10_4_PEER_RATE_RETRY_SCHED_CMDID,
  1442. WMI_10_4_WLAN_PROFILE_TRIGGER_CMDID,
  1443. WMI_10_4_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
  1444. WMI_10_4_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
  1445. WMI_10_4_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
  1446. WMI_10_4_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
  1447. WMI_10_4_PDEV_SUSPEND_CMDID,
  1448. WMI_10_4_PDEV_RESUME_CMDID,
  1449. WMI_10_4_ADD_BCN_FILTER_CMDID,
  1450. WMI_10_4_RMV_BCN_FILTER_CMDID,
  1451. WMI_10_4_WOW_ADD_WAKE_PATTERN_CMDID,
  1452. WMI_10_4_WOW_DEL_WAKE_PATTERN_CMDID,
  1453. WMI_10_4_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
  1454. WMI_10_4_WOW_ENABLE_CMDID,
  1455. WMI_10_4_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
  1456. WMI_10_4_RTT_MEASREQ_CMDID,
  1457. WMI_10_4_RTT_TSF_CMDID,
  1458. WMI_10_4_RTT_KEEPALIVE_CMDID,
  1459. WMI_10_4_OEM_REQ_CMDID,
  1460. WMI_10_4_NAN_CMDID,
  1461. WMI_10_4_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
  1462. WMI_10_4_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
  1463. WMI_10_4_REQUEST_STATS_CMDID,
  1464. WMI_10_4_GPIO_CONFIG_CMDID,
  1465. WMI_10_4_GPIO_OUTPUT_CMDID,
  1466. WMI_10_4_VDEV_RATEMASK_CMDID,
  1467. WMI_10_4_CSA_OFFLOAD_ENABLE_CMDID,
  1468. WMI_10_4_GTK_OFFLOAD_CMDID,
  1469. WMI_10_4_QBOOST_CFG_CMDID,
  1470. WMI_10_4_CSA_OFFLOAD_CHANSWITCH_CMDID,
  1471. WMI_10_4_PDEV_SMART_ANT_ENABLE_CMDID,
  1472. WMI_10_4_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
  1473. WMI_10_4_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
  1474. WMI_10_4_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
  1475. WMI_10_4_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
  1476. WMI_10_4_VDEV_SET_KEEPALIVE_CMDID,
  1477. WMI_10_4_VDEV_GET_KEEPALIVE_CMDID,
  1478. WMI_10_4_FORCE_FW_HANG_CMDID,
  1479. WMI_10_4_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
  1480. WMI_10_4_PDEV_SET_CTL_TABLE_CMDID,
  1481. WMI_10_4_PDEV_SET_MIMOGAIN_TABLE_CMDID,
  1482. WMI_10_4_PDEV_RATEPWR_TABLE_CMDID,
  1483. WMI_10_4_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
  1484. WMI_10_4_PDEV_FIPS_CMDID,
  1485. WMI_10_4_TT_SET_CONF_CMDID,
  1486. WMI_10_4_FWTEST_CMDID,
  1487. WMI_10_4_VDEV_ATF_REQUEST_CMDID,
  1488. WMI_10_4_PEER_ATF_REQUEST_CMDID,
  1489. WMI_10_4_PDEV_GET_ANI_CCK_CONFIG_CMDID,
  1490. WMI_10_4_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
  1491. WMI_10_4_PDEV_RESERVE_AST_ENTRY_CMDID,
  1492. WMI_10_4_PDEV_GET_NFCAL_POWER_CMDID,
  1493. WMI_10_4_PDEV_GET_TPC_CMDID,
  1494. WMI_10_4_PDEV_GET_AST_INFO_CMDID,
  1495. WMI_10_4_VDEV_SET_DSCP_TID_MAP_CMDID,
  1496. WMI_10_4_PDEV_GET_TEMPERATURE_CMDID,
  1497. WMI_10_4_PDEV_GET_INFO_CMDID,
  1498. WMI_10_4_VDEV_GET_INFO_CMDID,
  1499. WMI_10_4_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
  1500. WMI_10_4_MU_CAL_START_CMDID,
  1501. WMI_10_4_SET_CCA_PARAMS_CMDID,
  1502. WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
  1503. WMI_10_4_EXT_RESOURCE_CFG_CMDID,
  1504. WMI_10_4_VDEV_SET_IE_CMDID,
  1505. WMI_10_4_SET_LTEU_CONFIG_CMDID,
  1506. WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
  1507. };
  1508. enum wmi_10_4_event_id {
  1509. WMI_10_4_SERVICE_READY_EVENTID = 0x8000,
  1510. WMI_10_4_READY_EVENTID,
  1511. WMI_10_4_DEBUG_MESG_EVENTID,
  1512. WMI_10_4_START_EVENTID = 0x9000,
  1513. WMI_10_4_END_EVENTID = 0x9FFF,
  1514. WMI_10_4_SCAN_EVENTID = WMI_10_4_START_EVENTID,
  1515. WMI_10_4_ECHO_EVENTID,
  1516. WMI_10_4_UPDATE_STATS_EVENTID,
  1517. WMI_10_4_INST_RSSI_STATS_EVENTID,
  1518. WMI_10_4_VDEV_START_RESP_EVENTID,
  1519. WMI_10_4_VDEV_STANDBY_REQ_EVENTID,
  1520. WMI_10_4_VDEV_RESUME_REQ_EVENTID,
  1521. WMI_10_4_VDEV_STOPPED_EVENTID,
  1522. WMI_10_4_PEER_STA_KICKOUT_EVENTID,
  1523. WMI_10_4_HOST_SWBA_EVENTID,
  1524. WMI_10_4_TBTTOFFSET_UPDATE_EVENTID,
  1525. WMI_10_4_MGMT_RX_EVENTID,
  1526. WMI_10_4_CHAN_INFO_EVENTID,
  1527. WMI_10_4_PHYERR_EVENTID,
  1528. WMI_10_4_ROAM_EVENTID,
  1529. WMI_10_4_PROFILE_MATCH,
  1530. WMI_10_4_DEBUG_PRINT_EVENTID,
  1531. WMI_10_4_PDEV_QVIT_EVENTID,
  1532. WMI_10_4_WLAN_PROFILE_DATA_EVENTID,
  1533. WMI_10_4_RTT_MEASUREMENT_REPORT_EVENTID,
  1534. WMI_10_4_TSF_MEASUREMENT_REPORT_EVENTID,
  1535. WMI_10_4_RTT_ERROR_REPORT_EVENTID,
  1536. WMI_10_4_RTT_KEEPALIVE_EVENTID,
  1537. WMI_10_4_OEM_CAPABILITY_EVENTID,
  1538. WMI_10_4_OEM_MEASUREMENT_REPORT_EVENTID,
  1539. WMI_10_4_OEM_ERROR_REPORT_EVENTID,
  1540. WMI_10_4_NAN_EVENTID,
  1541. WMI_10_4_WOW_WAKEUP_HOST_EVENTID,
  1542. WMI_10_4_GTK_OFFLOAD_STATUS_EVENTID,
  1543. WMI_10_4_GTK_REKEY_FAIL_EVENTID,
  1544. WMI_10_4_DCS_INTERFERENCE_EVENTID,
  1545. WMI_10_4_PDEV_TPC_CONFIG_EVENTID,
  1546. WMI_10_4_CSA_HANDLING_EVENTID,
  1547. WMI_10_4_GPIO_INPUT_EVENTID,
  1548. WMI_10_4_PEER_RATECODE_LIST_EVENTID,
  1549. WMI_10_4_GENERIC_BUFFER_EVENTID,
  1550. WMI_10_4_MCAST_BUF_RELEASE_EVENTID,
  1551. WMI_10_4_MCAST_LIST_AGEOUT_EVENTID,
  1552. WMI_10_4_VDEV_GET_KEEPALIVE_EVENTID,
  1553. WMI_10_4_WDS_PEER_EVENTID,
  1554. WMI_10_4_PEER_STA_PS_STATECHG_EVENTID,
  1555. WMI_10_4_PDEV_FIPS_EVENTID,
  1556. WMI_10_4_TT_STATS_EVENTID,
  1557. WMI_10_4_PDEV_CHANNEL_HOPPING_EVENTID,
  1558. WMI_10_4_PDEV_ANI_CCK_LEVEL_EVENTID,
  1559. WMI_10_4_PDEV_ANI_OFDM_LEVEL_EVENTID,
  1560. WMI_10_4_PDEV_RESERVE_AST_ENTRY_EVENTID,
  1561. WMI_10_4_PDEV_NFCAL_POWER_EVENTID,
  1562. WMI_10_4_PDEV_TPC_EVENTID,
  1563. WMI_10_4_PDEV_GET_AST_INFO_EVENTID,
  1564. WMI_10_4_PDEV_TEMPERATURE_EVENTID,
  1565. WMI_10_4_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
  1566. WMI_10_4_PDEV_BSS_CHAN_INFO_EVENTID,
  1567. WMI_10_4_MU_REPORT_EVENTID,
  1568. WMI_10_4_PDEV_UTF_EVENTID = WMI_10_4_END_EVENTID - 1,
  1569. };
  1570. enum wmi_phy_mode {
  1571. MODE_11A = 0, /* 11a Mode */
  1572. MODE_11G = 1, /* 11b/g Mode */
  1573. MODE_11B = 2, /* 11b Mode */
  1574. MODE_11GONLY = 3, /* 11g only Mode */
  1575. MODE_11NA_HT20 = 4, /* 11a HT20 mode */
  1576. MODE_11NG_HT20 = 5, /* 11g HT20 mode */
  1577. MODE_11NA_HT40 = 6, /* 11a HT40 mode */
  1578. MODE_11NG_HT40 = 7, /* 11g HT40 mode */
  1579. MODE_11AC_VHT20 = 8,
  1580. MODE_11AC_VHT40 = 9,
  1581. MODE_11AC_VHT80 = 10,
  1582. /* MODE_11AC_VHT160 = 11, */
  1583. MODE_11AC_VHT20_2G = 11,
  1584. MODE_11AC_VHT40_2G = 12,
  1585. MODE_11AC_VHT80_2G = 13,
  1586. MODE_UNKNOWN = 14,
  1587. MODE_MAX = 14
  1588. };
  1589. static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
  1590. {
  1591. switch (mode) {
  1592. case MODE_11A:
  1593. return "11a";
  1594. case MODE_11G:
  1595. return "11g";
  1596. case MODE_11B:
  1597. return "11b";
  1598. case MODE_11GONLY:
  1599. return "11gonly";
  1600. case MODE_11NA_HT20:
  1601. return "11na-ht20";
  1602. case MODE_11NG_HT20:
  1603. return "11ng-ht20";
  1604. case MODE_11NA_HT40:
  1605. return "11na-ht40";
  1606. case MODE_11NG_HT40:
  1607. return "11ng-ht40";
  1608. case MODE_11AC_VHT20:
  1609. return "11ac-vht20";
  1610. case MODE_11AC_VHT40:
  1611. return "11ac-vht40";
  1612. case MODE_11AC_VHT80:
  1613. return "11ac-vht80";
  1614. case MODE_11AC_VHT20_2G:
  1615. return "11ac-vht20-2g";
  1616. case MODE_11AC_VHT40_2G:
  1617. return "11ac-vht40-2g";
  1618. case MODE_11AC_VHT80_2G:
  1619. return "11ac-vht80-2g";
  1620. case MODE_UNKNOWN:
  1621. /* skip */
  1622. break;
  1623. /* no default handler to allow compiler to check that the
  1624. * enum is fully handled */
  1625. };
  1626. return "<unknown>";
  1627. }
  1628. #define WMI_CHAN_LIST_TAG 0x1
  1629. #define WMI_SSID_LIST_TAG 0x2
  1630. #define WMI_BSSID_LIST_TAG 0x3
  1631. #define WMI_IE_TAG 0x4
  1632. struct wmi_channel {
  1633. __le32 mhz;
  1634. __le32 band_center_freq1;
  1635. __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
  1636. union {
  1637. __le32 flags; /* WMI_CHAN_FLAG_ */
  1638. struct {
  1639. u8 mode; /* only 6 LSBs */
  1640. } __packed;
  1641. } __packed;
  1642. union {
  1643. __le32 reginfo0;
  1644. struct {
  1645. /* note: power unit is 0.5 dBm */
  1646. u8 min_power;
  1647. u8 max_power;
  1648. u8 reg_power;
  1649. u8 reg_classid;
  1650. } __packed;
  1651. } __packed;
  1652. union {
  1653. __le32 reginfo1;
  1654. struct {
  1655. u8 antenna_max;
  1656. } __packed;
  1657. } __packed;
  1658. } __packed;
  1659. struct wmi_channel_arg {
  1660. u32 freq;
  1661. u32 band_center_freq1;
  1662. bool passive;
  1663. bool allow_ibss;
  1664. bool allow_ht;
  1665. bool allow_vht;
  1666. bool ht40plus;
  1667. bool chan_radar;
  1668. /* note: power unit is 0.5 dBm */
  1669. u32 min_power;
  1670. u32 max_power;
  1671. u32 max_reg_power;
  1672. u32 max_antenna_gain;
  1673. u32 reg_class_id;
  1674. enum wmi_phy_mode mode;
  1675. };
  1676. enum wmi_channel_change_cause {
  1677. WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
  1678. WMI_CHANNEL_CHANGE_CAUSE_CSA,
  1679. };
  1680. #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
  1681. #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
  1682. #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
  1683. #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
  1684. #define WMI_CHAN_FLAG_DFS (1 << 10)
  1685. #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
  1686. #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
  1687. /* Indicate reason for channel switch */
  1688. #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
  1689. #define WMI_MAX_SPATIAL_STREAM 3 /* default max ss */
  1690. /* HT Capabilities*/
  1691. #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  1692. #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
  1693. #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  1694. #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  1695. #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
  1696. #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  1697. #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
  1698. #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
  1699. #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  1700. #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  1701. #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  1702. #define WMI_HT_CAP_HT40_SGI 0x0800
  1703. #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
  1704. WMI_HT_CAP_HT20_SGI | \
  1705. WMI_HT_CAP_HT40_SGI | \
  1706. WMI_HT_CAP_TX_STBC | \
  1707. WMI_HT_CAP_RX_STBC | \
  1708. WMI_HT_CAP_LDPC)
  1709. /*
  1710. * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  1711. * field. The fields not defined here are not supported, or reserved.
  1712. * Do not change these masks and if you have to add new one follow the
  1713. * bitmask as specified by 802.11ac draft.
  1714. */
  1715. #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  1716. #define WMI_VHT_CAP_RX_LDPC 0x00000010
  1717. #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
  1718. #define WMI_VHT_CAP_TX_STBC 0x00000080
  1719. #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
  1720. #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
  1721. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  1722. #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
  1723. #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
  1724. #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
  1725. /* The following also refer for max HT AMSDU */
  1726. #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
  1727. #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
  1728. #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  1729. #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
  1730. WMI_VHT_CAP_RX_LDPC | \
  1731. WMI_VHT_CAP_SGI_80MHZ | \
  1732. WMI_VHT_CAP_TX_STBC | \
  1733. WMI_VHT_CAP_RX_STBC_MASK | \
  1734. WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  1735. WMI_VHT_CAP_RX_FIXED_ANT | \
  1736. WMI_VHT_CAP_TX_FIXED_ANT)
  1737. /*
  1738. * Interested readers refer to Rx/Tx MCS Map definition as defined in
  1739. * 802.11ac
  1740. */
  1741. #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
  1742. #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  1743. #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  1744. enum {
  1745. REGDMN_MODE_11A = 0x00001, /* 11a channels */
  1746. REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
  1747. REGDMN_MODE_11B = 0x00004, /* 11b channels */
  1748. REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
  1749. REGDMN_MODE_11G = 0x00008, /* XXX historical */
  1750. REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
  1751. REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
  1752. REGDMN_MODE_XR = 0x00100, /* XR channels */
  1753. REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
  1754. REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
  1755. REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
  1756. REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
  1757. REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
  1758. REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
  1759. REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
  1760. REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
  1761. REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
  1762. REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
  1763. REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
  1764. REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
  1765. REGDMN_MODE_ALL = 0xffffffff
  1766. };
  1767. #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
  1768. #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
  1769. #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
  1770. /* regulatory capabilities */
  1771. #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
  1772. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
  1773. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
  1774. #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
  1775. #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
  1776. #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
  1777. struct hal_reg_capabilities {
  1778. /* regdomain value specified in EEPROM */
  1779. __le32 eeprom_rd;
  1780. /*regdomain */
  1781. __le32 eeprom_rd_ext;
  1782. /* CAP1 capabilities bit map. */
  1783. __le32 regcap1;
  1784. /* REGDMN EEPROM CAP. */
  1785. __le32 regcap2;
  1786. /* REGDMN MODE */
  1787. __le32 wireless_modes;
  1788. __le32 low_2ghz_chan;
  1789. __le32 high_2ghz_chan;
  1790. __le32 low_5ghz_chan;
  1791. __le32 high_5ghz_chan;
  1792. } __packed;
  1793. enum wlan_mode_capability {
  1794. WHAL_WLAN_11A_CAPABILITY = 0x1,
  1795. WHAL_WLAN_11G_CAPABILITY = 0x2,
  1796. WHAL_WLAN_11AG_CAPABILITY = 0x3,
  1797. };
  1798. /* structure used by FW for requesting host memory */
  1799. struct wlan_host_mem_req {
  1800. /* ID of the request */
  1801. __le32 req_id;
  1802. /* size of the of each unit */
  1803. __le32 unit_size;
  1804. /* flags to indicate that
  1805. * the number units is dependent
  1806. * on number of resources(num vdevs num peers .. etc)
  1807. */
  1808. __le32 num_unit_info;
  1809. /*
  1810. * actual number of units to allocate . if flags in the num_unit_info
  1811. * indicate that number of units is tied to number of a particular
  1812. * resource to allocate then num_units filed is set to 0 and host
  1813. * will derive the number units from number of the resources it is
  1814. * requesting.
  1815. */
  1816. __le32 num_units;
  1817. } __packed;
  1818. /*
  1819. * The following struct holds optional payload for
  1820. * wmi_service_ready_event,e.g., 11ac pass some of the
  1821. * device capability to the host.
  1822. */
  1823. struct wmi_service_ready_event {
  1824. __le32 sw_version;
  1825. __le32 sw_version_1;
  1826. __le32 abi_version;
  1827. /* WMI_PHY_CAPABILITY */
  1828. __le32 phy_capability;
  1829. /* Maximum number of frag table entries that SW will populate less 1 */
  1830. __le32 max_frag_entry;
  1831. __le32 wmi_service_bitmap[16];
  1832. __le32 num_rf_chains;
  1833. /*
  1834. * The following field is only valid for service type
  1835. * WMI_SERVICE_11AC
  1836. */
  1837. __le32 ht_cap_info; /* WMI HT Capability */
  1838. __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1839. __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1840. __le32 hw_min_tx_power;
  1841. __le32 hw_max_tx_power;
  1842. struct hal_reg_capabilities hal_reg_capabilities;
  1843. __le32 sys_cap_info;
  1844. __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1845. /*
  1846. * Max beacon and Probe Response IE offload size
  1847. * (includes optional P2P IEs)
  1848. */
  1849. __le32 max_bcn_ie_size;
  1850. /*
  1851. * request to host to allocate a chuck of memory and pss it down to FW
  1852. * via WM_INIT. FW uses this as FW extesnsion memory for saving its
  1853. * data structures. Only valid for low latency interfaces like PCIE
  1854. * where FW can access this memory directly (or) by DMA.
  1855. */
  1856. __le32 num_mem_reqs;
  1857. struct wlan_host_mem_req mem_reqs[0];
  1858. } __packed;
  1859. /* This is the definition from 10.X firmware branch */
  1860. struct wmi_10x_service_ready_event {
  1861. __le32 sw_version;
  1862. __le32 abi_version;
  1863. /* WMI_PHY_CAPABILITY */
  1864. __le32 phy_capability;
  1865. /* Maximum number of frag table entries that SW will populate less 1 */
  1866. __le32 max_frag_entry;
  1867. __le32 wmi_service_bitmap[16];
  1868. __le32 num_rf_chains;
  1869. /*
  1870. * The following field is only valid for service type
  1871. * WMI_SERVICE_11AC
  1872. */
  1873. __le32 ht_cap_info; /* WMI HT Capability */
  1874. __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
  1875. __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
  1876. __le32 hw_min_tx_power;
  1877. __le32 hw_max_tx_power;
  1878. struct hal_reg_capabilities hal_reg_capabilities;
  1879. __le32 sys_cap_info;
  1880. __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
  1881. /*
  1882. * request to host to allocate a chuck of memory and pss it down to FW
  1883. * via WM_INIT. FW uses this as FW extesnsion memory for saving its
  1884. * data structures. Only valid for low latency interfaces like PCIE
  1885. * where FW can access this memory directly (or) by DMA.
  1886. */
  1887. __le32 num_mem_reqs;
  1888. struct wlan_host_mem_req mem_reqs[0];
  1889. } __packed;
  1890. #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
  1891. #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
  1892. struct wmi_ready_event {
  1893. __le32 sw_version;
  1894. __le32 abi_version;
  1895. struct wmi_mac_addr mac_addr;
  1896. __le32 status;
  1897. } __packed;
  1898. struct wmi_resource_config {
  1899. /* number of virtual devices (VAPs) to support */
  1900. __le32 num_vdevs;
  1901. /* number of peer nodes to support */
  1902. __le32 num_peers;
  1903. /*
  1904. * In offload mode target supports features like WOW, chatter and
  1905. * other protocol offloads. In order to support them some
  1906. * functionalities like reorder buffering, PN checking need to be
  1907. * done in target. This determines maximum number of peers suported
  1908. * by target in offload mode
  1909. */
  1910. __le32 num_offload_peers;
  1911. /* For target-based RX reordering */
  1912. __le32 num_offload_reorder_bufs;
  1913. /* number of keys per peer */
  1914. __le32 num_peer_keys;
  1915. /* total number of TX/RX data TIDs */
  1916. __le32 num_tids;
  1917. /*
  1918. * max skid for resolving hash collisions
  1919. *
  1920. * The address search table is sparse, so that if two MAC addresses
  1921. * result in the same hash value, the second of these conflicting
  1922. * entries can slide to the next index in the address search table,
  1923. * and use it, if it is unoccupied. This ast_skid_limit parameter
  1924. * specifies the upper bound on how many subsequent indices to search
  1925. * over to find an unoccupied space.
  1926. */
  1927. __le32 ast_skid_limit;
  1928. /*
  1929. * the nominal chain mask for transmit
  1930. *
  1931. * The chain mask may be modified dynamically, e.g. to operate AP
  1932. * tx with a reduced number of chains if no clients are associated.
  1933. * This configuration parameter specifies the nominal chain-mask that
  1934. * should be used when not operating with a reduced set of tx chains.
  1935. */
  1936. __le32 tx_chain_mask;
  1937. /*
  1938. * the nominal chain mask for receive
  1939. *
  1940. * The chain mask may be modified dynamically, e.g. for a client
  1941. * to use a reduced number of chains for receive if the traffic to
  1942. * the client is low enough that it doesn't require downlink MIMO
  1943. * or antenna diversity.
  1944. * This configuration parameter specifies the nominal chain-mask that
  1945. * should be used when not operating with a reduced set of rx chains.
  1946. */
  1947. __le32 rx_chain_mask;
  1948. /*
  1949. * what rx reorder timeout (ms) to use for the AC
  1950. *
  1951. * Each WMM access class (voice, video, best-effort, background) will
  1952. * have its own timeout value to dictate how long to wait for missing
  1953. * rx MPDUs to arrive before flushing subsequent MPDUs that have
  1954. * already been received.
  1955. * This parameter specifies the timeout in milliseconds for each
  1956. * class.
  1957. */
  1958. __le32 rx_timeout_pri_vi;
  1959. __le32 rx_timeout_pri_vo;
  1960. __le32 rx_timeout_pri_be;
  1961. __le32 rx_timeout_pri_bk;
  1962. /*
  1963. * what mode the rx should decap packets to
  1964. *
  1965. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  1966. * THis setting also determines the default TX behavior, however TX
  1967. * behavior can be modified on a per VAP basis during VAP init
  1968. */
  1969. __le32 rx_decap_mode;
  1970. /* what is the maximum number of scan requests that can be queued */
  1971. __le32 scan_max_pending_reqs;
  1972. /* maximum VDEV that could use BMISS offload */
  1973. __le32 bmiss_offload_max_vdev;
  1974. /* maximum VDEV that could use offload roaming */
  1975. __le32 roam_offload_max_vdev;
  1976. /* maximum AP profiles that would push to offload roaming */
  1977. __le32 roam_offload_max_ap_profiles;
  1978. /*
  1979. * how many groups to use for mcast->ucast conversion
  1980. *
  1981. * The target's WAL maintains a table to hold information regarding
  1982. * which peers belong to a given multicast group, so that if
  1983. * multicast->unicast conversion is enabled, the target can convert
  1984. * multicast tx frames to a series of unicast tx frames, to each
  1985. * peer within the multicast group.
  1986. This num_mcast_groups configuration parameter tells the target how
  1987. * many multicast groups to provide storage for within its multicast
  1988. * group membership table.
  1989. */
  1990. __le32 num_mcast_groups;
  1991. /*
  1992. * size to alloc for the mcast membership table
  1993. *
  1994. * This num_mcast_table_elems configuration parameter tells the
  1995. * target how many peer elements it needs to provide storage for in
  1996. * its multicast group membership table.
  1997. * These multicast group membership table elements are shared by the
  1998. * multicast groups stored within the table.
  1999. */
  2000. __le32 num_mcast_table_elems;
  2001. /*
  2002. * whether/how to do multicast->unicast conversion
  2003. *
  2004. * This configuration parameter specifies whether the target should
  2005. * perform multicast --> unicast conversion on transmit, and if so,
  2006. * what to do if it finds no entries in its multicast group
  2007. * membership table for the multicast IP address in the tx frame.
  2008. * Configuration value:
  2009. * 0 -> Do not perform multicast to unicast conversion.
  2010. * 1 -> Convert multicast frames to unicast, if the IP multicast
  2011. * address from the tx frame is found in the multicast group
  2012. * membership table. If the IP multicast address is not found,
  2013. * drop the frame.
  2014. * 2 -> Convert multicast frames to unicast, if the IP multicast
  2015. * address from the tx frame is found in the multicast group
  2016. * membership table. If the IP multicast address is not found,
  2017. * transmit the frame as multicast.
  2018. */
  2019. __le32 mcast2ucast_mode;
  2020. /*
  2021. * how much memory to allocate for a tx PPDU dbg log
  2022. *
  2023. * This parameter controls how much memory the target will allocate
  2024. * to store a log of tx PPDU meta-information (how large the PPDU
  2025. * was, when it was sent, whether it was successful, etc.)
  2026. */
  2027. __le32 tx_dbg_log_size;
  2028. /* how many AST entries to be allocated for WDS */
  2029. __le32 num_wds_entries;
  2030. /*
  2031. * MAC DMA burst size, e.g., For target PCI limit can be
  2032. * 0 -default, 1 256B
  2033. */
  2034. __le32 dma_burst_size;
  2035. /*
  2036. * Fixed delimiters to be inserted after every MPDU to
  2037. * account for interface latency to avoid underrun.
  2038. */
  2039. __le32 mac_aggr_delim;
  2040. /*
  2041. * determine whether target is responsible for detecting duplicate
  2042. * non-aggregate MPDU and timing out stale fragments.
  2043. *
  2044. * A-MPDU reordering is always performed on the target.
  2045. *
  2046. * 0: target responsible for frag timeout and dup checking
  2047. * 1: host responsible for frag timeout and dup checking
  2048. */
  2049. __le32 rx_skip_defrag_timeout_dup_detection_check;
  2050. /*
  2051. * Configuration for VoW :
  2052. * No of Video Nodes to be supported
  2053. * and Max no of descriptors for each Video link (node).
  2054. */
  2055. __le32 vow_config;
  2056. /* maximum VDEV that could use GTK offload */
  2057. __le32 gtk_offload_max_vdev;
  2058. /* Number of msdu descriptors target should use */
  2059. __le32 num_msdu_desc;
  2060. /*
  2061. * Max. number of Tx fragments per MSDU
  2062. * This parameter controls the max number of Tx fragments per MSDU.
  2063. * This is sent by the target as part of the WMI_SERVICE_READY event
  2064. * and is overriden by the OS shim as required.
  2065. */
  2066. __le32 max_frag_entries;
  2067. } __packed;
  2068. struct wmi_resource_config_10x {
  2069. /* number of virtual devices (VAPs) to support */
  2070. __le32 num_vdevs;
  2071. /* number of peer nodes to support */
  2072. __le32 num_peers;
  2073. /* number of keys per peer */
  2074. __le32 num_peer_keys;
  2075. /* total number of TX/RX data TIDs */
  2076. __le32 num_tids;
  2077. /*
  2078. * max skid for resolving hash collisions
  2079. *
  2080. * The address search table is sparse, so that if two MAC addresses
  2081. * result in the same hash value, the second of these conflicting
  2082. * entries can slide to the next index in the address search table,
  2083. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2084. * specifies the upper bound on how many subsequent indices to search
  2085. * over to find an unoccupied space.
  2086. */
  2087. __le32 ast_skid_limit;
  2088. /*
  2089. * the nominal chain mask for transmit
  2090. *
  2091. * The chain mask may be modified dynamically, e.g. to operate AP
  2092. * tx with a reduced number of chains if no clients are associated.
  2093. * This configuration parameter specifies the nominal chain-mask that
  2094. * should be used when not operating with a reduced set of tx chains.
  2095. */
  2096. __le32 tx_chain_mask;
  2097. /*
  2098. * the nominal chain mask for receive
  2099. *
  2100. * The chain mask may be modified dynamically, e.g. for a client
  2101. * to use a reduced number of chains for receive if the traffic to
  2102. * the client is low enough that it doesn't require downlink MIMO
  2103. * or antenna diversity.
  2104. * This configuration parameter specifies the nominal chain-mask that
  2105. * should be used when not operating with a reduced set of rx chains.
  2106. */
  2107. __le32 rx_chain_mask;
  2108. /*
  2109. * what rx reorder timeout (ms) to use for the AC
  2110. *
  2111. * Each WMM access class (voice, video, best-effort, background) will
  2112. * have its own timeout value to dictate how long to wait for missing
  2113. * rx MPDUs to arrive before flushing subsequent MPDUs that have
  2114. * already been received.
  2115. * This parameter specifies the timeout in milliseconds for each
  2116. * class.
  2117. */
  2118. __le32 rx_timeout_pri_vi;
  2119. __le32 rx_timeout_pri_vo;
  2120. __le32 rx_timeout_pri_be;
  2121. __le32 rx_timeout_pri_bk;
  2122. /*
  2123. * what mode the rx should decap packets to
  2124. *
  2125. * MAC can decap to RAW (no decap), native wifi or Ethernet types
  2126. * THis setting also determines the default TX behavior, however TX
  2127. * behavior can be modified on a per VAP basis during VAP init
  2128. */
  2129. __le32 rx_decap_mode;
  2130. /* what is the maximum number of scan requests that can be queued */
  2131. __le32 scan_max_pending_reqs;
  2132. /* maximum VDEV that could use BMISS offload */
  2133. __le32 bmiss_offload_max_vdev;
  2134. /* maximum VDEV that could use offload roaming */
  2135. __le32 roam_offload_max_vdev;
  2136. /* maximum AP profiles that would push to offload roaming */
  2137. __le32 roam_offload_max_ap_profiles;
  2138. /*
  2139. * how many groups to use for mcast->ucast conversion
  2140. *
  2141. * The target's WAL maintains a table to hold information regarding
  2142. * which peers belong to a given multicast group, so that if
  2143. * multicast->unicast conversion is enabled, the target can convert
  2144. * multicast tx frames to a series of unicast tx frames, to each
  2145. * peer within the multicast group.
  2146. This num_mcast_groups configuration parameter tells the target how
  2147. * many multicast groups to provide storage for within its multicast
  2148. * group membership table.
  2149. */
  2150. __le32 num_mcast_groups;
  2151. /*
  2152. * size to alloc for the mcast membership table
  2153. *
  2154. * This num_mcast_table_elems configuration parameter tells the
  2155. * target how many peer elements it needs to provide storage for in
  2156. * its multicast group membership table.
  2157. * These multicast group membership table elements are shared by the
  2158. * multicast groups stored within the table.
  2159. */
  2160. __le32 num_mcast_table_elems;
  2161. /*
  2162. * whether/how to do multicast->unicast conversion
  2163. *
  2164. * This configuration parameter specifies whether the target should
  2165. * perform multicast --> unicast conversion on transmit, and if so,
  2166. * what to do if it finds no entries in its multicast group
  2167. * membership table for the multicast IP address in the tx frame.
  2168. * Configuration value:
  2169. * 0 -> Do not perform multicast to unicast conversion.
  2170. * 1 -> Convert multicast frames to unicast, if the IP multicast
  2171. * address from the tx frame is found in the multicast group
  2172. * membership table. If the IP multicast address is not found,
  2173. * drop the frame.
  2174. * 2 -> Convert multicast frames to unicast, if the IP multicast
  2175. * address from the tx frame is found in the multicast group
  2176. * membership table. If the IP multicast address is not found,
  2177. * transmit the frame as multicast.
  2178. */
  2179. __le32 mcast2ucast_mode;
  2180. /*
  2181. * how much memory to allocate for a tx PPDU dbg log
  2182. *
  2183. * This parameter controls how much memory the target will allocate
  2184. * to store a log of tx PPDU meta-information (how large the PPDU
  2185. * was, when it was sent, whether it was successful, etc.)
  2186. */
  2187. __le32 tx_dbg_log_size;
  2188. /* how many AST entries to be allocated for WDS */
  2189. __le32 num_wds_entries;
  2190. /*
  2191. * MAC DMA burst size, e.g., For target PCI limit can be
  2192. * 0 -default, 1 256B
  2193. */
  2194. __le32 dma_burst_size;
  2195. /*
  2196. * Fixed delimiters to be inserted after every MPDU to
  2197. * account for interface latency to avoid underrun.
  2198. */
  2199. __le32 mac_aggr_delim;
  2200. /*
  2201. * determine whether target is responsible for detecting duplicate
  2202. * non-aggregate MPDU and timing out stale fragments.
  2203. *
  2204. * A-MPDU reordering is always performed on the target.
  2205. *
  2206. * 0: target responsible for frag timeout and dup checking
  2207. * 1: host responsible for frag timeout and dup checking
  2208. */
  2209. __le32 rx_skip_defrag_timeout_dup_detection_check;
  2210. /*
  2211. * Configuration for VoW :
  2212. * No of Video Nodes to be supported
  2213. * and Max no of descriptors for each Video link (node).
  2214. */
  2215. __le32 vow_config;
  2216. /* Number of msdu descriptors target should use */
  2217. __le32 num_msdu_desc;
  2218. /*
  2219. * Max. number of Tx fragments per MSDU
  2220. * This parameter controls the max number of Tx fragments per MSDU.
  2221. * This is sent by the target as part of the WMI_SERVICE_READY event
  2222. * and is overriden by the OS shim as required.
  2223. */
  2224. __le32 max_frag_entries;
  2225. } __packed;
  2226. enum wmi_10_2_feature_mask {
  2227. WMI_10_2_RX_BATCH_MODE = BIT(0),
  2228. WMI_10_2_ATF_CONFIG = BIT(1),
  2229. WMI_10_2_COEX_GPIO = BIT(3),
  2230. WMI_10_2_PEER_STATS = BIT(7),
  2231. };
  2232. struct wmi_resource_config_10_2 {
  2233. struct wmi_resource_config_10x common;
  2234. __le32 max_peer_ext_stats;
  2235. __le32 smart_ant_cap; /* 0-disable, 1-enable */
  2236. __le32 bk_min_free;
  2237. __le32 be_min_free;
  2238. __le32 vi_min_free;
  2239. __le32 vo_min_free;
  2240. __le32 feature_mask;
  2241. } __packed;
  2242. #define NUM_UNITS_IS_NUM_VDEVS BIT(0)
  2243. #define NUM_UNITS_IS_NUM_PEERS BIT(1)
  2244. #define NUM_UNITS_IS_NUM_ACTIVE_PEERS BIT(2)
  2245. struct wmi_resource_config_10_4 {
  2246. /* Number of virtual devices (VAPs) to support */
  2247. __le32 num_vdevs;
  2248. /* Number of peer nodes to support */
  2249. __le32 num_peers;
  2250. /* Number of active peer nodes to support */
  2251. __le32 num_active_peers;
  2252. /* In offload mode, target supports features like WOW, chatter and other
  2253. * protocol offloads. In order to support them some functionalities like
  2254. * reorder buffering, PN checking need to be done in target.
  2255. * This determines maximum number of peers supported by target in
  2256. * offload mode.
  2257. */
  2258. __le32 num_offload_peers;
  2259. /* Number of reorder buffers available for doing target based reorder
  2260. * Rx reorder buffering
  2261. */
  2262. __le32 num_offload_reorder_buffs;
  2263. /* Number of keys per peer */
  2264. __le32 num_peer_keys;
  2265. /* Total number of TX/RX data TIDs */
  2266. __le32 num_tids;
  2267. /* Max skid for resolving hash collisions.
  2268. * The address search table is sparse, so that if two MAC addresses
  2269. * result in the same hash value, the second of these conflicting
  2270. * entries can slide to the next index in the address search table,
  2271. * and use it, if it is unoccupied. This ast_skid_limit parameter
  2272. * specifies the upper bound on how many subsequent indices to search
  2273. * over to find an unoccupied space.
  2274. */
  2275. __le32 ast_skid_limit;
  2276. /* The nominal chain mask for transmit.
  2277. * The chain mask may be modified dynamically, e.g. to operate AP tx
  2278. * with a reduced number of chains if no clients are associated.
  2279. * This configuration parameter specifies the nominal chain-mask that
  2280. * should be used when not operating with a reduced set of tx chains.
  2281. */
  2282. __le32 tx_chain_mask;
  2283. /* The nominal chain mask for receive.
  2284. * The chain mask may be modified dynamically, e.g. for a client to use
  2285. * a reduced number of chains for receive if the traffic to the client
  2286. * is low enough that it doesn't require downlink MIMO or antenna
  2287. * diversity. This configuration parameter specifies the nominal
  2288. * chain-mask that should be used when not operating with a reduced
  2289. * set of rx chains.
  2290. */
  2291. __le32 rx_chain_mask;
  2292. /* What rx reorder timeout (ms) to use for the AC.
  2293. * Each WMM access class (voice, video, best-effort, background) will
  2294. * have its own timeout value to dictate how long to wait for missing
  2295. * rx MPDUs to arrive before flushing subsequent MPDUs that have already
  2296. * been received. This parameter specifies the timeout in milliseconds
  2297. * for each class.
  2298. */
  2299. __le32 rx_timeout_pri[4];
  2300. /* What mode the rx should decap packets to.
  2301. * MAC can decap to RAW (no decap), native wifi or Ethernet types.
  2302. * This setting also determines the default TX behavior, however TX
  2303. * behavior can be modified on a per VAP basis during VAP init
  2304. */
  2305. __le32 rx_decap_mode;
  2306. __le32 scan_max_pending_req;
  2307. __le32 bmiss_offload_max_vdev;
  2308. __le32 roam_offload_max_vdev;
  2309. __le32 roam_offload_max_ap_profiles;
  2310. /* How many groups to use for mcast->ucast conversion.
  2311. * The target's WAL maintains a table to hold information regarding
  2312. * which peers belong to a given multicast group, so that if
  2313. * multicast->unicast conversion is enabled, the target can convert
  2314. * multicast tx frames to a series of unicast tx frames, to each peer
  2315. * within the multicast group. This num_mcast_groups configuration
  2316. * parameter tells the target how many multicast groups to provide
  2317. * storage for within its multicast group membership table.
  2318. */
  2319. __le32 num_mcast_groups;
  2320. /* Size to alloc for the mcast membership table.
  2321. * This num_mcast_table_elems configuration parameter tells the target
  2322. * how many peer elements it needs to provide storage for in its
  2323. * multicast group membership table. These multicast group membership
  2324. * table elements are shared by the multicast groups stored within
  2325. * the table.
  2326. */
  2327. __le32 num_mcast_table_elems;
  2328. /* Whether/how to do multicast->unicast conversion.
  2329. * This configuration parameter specifies whether the target should
  2330. * perform multicast --> unicast conversion on transmit, and if so,
  2331. * what to do if it finds no entries in its multicast group membership
  2332. * table for the multicast IP address in the tx frame.
  2333. * Configuration value:
  2334. * 0 -> Do not perform multicast to unicast conversion.
  2335. * 1 -> Convert multicast frames to unicast, if the IP multicast address
  2336. * from the tx frame is found in the multicast group membership
  2337. * table. If the IP multicast address is not found, drop the frame
  2338. * 2 -> Convert multicast frames to unicast, if the IP multicast address
  2339. * from the tx frame is found in the multicast group membership
  2340. * table. If the IP multicast address is not found, transmit the
  2341. * frame as multicast.
  2342. */
  2343. __le32 mcast2ucast_mode;
  2344. /* How much memory to allocate for a tx PPDU dbg log.
  2345. * This parameter controls how much memory the target will allocate to
  2346. * store a log of tx PPDU meta-information (how large the PPDU was,
  2347. * when it was sent, whether it was successful, etc.)
  2348. */
  2349. __le32 tx_dbg_log_size;
  2350. /* How many AST entries to be allocated for WDS */
  2351. __le32 num_wds_entries;
  2352. /* MAC DMA burst size. 0 -default, 1 -256B */
  2353. __le32 dma_burst_size;
  2354. /* Fixed delimiters to be inserted after every MPDU to account for
  2355. * interface latency to avoid underrun.
  2356. */
  2357. __le32 mac_aggr_delim;
  2358. /* Determine whether target is responsible for detecting duplicate
  2359. * non-aggregate MPDU and timing out stale fragments. A-MPDU reordering
  2360. * is always performed on the target.
  2361. *
  2362. * 0: target responsible for frag timeout and dup checking
  2363. * 1: host responsible for frag timeout and dup checking
  2364. */
  2365. __le32 rx_skip_defrag_timeout_dup_detection_check;
  2366. /* Configuration for VoW : No of Video nodes to be supported and max
  2367. * no of descriptors for each video link (node).
  2368. */
  2369. __le32 vow_config;
  2370. /* Maximum vdev that could use gtk offload */
  2371. __le32 gtk_offload_max_vdev;
  2372. /* Number of msdu descriptors target should use */
  2373. __le32 num_msdu_desc;
  2374. /* Max number of tx fragments per MSDU.
  2375. * This parameter controls the max number of tx fragments per MSDU.
  2376. * This will passed by target as part of the WMI_SERVICE_READY event
  2377. * and is overridden by the OS shim as required.
  2378. */
  2379. __le32 max_frag_entries;
  2380. /* Max number of extended peer stats.
  2381. * This parameter controls the max number of peers for which extended
  2382. * statistics are supported by target
  2383. */
  2384. __le32 max_peer_ext_stats;
  2385. /* Smart antenna capabilities information.
  2386. * 1 - Smart antenna is enabled
  2387. * 0 - Smart antenna is disabled
  2388. * In future this can contain smart antenna specific capabilities.
  2389. */
  2390. __le32 smart_ant_cap;
  2391. /* User can configure the buffers allocated for each AC (BE, BK, VI, VO)
  2392. * during init.
  2393. */
  2394. __le32 bk_minfree;
  2395. __le32 be_minfree;
  2396. __le32 vi_minfree;
  2397. __le32 vo_minfree;
  2398. /* Rx batch mode capability.
  2399. * 1 - Rx batch mode enabled
  2400. * 0 - Rx batch mode disabled
  2401. */
  2402. __le32 rx_batchmode;
  2403. /* Thermal throttling capability.
  2404. * 1 - Capable of thermal throttling
  2405. * 0 - Not capable of thermal throttling
  2406. */
  2407. __le32 tt_support;
  2408. /* ATF configuration.
  2409. * 1 - Enable ATF
  2410. * 0 - Disable ATF
  2411. */
  2412. __le32 atf_config;
  2413. /* Configure padding to manage IP header un-alignment
  2414. * 1 - Enable padding
  2415. * 0 - Disable padding
  2416. */
  2417. __le32 iphdr_pad_config;
  2418. /* qwrap configuration
  2419. * 1 - This is qwrap configuration
  2420. * 0 - This is not qwrap
  2421. */
  2422. __le32 qwrap_config;
  2423. } __packed;
  2424. /* strucutre describing host memory chunk. */
  2425. struct host_memory_chunk {
  2426. /* id of the request that is passed up in service ready */
  2427. __le32 req_id;
  2428. /* the physical address the memory chunk */
  2429. __le32 ptr;
  2430. /* size of the chunk */
  2431. __le32 size;
  2432. } __packed;
  2433. struct wmi_host_mem_chunks {
  2434. __le32 count;
  2435. /* some fw revisions require at least 1 chunk regardless of count */
  2436. struct host_memory_chunk items[1];
  2437. } __packed;
  2438. struct wmi_init_cmd {
  2439. struct wmi_resource_config resource_config;
  2440. struct wmi_host_mem_chunks mem_chunks;
  2441. } __packed;
  2442. /* _10x stucture is from 10.X FW API */
  2443. struct wmi_init_cmd_10x {
  2444. struct wmi_resource_config_10x resource_config;
  2445. struct wmi_host_mem_chunks mem_chunks;
  2446. } __packed;
  2447. struct wmi_init_cmd_10_2 {
  2448. struct wmi_resource_config_10_2 resource_config;
  2449. struct wmi_host_mem_chunks mem_chunks;
  2450. } __packed;
  2451. struct wmi_init_cmd_10_4 {
  2452. struct wmi_resource_config_10_4 resource_config;
  2453. struct wmi_host_mem_chunks mem_chunks;
  2454. } __packed;
  2455. struct wmi_chan_list_entry {
  2456. __le16 freq;
  2457. u8 phy_mode; /* valid for 10.2 only */
  2458. u8 reserved;
  2459. } __packed;
  2460. /* TLV for channel list */
  2461. struct wmi_chan_list {
  2462. __le32 tag; /* WMI_CHAN_LIST_TAG */
  2463. __le32 num_chan;
  2464. struct wmi_chan_list_entry channel_list[0];
  2465. } __packed;
  2466. struct wmi_bssid_list {
  2467. __le32 tag; /* WMI_BSSID_LIST_TAG */
  2468. __le32 num_bssid;
  2469. struct wmi_mac_addr bssid_list[0];
  2470. } __packed;
  2471. struct wmi_ie_data {
  2472. __le32 tag; /* WMI_IE_TAG */
  2473. __le32 ie_len;
  2474. u8 ie_data[0];
  2475. } __packed;
  2476. struct wmi_ssid {
  2477. __le32 ssid_len;
  2478. u8 ssid[32];
  2479. } __packed;
  2480. struct wmi_ssid_list {
  2481. __le32 tag; /* WMI_SSID_LIST_TAG */
  2482. __le32 num_ssids;
  2483. struct wmi_ssid ssids[0];
  2484. } __packed;
  2485. /* prefix used by scan requestor ids on the host */
  2486. #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
  2487. /* prefix used by scan request ids generated on the host */
  2488. /* host cycles through the lower 12 bits to generate ids */
  2489. #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
  2490. #define WLAN_SCAN_PARAMS_MAX_SSID 16
  2491. #define WLAN_SCAN_PARAMS_MAX_BSSID 4
  2492. #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
  2493. /* Values lower than this may be refused by some firmware revisions with a scan
  2494. * completion with a timedout reason.
  2495. */
  2496. #define WMI_SCAN_CHAN_MIN_TIME_MSEC 40
  2497. /* Scan priority numbers must be sequential, starting with 0 */
  2498. enum wmi_scan_priority {
  2499. WMI_SCAN_PRIORITY_VERY_LOW = 0,
  2500. WMI_SCAN_PRIORITY_LOW,
  2501. WMI_SCAN_PRIORITY_MEDIUM,
  2502. WMI_SCAN_PRIORITY_HIGH,
  2503. WMI_SCAN_PRIORITY_VERY_HIGH,
  2504. WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
  2505. };
  2506. struct wmi_start_scan_common {
  2507. /* Scan ID */
  2508. __le32 scan_id;
  2509. /* Scan requestor ID */
  2510. __le32 scan_req_id;
  2511. /* VDEV id(interface) that is requesting scan */
  2512. __le32 vdev_id;
  2513. /* Scan Priority, input to scan scheduler */
  2514. __le32 scan_priority;
  2515. /* Scan events subscription */
  2516. __le32 notify_scan_events;
  2517. /* dwell time in msec on active channels */
  2518. __le32 dwell_time_active;
  2519. /* dwell time in msec on passive channels */
  2520. __le32 dwell_time_passive;
  2521. /*
  2522. * min time in msec on the BSS channel,only valid if atleast one
  2523. * VDEV is active
  2524. */
  2525. __le32 min_rest_time;
  2526. /*
  2527. * max rest time in msec on the BSS channel,only valid if at least
  2528. * one VDEV is active
  2529. */
  2530. /*
  2531. * the scanner will rest on the bss channel at least min_rest_time
  2532. * after min_rest_time the scanner will start checking for tx/rx
  2533. * activity on all VDEVs. if there is no activity the scanner will
  2534. * switch to off channel. if there is activity the scanner will let
  2535. * the radio on the bss channel until max_rest_time expires.at
  2536. * max_rest_time scanner will switch to off channel irrespective of
  2537. * activity. activity is determined by the idle_time parameter.
  2538. */
  2539. __le32 max_rest_time;
  2540. /*
  2541. * time before sending next set of probe requests.
  2542. * The scanner keeps repeating probe requests transmission with
  2543. * period specified by repeat_probe_time.
  2544. * The number of probe requests specified depends on the ssid_list
  2545. * and bssid_list
  2546. */
  2547. __le32 repeat_probe_time;
  2548. /* time in msec between 2 consequetive probe requests with in a set. */
  2549. __le32 probe_spacing_time;
  2550. /*
  2551. * data inactivity time in msec on bss channel that will be used by
  2552. * scanner for measuring the inactivity.
  2553. */
  2554. __le32 idle_time;
  2555. /* maximum time in msec allowed for scan */
  2556. __le32 max_scan_time;
  2557. /*
  2558. * delay in msec before sending first probe request after switching
  2559. * to a channel
  2560. */
  2561. __le32 probe_delay;
  2562. /* Scan control flags */
  2563. __le32 scan_ctrl_flags;
  2564. } __packed;
  2565. struct wmi_start_scan_tlvs {
  2566. /* TLV parameters. These includes channel list, ssid list, bssid list,
  2567. * extra ies.
  2568. */
  2569. u8 tlvs[0];
  2570. } __packed;
  2571. struct wmi_start_scan_cmd {
  2572. struct wmi_start_scan_common common;
  2573. __le32 burst_duration_ms;
  2574. struct wmi_start_scan_tlvs tlvs;
  2575. } __packed;
  2576. /* This is the definition from 10.X firmware branch */
  2577. struct wmi_10x_start_scan_cmd {
  2578. struct wmi_start_scan_common common;
  2579. struct wmi_start_scan_tlvs tlvs;
  2580. } __packed;
  2581. struct wmi_ssid_arg {
  2582. int len;
  2583. const u8 *ssid;
  2584. };
  2585. struct wmi_bssid_arg {
  2586. const u8 *bssid;
  2587. };
  2588. struct wmi_start_scan_arg {
  2589. u32 scan_id;
  2590. u32 scan_req_id;
  2591. u32 vdev_id;
  2592. u32 scan_priority;
  2593. u32 notify_scan_events;
  2594. u32 dwell_time_active;
  2595. u32 dwell_time_passive;
  2596. u32 min_rest_time;
  2597. u32 max_rest_time;
  2598. u32 repeat_probe_time;
  2599. u32 probe_spacing_time;
  2600. u32 idle_time;
  2601. u32 max_scan_time;
  2602. u32 probe_delay;
  2603. u32 scan_ctrl_flags;
  2604. u32 burst_duration_ms;
  2605. u32 ie_len;
  2606. u32 n_channels;
  2607. u32 n_ssids;
  2608. u32 n_bssids;
  2609. u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
  2610. u16 channels[64];
  2611. struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
  2612. struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
  2613. };
  2614. /* scan control flags */
  2615. /* passively scan all channels including active channels */
  2616. #define WMI_SCAN_FLAG_PASSIVE 0x1
  2617. /* add wild card ssid probe request even though ssid_list is specified. */
  2618. #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
  2619. /* add cck rates to rates/xrate ie for the generated probe request */
  2620. #define WMI_SCAN_ADD_CCK_RATES 0x4
  2621. /* add ofdm rates to rates/xrate ie for the generated probe request */
  2622. #define WMI_SCAN_ADD_OFDM_RATES 0x8
  2623. /* To enable indication of Chan load and Noise floor to host */
  2624. #define WMI_SCAN_CHAN_STAT_EVENT 0x10
  2625. /* Filter Probe request frames */
  2626. #define WMI_SCAN_FILTER_PROBE_REQ 0x20
  2627. /* When set, DFS channels will not be scanned */
  2628. #define WMI_SCAN_BYPASS_DFS_CHN 0x40
  2629. /* Different FW scan engine may choose to bail out on errors.
  2630. * Allow the driver to have influence over that. */
  2631. #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
  2632. /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
  2633. #define WMI_SCAN_CLASS_MASK 0xFF000000
  2634. enum wmi_stop_scan_type {
  2635. WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
  2636. WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
  2637. WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
  2638. };
  2639. struct wmi_stop_scan_cmd {
  2640. __le32 scan_req_id;
  2641. __le32 scan_id;
  2642. __le32 req_type;
  2643. __le32 vdev_id;
  2644. } __packed;
  2645. struct wmi_stop_scan_arg {
  2646. u32 req_id;
  2647. enum wmi_stop_scan_type req_type;
  2648. union {
  2649. u32 scan_id;
  2650. u32 vdev_id;
  2651. } u;
  2652. };
  2653. struct wmi_scan_chan_list_cmd {
  2654. __le32 num_scan_chans;
  2655. struct wmi_channel chan_info[0];
  2656. } __packed;
  2657. struct wmi_scan_chan_list_arg {
  2658. u32 n_channels;
  2659. struct wmi_channel_arg *channels;
  2660. };
  2661. enum wmi_bss_filter {
  2662. WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
  2663. WMI_BSS_FILTER_ALL, /* all beacons forwarded */
  2664. WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
  2665. WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
  2666. WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
  2667. WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
  2668. WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
  2669. WMI_BSS_FILTER_LAST_BSS, /* marker only */
  2670. };
  2671. enum wmi_scan_event_type {
  2672. WMI_SCAN_EVENT_STARTED = BIT(0),
  2673. WMI_SCAN_EVENT_COMPLETED = BIT(1),
  2674. WMI_SCAN_EVENT_BSS_CHANNEL = BIT(2),
  2675. WMI_SCAN_EVENT_FOREIGN_CHANNEL = BIT(3),
  2676. WMI_SCAN_EVENT_DEQUEUED = BIT(4),
  2677. /* possibly by high-prio scan */
  2678. WMI_SCAN_EVENT_PREEMPTED = BIT(5),
  2679. WMI_SCAN_EVENT_START_FAILED = BIT(6),
  2680. WMI_SCAN_EVENT_RESTARTED = BIT(7),
  2681. WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = BIT(8),
  2682. WMI_SCAN_EVENT_MAX = BIT(15),
  2683. };
  2684. enum wmi_scan_completion_reason {
  2685. WMI_SCAN_REASON_COMPLETED,
  2686. WMI_SCAN_REASON_CANCELLED,
  2687. WMI_SCAN_REASON_PREEMPTED,
  2688. WMI_SCAN_REASON_TIMEDOUT,
  2689. WMI_SCAN_REASON_INTERNAL_FAILURE,
  2690. WMI_SCAN_REASON_MAX,
  2691. };
  2692. struct wmi_scan_event {
  2693. __le32 event_type; /* %WMI_SCAN_EVENT_ */
  2694. __le32 reason; /* %WMI_SCAN_REASON_ */
  2695. __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
  2696. __le32 scan_req_id;
  2697. __le32 scan_id;
  2698. __le32 vdev_id;
  2699. } __packed;
  2700. /*
  2701. * This defines how much headroom is kept in the
  2702. * receive frame between the descriptor and the
  2703. * payload, in order for the WMI PHY error and
  2704. * management handler to insert header contents.
  2705. *
  2706. * This is in bytes.
  2707. */
  2708. #define WMI_MGMT_RX_HDR_HEADROOM 52
  2709. /*
  2710. * This event will be used for sending scan results
  2711. * as well as rx mgmt frames to the host. The rx buffer
  2712. * will be sent as part of this WMI event. It would be a
  2713. * good idea to pass all the fields in the RX status
  2714. * descriptor up to the host.
  2715. */
  2716. struct wmi_mgmt_rx_hdr_v1 {
  2717. __le32 channel;
  2718. __le32 snr;
  2719. __le32 rate;
  2720. __le32 phy_mode;
  2721. __le32 buf_len;
  2722. __le32 status; /* %WMI_RX_STATUS_ */
  2723. } __packed;
  2724. struct wmi_mgmt_rx_hdr_v2 {
  2725. struct wmi_mgmt_rx_hdr_v1 v1;
  2726. __le32 rssi_ctl[4];
  2727. } __packed;
  2728. struct wmi_mgmt_rx_event_v1 {
  2729. struct wmi_mgmt_rx_hdr_v1 hdr;
  2730. u8 buf[0];
  2731. } __packed;
  2732. struct wmi_mgmt_rx_event_v2 {
  2733. struct wmi_mgmt_rx_hdr_v2 hdr;
  2734. u8 buf[0];
  2735. } __packed;
  2736. struct wmi_10_4_mgmt_rx_hdr {
  2737. __le32 channel;
  2738. __le32 snr;
  2739. u8 rssi_ctl[4];
  2740. __le32 rate;
  2741. __le32 phy_mode;
  2742. __le32 buf_len;
  2743. __le32 status;
  2744. } __packed;
  2745. struct wmi_10_4_mgmt_rx_event {
  2746. struct wmi_10_4_mgmt_rx_hdr hdr;
  2747. u8 buf[0];
  2748. } __packed;
  2749. #define WMI_RX_STATUS_OK 0x00
  2750. #define WMI_RX_STATUS_ERR_CRC 0x01
  2751. #define WMI_RX_STATUS_ERR_DECRYPT 0x08
  2752. #define WMI_RX_STATUS_ERR_MIC 0x10
  2753. #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
  2754. #define PHY_ERROR_GEN_SPECTRAL_SCAN 0x26
  2755. #define PHY_ERROR_GEN_FALSE_RADAR_EXT 0x24
  2756. #define PHY_ERROR_GEN_RADAR 0x05
  2757. #define PHY_ERROR_10_4_RADAR_MASK 0x4
  2758. #define PHY_ERROR_10_4_SPECTRAL_SCAN_MASK 0x4000000
  2759. enum phy_err_type {
  2760. PHY_ERROR_UNKNOWN,
  2761. PHY_ERROR_SPECTRAL_SCAN,
  2762. PHY_ERROR_FALSE_RADAR_EXT,
  2763. PHY_ERROR_RADAR
  2764. };
  2765. struct wmi_phyerr {
  2766. __le32 tsf_timestamp;
  2767. __le16 freq1;
  2768. __le16 freq2;
  2769. u8 rssi_combined;
  2770. u8 chan_width_mhz;
  2771. u8 phy_err_code;
  2772. u8 rsvd0;
  2773. __le32 rssi_chains[4];
  2774. __le16 nf_chains[4];
  2775. __le32 buf_len;
  2776. u8 buf[0];
  2777. } __packed;
  2778. struct wmi_phyerr_event {
  2779. __le32 num_phyerrs;
  2780. __le32 tsf_l32;
  2781. __le32 tsf_u32;
  2782. struct wmi_phyerr phyerrs[0];
  2783. } __packed;
  2784. struct wmi_10_4_phyerr_event {
  2785. __le32 tsf_l32;
  2786. __le32 tsf_u32;
  2787. __le16 freq1;
  2788. __le16 freq2;
  2789. u8 rssi_combined;
  2790. u8 chan_width_mhz;
  2791. u8 phy_err_code;
  2792. u8 rsvd0;
  2793. __le32 rssi_chains[4];
  2794. __le16 nf_chains[4];
  2795. __le32 phy_err_mask[2];
  2796. __le32 tsf_timestamp;
  2797. __le32 buf_len;
  2798. u8 buf[0];
  2799. } __packed;
  2800. #define PHYERR_TLV_SIG 0xBB
  2801. #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB
  2802. #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8
  2803. #define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT 0xF9
  2804. struct phyerr_radar_report {
  2805. __le32 reg0; /* RADAR_REPORT_REG0_* */
  2806. __le32 reg1; /* REDAR_REPORT_REG1_* */
  2807. } __packed;
  2808. #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK 0x80000000
  2809. #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB 31
  2810. #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK 0x40000000
  2811. #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB 30
  2812. #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK 0x3FF00000
  2813. #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB 20
  2814. #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK 0x000F0000
  2815. #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB 16
  2816. #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK 0x0000FC00
  2817. #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB 10
  2818. #define RADAR_REPORT_REG0_PULSE_SIDX_MASK 0x000003FF
  2819. #define RADAR_REPORT_REG0_PULSE_SIDX_LSB 0
  2820. #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK 0x80000000
  2821. #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB 31
  2822. #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK 0x7F000000
  2823. #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB 24
  2824. #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK 0x00FF0000
  2825. #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB 16
  2826. #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK 0x0000FF00
  2827. #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB 8
  2828. #define RADAR_REPORT_REG1_PULSE_DUR_MASK 0x000000FF
  2829. #define RADAR_REPORT_REG1_PULSE_DUR_LSB 0
  2830. struct phyerr_fft_report {
  2831. __le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */
  2832. __le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */
  2833. } __packed;
  2834. #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK 0xFF800000
  2835. #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB 23
  2836. #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK 0x007FC000
  2837. #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB 14
  2838. #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK 0x00003000
  2839. #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB 12
  2840. #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK 0x00000FFF
  2841. #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB 0
  2842. #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK 0xFC000000
  2843. #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB 26
  2844. #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK 0x03FC0000
  2845. #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB 18
  2846. #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK 0x0003FF00
  2847. #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB 8
  2848. #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK 0x000000FF
  2849. #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB 0
  2850. struct phyerr_tlv {
  2851. __le16 len;
  2852. u8 tag;
  2853. u8 sig;
  2854. } __packed;
  2855. #define DFS_RSSI_POSSIBLY_FALSE 50
  2856. #define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE 40
  2857. struct wmi_mgmt_tx_hdr {
  2858. __le32 vdev_id;
  2859. struct wmi_mac_addr peer_macaddr;
  2860. __le32 tx_rate;
  2861. __le32 tx_power;
  2862. __le32 buf_len;
  2863. } __packed;
  2864. struct wmi_mgmt_tx_cmd {
  2865. struct wmi_mgmt_tx_hdr hdr;
  2866. u8 buf[0];
  2867. } __packed;
  2868. struct wmi_echo_event {
  2869. __le32 value;
  2870. } __packed;
  2871. struct wmi_echo_cmd {
  2872. __le32 value;
  2873. } __packed;
  2874. struct wmi_pdev_set_regdomain_cmd {
  2875. __le32 reg_domain;
  2876. __le32 reg_domain_2G;
  2877. __le32 reg_domain_5G;
  2878. __le32 conformance_test_limit_2G;
  2879. __le32 conformance_test_limit_5G;
  2880. } __packed;
  2881. enum wmi_dfs_region {
  2882. /* Uninitialized dfs domain */
  2883. WMI_UNINIT_DFS_DOMAIN = 0,
  2884. /* FCC3 dfs domain */
  2885. WMI_FCC_DFS_DOMAIN = 1,
  2886. /* ETSI dfs domain */
  2887. WMI_ETSI_DFS_DOMAIN = 2,
  2888. /*Japan dfs domain */
  2889. WMI_MKK4_DFS_DOMAIN = 3,
  2890. };
  2891. struct wmi_pdev_set_regdomain_cmd_10x {
  2892. __le32 reg_domain;
  2893. __le32 reg_domain_2G;
  2894. __le32 reg_domain_5G;
  2895. __le32 conformance_test_limit_2G;
  2896. __le32 conformance_test_limit_5G;
  2897. /* dfs domain from wmi_dfs_region */
  2898. __le32 dfs_domain;
  2899. } __packed;
  2900. /* Command to set/unset chip in quiet mode */
  2901. struct wmi_pdev_set_quiet_cmd {
  2902. /* period in TUs */
  2903. __le32 period;
  2904. /* duration in TUs */
  2905. __le32 duration;
  2906. /* offset in TUs */
  2907. __le32 next_start;
  2908. /* enable/disable */
  2909. __le32 enabled;
  2910. } __packed;
  2911. /*
  2912. * 802.11g protection mode.
  2913. */
  2914. enum ath10k_protmode {
  2915. ATH10K_PROT_NONE = 0, /* no protection */
  2916. ATH10K_PROT_CTSONLY = 1, /* CTS to self */
  2917. ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
  2918. };
  2919. enum wmi_rtscts_profile {
  2920. WMI_RTSCTS_FOR_NO_RATESERIES = 0,
  2921. WMI_RTSCTS_FOR_SECOND_RATESERIES,
  2922. WMI_RTSCTS_ACROSS_SW_RETRIES
  2923. };
  2924. #define WMI_RTSCTS_ENABLED 1
  2925. #define WMI_RTSCTS_SET_MASK 0x0f
  2926. #define WMI_RTSCTS_SET_LSB 0
  2927. #define WMI_RTSCTS_PROFILE_MASK 0xf0
  2928. #define WMI_RTSCTS_PROFILE_LSB 4
  2929. enum wmi_beacon_gen_mode {
  2930. WMI_BEACON_STAGGERED_MODE = 0,
  2931. WMI_BEACON_BURST_MODE = 1
  2932. };
  2933. enum wmi_csa_event_ies_present_flag {
  2934. WMI_CSA_IE_PRESENT = 0x00000001,
  2935. WMI_XCSA_IE_PRESENT = 0x00000002,
  2936. WMI_WBW_IE_PRESENT = 0x00000004,
  2937. WMI_CSWARP_IE_PRESENT = 0x00000008,
  2938. };
  2939. /* wmi CSA receive event from beacon frame */
  2940. struct wmi_csa_event {
  2941. __le32 i_fc_dur;
  2942. /* Bit 0-15: FC */
  2943. /* Bit 16-31: DUR */
  2944. struct wmi_mac_addr i_addr1;
  2945. struct wmi_mac_addr i_addr2;
  2946. __le32 csa_ie[2];
  2947. __le32 xcsa_ie[2];
  2948. __le32 wb_ie[2];
  2949. __le32 cswarp_ie;
  2950. __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
  2951. } __packed;
  2952. /* the definition of different PDEV parameters */
  2953. #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  2954. #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
  2955. #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
  2956. struct wmi_pdev_param_map {
  2957. u32 tx_chain_mask;
  2958. u32 rx_chain_mask;
  2959. u32 txpower_limit2g;
  2960. u32 txpower_limit5g;
  2961. u32 txpower_scale;
  2962. u32 beacon_gen_mode;
  2963. u32 beacon_tx_mode;
  2964. u32 resmgr_offchan_mode;
  2965. u32 protection_mode;
  2966. u32 dynamic_bw;
  2967. u32 non_agg_sw_retry_th;
  2968. u32 agg_sw_retry_th;
  2969. u32 sta_kickout_th;
  2970. u32 ac_aggrsize_scaling;
  2971. u32 ltr_enable;
  2972. u32 ltr_ac_latency_be;
  2973. u32 ltr_ac_latency_bk;
  2974. u32 ltr_ac_latency_vi;
  2975. u32 ltr_ac_latency_vo;
  2976. u32 ltr_ac_latency_timeout;
  2977. u32 ltr_sleep_override;
  2978. u32 ltr_rx_override;
  2979. u32 ltr_tx_activity_timeout;
  2980. u32 l1ss_enable;
  2981. u32 dsleep_enable;
  2982. u32 pcielp_txbuf_flush;
  2983. u32 pcielp_txbuf_watermark;
  2984. u32 pcielp_txbuf_tmo_en;
  2985. u32 pcielp_txbuf_tmo_value;
  2986. u32 pdev_stats_update_period;
  2987. u32 vdev_stats_update_period;
  2988. u32 peer_stats_update_period;
  2989. u32 bcnflt_stats_update_period;
  2990. u32 pmf_qos;
  2991. u32 arp_ac_override;
  2992. u32 dcs;
  2993. u32 ani_enable;
  2994. u32 ani_poll_period;
  2995. u32 ani_listen_period;
  2996. u32 ani_ofdm_level;
  2997. u32 ani_cck_level;
  2998. u32 dyntxchain;
  2999. u32 proxy_sta;
  3000. u32 idle_ps_config;
  3001. u32 power_gating_sleep;
  3002. u32 fast_channel_reset;
  3003. u32 burst_dur;
  3004. u32 burst_enable;
  3005. u32 cal_period;
  3006. u32 aggr_burst;
  3007. u32 rx_decap_mode;
  3008. u32 smart_antenna_default_antenna;
  3009. u32 igmpmld_override;
  3010. u32 igmpmld_tid;
  3011. u32 antenna_gain;
  3012. u32 rx_filter;
  3013. u32 set_mcast_to_ucast_tid;
  3014. u32 proxy_sta_mode;
  3015. u32 set_mcast2ucast_mode;
  3016. u32 set_mcast2ucast_buffer;
  3017. u32 remove_mcast2ucast_buffer;
  3018. u32 peer_sta_ps_statechg_enable;
  3019. u32 igmpmld_ac_override;
  3020. u32 block_interbss;
  3021. u32 set_disable_reset_cmdid;
  3022. u32 set_msdu_ttl_cmdid;
  3023. u32 set_ppdu_duration_cmdid;
  3024. u32 txbf_sound_period_cmdid;
  3025. u32 set_promisc_mode_cmdid;
  3026. u32 set_burst_mode_cmdid;
  3027. u32 en_stats;
  3028. u32 mu_group_policy;
  3029. u32 noise_detection;
  3030. u32 noise_threshold;
  3031. u32 dpd_enable;
  3032. u32 set_mcast_bcast_echo;
  3033. u32 atf_strict_sch;
  3034. u32 atf_sched_duration;
  3035. u32 ant_plzn;
  3036. u32 mgmt_retry_limit;
  3037. u32 sensitivity_level;
  3038. u32 signed_txpower_2g;
  3039. u32 signed_txpower_5g;
  3040. u32 enable_per_tid_amsdu;
  3041. u32 enable_per_tid_ampdu;
  3042. u32 cca_threshold;
  3043. u32 rts_fixed_rate;
  3044. u32 pdev_reset;
  3045. u32 wapi_mbssid_offset;
  3046. u32 arp_srcaddr;
  3047. u32 arp_dstaddr;
  3048. };
  3049. #define WMI_PDEV_PARAM_UNSUPPORTED 0
  3050. enum wmi_pdev_param {
  3051. /* TX chain mask */
  3052. WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3053. /* RX chain mask */
  3054. WMI_PDEV_PARAM_RX_CHAIN_MASK,
  3055. /* TX power limit for 2G Radio */
  3056. WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
  3057. /* TX power limit for 5G Radio */
  3058. WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
  3059. /* TX power scale */
  3060. WMI_PDEV_PARAM_TXPOWER_SCALE,
  3061. /* Beacon generation mode . 0: host, 1: target */
  3062. WMI_PDEV_PARAM_BEACON_GEN_MODE,
  3063. /* Beacon generation mode . 0: staggered 1: bursted */
  3064. WMI_PDEV_PARAM_BEACON_TX_MODE,
  3065. /*
  3066. * Resource manager off chan mode .
  3067. * 0: turn off off chan mode. 1: turn on offchan mode
  3068. */
  3069. WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  3070. /*
  3071. * Protection mode:
  3072. * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
  3073. */
  3074. WMI_PDEV_PARAM_PROTECTION_MODE,
  3075. /*
  3076. * Dynamic bandwidth - 0: disable, 1: enable
  3077. *
  3078. * When enabled HW rate control tries different bandwidths when
  3079. * retransmitting frames.
  3080. */
  3081. WMI_PDEV_PARAM_DYNAMIC_BW,
  3082. /* Non aggregrate/ 11g sw retry threshold.0-disable */
  3083. WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  3084. /* aggregrate sw retry threshold. 0-disable*/
  3085. WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
  3086. /* Station kickout threshold (non of consecutive failures).0-disable */
  3087. WMI_PDEV_PARAM_STA_KICKOUT_TH,
  3088. /* Aggerate size scaling configuration per AC */
  3089. WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  3090. /* LTR enable */
  3091. WMI_PDEV_PARAM_LTR_ENABLE,
  3092. /* LTR latency for BE, in us */
  3093. WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
  3094. /* LTR latency for BK, in us */
  3095. WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
  3096. /* LTR latency for VI, in us */
  3097. WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
  3098. /* LTR latency for VO, in us */
  3099. WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
  3100. /* LTR AC latency timeout, in ms */
  3101. WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  3102. /* LTR platform latency override, in us */
  3103. WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  3104. /* LTR-RX override, in us */
  3105. WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
  3106. /* Tx activity timeout for LTR, in us */
  3107. WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  3108. /* L1SS state machine enable */
  3109. WMI_PDEV_PARAM_L1SS_ENABLE,
  3110. /* Deep sleep state machine enable */
  3111. WMI_PDEV_PARAM_DSLEEP_ENABLE,
  3112. /* RX buffering flush enable */
  3113. WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  3114. /* RX buffering matermark */
  3115. WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  3116. /* RX buffering timeout enable */
  3117. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  3118. /* RX buffering timeout value */
  3119. WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  3120. /* pdev level stats update period in ms */
  3121. WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  3122. /* vdev level stats update period in ms */
  3123. WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  3124. /* peer level stats update period in ms */
  3125. WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  3126. /* beacon filter status update period */
  3127. WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  3128. /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  3129. WMI_PDEV_PARAM_PMF_QOS,
  3130. /* Access category on which ARP frames are sent */
  3131. WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
  3132. /* DCS configuration */
  3133. WMI_PDEV_PARAM_DCS,
  3134. /* Enable/Disable ANI on target */
  3135. WMI_PDEV_PARAM_ANI_ENABLE,
  3136. /* configure the ANI polling period */
  3137. WMI_PDEV_PARAM_ANI_POLL_PERIOD,
  3138. /* configure the ANI listening period */
  3139. WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
  3140. /* configure OFDM immunity level */
  3141. WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
  3142. /* configure CCK immunity level */
  3143. WMI_PDEV_PARAM_ANI_CCK_LEVEL,
  3144. /* Enable/Disable CDD for 1x1 STAs in rate control module */
  3145. WMI_PDEV_PARAM_DYNTXCHAIN,
  3146. /* Enable/Disable proxy STA */
  3147. WMI_PDEV_PARAM_PROXY_STA,
  3148. /* Enable/Disable low power state when all VDEVs are inactive/idle. */
  3149. WMI_PDEV_PARAM_IDLE_PS_CONFIG,
  3150. /* Enable/Disable power gating sleep */
  3151. WMI_PDEV_PARAM_POWER_GATING_SLEEP,
  3152. };
  3153. enum wmi_10x_pdev_param {
  3154. /* TX chian mask */
  3155. WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3156. /* RX chian mask */
  3157. WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
  3158. /* TX power limit for 2G Radio */
  3159. WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
  3160. /* TX power limit for 5G Radio */
  3161. WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
  3162. /* TX power scale */
  3163. WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
  3164. /* Beacon generation mode . 0: host, 1: target */
  3165. WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
  3166. /* Beacon generation mode . 0: staggered 1: bursted */
  3167. WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
  3168. /*
  3169. * Resource manager off chan mode .
  3170. * 0: turn off off chan mode. 1: turn on offchan mode
  3171. */
  3172. WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  3173. /*
  3174. * Protection mode:
  3175. * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
  3176. */
  3177. WMI_10X_PDEV_PARAM_PROTECTION_MODE,
  3178. /* Dynamic bandwidth 0: disable 1: enable */
  3179. WMI_10X_PDEV_PARAM_DYNAMIC_BW,
  3180. /* Non aggregrate/ 11g sw retry threshold.0-disable */
  3181. WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  3182. /* aggregrate sw retry threshold. 0-disable*/
  3183. WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
  3184. /* Station kickout threshold (non of consecutive failures).0-disable */
  3185. WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
  3186. /* Aggerate size scaling configuration per AC */
  3187. WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  3188. /* LTR enable */
  3189. WMI_10X_PDEV_PARAM_LTR_ENABLE,
  3190. /* LTR latency for BE, in us */
  3191. WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
  3192. /* LTR latency for BK, in us */
  3193. WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
  3194. /* LTR latency for VI, in us */
  3195. WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
  3196. /* LTR latency for VO, in us */
  3197. WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
  3198. /* LTR AC latency timeout, in ms */
  3199. WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  3200. /* LTR platform latency override, in us */
  3201. WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  3202. /* LTR-RX override, in us */
  3203. WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
  3204. /* Tx activity timeout for LTR, in us */
  3205. WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  3206. /* L1SS state machine enable */
  3207. WMI_10X_PDEV_PARAM_L1SS_ENABLE,
  3208. /* Deep sleep state machine enable */
  3209. WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
  3210. /* pdev level stats update period in ms */
  3211. WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  3212. /* vdev level stats update period in ms */
  3213. WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  3214. /* peer level stats update period in ms */
  3215. WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  3216. /* beacon filter status update period */
  3217. WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  3218. /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
  3219. WMI_10X_PDEV_PARAM_PMF_QOS,
  3220. /* Access category on which ARP and DHCP frames are sent */
  3221. WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
  3222. /* DCS configuration */
  3223. WMI_10X_PDEV_PARAM_DCS,
  3224. /* Enable/Disable ANI on target */
  3225. WMI_10X_PDEV_PARAM_ANI_ENABLE,
  3226. /* configure the ANI polling period */
  3227. WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
  3228. /* configure the ANI listening period */
  3229. WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
  3230. /* configure OFDM immunity level */
  3231. WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
  3232. /* configure CCK immunity level */
  3233. WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
  3234. /* Enable/Disable CDD for 1x1 STAs in rate control module */
  3235. WMI_10X_PDEV_PARAM_DYNTXCHAIN,
  3236. /* Enable/Disable Fast channel reset*/
  3237. WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
  3238. /* Set Bursting DUR */
  3239. WMI_10X_PDEV_PARAM_BURST_DUR,
  3240. /* Set Bursting Enable*/
  3241. WMI_10X_PDEV_PARAM_BURST_ENABLE,
  3242. /* following are available as of firmware 10.2 */
  3243. WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
  3244. WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE,
  3245. WMI_10X_PDEV_PARAM_IGMPMLD_TID,
  3246. WMI_10X_PDEV_PARAM_ANTENNA_GAIN,
  3247. WMI_10X_PDEV_PARAM_RX_DECAP_MODE,
  3248. WMI_10X_PDEV_PARAM_RX_FILTER,
  3249. WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID,
  3250. WMI_10X_PDEV_PARAM_PROXY_STA_MODE,
  3251. WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE,
  3252. WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
  3253. WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
  3254. WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE,
  3255. WMI_10X_PDEV_PARAM_RTS_FIXED_RATE,
  3256. WMI_10X_PDEV_PARAM_CAL_PERIOD
  3257. };
  3258. enum wmi_10_4_pdev_param {
  3259. WMI_10_4_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
  3260. WMI_10_4_PDEV_PARAM_RX_CHAIN_MASK,
  3261. WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT2G,
  3262. WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT5G,
  3263. WMI_10_4_PDEV_PARAM_TXPOWER_SCALE,
  3264. WMI_10_4_PDEV_PARAM_BEACON_GEN_MODE,
  3265. WMI_10_4_PDEV_PARAM_BEACON_TX_MODE,
  3266. WMI_10_4_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
  3267. WMI_10_4_PDEV_PARAM_PROTECTION_MODE,
  3268. WMI_10_4_PDEV_PARAM_DYNAMIC_BW,
  3269. WMI_10_4_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
  3270. WMI_10_4_PDEV_PARAM_AGG_SW_RETRY_TH,
  3271. WMI_10_4_PDEV_PARAM_STA_KICKOUT_TH,
  3272. WMI_10_4_PDEV_PARAM_AC_AGGRSIZE_SCALING,
  3273. WMI_10_4_PDEV_PARAM_LTR_ENABLE,
  3274. WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BE,
  3275. WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BK,
  3276. WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VI,
  3277. WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VO,
  3278. WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
  3279. WMI_10_4_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
  3280. WMI_10_4_PDEV_PARAM_LTR_RX_OVERRIDE,
  3281. WMI_10_4_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
  3282. WMI_10_4_PDEV_PARAM_L1SS_ENABLE,
  3283. WMI_10_4_PDEV_PARAM_DSLEEP_ENABLE,
  3284. WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
  3285. WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
  3286. WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
  3287. WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
  3288. WMI_10_4_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
  3289. WMI_10_4_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
  3290. WMI_10_4_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
  3291. WMI_10_4_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
  3292. WMI_10_4_PDEV_PARAM_PMF_QOS,
  3293. WMI_10_4_PDEV_PARAM_ARP_AC_OVERRIDE,
  3294. WMI_10_4_PDEV_PARAM_DCS,
  3295. WMI_10_4_PDEV_PARAM_ANI_ENABLE,
  3296. WMI_10_4_PDEV_PARAM_ANI_POLL_PERIOD,
  3297. WMI_10_4_PDEV_PARAM_ANI_LISTEN_PERIOD,
  3298. WMI_10_4_PDEV_PARAM_ANI_OFDM_LEVEL,
  3299. WMI_10_4_PDEV_PARAM_ANI_CCK_LEVEL,
  3300. WMI_10_4_PDEV_PARAM_DYNTXCHAIN,
  3301. WMI_10_4_PDEV_PARAM_PROXY_STA,
  3302. WMI_10_4_PDEV_PARAM_IDLE_PS_CONFIG,
  3303. WMI_10_4_PDEV_PARAM_POWER_GATING_SLEEP,
  3304. WMI_10_4_PDEV_PARAM_AGGR_BURST,
  3305. WMI_10_4_PDEV_PARAM_RX_DECAP_MODE,
  3306. WMI_10_4_PDEV_PARAM_FAST_CHANNEL_RESET,
  3307. WMI_10_4_PDEV_PARAM_BURST_DUR,
  3308. WMI_10_4_PDEV_PARAM_BURST_ENABLE,
  3309. WMI_10_4_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
  3310. WMI_10_4_PDEV_PARAM_IGMPMLD_OVERRIDE,
  3311. WMI_10_4_PDEV_PARAM_IGMPMLD_TID,
  3312. WMI_10_4_PDEV_PARAM_ANTENNA_GAIN,
  3313. WMI_10_4_PDEV_PARAM_RX_FILTER,
  3314. WMI_10_4_PDEV_SET_MCAST_TO_UCAST_TID,
  3315. WMI_10_4_PDEV_PARAM_PROXY_STA_MODE,
  3316. WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_MODE,
  3317. WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
  3318. WMI_10_4_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
  3319. WMI_10_4_PDEV_PEER_STA_PS_STATECHG_ENABLE,
  3320. WMI_10_4_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
  3321. WMI_10_4_PDEV_PARAM_BLOCK_INTERBSS,
  3322. WMI_10_4_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
  3323. WMI_10_4_PDEV_PARAM_SET_MSDU_TTL_CMDID,
  3324. WMI_10_4_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
  3325. WMI_10_4_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
  3326. WMI_10_4_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
  3327. WMI_10_4_PDEV_PARAM_SET_BURST_MODE_CMDID,
  3328. WMI_10_4_PDEV_PARAM_EN_STATS,
  3329. WMI_10_4_PDEV_PARAM_MU_GROUP_POLICY,
  3330. WMI_10_4_PDEV_PARAM_NOISE_DETECTION,
  3331. WMI_10_4_PDEV_PARAM_NOISE_THRESHOLD,
  3332. WMI_10_4_PDEV_PARAM_DPD_ENABLE,
  3333. WMI_10_4_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
  3334. WMI_10_4_PDEV_PARAM_ATF_STRICT_SCH,
  3335. WMI_10_4_PDEV_PARAM_ATF_SCHED_DURATION,
  3336. WMI_10_4_PDEV_PARAM_ANT_PLZN,
  3337. WMI_10_4_PDEV_PARAM_MGMT_RETRY_LIMIT,
  3338. WMI_10_4_PDEV_PARAM_SENSITIVITY_LEVEL,
  3339. WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_2G,
  3340. WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_5G,
  3341. WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
  3342. WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
  3343. WMI_10_4_PDEV_PARAM_CCA_THRESHOLD,
  3344. WMI_10_4_PDEV_PARAM_RTS_FIXED_RATE,
  3345. WMI_10_4_PDEV_PARAM_CAL_PERIOD,
  3346. WMI_10_4_PDEV_PARAM_PDEV_RESET,
  3347. WMI_10_4_PDEV_PARAM_WAPI_MBSSID_OFFSET,
  3348. WMI_10_4_PDEV_PARAM_ARP_SRCADDR,
  3349. WMI_10_4_PDEV_PARAM_ARP_DSTADDR,
  3350. WMI_10_4_PDEV_PARAM_TXPOWER_DECR_DB,
  3351. WMI_10_4_PDEV_PARAM_RX_BATCHMODE,
  3352. WMI_10_4_PDEV_PARAM_PACKET_AGGR_DELAY,
  3353. WMI_10_4_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
  3354. WMI_10_4_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
  3355. WMI_10_4_PDEV_PARAM_CUST_TXPOWER_SCALE,
  3356. };
  3357. struct wmi_pdev_set_param_cmd {
  3358. __le32 param_id;
  3359. __le32 param_value;
  3360. } __packed;
  3361. /* valid period is 1 ~ 60000ms, unit in millisecond */
  3362. #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
  3363. struct wmi_pdev_get_tpc_config_cmd {
  3364. /* parameter */
  3365. __le32 param;
  3366. } __packed;
  3367. #define WMI_TPC_CONFIG_PARAM 1
  3368. #define WMI_TPC_RATE_MAX 160
  3369. #define WMI_TPC_TX_N_CHAIN 4
  3370. #define WMI_TPC_PREAM_TABLE_MAX 10
  3371. #define WMI_TPC_FLAG 3
  3372. #define WMI_TPC_BUF_SIZE 10
  3373. enum wmi_tpc_table_type {
  3374. WMI_TPC_TABLE_TYPE_CDD = 0,
  3375. WMI_TPC_TABLE_TYPE_STBC = 1,
  3376. WMI_TPC_TABLE_TYPE_TXBF = 2,
  3377. };
  3378. enum wmi_tpc_config_event_flag {
  3379. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  3380. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  3381. WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  3382. };
  3383. struct wmi_pdev_tpc_config_event {
  3384. __le32 reg_domain;
  3385. __le32 chan_freq;
  3386. __le32 phy_mode;
  3387. __le32 twice_antenna_reduction;
  3388. __le32 twice_max_rd_power;
  3389. a_sle32 twice_antenna_gain;
  3390. __le32 power_limit;
  3391. __le32 rate_max;
  3392. __le32 num_tx_chain;
  3393. __le32 ctl;
  3394. __le32 flags;
  3395. s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
  3396. s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  3397. s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  3398. s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
  3399. u8 rates_array[WMI_TPC_RATE_MAX];
  3400. } __packed;
  3401. /* Transmit power scale factor. */
  3402. enum wmi_tp_scale {
  3403. WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
  3404. WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  3405. WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  3406. WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  3407. WMI_TP_SCALE_MIN = 4, /* min, but still on */
  3408. WMI_TP_SCALE_SIZE = 5, /* max num of enum */
  3409. };
  3410. struct wmi_pdev_chanlist_update_event {
  3411. /* number of channels */
  3412. __le32 num_chan;
  3413. /* array of channels */
  3414. struct wmi_channel channel_list[1];
  3415. } __packed;
  3416. #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
  3417. struct wmi_debug_mesg_event {
  3418. /* message buffer, NULL terminated */
  3419. char bufp[WMI_MAX_DEBUG_MESG];
  3420. } __packed;
  3421. enum {
  3422. /* P2P device */
  3423. VDEV_SUBTYPE_P2PDEV = 0,
  3424. /* P2P client */
  3425. VDEV_SUBTYPE_P2PCLI,
  3426. /* P2P GO */
  3427. VDEV_SUBTYPE_P2PGO,
  3428. /* BT3.0 HS */
  3429. VDEV_SUBTYPE_BT,
  3430. };
  3431. struct wmi_pdev_set_channel_cmd {
  3432. /* idnore power , only use flags , mode and freq */
  3433. struct wmi_channel chan;
  3434. } __packed;
  3435. struct wmi_pdev_pktlog_enable_cmd {
  3436. __le32 ev_bitmap;
  3437. } __packed;
  3438. /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
  3439. #define WMI_DSCP_MAP_MAX (64)
  3440. struct wmi_pdev_set_dscp_tid_map_cmd {
  3441. /* map indicating DSCP to TID conversion */
  3442. __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
  3443. } __packed;
  3444. enum mcast_bcast_rate_id {
  3445. WMI_SET_MCAST_RATE,
  3446. WMI_SET_BCAST_RATE
  3447. };
  3448. struct mcast_bcast_rate {
  3449. enum mcast_bcast_rate_id rate_id;
  3450. __le32 rate;
  3451. } __packed;
  3452. struct wmi_wmm_params {
  3453. __le32 cwmin;
  3454. __le32 cwmax;
  3455. __le32 aifs;
  3456. __le32 txop;
  3457. __le32 acm;
  3458. __le32 no_ack;
  3459. } __packed;
  3460. struct wmi_pdev_set_wmm_params {
  3461. struct wmi_wmm_params ac_be;
  3462. struct wmi_wmm_params ac_bk;
  3463. struct wmi_wmm_params ac_vi;
  3464. struct wmi_wmm_params ac_vo;
  3465. } __packed;
  3466. struct wmi_wmm_params_arg {
  3467. u32 cwmin;
  3468. u32 cwmax;
  3469. u32 aifs;
  3470. u32 txop;
  3471. u32 acm;
  3472. u32 no_ack;
  3473. };
  3474. struct wmi_wmm_params_all_arg {
  3475. struct wmi_wmm_params_arg ac_be;
  3476. struct wmi_wmm_params_arg ac_bk;
  3477. struct wmi_wmm_params_arg ac_vi;
  3478. struct wmi_wmm_params_arg ac_vo;
  3479. };
  3480. struct wmi_pdev_stats_tx {
  3481. /* Num HTT cookies queued to dispatch list */
  3482. __le32 comp_queued;
  3483. /* Num HTT cookies dispatched */
  3484. __le32 comp_delivered;
  3485. /* Num MSDU queued to WAL */
  3486. __le32 msdu_enqued;
  3487. /* Num MPDU queue to WAL */
  3488. __le32 mpdu_enqued;
  3489. /* Num MSDUs dropped by WMM limit */
  3490. __le32 wmm_drop;
  3491. /* Num Local frames queued */
  3492. __le32 local_enqued;
  3493. /* Num Local frames done */
  3494. __le32 local_freed;
  3495. /* Num queued to HW */
  3496. __le32 hw_queued;
  3497. /* Num PPDU reaped from HW */
  3498. __le32 hw_reaped;
  3499. /* Num underruns */
  3500. __le32 underrun;
  3501. /* Num PPDUs cleaned up in TX abort */
  3502. __le32 tx_abort;
  3503. /* Num MPDUs requed by SW */
  3504. __le32 mpdus_requed;
  3505. /* excessive retries */
  3506. __le32 tx_ko;
  3507. /* data hw rate code */
  3508. __le32 data_rc;
  3509. /* Scheduler self triggers */
  3510. __le32 self_triggers;
  3511. /* frames dropped due to excessive sw retries */
  3512. __le32 sw_retry_failure;
  3513. /* illegal rate phy errors */
  3514. __le32 illgl_rate_phy_err;
  3515. /* wal pdev continous xretry */
  3516. __le32 pdev_cont_xretry;
  3517. /* wal pdev continous xretry */
  3518. __le32 pdev_tx_timeout;
  3519. /* wal pdev resets */
  3520. __le32 pdev_resets;
  3521. /* frames dropped due to non-availability of stateless TIDs */
  3522. __le32 stateless_tid_alloc_failure;
  3523. __le32 phy_underrun;
  3524. /* MPDU is more than txop limit */
  3525. __le32 txop_ovf;
  3526. } __packed;
  3527. struct wmi_10_4_pdev_stats_tx {
  3528. /* Num HTT cookies queued to dispatch list */
  3529. __le32 comp_queued;
  3530. /* Num HTT cookies dispatched */
  3531. __le32 comp_delivered;
  3532. /* Num MSDU queued to WAL */
  3533. __le32 msdu_enqued;
  3534. /* Num MPDU queue to WAL */
  3535. __le32 mpdu_enqued;
  3536. /* Num MSDUs dropped by WMM limit */
  3537. __le32 wmm_drop;
  3538. /* Num Local frames queued */
  3539. __le32 local_enqued;
  3540. /* Num Local frames done */
  3541. __le32 local_freed;
  3542. /* Num queued to HW */
  3543. __le32 hw_queued;
  3544. /* Num PPDU reaped from HW */
  3545. __le32 hw_reaped;
  3546. /* Num underruns */
  3547. __le32 underrun;
  3548. /* HW Paused. */
  3549. __le32 hw_paused;
  3550. /* Num PPDUs cleaned up in TX abort */
  3551. __le32 tx_abort;
  3552. /* Num MPDUs requed by SW */
  3553. __le32 mpdus_requed;
  3554. /* excessive retries */
  3555. __le32 tx_ko;
  3556. /* data hw rate code */
  3557. __le32 data_rc;
  3558. /* Scheduler self triggers */
  3559. __le32 self_triggers;
  3560. /* frames dropped due to excessive sw retries */
  3561. __le32 sw_retry_failure;
  3562. /* illegal rate phy errors */
  3563. __le32 illgl_rate_phy_err;
  3564. /* wal pdev continuous xretry */
  3565. __le32 pdev_cont_xretry;
  3566. /* wal pdev tx timeouts */
  3567. __le32 pdev_tx_timeout;
  3568. /* wal pdev resets */
  3569. __le32 pdev_resets;
  3570. /* frames dropped due to non-availability of stateless TIDs */
  3571. __le32 stateless_tid_alloc_failure;
  3572. __le32 phy_underrun;
  3573. /* MPDU is more than txop limit */
  3574. __le32 txop_ovf;
  3575. /* Number of Sequences posted */
  3576. __le32 seq_posted;
  3577. /* Number of Sequences failed queueing */
  3578. __le32 seq_failed_queueing;
  3579. /* Number of Sequences completed */
  3580. __le32 seq_completed;
  3581. /* Number of Sequences restarted */
  3582. __le32 seq_restarted;
  3583. /* Number of MU Sequences posted */
  3584. __le32 mu_seq_posted;
  3585. /* Num MPDUs flushed by SW, HWPAUSED,SW TXABORT(Reset,channel change) */
  3586. __le32 mpdus_sw_flush;
  3587. /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
  3588. __le32 mpdus_hw_filter;
  3589. /* Num MPDUs truncated by PDG
  3590. * (TXOP, TBTT, PPDU_duration based on rate, dyn_bw)
  3591. */
  3592. __le32 mpdus_truncated;
  3593. /* Num MPDUs that was tried but didn't receive ACK or BA */
  3594. __le32 mpdus_ack_failed;
  3595. /* Num MPDUs that was dropped due to expiry. */
  3596. __le32 mpdus_expired;
  3597. } __packed;
  3598. struct wmi_pdev_stats_rx {
  3599. /* Cnts any change in ring routing mid-ppdu */
  3600. __le32 mid_ppdu_route_change;
  3601. /* Total number of statuses processed */
  3602. __le32 status_rcvd;
  3603. /* Extra frags on rings 0-3 */
  3604. __le32 r0_frags;
  3605. __le32 r1_frags;
  3606. __le32 r2_frags;
  3607. __le32 r3_frags;
  3608. /* MSDUs / MPDUs delivered to HTT */
  3609. __le32 htt_msdus;
  3610. __le32 htt_mpdus;
  3611. /* MSDUs / MPDUs delivered to local stack */
  3612. __le32 loc_msdus;
  3613. __le32 loc_mpdus;
  3614. /* AMSDUs that have more MSDUs than the status ring size */
  3615. __le32 oversize_amsdu;
  3616. /* Number of PHY errors */
  3617. __le32 phy_errs;
  3618. /* Number of PHY errors drops */
  3619. __le32 phy_err_drop;
  3620. /* Number of mpdu errors - FCS, MIC, ENC etc. */
  3621. __le32 mpdu_errs;
  3622. } __packed;
  3623. struct wmi_pdev_stats_peer {
  3624. /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
  3625. __le32 dummy;
  3626. } __packed;
  3627. enum wmi_stats_id {
  3628. WMI_STAT_PEER = BIT(0),
  3629. WMI_STAT_AP = BIT(1),
  3630. WMI_STAT_PDEV = BIT(2),
  3631. WMI_STAT_VDEV = BIT(3),
  3632. WMI_STAT_BCNFLT = BIT(4),
  3633. WMI_STAT_VDEV_RATE = BIT(5),
  3634. };
  3635. struct wlan_inst_rssi_args {
  3636. __le16 cfg_retry_count;
  3637. __le16 retry_count;
  3638. };
  3639. struct wmi_request_stats_cmd {
  3640. __le32 stats_id;
  3641. __le32 vdev_id;
  3642. /* peer MAC address */
  3643. struct wmi_mac_addr peer_macaddr;
  3644. /* Instantaneous RSSI arguments */
  3645. struct wlan_inst_rssi_args inst_rssi_args;
  3646. } __packed;
  3647. /* Suspend option */
  3648. enum {
  3649. /* suspend */
  3650. WMI_PDEV_SUSPEND,
  3651. /* suspend and disable all interrupts */
  3652. WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
  3653. };
  3654. struct wmi_pdev_suspend_cmd {
  3655. /* suspend option sent to target */
  3656. __le32 suspend_opt;
  3657. } __packed;
  3658. struct wmi_stats_event {
  3659. __le32 stats_id; /* WMI_STAT_ */
  3660. /*
  3661. * number of pdev stats event structures
  3662. * (wmi_pdev_stats) 0 or 1
  3663. */
  3664. __le32 num_pdev_stats;
  3665. /*
  3666. * number of vdev stats event structures
  3667. * (wmi_vdev_stats) 0 or max vdevs
  3668. */
  3669. __le32 num_vdev_stats;
  3670. /*
  3671. * number of peer stats event structures
  3672. * (wmi_peer_stats) 0 or max peers
  3673. */
  3674. __le32 num_peer_stats;
  3675. __le32 num_bcnflt_stats;
  3676. /*
  3677. * followed by
  3678. * num_pdev_stats * size of(struct wmi_pdev_stats)
  3679. * num_vdev_stats * size of(struct wmi_vdev_stats)
  3680. * num_peer_stats * size of(struct wmi_peer_stats)
  3681. *
  3682. * By having a zero sized array, the pointer to data area
  3683. * becomes available without increasing the struct size
  3684. */
  3685. u8 data[0];
  3686. } __packed;
  3687. struct wmi_10_2_stats_event {
  3688. __le32 stats_id; /* %WMI_REQUEST_ */
  3689. __le32 num_pdev_stats;
  3690. __le32 num_pdev_ext_stats;
  3691. __le32 num_vdev_stats;
  3692. __le32 num_peer_stats;
  3693. __le32 num_bcnflt_stats;
  3694. u8 data[0];
  3695. } __packed;
  3696. /*
  3697. * PDEV statistics
  3698. * TODO: add all PDEV stats here
  3699. */
  3700. struct wmi_pdev_stats_base {
  3701. __le32 chan_nf;
  3702. __le32 tx_frame_count;
  3703. __le32 rx_frame_count;
  3704. __le32 rx_clear_count;
  3705. __le32 cycle_count;
  3706. __le32 phy_err_count;
  3707. __le32 chan_tx_pwr;
  3708. } __packed;
  3709. struct wmi_pdev_stats {
  3710. struct wmi_pdev_stats_base base;
  3711. struct wmi_pdev_stats_tx tx;
  3712. struct wmi_pdev_stats_rx rx;
  3713. struct wmi_pdev_stats_peer peer;
  3714. } __packed;
  3715. struct wmi_pdev_stats_extra {
  3716. __le32 ack_rx_bad;
  3717. __le32 rts_bad;
  3718. __le32 rts_good;
  3719. __le32 fcs_bad;
  3720. __le32 no_beacons;
  3721. __le32 mib_int_count;
  3722. } __packed;
  3723. struct wmi_10x_pdev_stats {
  3724. struct wmi_pdev_stats_base base;
  3725. struct wmi_pdev_stats_tx tx;
  3726. struct wmi_pdev_stats_rx rx;
  3727. struct wmi_pdev_stats_peer peer;
  3728. struct wmi_pdev_stats_extra extra;
  3729. } __packed;
  3730. struct wmi_pdev_stats_mem {
  3731. __le32 dram_free;
  3732. __le32 iram_free;
  3733. } __packed;
  3734. struct wmi_10_2_pdev_stats {
  3735. struct wmi_pdev_stats_base base;
  3736. struct wmi_pdev_stats_tx tx;
  3737. __le32 mc_drop;
  3738. struct wmi_pdev_stats_rx rx;
  3739. __le32 pdev_rx_timeout;
  3740. struct wmi_pdev_stats_mem mem;
  3741. struct wmi_pdev_stats_peer peer;
  3742. struct wmi_pdev_stats_extra extra;
  3743. } __packed;
  3744. struct wmi_10_4_pdev_stats {
  3745. struct wmi_pdev_stats_base base;
  3746. struct wmi_10_4_pdev_stats_tx tx;
  3747. struct wmi_pdev_stats_rx rx;
  3748. __le32 rx_ovfl_errs;
  3749. struct wmi_pdev_stats_mem mem;
  3750. __le32 sram_free_size;
  3751. struct wmi_pdev_stats_extra extra;
  3752. } __packed;
  3753. /*
  3754. * VDEV statistics
  3755. * TODO: add all VDEV stats here
  3756. */
  3757. struct wmi_vdev_stats {
  3758. __le32 vdev_id;
  3759. } __packed;
  3760. /*
  3761. * peer statistics.
  3762. * TODO: add more stats
  3763. */
  3764. struct wmi_peer_stats {
  3765. struct wmi_mac_addr peer_macaddr;
  3766. __le32 peer_rssi;
  3767. __le32 peer_tx_rate;
  3768. } __packed;
  3769. struct wmi_10x_peer_stats {
  3770. struct wmi_peer_stats old;
  3771. __le32 peer_rx_rate;
  3772. } __packed;
  3773. struct wmi_10_2_peer_stats {
  3774. struct wmi_peer_stats old;
  3775. __le32 peer_rx_rate;
  3776. __le32 current_per;
  3777. __le32 retries;
  3778. __le32 tx_rate_count;
  3779. __le32 max_4ms_frame_len;
  3780. __le32 total_sub_frames;
  3781. __le32 tx_bytes;
  3782. __le32 num_pkt_loss_overflow[4];
  3783. __le32 num_pkt_loss_excess_retry[4];
  3784. } __packed;
  3785. struct wmi_10_2_4_peer_stats {
  3786. struct wmi_10_2_peer_stats common;
  3787. __le32 peer_rssi_changed;
  3788. } __packed;
  3789. struct wmi_10_2_4_ext_peer_stats {
  3790. struct wmi_10_2_peer_stats common;
  3791. __le32 peer_rssi_changed;
  3792. __le32 rx_duration;
  3793. } __packed;
  3794. struct wmi_10_4_peer_stats {
  3795. struct wmi_mac_addr peer_macaddr;
  3796. __le32 peer_rssi;
  3797. __le32 peer_rssi_seq_num;
  3798. __le32 peer_tx_rate;
  3799. __le32 peer_rx_rate;
  3800. __le32 current_per;
  3801. __le32 retries;
  3802. __le32 tx_rate_count;
  3803. __le32 max_4ms_frame_len;
  3804. __le32 total_sub_frames;
  3805. __le32 tx_bytes;
  3806. __le32 num_pkt_loss_overflow[4];
  3807. __le32 num_pkt_loss_excess_retry[4];
  3808. __le32 peer_rssi_changed;
  3809. } __packed;
  3810. struct wmi_10_2_pdev_ext_stats {
  3811. __le32 rx_rssi_comb;
  3812. __le32 rx_rssi[4];
  3813. __le32 rx_mcs[10];
  3814. __le32 tx_mcs[10];
  3815. __le32 ack_rssi;
  3816. } __packed;
  3817. struct wmi_vdev_create_cmd {
  3818. __le32 vdev_id;
  3819. __le32 vdev_type;
  3820. __le32 vdev_subtype;
  3821. struct wmi_mac_addr vdev_macaddr;
  3822. } __packed;
  3823. enum wmi_vdev_type {
  3824. WMI_VDEV_TYPE_AP = 1,
  3825. WMI_VDEV_TYPE_STA = 2,
  3826. WMI_VDEV_TYPE_IBSS = 3,
  3827. WMI_VDEV_TYPE_MONITOR = 4,
  3828. };
  3829. enum wmi_vdev_subtype {
  3830. WMI_VDEV_SUBTYPE_NONE,
  3831. WMI_VDEV_SUBTYPE_P2P_DEVICE,
  3832. WMI_VDEV_SUBTYPE_P2P_CLIENT,
  3833. WMI_VDEV_SUBTYPE_P2P_GO,
  3834. WMI_VDEV_SUBTYPE_PROXY_STA,
  3835. WMI_VDEV_SUBTYPE_MESH_11S,
  3836. WMI_VDEV_SUBTYPE_MESH_NON_11S,
  3837. };
  3838. enum wmi_vdev_subtype_legacy {
  3839. WMI_VDEV_SUBTYPE_LEGACY_NONE = 0,
  3840. WMI_VDEV_SUBTYPE_LEGACY_P2P_DEV = 1,
  3841. WMI_VDEV_SUBTYPE_LEGACY_P2P_CLI = 2,
  3842. WMI_VDEV_SUBTYPE_LEGACY_P2P_GO = 3,
  3843. WMI_VDEV_SUBTYPE_LEGACY_PROXY_STA = 4,
  3844. };
  3845. enum wmi_vdev_subtype_10_2_4 {
  3846. WMI_VDEV_SUBTYPE_10_2_4_NONE = 0,
  3847. WMI_VDEV_SUBTYPE_10_2_4_P2P_DEV = 1,
  3848. WMI_VDEV_SUBTYPE_10_2_4_P2P_CLI = 2,
  3849. WMI_VDEV_SUBTYPE_10_2_4_P2P_GO = 3,
  3850. WMI_VDEV_SUBTYPE_10_2_4_PROXY_STA = 4,
  3851. WMI_VDEV_SUBTYPE_10_2_4_MESH_11S = 5,
  3852. };
  3853. enum wmi_vdev_subtype_10_4 {
  3854. WMI_VDEV_SUBTYPE_10_4_NONE = 0,
  3855. WMI_VDEV_SUBTYPE_10_4_P2P_DEV = 1,
  3856. WMI_VDEV_SUBTYPE_10_4_P2P_CLI = 2,
  3857. WMI_VDEV_SUBTYPE_10_4_P2P_GO = 3,
  3858. WMI_VDEV_SUBTYPE_10_4_PROXY_STA = 4,
  3859. WMI_VDEV_SUBTYPE_10_4_MESH_NON_11S = 5,
  3860. WMI_VDEV_SUBTYPE_10_4_MESH_11S = 6,
  3861. };
  3862. /* values for vdev_subtype */
  3863. /* values for vdev_start_request flags */
  3864. /*
  3865. * Indicates that AP VDEV uses hidden ssid. only valid for
  3866. * AP/GO */
  3867. #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
  3868. /*
  3869. * Indicates if robust management frame/management frame
  3870. * protection is enabled. For GO/AP vdevs, it indicates that
  3871. * it may support station/client associations with RMF enabled.
  3872. * For STA/client vdevs, it indicates that sta will
  3873. * associate with AP with RMF enabled. */
  3874. #define WMI_VDEV_START_PMF_ENABLED (1<<1)
  3875. struct wmi_p2p_noa_descriptor {
  3876. __le32 type_count; /* 255: continuous schedule, 0: reserved */
  3877. __le32 duration; /* Absent period duration in micro seconds */
  3878. __le32 interval; /* Absent period interval in micro seconds */
  3879. __le32 start_time; /* 32 bit tsf time when in starts */
  3880. } __packed;
  3881. struct wmi_vdev_start_request_cmd {
  3882. /* WMI channel */
  3883. struct wmi_channel chan;
  3884. /* unique id identifying the VDEV, generated by the caller */
  3885. __le32 vdev_id;
  3886. /* requestor id identifying the caller module */
  3887. __le32 requestor_id;
  3888. /* beacon interval from received beacon */
  3889. __le32 beacon_interval;
  3890. /* DTIM Period from the received beacon */
  3891. __le32 dtim_period;
  3892. /* Flags */
  3893. __le32 flags;
  3894. /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
  3895. struct wmi_ssid ssid;
  3896. /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
  3897. __le32 bcn_tx_rate;
  3898. /* beacon/probe reponse xmit power. Applicable for SoftAP. */
  3899. __le32 bcn_tx_power;
  3900. /* number of p2p NOA descriptor(s) from scan entry */
  3901. __le32 num_noa_descriptors;
  3902. /*
  3903. * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
  3904. * During CAC, Our HW shouldn't ack ditected frames
  3905. */
  3906. __le32 disable_hw_ack;
  3907. /* actual p2p NOA descriptor from scan entry */
  3908. struct wmi_p2p_noa_descriptor noa_descriptors[2];
  3909. } __packed;
  3910. struct wmi_vdev_restart_request_cmd {
  3911. struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
  3912. } __packed;
  3913. struct wmi_vdev_start_request_arg {
  3914. u32 vdev_id;
  3915. struct wmi_channel_arg channel;
  3916. u32 bcn_intval;
  3917. u32 dtim_period;
  3918. u8 *ssid;
  3919. u32 ssid_len;
  3920. u32 bcn_tx_rate;
  3921. u32 bcn_tx_power;
  3922. bool disable_hw_ack;
  3923. bool hidden_ssid;
  3924. bool pmf_enabled;
  3925. };
  3926. struct wmi_vdev_delete_cmd {
  3927. /* unique id identifying the VDEV, generated by the caller */
  3928. __le32 vdev_id;
  3929. } __packed;
  3930. struct wmi_vdev_up_cmd {
  3931. __le32 vdev_id;
  3932. __le32 vdev_assoc_id;
  3933. struct wmi_mac_addr vdev_bssid;
  3934. } __packed;
  3935. struct wmi_vdev_stop_cmd {
  3936. __le32 vdev_id;
  3937. } __packed;
  3938. struct wmi_vdev_down_cmd {
  3939. __le32 vdev_id;
  3940. } __packed;
  3941. struct wmi_vdev_standby_response_cmd {
  3942. /* unique id identifying the VDEV, generated by the caller */
  3943. __le32 vdev_id;
  3944. } __packed;
  3945. struct wmi_vdev_resume_response_cmd {
  3946. /* unique id identifying the VDEV, generated by the caller */
  3947. __le32 vdev_id;
  3948. } __packed;
  3949. struct wmi_vdev_set_param_cmd {
  3950. __le32 vdev_id;
  3951. __le32 param_id;
  3952. __le32 param_value;
  3953. } __packed;
  3954. #define WMI_MAX_KEY_INDEX 3
  3955. #define WMI_MAX_KEY_LEN 32
  3956. #define WMI_KEY_PAIRWISE 0x00
  3957. #define WMI_KEY_GROUP 0x01
  3958. #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
  3959. struct wmi_key_seq_counter {
  3960. __le32 key_seq_counter_l;
  3961. __le32 key_seq_counter_h;
  3962. } __packed;
  3963. #define WMI_CIPHER_NONE 0x0 /* clear key */
  3964. #define WMI_CIPHER_WEP 0x1
  3965. #define WMI_CIPHER_TKIP 0x2
  3966. #define WMI_CIPHER_AES_OCB 0x3
  3967. #define WMI_CIPHER_AES_CCM 0x4
  3968. #define WMI_CIPHER_WAPI 0x5
  3969. #define WMI_CIPHER_CKIP 0x6
  3970. #define WMI_CIPHER_AES_CMAC 0x7
  3971. struct wmi_vdev_install_key_cmd {
  3972. __le32 vdev_id;
  3973. struct wmi_mac_addr peer_macaddr;
  3974. __le32 key_idx;
  3975. __le32 key_flags;
  3976. __le32 key_cipher; /* %WMI_CIPHER_ */
  3977. struct wmi_key_seq_counter key_rsc_counter;
  3978. struct wmi_key_seq_counter key_global_rsc_counter;
  3979. struct wmi_key_seq_counter key_tsc_counter;
  3980. u8 wpi_key_rsc_counter[16];
  3981. u8 wpi_key_tsc_counter[16];
  3982. __le32 key_len;
  3983. __le32 key_txmic_len;
  3984. __le32 key_rxmic_len;
  3985. /* contains key followed by tx mic followed by rx mic */
  3986. u8 key_data[0];
  3987. } __packed;
  3988. struct wmi_vdev_install_key_arg {
  3989. u32 vdev_id;
  3990. const u8 *macaddr;
  3991. u32 key_idx;
  3992. u32 key_flags;
  3993. u32 key_cipher;
  3994. u32 key_len;
  3995. u32 key_txmic_len;
  3996. u32 key_rxmic_len;
  3997. const void *key_data;
  3998. };
  3999. /*
  4000. * vdev fixed rate format:
  4001. * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
  4002. * - nss - b5:b4 - ss number (0 mean 1ss)
  4003. * - rate_mcs - b3:b0 - as below
  4004. * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
  4005. * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
  4006. * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
  4007. * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
  4008. * HT/VHT: MCS index
  4009. */
  4010. /* Preamble types to be used with VDEV fixed rate configuration */
  4011. enum wmi_rate_preamble {
  4012. WMI_RATE_PREAMBLE_OFDM,
  4013. WMI_RATE_PREAMBLE_CCK,
  4014. WMI_RATE_PREAMBLE_HT,
  4015. WMI_RATE_PREAMBLE_VHT,
  4016. };
  4017. #define ATH10K_HW_NSS(rate) (1 + (((rate) >> 4) & 0x3))
  4018. #define ATH10K_HW_PREAMBLE(rate) (((rate) >> 6) & 0x3)
  4019. #define ATH10K_HW_RATECODE(rate, nss, preamble) \
  4020. (((preamble) << 6) | ((nss) << 4) | (rate))
  4021. /* Value to disable fixed rate setting */
  4022. #define WMI_FIXED_RATE_NONE (0xff)
  4023. struct wmi_vdev_param_map {
  4024. u32 rts_threshold;
  4025. u32 fragmentation_threshold;
  4026. u32 beacon_interval;
  4027. u32 listen_interval;
  4028. u32 multicast_rate;
  4029. u32 mgmt_tx_rate;
  4030. u32 slot_time;
  4031. u32 preamble;
  4032. u32 swba_time;
  4033. u32 wmi_vdev_stats_update_period;
  4034. u32 wmi_vdev_pwrsave_ageout_time;
  4035. u32 wmi_vdev_host_swba_interval;
  4036. u32 dtim_period;
  4037. u32 wmi_vdev_oc_scheduler_air_time_limit;
  4038. u32 wds;
  4039. u32 atim_window;
  4040. u32 bmiss_count_max;
  4041. u32 bmiss_first_bcnt;
  4042. u32 bmiss_final_bcnt;
  4043. u32 feature_wmm;
  4044. u32 chwidth;
  4045. u32 chextoffset;
  4046. u32 disable_htprotection;
  4047. u32 sta_quickkickout;
  4048. u32 mgmt_rate;
  4049. u32 protection_mode;
  4050. u32 fixed_rate;
  4051. u32 sgi;
  4052. u32 ldpc;
  4053. u32 tx_stbc;
  4054. u32 rx_stbc;
  4055. u32 intra_bss_fwd;
  4056. u32 def_keyid;
  4057. u32 nss;
  4058. u32 bcast_data_rate;
  4059. u32 mcast_data_rate;
  4060. u32 mcast_indicate;
  4061. u32 dhcp_indicate;
  4062. u32 unknown_dest_indicate;
  4063. u32 ap_keepalive_min_idle_inactive_time_secs;
  4064. u32 ap_keepalive_max_idle_inactive_time_secs;
  4065. u32 ap_keepalive_max_unresponsive_time_secs;
  4066. u32 ap_enable_nawds;
  4067. u32 mcast2ucast_set;
  4068. u32 enable_rtscts;
  4069. u32 txbf;
  4070. u32 packet_powersave;
  4071. u32 drop_unencry;
  4072. u32 tx_encap_type;
  4073. u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
  4074. u32 rc_num_retries;
  4075. u32 cabq_maxdur;
  4076. u32 mfptest_set;
  4077. u32 rts_fixed_rate;
  4078. u32 vht_sgimask;
  4079. u32 vht80_ratemask;
  4080. u32 early_rx_adjust_enable;
  4081. u32 early_rx_tgt_bmiss_num;
  4082. u32 early_rx_bmiss_sample_cycle;
  4083. u32 early_rx_slop_step;
  4084. u32 early_rx_init_slop;
  4085. u32 early_rx_adjust_pause;
  4086. u32 proxy_sta;
  4087. u32 meru_vc;
  4088. u32 rx_decap_type;
  4089. u32 bw_nss_ratemask;
  4090. };
  4091. #define WMI_VDEV_PARAM_UNSUPPORTED 0
  4092. /* the definition of different VDEV parameters */
  4093. enum wmi_vdev_param {
  4094. /* RTS Threshold */
  4095. WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  4096. /* Fragmentation threshold */
  4097. WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  4098. /* beacon interval in TUs */
  4099. WMI_VDEV_PARAM_BEACON_INTERVAL,
  4100. /* Listen interval in TUs */
  4101. WMI_VDEV_PARAM_LISTEN_INTERVAL,
  4102. /* muticast rate in Mbps */
  4103. WMI_VDEV_PARAM_MULTICAST_RATE,
  4104. /* management frame rate in Mbps */
  4105. WMI_VDEV_PARAM_MGMT_TX_RATE,
  4106. /* slot time (long vs short) */
  4107. WMI_VDEV_PARAM_SLOT_TIME,
  4108. /* preamble (long vs short) */
  4109. WMI_VDEV_PARAM_PREAMBLE,
  4110. /* SWBA time (time before tbtt in msec) */
  4111. WMI_VDEV_PARAM_SWBA_TIME,
  4112. /* time period for updating VDEV stats */
  4113. WMI_VDEV_STATS_UPDATE_PERIOD,
  4114. /* age out time in msec for frames queued for station in power save */
  4115. WMI_VDEV_PWRSAVE_AGEOUT_TIME,
  4116. /*
  4117. * Host SWBA interval (time in msec before tbtt for SWBA event
  4118. * generation).
  4119. */
  4120. WMI_VDEV_HOST_SWBA_INTERVAL,
  4121. /* DTIM period (specified in units of num beacon intervals) */
  4122. WMI_VDEV_PARAM_DTIM_PERIOD,
  4123. /*
  4124. * scheduler air time limit for this VDEV. used by off chan
  4125. * scheduler.
  4126. */
  4127. WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  4128. /* enable/dsiable WDS for this VDEV */
  4129. WMI_VDEV_PARAM_WDS,
  4130. /* ATIM Window */
  4131. WMI_VDEV_PARAM_ATIM_WINDOW,
  4132. /* BMISS max */
  4133. WMI_VDEV_PARAM_BMISS_COUNT_MAX,
  4134. /* BMISS first time */
  4135. WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
  4136. /* BMISS final time */
  4137. WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
  4138. /* WMM enables/disabled */
  4139. WMI_VDEV_PARAM_FEATURE_WMM,
  4140. /* Channel width */
  4141. WMI_VDEV_PARAM_CHWIDTH,
  4142. /* Channel Offset */
  4143. WMI_VDEV_PARAM_CHEXTOFFSET,
  4144. /* Disable HT Protection */
  4145. WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
  4146. /* Quick STA Kickout */
  4147. WMI_VDEV_PARAM_STA_QUICKKICKOUT,
  4148. /* Rate to be used with Management frames */
  4149. WMI_VDEV_PARAM_MGMT_RATE,
  4150. /* Protection Mode */
  4151. WMI_VDEV_PARAM_PROTECTION_MODE,
  4152. /* Fixed rate setting */
  4153. WMI_VDEV_PARAM_FIXED_RATE,
  4154. /* Short GI Enable/Disable */
  4155. WMI_VDEV_PARAM_SGI,
  4156. /* Enable LDPC */
  4157. WMI_VDEV_PARAM_LDPC,
  4158. /* Enable Tx STBC */
  4159. WMI_VDEV_PARAM_TX_STBC,
  4160. /* Enable Rx STBC */
  4161. WMI_VDEV_PARAM_RX_STBC,
  4162. /* Intra BSS forwarding */
  4163. WMI_VDEV_PARAM_INTRA_BSS_FWD,
  4164. /* Setting Default xmit key for Vdev */
  4165. WMI_VDEV_PARAM_DEF_KEYID,
  4166. /* NSS width */
  4167. WMI_VDEV_PARAM_NSS,
  4168. /* Set the custom rate for the broadcast data frames */
  4169. WMI_VDEV_PARAM_BCAST_DATA_RATE,
  4170. /* Set the custom rate (rate-code) for multicast data frames */
  4171. WMI_VDEV_PARAM_MCAST_DATA_RATE,
  4172. /* Tx multicast packet indicate Enable/Disable */
  4173. WMI_VDEV_PARAM_MCAST_INDICATE,
  4174. /* Tx DHCP packet indicate Enable/Disable */
  4175. WMI_VDEV_PARAM_DHCP_INDICATE,
  4176. /* Enable host inspection of Tx unicast packet to unknown destination */
  4177. WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  4178. /* The minimum amount of time AP begins to consider STA inactive */
  4179. WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  4180. /*
  4181. * An associated STA is considered inactive when there is no recent
  4182. * TX/RX activity and no downlink frames are buffered for it. Once a
  4183. * STA exceeds the maximum idle inactive time, the AP will send an
  4184. * 802.11 data-null as a keep alive to verify the STA is still
  4185. * associated. If the STA does ACK the data-null, or if the data-null
  4186. * is buffered and the STA does not retrieve it, the STA will be
  4187. * considered unresponsive
  4188. * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
  4189. */
  4190. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  4191. /*
  4192. * An associated STA is considered unresponsive if there is no recent
  4193. * TX/RX activity and downlink frames are buffered for it. Once a STA
  4194. * exceeds the maximum unresponsive time, the AP will send a
  4195. * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
  4196. WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  4197. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  4198. WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
  4199. /* Enable/Disable RTS-CTS */
  4200. WMI_VDEV_PARAM_ENABLE_RTSCTS,
  4201. /* Enable TXBFee/er */
  4202. WMI_VDEV_PARAM_TXBF,
  4203. /* Set packet power save */
  4204. WMI_VDEV_PARAM_PACKET_POWERSAVE,
  4205. /*
  4206. * Drops un-encrypted packets if eceived in an encrypted connection
  4207. * otherwise forwards to host.
  4208. */
  4209. WMI_VDEV_PARAM_DROP_UNENCRY,
  4210. /*
  4211. * Set the encapsulation type for frames.
  4212. */
  4213. WMI_VDEV_PARAM_TX_ENCAP_TYPE,
  4214. };
  4215. /* the definition of different VDEV parameters */
  4216. enum wmi_10x_vdev_param {
  4217. /* RTS Threshold */
  4218. WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  4219. /* Fragmentation threshold */
  4220. WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  4221. /* beacon interval in TUs */
  4222. WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
  4223. /* Listen interval in TUs */
  4224. WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
  4225. /* muticast rate in Mbps */
  4226. WMI_10X_VDEV_PARAM_MULTICAST_RATE,
  4227. /* management frame rate in Mbps */
  4228. WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
  4229. /* slot time (long vs short) */
  4230. WMI_10X_VDEV_PARAM_SLOT_TIME,
  4231. /* preamble (long vs short) */
  4232. WMI_10X_VDEV_PARAM_PREAMBLE,
  4233. /* SWBA time (time before tbtt in msec) */
  4234. WMI_10X_VDEV_PARAM_SWBA_TIME,
  4235. /* time period for updating VDEV stats */
  4236. WMI_10X_VDEV_STATS_UPDATE_PERIOD,
  4237. /* age out time in msec for frames queued for station in power save */
  4238. WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
  4239. /*
  4240. * Host SWBA interval (time in msec before tbtt for SWBA event
  4241. * generation).
  4242. */
  4243. WMI_10X_VDEV_HOST_SWBA_INTERVAL,
  4244. /* DTIM period (specified in units of num beacon intervals) */
  4245. WMI_10X_VDEV_PARAM_DTIM_PERIOD,
  4246. /*
  4247. * scheduler air time limit for this VDEV. used by off chan
  4248. * scheduler.
  4249. */
  4250. WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  4251. /* enable/dsiable WDS for this VDEV */
  4252. WMI_10X_VDEV_PARAM_WDS,
  4253. /* ATIM Window */
  4254. WMI_10X_VDEV_PARAM_ATIM_WINDOW,
  4255. /* BMISS max */
  4256. WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
  4257. /* WMM enables/disabled */
  4258. WMI_10X_VDEV_PARAM_FEATURE_WMM,
  4259. /* Channel width */
  4260. WMI_10X_VDEV_PARAM_CHWIDTH,
  4261. /* Channel Offset */
  4262. WMI_10X_VDEV_PARAM_CHEXTOFFSET,
  4263. /* Disable HT Protection */
  4264. WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
  4265. /* Quick STA Kickout */
  4266. WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
  4267. /* Rate to be used with Management frames */
  4268. WMI_10X_VDEV_PARAM_MGMT_RATE,
  4269. /* Protection Mode */
  4270. WMI_10X_VDEV_PARAM_PROTECTION_MODE,
  4271. /* Fixed rate setting */
  4272. WMI_10X_VDEV_PARAM_FIXED_RATE,
  4273. /* Short GI Enable/Disable */
  4274. WMI_10X_VDEV_PARAM_SGI,
  4275. /* Enable LDPC */
  4276. WMI_10X_VDEV_PARAM_LDPC,
  4277. /* Enable Tx STBC */
  4278. WMI_10X_VDEV_PARAM_TX_STBC,
  4279. /* Enable Rx STBC */
  4280. WMI_10X_VDEV_PARAM_RX_STBC,
  4281. /* Intra BSS forwarding */
  4282. WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
  4283. /* Setting Default xmit key for Vdev */
  4284. WMI_10X_VDEV_PARAM_DEF_KEYID,
  4285. /* NSS width */
  4286. WMI_10X_VDEV_PARAM_NSS,
  4287. /* Set the custom rate for the broadcast data frames */
  4288. WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
  4289. /* Set the custom rate (rate-code) for multicast data frames */
  4290. WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
  4291. /* Tx multicast packet indicate Enable/Disable */
  4292. WMI_10X_VDEV_PARAM_MCAST_INDICATE,
  4293. /* Tx DHCP packet indicate Enable/Disable */
  4294. WMI_10X_VDEV_PARAM_DHCP_INDICATE,
  4295. /* Enable host inspection of Tx unicast packet to unknown destination */
  4296. WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  4297. /* The minimum amount of time AP begins to consider STA inactive */
  4298. WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  4299. /*
  4300. * An associated STA is considered inactive when there is no recent
  4301. * TX/RX activity and no downlink frames are buffered for it. Once a
  4302. * STA exceeds the maximum idle inactive time, the AP will send an
  4303. * 802.11 data-null as a keep alive to verify the STA is still
  4304. * associated. If the STA does ACK the data-null, or if the data-null
  4305. * is buffered and the STA does not retrieve it, the STA will be
  4306. * considered unresponsive
  4307. * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
  4308. */
  4309. WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  4310. /*
  4311. * An associated STA is considered unresponsive if there is no recent
  4312. * TX/RX activity and downlink frames are buffered for it. Once a STA
  4313. * exceeds the maximum unresponsive time, the AP will send a
  4314. * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */
  4315. WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  4316. /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
  4317. WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
  4318. WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
  4319. /* Enable/Disable RTS-CTS */
  4320. WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
  4321. WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
  4322. /* following are available as of firmware 10.2 */
  4323. WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
  4324. WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
  4325. WMI_10X_VDEV_PARAM_MFPTEST_SET,
  4326. WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
  4327. WMI_10X_VDEV_PARAM_VHT_SGIMASK,
  4328. WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
  4329. };
  4330. enum wmi_10_4_vdev_param {
  4331. WMI_10_4_VDEV_PARAM_RTS_THRESHOLD = 0x1,
  4332. WMI_10_4_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
  4333. WMI_10_4_VDEV_PARAM_BEACON_INTERVAL,
  4334. WMI_10_4_VDEV_PARAM_LISTEN_INTERVAL,
  4335. WMI_10_4_VDEV_PARAM_MULTICAST_RATE,
  4336. WMI_10_4_VDEV_PARAM_MGMT_TX_RATE,
  4337. WMI_10_4_VDEV_PARAM_SLOT_TIME,
  4338. WMI_10_4_VDEV_PARAM_PREAMBLE,
  4339. WMI_10_4_VDEV_PARAM_SWBA_TIME,
  4340. WMI_10_4_VDEV_STATS_UPDATE_PERIOD,
  4341. WMI_10_4_VDEV_PWRSAVE_AGEOUT_TIME,
  4342. WMI_10_4_VDEV_HOST_SWBA_INTERVAL,
  4343. WMI_10_4_VDEV_PARAM_DTIM_PERIOD,
  4344. WMI_10_4_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
  4345. WMI_10_4_VDEV_PARAM_WDS,
  4346. WMI_10_4_VDEV_PARAM_ATIM_WINDOW,
  4347. WMI_10_4_VDEV_PARAM_BMISS_COUNT_MAX,
  4348. WMI_10_4_VDEV_PARAM_BMISS_FIRST_BCNT,
  4349. WMI_10_4_VDEV_PARAM_BMISS_FINAL_BCNT,
  4350. WMI_10_4_VDEV_PARAM_FEATURE_WMM,
  4351. WMI_10_4_VDEV_PARAM_CHWIDTH,
  4352. WMI_10_4_VDEV_PARAM_CHEXTOFFSET,
  4353. WMI_10_4_VDEV_PARAM_DISABLE_HTPROTECTION,
  4354. WMI_10_4_VDEV_PARAM_STA_QUICKKICKOUT,
  4355. WMI_10_4_VDEV_PARAM_MGMT_RATE,
  4356. WMI_10_4_VDEV_PARAM_PROTECTION_MODE,
  4357. WMI_10_4_VDEV_PARAM_FIXED_RATE,
  4358. WMI_10_4_VDEV_PARAM_SGI,
  4359. WMI_10_4_VDEV_PARAM_LDPC,
  4360. WMI_10_4_VDEV_PARAM_TX_STBC,
  4361. WMI_10_4_VDEV_PARAM_RX_STBC,
  4362. WMI_10_4_VDEV_PARAM_INTRA_BSS_FWD,
  4363. WMI_10_4_VDEV_PARAM_DEF_KEYID,
  4364. WMI_10_4_VDEV_PARAM_NSS,
  4365. WMI_10_4_VDEV_PARAM_BCAST_DATA_RATE,
  4366. WMI_10_4_VDEV_PARAM_MCAST_DATA_RATE,
  4367. WMI_10_4_VDEV_PARAM_MCAST_INDICATE,
  4368. WMI_10_4_VDEV_PARAM_DHCP_INDICATE,
  4369. WMI_10_4_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
  4370. WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
  4371. WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
  4372. WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
  4373. WMI_10_4_VDEV_PARAM_AP_ENABLE_NAWDS,
  4374. WMI_10_4_VDEV_PARAM_MCAST2UCAST_SET,
  4375. WMI_10_4_VDEV_PARAM_ENABLE_RTSCTS,
  4376. WMI_10_4_VDEV_PARAM_RC_NUM_RETRIES,
  4377. WMI_10_4_VDEV_PARAM_TXBF,
  4378. WMI_10_4_VDEV_PARAM_PACKET_POWERSAVE,
  4379. WMI_10_4_VDEV_PARAM_DROP_UNENCRY,
  4380. WMI_10_4_VDEV_PARAM_TX_ENCAP_TYPE,
  4381. WMI_10_4_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
  4382. WMI_10_4_VDEV_PARAM_CABQ_MAXDUR,
  4383. WMI_10_4_VDEV_PARAM_MFPTEST_SET,
  4384. WMI_10_4_VDEV_PARAM_RTS_FIXED_RATE,
  4385. WMI_10_4_VDEV_PARAM_VHT_SGIMASK,
  4386. WMI_10_4_VDEV_PARAM_VHT80_RATEMASK,
  4387. WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
  4388. WMI_10_4_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
  4389. WMI_10_4_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
  4390. WMI_10_4_VDEV_PARAM_EARLY_RX_SLOP_STEP,
  4391. WMI_10_4_VDEV_PARAM_EARLY_RX_INIT_SLOP,
  4392. WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
  4393. WMI_10_4_VDEV_PARAM_PROXY_STA,
  4394. WMI_10_4_VDEV_PARAM_MERU_VC,
  4395. WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE,
  4396. WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK,
  4397. };
  4398. #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
  4399. #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
  4400. #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
  4401. #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
  4402. #define WMI_TXBF_STS_CAP_OFFSET_LSB 4
  4403. #define WMI_TXBF_STS_CAP_OFFSET_MASK 0xf0
  4404. #define WMI_BF_SOUND_DIM_OFFSET_LSB 8
  4405. #define WMI_BF_SOUND_DIM_OFFSET_MASK 0xf00
  4406. /* slot time long */
  4407. #define WMI_VDEV_SLOT_TIME_LONG 0x1
  4408. /* slot time short */
  4409. #define WMI_VDEV_SLOT_TIME_SHORT 0x2
  4410. /* preablbe long */
  4411. #define WMI_VDEV_PREAMBLE_LONG 0x1
  4412. /* preablbe short */
  4413. #define WMI_VDEV_PREAMBLE_SHORT 0x2
  4414. enum wmi_start_event_param {
  4415. WMI_VDEV_RESP_START_EVENT = 0,
  4416. WMI_VDEV_RESP_RESTART_EVENT,
  4417. };
  4418. struct wmi_vdev_start_response_event {
  4419. __le32 vdev_id;
  4420. __le32 req_id;
  4421. __le32 resp_type; /* %WMI_VDEV_RESP_ */
  4422. __le32 status;
  4423. } __packed;
  4424. struct wmi_vdev_standby_req_event {
  4425. /* unique id identifying the VDEV, generated by the caller */
  4426. __le32 vdev_id;
  4427. } __packed;
  4428. struct wmi_vdev_resume_req_event {
  4429. /* unique id identifying the VDEV, generated by the caller */
  4430. __le32 vdev_id;
  4431. } __packed;
  4432. struct wmi_vdev_stopped_event {
  4433. /* unique id identifying the VDEV, generated by the caller */
  4434. __le32 vdev_id;
  4435. } __packed;
  4436. /*
  4437. * common structure used for simple events
  4438. * (stopped, resume_req, standby response)
  4439. */
  4440. struct wmi_vdev_simple_event {
  4441. /* unique id identifying the VDEV, generated by the caller */
  4442. __le32 vdev_id;
  4443. } __packed;
  4444. /* VDEV start response status codes */
  4445. /* VDEV succesfully started */
  4446. #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
  4447. /* requested VDEV not found */
  4448. #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
  4449. /* unsupported VDEV combination */
  4450. #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
  4451. /* TODO: please add more comments if you have in-depth information */
  4452. struct wmi_vdev_spectral_conf_cmd {
  4453. __le32 vdev_id;
  4454. /* number of fft samples to send (0 for infinite) */
  4455. __le32 scan_count;
  4456. __le32 scan_period;
  4457. __le32 scan_priority;
  4458. /* number of bins in the FFT: 2^(fft_size - bin_scale) */
  4459. __le32 scan_fft_size;
  4460. __le32 scan_gc_ena;
  4461. __le32 scan_restart_ena;
  4462. __le32 scan_noise_floor_ref;
  4463. __le32 scan_init_delay;
  4464. __le32 scan_nb_tone_thr;
  4465. __le32 scan_str_bin_thr;
  4466. __le32 scan_wb_rpt_mode;
  4467. __le32 scan_rssi_rpt_mode;
  4468. __le32 scan_rssi_thr;
  4469. __le32 scan_pwr_format;
  4470. /* rpt_mode: Format of FFT report to software for spectral scan
  4471. * triggered FFTs:
  4472. * 0: No FFT report (only spectral scan summary report)
  4473. * 1: 2-dword summary of metrics for each completed FFT + spectral
  4474. * scan summary report
  4475. * 2: 2-dword summary of metrics for each completed FFT +
  4476. * 1x- oversampled bins(in-band) per FFT + spectral scan summary
  4477. * report
  4478. * 3: 2-dword summary of metrics for each completed FFT +
  4479. * 2x- oversampled bins (all) per FFT + spectral scan summary
  4480. */
  4481. __le32 scan_rpt_mode;
  4482. __le32 scan_bin_scale;
  4483. __le32 scan_dbm_adj;
  4484. __le32 scan_chn_mask;
  4485. } __packed;
  4486. struct wmi_vdev_spectral_conf_arg {
  4487. u32 vdev_id;
  4488. u32 scan_count;
  4489. u32 scan_period;
  4490. u32 scan_priority;
  4491. u32 scan_fft_size;
  4492. u32 scan_gc_ena;
  4493. u32 scan_restart_ena;
  4494. u32 scan_noise_floor_ref;
  4495. u32 scan_init_delay;
  4496. u32 scan_nb_tone_thr;
  4497. u32 scan_str_bin_thr;
  4498. u32 scan_wb_rpt_mode;
  4499. u32 scan_rssi_rpt_mode;
  4500. u32 scan_rssi_thr;
  4501. u32 scan_pwr_format;
  4502. u32 scan_rpt_mode;
  4503. u32 scan_bin_scale;
  4504. u32 scan_dbm_adj;
  4505. u32 scan_chn_mask;
  4506. };
  4507. #define WMI_SPECTRAL_ENABLE_DEFAULT 0
  4508. #define WMI_SPECTRAL_COUNT_DEFAULT 0
  4509. #define WMI_SPECTRAL_PERIOD_DEFAULT 35
  4510. #define WMI_SPECTRAL_PRIORITY_DEFAULT 1
  4511. #define WMI_SPECTRAL_FFT_SIZE_DEFAULT 7
  4512. #define WMI_SPECTRAL_GC_ENA_DEFAULT 1
  4513. #define WMI_SPECTRAL_RESTART_ENA_DEFAULT 0
  4514. #define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT -96
  4515. #define WMI_SPECTRAL_INIT_DELAY_DEFAULT 80
  4516. #define WMI_SPECTRAL_NB_TONE_THR_DEFAULT 12
  4517. #define WMI_SPECTRAL_STR_BIN_THR_DEFAULT 8
  4518. #define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT 0
  4519. #define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT 0
  4520. #define WMI_SPECTRAL_RSSI_THR_DEFAULT 0xf0
  4521. #define WMI_SPECTRAL_PWR_FORMAT_DEFAULT 0
  4522. #define WMI_SPECTRAL_RPT_MODE_DEFAULT 2
  4523. #define WMI_SPECTRAL_BIN_SCALE_DEFAULT 1
  4524. #define WMI_SPECTRAL_DBM_ADJ_DEFAULT 1
  4525. #define WMI_SPECTRAL_CHN_MASK_DEFAULT 1
  4526. struct wmi_vdev_spectral_enable_cmd {
  4527. __le32 vdev_id;
  4528. __le32 trigger_cmd;
  4529. __le32 enable_cmd;
  4530. } __packed;
  4531. #define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER 1
  4532. #define WMI_SPECTRAL_TRIGGER_CMD_CLEAR 2
  4533. #define WMI_SPECTRAL_ENABLE_CMD_ENABLE 1
  4534. #define WMI_SPECTRAL_ENABLE_CMD_DISABLE 2
  4535. /* Beacon processing related command and event structures */
  4536. struct wmi_bcn_tx_hdr {
  4537. __le32 vdev_id;
  4538. __le32 tx_rate;
  4539. __le32 tx_power;
  4540. __le32 bcn_len;
  4541. } __packed;
  4542. struct wmi_bcn_tx_cmd {
  4543. struct wmi_bcn_tx_hdr hdr;
  4544. u8 *bcn[0];
  4545. } __packed;
  4546. struct wmi_bcn_tx_arg {
  4547. u32 vdev_id;
  4548. u32 tx_rate;
  4549. u32 tx_power;
  4550. u32 bcn_len;
  4551. const void *bcn;
  4552. };
  4553. enum wmi_bcn_tx_ref_flags {
  4554. WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1,
  4555. WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2,
  4556. };
  4557. /* TODO: It is unclear why "no antenna" works while any other seemingly valid
  4558. * chainmask yields no beacons on the air at all.
  4559. */
  4560. #define WMI_BCN_TX_REF_DEF_ANTENNA 0
  4561. struct wmi_bcn_tx_ref_cmd {
  4562. __le32 vdev_id;
  4563. __le32 data_len;
  4564. /* physical address of the frame - dma pointer */
  4565. __le32 data_ptr;
  4566. /* id for host to track */
  4567. __le32 msdu_id;
  4568. /* frame ctrl to setup PPDU desc */
  4569. __le32 frame_control;
  4570. /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
  4571. __le32 flags;
  4572. /* introduced in 10.2 */
  4573. __le32 antenna_mask;
  4574. } __packed;
  4575. /* Beacon filter */
  4576. #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
  4577. #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
  4578. #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
  4579. #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
  4580. #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
  4581. struct wmi_bcn_filter_rx_cmd {
  4582. /* Filter ID */
  4583. __le32 bcn_filter_id;
  4584. /* Filter type - wmi_bcn_filter */
  4585. __le32 bcn_filter;
  4586. /* Buffer len */
  4587. __le32 bcn_filter_len;
  4588. /* Filter info (threshold, BSSID, RSSI) */
  4589. u8 *bcn_filter_buf;
  4590. } __packed;
  4591. /* Capabilities and IEs to be passed to firmware */
  4592. struct wmi_bcn_prb_info {
  4593. /* Capabilities */
  4594. __le32 caps;
  4595. /* ERP info */
  4596. __le32 erp;
  4597. /* Advanced capabilities */
  4598. /* HT capabilities */
  4599. /* HT Info */
  4600. /* ibss_dfs */
  4601. /* wpa Info */
  4602. /* rsn Info */
  4603. /* rrm info */
  4604. /* ath_ext */
  4605. /* app IE */
  4606. } __packed;
  4607. struct wmi_bcn_tmpl_cmd {
  4608. /* unique id identifying the VDEV, generated by the caller */
  4609. __le32 vdev_id;
  4610. /* TIM IE offset from the beginning of the template. */
  4611. __le32 tim_ie_offset;
  4612. /* beacon probe capabilities and IEs */
  4613. struct wmi_bcn_prb_info bcn_prb_info;
  4614. /* beacon buffer length */
  4615. __le32 buf_len;
  4616. /* variable length data */
  4617. u8 data[1];
  4618. } __packed;
  4619. struct wmi_prb_tmpl_cmd {
  4620. /* unique id identifying the VDEV, generated by the caller */
  4621. __le32 vdev_id;
  4622. /* beacon probe capabilities and IEs */
  4623. struct wmi_bcn_prb_info bcn_prb_info;
  4624. /* beacon buffer length */
  4625. __le32 buf_len;
  4626. /* Variable length data */
  4627. u8 data[1];
  4628. } __packed;
  4629. enum wmi_sta_ps_mode {
  4630. /* enable power save for the given STA VDEV */
  4631. WMI_STA_PS_MODE_DISABLED = 0,
  4632. /* disable power save for a given STA VDEV */
  4633. WMI_STA_PS_MODE_ENABLED = 1,
  4634. };
  4635. struct wmi_sta_powersave_mode_cmd {
  4636. /* unique id identifying the VDEV, generated by the caller */
  4637. __le32 vdev_id;
  4638. /*
  4639. * Power save mode
  4640. * (see enum wmi_sta_ps_mode)
  4641. */
  4642. __le32 sta_ps_mode;
  4643. } __packed;
  4644. enum wmi_csa_offload_en {
  4645. WMI_CSA_OFFLOAD_DISABLE = 0,
  4646. WMI_CSA_OFFLOAD_ENABLE = 1,
  4647. };
  4648. struct wmi_csa_offload_enable_cmd {
  4649. __le32 vdev_id;
  4650. __le32 csa_offload_enable;
  4651. } __packed;
  4652. struct wmi_csa_offload_chanswitch_cmd {
  4653. __le32 vdev_id;
  4654. struct wmi_channel chan;
  4655. } __packed;
  4656. /*
  4657. * This parameter controls the policy for retrieving frames from AP while the
  4658. * STA is in sleep state.
  4659. *
  4660. * Only takes affect if the sta_ps_mode is enabled
  4661. */
  4662. enum wmi_sta_ps_param_rx_wake_policy {
  4663. /*
  4664. * Wake up when ever there is an RX activity on the VDEV. In this mode
  4665. * the Power save SM(state machine) will come out of sleep by either
  4666. * sending null frame (or) a data frame (with PS==0) in response to TIM
  4667. * bit set in the received beacon frame from AP.
  4668. */
  4669. WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  4670. /*
  4671. * Here the power save state machine will not wakeup in response to TIM
  4672. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  4673. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  4674. * access categories are delivery-enabled, the station will send a
  4675. * UAPSD trigger frame, otherwise it will send a PS-Poll.
  4676. */
  4677. WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  4678. };
  4679. /*
  4680. * Number of tx frames/beacon that cause the power save SM to wake up.
  4681. *
  4682. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  4683. * meaning, It will cause the SM to never wake up. This is useful if you want
  4684. * to keep the system to sleep all the time for some kind of test mode . host
  4685. * can change this parameter any time. It will affect at the next tx frame.
  4686. */
  4687. enum wmi_sta_ps_param_tx_wake_threshold {
  4688. WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  4689. WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  4690. /*
  4691. * Values greater than one indicate that many TX attempts per beacon
  4692. * interval before the STA will wake up
  4693. */
  4694. };
  4695. /*
  4696. * The maximum number of PS-Poll frames the FW will send in response to
  4697. * traffic advertised in TIM before waking up (by sending a null frame with PS
  4698. * = 0). Value 0 has a special meaning: there is no maximum count and the FW
  4699. * will send as many PS-Poll as are necessary to retrieve buffered BU. This
  4700. * parameter is used when the RX wake policy is
  4701. * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
  4702. * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
  4703. */
  4704. enum wmi_sta_ps_param_pspoll_count {
  4705. WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  4706. /*
  4707. * Values greater than 0 indicate the maximum numer of PS-Poll frames
  4708. * FW will send before waking up.
  4709. */
  4710. /* When u-APSD is enabled the firmware will be very reluctant to exit
  4711. * STA PS. This could result in very poor Rx performance with STA doing
  4712. * PS-Poll for each and every buffered frame. This value is a bit
  4713. * arbitrary.
  4714. */
  4715. WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
  4716. };
  4717. /*
  4718. * This will include the delivery and trigger enabled state for every AC.
  4719. * This is the negotiated state with AP. The host MLME needs to set this based
  4720. * on AP capability and the state Set in the association request by the
  4721. * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
  4722. */
  4723. #define WMI_UAPSD_AC_TYPE_DELI 0
  4724. #define WMI_UAPSD_AC_TYPE_TRIG 1
  4725. #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
  4726. ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
  4727. enum wmi_sta_ps_param_uapsd {
  4728. WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  4729. WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  4730. WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  4731. WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  4732. WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  4733. WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  4734. WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  4735. WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  4736. };
  4737. #define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX
  4738. struct wmi_sta_uapsd_auto_trig_param {
  4739. __le32 wmm_ac;
  4740. __le32 user_priority;
  4741. __le32 service_interval;
  4742. __le32 suspend_interval;
  4743. __le32 delay_interval;
  4744. };
  4745. struct wmi_sta_uapsd_auto_trig_cmd_fixed_param {
  4746. __le32 vdev_id;
  4747. struct wmi_mac_addr peer_macaddr;
  4748. __le32 num_ac;
  4749. };
  4750. struct wmi_sta_uapsd_auto_trig_arg {
  4751. u32 wmm_ac;
  4752. u32 user_priority;
  4753. u32 service_interval;
  4754. u32 suspend_interval;
  4755. u32 delay_interval;
  4756. };
  4757. enum wmi_sta_powersave_param {
  4758. /*
  4759. * Controls how frames are retrievd from AP while STA is sleeping
  4760. *
  4761. * (see enum wmi_sta_ps_param_rx_wake_policy)
  4762. */
  4763. WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  4764. /*
  4765. * The STA will go active after this many TX
  4766. *
  4767. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  4768. */
  4769. WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  4770. /*
  4771. * Number of PS-Poll to send before STA wakes up
  4772. *
  4773. * (see enum wmi_sta_ps_param_pspoll_count)
  4774. *
  4775. */
  4776. WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
  4777. /*
  4778. * TX/RX inactivity time in msec before going to sleep.
  4779. *
  4780. * The power save SM will monitor tx/rx activity on the VDEV, if no
  4781. * activity for the specified msec of the parameter the Power save
  4782. * SM will go to sleep.
  4783. */
  4784. WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
  4785. /*
  4786. * Set uapsd configuration.
  4787. *
  4788. * (see enum wmi_sta_ps_param_uapsd)
  4789. */
  4790. WMI_STA_PS_PARAM_UAPSD = 4,
  4791. };
  4792. struct wmi_sta_powersave_param_cmd {
  4793. __le32 vdev_id;
  4794. __le32 param_id; /* %WMI_STA_PS_PARAM_ */
  4795. __le32 param_value;
  4796. } __packed;
  4797. /* No MIMO power save */
  4798. #define WMI_STA_MIMO_PS_MODE_DISABLE
  4799. /* mimo powersave mode static*/
  4800. #define WMI_STA_MIMO_PS_MODE_STATIC
  4801. /* mimo powersave mode dynamic */
  4802. #define WMI_STA_MIMO_PS_MODE_DYNAMIC
  4803. struct wmi_sta_mimo_ps_mode_cmd {
  4804. /* unique id identifying the VDEV, generated by the caller */
  4805. __le32 vdev_id;
  4806. /* mimo powersave mode as defined above */
  4807. __le32 mimo_pwrsave_mode;
  4808. } __packed;
  4809. /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
  4810. enum wmi_ap_ps_param_uapsd {
  4811. WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  4812. WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  4813. WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  4814. WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  4815. WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  4816. WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  4817. WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  4818. WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  4819. };
  4820. /* U-APSD maximum service period of peer station */
  4821. enum wmi_ap_ps_peer_param_max_sp {
  4822. WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  4823. WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  4824. WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  4825. WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  4826. MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
  4827. };
  4828. /*
  4829. * AP power save parameter
  4830. * Set a power save specific parameter for a peer station
  4831. */
  4832. enum wmi_ap_ps_peer_param {
  4833. /* Set uapsd configuration for a given peer.
  4834. *
  4835. * Include the delivery and trigger enabled state for every AC.
  4836. * The host MLME needs to set this based on AP capability and stations
  4837. * request Set in the association request received from the station.
  4838. *
  4839. * Lower 8 bits of the value specify the UAPSD configuration.
  4840. *
  4841. * (see enum wmi_ap_ps_param_uapsd)
  4842. * The default value is 0.
  4843. */
  4844. WMI_AP_PS_PEER_PARAM_UAPSD = 0,
  4845. /*
  4846. * Set the service period for a UAPSD capable station
  4847. *
  4848. * The service period from wme ie in the (re)assoc request frame.
  4849. *
  4850. * (see enum wmi_ap_ps_peer_param_max_sp)
  4851. */
  4852. WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
  4853. /* Time in seconds for aging out buffered frames for STA in PS */
  4854. WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  4855. };
  4856. struct wmi_ap_ps_peer_cmd {
  4857. /* unique id identifying the VDEV, generated by the caller */
  4858. __le32 vdev_id;
  4859. /* peer MAC address */
  4860. struct wmi_mac_addr peer_macaddr;
  4861. /* AP powersave param (see enum wmi_ap_ps_peer_param) */
  4862. __le32 param_id;
  4863. /* AP powersave param value */
  4864. __le32 param_value;
  4865. } __packed;
  4866. /* 128 clients = 4 words */
  4867. #define WMI_TIM_BITMAP_ARRAY_SIZE 4
  4868. struct wmi_tim_info {
  4869. __le32 tim_len;
  4870. __le32 tim_mcast;
  4871. __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
  4872. __le32 tim_changed;
  4873. __le32 tim_num_ps_pending;
  4874. } __packed;
  4875. struct wmi_tim_info_arg {
  4876. __le32 tim_len;
  4877. __le32 tim_mcast;
  4878. const __le32 *tim_bitmap;
  4879. __le32 tim_changed;
  4880. __le32 tim_num_ps_pending;
  4881. } __packed;
  4882. /* Maximum number of NOA Descriptors supported */
  4883. #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
  4884. #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
  4885. #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
  4886. #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
  4887. struct wmi_p2p_noa_info {
  4888. /* Bit 0 - Flag to indicate an update in NOA schedule
  4889. Bits 7-1 - Reserved */
  4890. u8 changed;
  4891. /* NOA index */
  4892. u8 index;
  4893. /* Bit 0 - Opp PS state of the AP
  4894. Bits 1-7 - Ctwindow in TUs */
  4895. u8 ctwindow_oppps;
  4896. /* Number of NOA descriptors */
  4897. u8 num_descriptors;
  4898. struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
  4899. } __packed;
  4900. struct wmi_bcn_info {
  4901. struct wmi_tim_info tim_info;
  4902. struct wmi_p2p_noa_info p2p_noa_info;
  4903. } __packed;
  4904. struct wmi_host_swba_event {
  4905. __le32 vdev_map;
  4906. struct wmi_bcn_info bcn_info[0];
  4907. } __packed;
  4908. struct wmi_10_2_4_bcn_info {
  4909. struct wmi_tim_info tim_info;
  4910. /* The 10.2.4 FW doesn't have p2p NOA info */
  4911. } __packed;
  4912. struct wmi_10_2_4_host_swba_event {
  4913. __le32 vdev_map;
  4914. struct wmi_10_2_4_bcn_info bcn_info[0];
  4915. } __packed;
  4916. /* 16 words = 512 client + 1 word = for guard */
  4917. #define WMI_10_4_TIM_BITMAP_ARRAY_SIZE 17
  4918. struct wmi_10_4_tim_info {
  4919. __le32 tim_len;
  4920. __le32 tim_mcast;
  4921. __le32 tim_bitmap[WMI_10_4_TIM_BITMAP_ARRAY_SIZE];
  4922. __le32 tim_changed;
  4923. __le32 tim_num_ps_pending;
  4924. } __packed;
  4925. #define WMI_10_4_P2P_MAX_NOA_DESCRIPTORS 1
  4926. struct wmi_10_4_p2p_noa_info {
  4927. /* Bit 0 - Flag to indicate an update in NOA schedule
  4928. * Bits 7-1 - Reserved
  4929. */
  4930. u8 changed;
  4931. /* NOA index */
  4932. u8 index;
  4933. /* Bit 0 - Opp PS state of the AP
  4934. * Bits 1-7 - Ctwindow in TUs
  4935. */
  4936. u8 ctwindow_oppps;
  4937. /* Number of NOA descriptors */
  4938. u8 num_descriptors;
  4939. struct wmi_p2p_noa_descriptor
  4940. noa_descriptors[WMI_10_4_P2P_MAX_NOA_DESCRIPTORS];
  4941. } __packed;
  4942. struct wmi_10_4_bcn_info {
  4943. struct wmi_10_4_tim_info tim_info;
  4944. struct wmi_10_4_p2p_noa_info p2p_noa_info;
  4945. } __packed;
  4946. struct wmi_10_4_host_swba_event {
  4947. __le32 vdev_map;
  4948. struct wmi_10_4_bcn_info bcn_info[0];
  4949. } __packed;
  4950. #define WMI_MAX_AP_VDEV 16
  4951. struct wmi_tbtt_offset_event {
  4952. __le32 vdev_map;
  4953. __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
  4954. } __packed;
  4955. struct wmi_peer_create_cmd {
  4956. __le32 vdev_id;
  4957. struct wmi_mac_addr peer_macaddr;
  4958. } __packed;
  4959. enum wmi_peer_type {
  4960. WMI_PEER_TYPE_DEFAULT = 0,
  4961. WMI_PEER_TYPE_BSS = 1,
  4962. WMI_PEER_TYPE_TDLS = 2,
  4963. };
  4964. struct wmi_peer_delete_cmd {
  4965. __le32 vdev_id;
  4966. struct wmi_mac_addr peer_macaddr;
  4967. } __packed;
  4968. struct wmi_peer_flush_tids_cmd {
  4969. __le32 vdev_id;
  4970. struct wmi_mac_addr peer_macaddr;
  4971. __le32 peer_tid_bitmap;
  4972. } __packed;
  4973. struct wmi_fixed_rate {
  4974. /*
  4975. * rate mode . 0: disable fixed rate (auto rate)
  4976. * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
  4977. * 2: ht20 11n rate specified as mcs index
  4978. * 3: ht40 11n rate specified as mcs index
  4979. */
  4980. __le32 rate_mode;
  4981. /*
  4982. * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
  4983. * and series 3 is stored at byte 3 (MSB)
  4984. */
  4985. __le32 rate_series;
  4986. /*
  4987. * 4 retry counts for 4 rate series. retry count for rate 0 is stored
  4988. * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
  4989. * (MSB)
  4990. */
  4991. __le32 rate_retries;
  4992. } __packed;
  4993. struct wmi_peer_fixed_rate_cmd {
  4994. /* unique id identifying the VDEV, generated by the caller */
  4995. __le32 vdev_id;
  4996. /* peer MAC address */
  4997. struct wmi_mac_addr peer_macaddr;
  4998. /* fixed rate */
  4999. struct wmi_fixed_rate peer_fixed_rate;
  5000. } __packed;
  5001. #define WMI_MGMT_TID 17
  5002. struct wmi_addba_clear_resp_cmd {
  5003. /* unique id identifying the VDEV, generated by the caller */
  5004. __le32 vdev_id;
  5005. /* peer MAC address */
  5006. struct wmi_mac_addr peer_macaddr;
  5007. } __packed;
  5008. struct wmi_addba_send_cmd {
  5009. /* unique id identifying the VDEV, generated by the caller */
  5010. __le32 vdev_id;
  5011. /* peer MAC address */
  5012. struct wmi_mac_addr peer_macaddr;
  5013. /* Tid number */
  5014. __le32 tid;
  5015. /* Buffer/Window size*/
  5016. __le32 buffersize;
  5017. } __packed;
  5018. struct wmi_delba_send_cmd {
  5019. /* unique id identifying the VDEV, generated by the caller */
  5020. __le32 vdev_id;
  5021. /* peer MAC address */
  5022. struct wmi_mac_addr peer_macaddr;
  5023. /* Tid number */
  5024. __le32 tid;
  5025. /* Is Initiator */
  5026. __le32 initiator;
  5027. /* Reason code */
  5028. __le32 reasoncode;
  5029. } __packed;
  5030. struct wmi_addba_setresponse_cmd {
  5031. /* unique id identifying the vdev, generated by the caller */
  5032. __le32 vdev_id;
  5033. /* peer mac address */
  5034. struct wmi_mac_addr peer_macaddr;
  5035. /* Tid number */
  5036. __le32 tid;
  5037. /* status code */
  5038. __le32 statuscode;
  5039. } __packed;
  5040. struct wmi_send_singleamsdu_cmd {
  5041. /* unique id identifying the vdev, generated by the caller */
  5042. __le32 vdev_id;
  5043. /* peer mac address */
  5044. struct wmi_mac_addr peer_macaddr;
  5045. /* Tid number */
  5046. __le32 tid;
  5047. } __packed;
  5048. enum wmi_peer_smps_state {
  5049. WMI_PEER_SMPS_PS_NONE = 0x0,
  5050. WMI_PEER_SMPS_STATIC = 0x1,
  5051. WMI_PEER_SMPS_DYNAMIC = 0x2
  5052. };
  5053. enum wmi_peer_chwidth {
  5054. WMI_PEER_CHWIDTH_20MHZ = 0,
  5055. WMI_PEER_CHWIDTH_40MHZ = 1,
  5056. WMI_PEER_CHWIDTH_80MHZ = 2,
  5057. };
  5058. enum wmi_peer_param {
  5059. WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
  5060. WMI_PEER_AMPDU = 0x2,
  5061. WMI_PEER_AUTHORIZE = 0x3,
  5062. WMI_PEER_CHAN_WIDTH = 0x4,
  5063. WMI_PEER_NSS = 0x5,
  5064. WMI_PEER_USE_4ADDR = 0x6,
  5065. WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
  5066. };
  5067. struct wmi_peer_set_param_cmd {
  5068. __le32 vdev_id;
  5069. struct wmi_mac_addr peer_macaddr;
  5070. __le32 param_id;
  5071. __le32 param_value;
  5072. } __packed;
  5073. #define MAX_SUPPORTED_RATES 128
  5074. struct wmi_rate_set {
  5075. /* total number of rates */
  5076. __le32 num_rates;
  5077. /*
  5078. * rates (each 8bit value) packed into a 32 bit word.
  5079. * the rates are filled from least significant byte to most
  5080. * significant byte.
  5081. */
  5082. __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
  5083. } __packed;
  5084. struct wmi_rate_set_arg {
  5085. unsigned int num_rates;
  5086. u8 rates[MAX_SUPPORTED_RATES];
  5087. };
  5088. /*
  5089. * NOTE: It would bea good idea to represent the Tx MCS
  5090. * info in one word and Rx in another word. This is split
  5091. * into multiple words for convenience
  5092. */
  5093. struct wmi_vht_rate_set {
  5094. __le32 rx_max_rate; /* Max Rx data rate */
  5095. __le32 rx_mcs_set; /* Negotiated RX VHT rates */
  5096. __le32 tx_max_rate; /* Max Tx data rate */
  5097. __le32 tx_mcs_set; /* Negotiated TX VHT rates */
  5098. } __packed;
  5099. struct wmi_vht_rate_set_arg {
  5100. u32 rx_max_rate;
  5101. u32 rx_mcs_set;
  5102. u32 tx_max_rate;
  5103. u32 tx_mcs_set;
  5104. };
  5105. struct wmi_peer_set_rates_cmd {
  5106. /* peer MAC address */
  5107. struct wmi_mac_addr peer_macaddr;
  5108. /* legacy rate set */
  5109. struct wmi_rate_set peer_legacy_rates;
  5110. /* ht rate set */
  5111. struct wmi_rate_set peer_ht_rates;
  5112. } __packed;
  5113. struct wmi_peer_set_q_empty_callback_cmd {
  5114. /* unique id identifying the VDEV, generated by the caller */
  5115. __le32 vdev_id;
  5116. /* peer MAC address */
  5117. struct wmi_mac_addr peer_macaddr;
  5118. __le32 callback_enable;
  5119. } __packed;
  5120. struct wmi_peer_flags_map {
  5121. u32 auth;
  5122. u32 qos;
  5123. u32 need_ptk_4_way;
  5124. u32 need_gtk_2_way;
  5125. u32 apsd;
  5126. u32 ht;
  5127. u32 bw40;
  5128. u32 stbc;
  5129. u32 ldbc;
  5130. u32 dyn_mimops;
  5131. u32 static_mimops;
  5132. u32 spatial_mux;
  5133. u32 vht;
  5134. u32 bw80;
  5135. u32 vht_2g;
  5136. u32 pmf;
  5137. };
  5138. enum wmi_peer_flags {
  5139. WMI_PEER_AUTH = 0x00000001,
  5140. WMI_PEER_QOS = 0x00000002,
  5141. WMI_PEER_NEED_PTK_4_WAY = 0x00000004,
  5142. WMI_PEER_NEED_GTK_2_WAY = 0x00000010,
  5143. WMI_PEER_APSD = 0x00000800,
  5144. WMI_PEER_HT = 0x00001000,
  5145. WMI_PEER_40MHZ = 0x00002000,
  5146. WMI_PEER_STBC = 0x00008000,
  5147. WMI_PEER_LDPC = 0x00010000,
  5148. WMI_PEER_DYN_MIMOPS = 0x00020000,
  5149. WMI_PEER_STATIC_MIMOPS = 0x00040000,
  5150. WMI_PEER_SPATIAL_MUX = 0x00200000,
  5151. WMI_PEER_VHT = 0x02000000,
  5152. WMI_PEER_80MHZ = 0x04000000,
  5153. WMI_PEER_VHT_2G = 0x08000000,
  5154. WMI_PEER_PMF = 0x10000000,
  5155. };
  5156. enum wmi_10x_peer_flags {
  5157. WMI_10X_PEER_AUTH = 0x00000001,
  5158. WMI_10X_PEER_QOS = 0x00000002,
  5159. WMI_10X_PEER_NEED_PTK_4_WAY = 0x00000004,
  5160. WMI_10X_PEER_NEED_GTK_2_WAY = 0x00000010,
  5161. WMI_10X_PEER_APSD = 0x00000800,
  5162. WMI_10X_PEER_HT = 0x00001000,
  5163. WMI_10X_PEER_40MHZ = 0x00002000,
  5164. WMI_10X_PEER_STBC = 0x00008000,
  5165. WMI_10X_PEER_LDPC = 0x00010000,
  5166. WMI_10X_PEER_DYN_MIMOPS = 0x00020000,
  5167. WMI_10X_PEER_STATIC_MIMOPS = 0x00040000,
  5168. WMI_10X_PEER_SPATIAL_MUX = 0x00200000,
  5169. WMI_10X_PEER_VHT = 0x02000000,
  5170. WMI_10X_PEER_80MHZ = 0x04000000,
  5171. };
  5172. enum wmi_10_2_peer_flags {
  5173. WMI_10_2_PEER_AUTH = 0x00000001,
  5174. WMI_10_2_PEER_QOS = 0x00000002,
  5175. WMI_10_2_PEER_NEED_PTK_4_WAY = 0x00000004,
  5176. WMI_10_2_PEER_NEED_GTK_2_WAY = 0x00000010,
  5177. WMI_10_2_PEER_APSD = 0x00000800,
  5178. WMI_10_2_PEER_HT = 0x00001000,
  5179. WMI_10_2_PEER_40MHZ = 0x00002000,
  5180. WMI_10_2_PEER_STBC = 0x00008000,
  5181. WMI_10_2_PEER_LDPC = 0x00010000,
  5182. WMI_10_2_PEER_DYN_MIMOPS = 0x00020000,
  5183. WMI_10_2_PEER_STATIC_MIMOPS = 0x00040000,
  5184. WMI_10_2_PEER_SPATIAL_MUX = 0x00200000,
  5185. WMI_10_2_PEER_VHT = 0x02000000,
  5186. WMI_10_2_PEER_80MHZ = 0x04000000,
  5187. WMI_10_2_PEER_VHT_2G = 0x08000000,
  5188. WMI_10_2_PEER_PMF = 0x10000000,
  5189. };
  5190. /*
  5191. * Peer rate capabilities.
  5192. *
  5193. * This is of interest to the ratecontrol
  5194. * module which resides in the firmware. The bit definitions are
  5195. * consistent with that defined in if_athrate.c.
  5196. */
  5197. #define WMI_RC_DS_FLAG 0x01
  5198. #define WMI_RC_CW40_FLAG 0x02
  5199. #define WMI_RC_SGI_FLAG 0x04
  5200. #define WMI_RC_HT_FLAG 0x08
  5201. #define WMI_RC_RTSCTS_FLAG 0x10
  5202. #define WMI_RC_TX_STBC_FLAG 0x20
  5203. #define WMI_RC_RX_STBC_FLAG 0xC0
  5204. #define WMI_RC_RX_STBC_FLAG_S 6
  5205. #define WMI_RC_WEP_TKIP_FLAG 0x100
  5206. #define WMI_RC_TS_FLAG 0x200
  5207. #define WMI_RC_UAPSD_FLAG 0x400
  5208. /* Maximum listen interval supported by hw in units of beacon interval */
  5209. #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
  5210. struct wmi_common_peer_assoc_complete_cmd {
  5211. struct wmi_mac_addr peer_macaddr;
  5212. __le32 vdev_id;
  5213. __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
  5214. __le32 peer_associd; /* 16 LSBs */
  5215. __le32 peer_flags;
  5216. __le32 peer_caps; /* 16 LSBs */
  5217. __le32 peer_listen_intval;
  5218. __le32 peer_ht_caps;
  5219. __le32 peer_max_mpdu;
  5220. __le32 peer_mpdu_density; /* 0..16 */
  5221. __le32 peer_rate_caps;
  5222. struct wmi_rate_set peer_legacy_rates;
  5223. struct wmi_rate_set peer_ht_rates;
  5224. __le32 peer_nss; /* num of spatial streams */
  5225. __le32 peer_vht_caps;
  5226. __le32 peer_phymode;
  5227. struct wmi_vht_rate_set peer_vht_rates;
  5228. };
  5229. struct wmi_main_peer_assoc_complete_cmd {
  5230. struct wmi_common_peer_assoc_complete_cmd cmd;
  5231. /* HT Operation Element of the peer. Five bytes packed in 2
  5232. * INT32 array and filled from lsb to msb. */
  5233. __le32 peer_ht_info[2];
  5234. } __packed;
  5235. struct wmi_10_1_peer_assoc_complete_cmd {
  5236. struct wmi_common_peer_assoc_complete_cmd cmd;
  5237. } __packed;
  5238. #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0
  5239. #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f
  5240. #define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4
  5241. #define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0
  5242. struct wmi_10_2_peer_assoc_complete_cmd {
  5243. struct wmi_common_peer_assoc_complete_cmd cmd;
  5244. __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
  5245. } __packed;
  5246. struct wmi_10_4_peer_assoc_complete_cmd {
  5247. struct wmi_10_2_peer_assoc_complete_cmd cmd;
  5248. __le32 peer_bw_rxnss_override;
  5249. } __packed;
  5250. struct wmi_peer_assoc_complete_arg {
  5251. u8 addr[ETH_ALEN];
  5252. u32 vdev_id;
  5253. bool peer_reassoc;
  5254. u16 peer_aid;
  5255. u32 peer_flags; /* see %WMI_PEER_ */
  5256. u16 peer_caps;
  5257. u32 peer_listen_intval;
  5258. u32 peer_ht_caps;
  5259. u32 peer_max_mpdu;
  5260. u32 peer_mpdu_density; /* 0..16 */
  5261. u32 peer_rate_caps; /* see %WMI_RC_ */
  5262. struct wmi_rate_set_arg peer_legacy_rates;
  5263. struct wmi_rate_set_arg peer_ht_rates;
  5264. u32 peer_num_spatial_streams;
  5265. u32 peer_vht_caps;
  5266. enum wmi_phy_mode peer_phymode;
  5267. struct wmi_vht_rate_set_arg peer_vht_rates;
  5268. };
  5269. struct wmi_peer_add_wds_entry_cmd {
  5270. /* peer MAC address */
  5271. struct wmi_mac_addr peer_macaddr;
  5272. /* wds MAC addr */
  5273. struct wmi_mac_addr wds_macaddr;
  5274. } __packed;
  5275. struct wmi_peer_remove_wds_entry_cmd {
  5276. /* wds MAC addr */
  5277. struct wmi_mac_addr wds_macaddr;
  5278. } __packed;
  5279. struct wmi_peer_q_empty_callback_event {
  5280. /* peer MAC address */
  5281. struct wmi_mac_addr peer_macaddr;
  5282. } __packed;
  5283. /*
  5284. * Channel info WMI event
  5285. */
  5286. struct wmi_chan_info_event {
  5287. __le32 err_code;
  5288. __le32 freq;
  5289. __le32 cmd_flags;
  5290. __le32 noise_floor;
  5291. __le32 rx_clear_count;
  5292. __le32 cycle_count;
  5293. } __packed;
  5294. struct wmi_10_4_chan_info_event {
  5295. __le32 err_code;
  5296. __le32 freq;
  5297. __le32 cmd_flags;
  5298. __le32 noise_floor;
  5299. __le32 rx_clear_count;
  5300. __le32 cycle_count;
  5301. __le32 chan_tx_pwr_range;
  5302. __le32 chan_tx_pwr_tp;
  5303. __le32 rx_frame_count;
  5304. } __packed;
  5305. struct wmi_peer_sta_kickout_event {
  5306. struct wmi_mac_addr peer_macaddr;
  5307. } __packed;
  5308. #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
  5309. #define WMI_CHAN_INFO_FLAG_PRE_COMPLETE BIT(1)
  5310. /* Beacon filter wmi command info */
  5311. #define BCN_FLT_MAX_SUPPORTED_IES 256
  5312. #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
  5313. struct bss_bcn_stats {
  5314. __le32 vdev_id;
  5315. __le32 bss_bcnsdropped;
  5316. __le32 bss_bcnsdelivered;
  5317. } __packed;
  5318. struct bcn_filter_stats {
  5319. __le32 bcns_dropped;
  5320. __le32 bcns_delivered;
  5321. __le32 activefilters;
  5322. struct bss_bcn_stats bss_stats;
  5323. } __packed;
  5324. struct wmi_add_bcn_filter_cmd {
  5325. u32 vdev_id;
  5326. u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
  5327. } __packed;
  5328. enum wmi_sta_keepalive_method {
  5329. WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
  5330. WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
  5331. };
  5332. #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
  5333. /* Firmware crashes if keepalive interval exceeds this limit */
  5334. #define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff
  5335. /* note: ip4 addresses are in network byte order, i.e. big endian */
  5336. struct wmi_sta_keepalive_arp_resp {
  5337. __be32 src_ip4_addr;
  5338. __be32 dest_ip4_addr;
  5339. struct wmi_mac_addr dest_mac_addr;
  5340. } __packed;
  5341. struct wmi_sta_keepalive_cmd {
  5342. __le32 vdev_id;
  5343. __le32 enabled;
  5344. __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
  5345. __le32 interval; /* in seconds */
  5346. struct wmi_sta_keepalive_arp_resp arp_resp;
  5347. } __packed;
  5348. struct wmi_sta_keepalive_arg {
  5349. u32 vdev_id;
  5350. u32 enabled;
  5351. u32 method;
  5352. u32 interval;
  5353. __be32 src_ip4_addr;
  5354. __be32 dest_ip4_addr;
  5355. const u8 dest_mac_addr[ETH_ALEN];
  5356. };
  5357. enum wmi_force_fw_hang_type {
  5358. WMI_FORCE_FW_HANG_ASSERT = 1,
  5359. WMI_FORCE_FW_HANG_NO_DETECT,
  5360. WMI_FORCE_FW_HANG_CTRL_EP_FULL,
  5361. WMI_FORCE_FW_HANG_EMPTY_POINT,
  5362. WMI_FORCE_FW_HANG_STACK_OVERFLOW,
  5363. WMI_FORCE_FW_HANG_INFINITE_LOOP,
  5364. };
  5365. #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
  5366. struct wmi_force_fw_hang_cmd {
  5367. __le32 type;
  5368. __le32 delay_ms;
  5369. } __packed;
  5370. enum ath10k_dbglog_level {
  5371. ATH10K_DBGLOG_LEVEL_VERBOSE = 0,
  5372. ATH10K_DBGLOG_LEVEL_INFO = 1,
  5373. ATH10K_DBGLOG_LEVEL_WARN = 2,
  5374. ATH10K_DBGLOG_LEVEL_ERR = 3,
  5375. };
  5376. /* VAP ids to enable dbglog */
  5377. #define ATH10K_DBGLOG_CFG_VAP_LOG_LSB 0
  5378. #define ATH10K_DBGLOG_CFG_VAP_LOG_MASK 0x0000ffff
  5379. /* to enable dbglog in the firmware */
  5380. #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB 16
  5381. #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK 0x00010000
  5382. /* timestamp resolution */
  5383. #define ATH10K_DBGLOG_CFG_RESOLUTION_LSB 17
  5384. #define ATH10K_DBGLOG_CFG_RESOLUTION_MASK 0x000E0000
  5385. /* number of queued messages before sending them to the host */
  5386. #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20
  5387. #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000
  5388. /*
  5389. * Log levels to enable. This defines the minimum level to enable, this is
  5390. * not a bitmask. See enum ath10k_dbglog_level for the values.
  5391. */
  5392. #define ATH10K_DBGLOG_CFG_LOG_LVL_LSB 28
  5393. #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000
  5394. /*
  5395. * Note: this is a cleaned up version of a struct firmware uses. For
  5396. * example, config_valid was hidden inside an array.
  5397. */
  5398. struct wmi_dbglog_cfg_cmd {
  5399. /* bitmask to hold mod id config*/
  5400. __le32 module_enable;
  5401. /* see ATH10K_DBGLOG_CFG_ */
  5402. __le32 config_enable;
  5403. /* mask of module id bits to be changed */
  5404. __le32 module_valid;
  5405. /* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
  5406. __le32 config_valid;
  5407. } __packed;
  5408. enum wmi_roam_reason {
  5409. WMI_ROAM_REASON_BETTER_AP = 1,
  5410. WMI_ROAM_REASON_BEACON_MISS = 2,
  5411. WMI_ROAM_REASON_LOW_RSSI = 3,
  5412. WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4,
  5413. WMI_ROAM_REASON_HO_FAILED = 5,
  5414. /* keep last */
  5415. WMI_ROAM_REASON_MAX,
  5416. };
  5417. struct wmi_roam_ev {
  5418. __le32 vdev_id;
  5419. __le32 reason;
  5420. } __packed;
  5421. #define ATH10K_FRAGMT_THRESHOLD_MIN 540
  5422. #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
  5423. #define WMI_MAX_EVENT 0x1000
  5424. /* Maximum number of pending TXed WMI packets */
  5425. #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
  5426. /* By default disable power save for IBSS */
  5427. #define ATH10K_DEFAULT_ATIM 0
  5428. #define WMI_MAX_MEM_REQS 16
  5429. struct wmi_scan_ev_arg {
  5430. __le32 event_type; /* %WMI_SCAN_EVENT_ */
  5431. __le32 reason; /* %WMI_SCAN_REASON_ */
  5432. __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
  5433. __le32 scan_req_id;
  5434. __le32 scan_id;
  5435. __le32 vdev_id;
  5436. };
  5437. struct wmi_mgmt_rx_ev_arg {
  5438. __le32 channel;
  5439. __le32 snr;
  5440. __le32 rate;
  5441. __le32 phy_mode;
  5442. __le32 buf_len;
  5443. __le32 status; /* %WMI_RX_STATUS_ */
  5444. };
  5445. struct wmi_ch_info_ev_arg {
  5446. __le32 err_code;
  5447. __le32 freq;
  5448. __le32 cmd_flags;
  5449. __le32 noise_floor;
  5450. __le32 rx_clear_count;
  5451. __le32 cycle_count;
  5452. __le32 chan_tx_pwr_range;
  5453. __le32 chan_tx_pwr_tp;
  5454. __le32 rx_frame_count;
  5455. };
  5456. struct wmi_vdev_start_ev_arg {
  5457. __le32 vdev_id;
  5458. __le32 req_id;
  5459. __le32 resp_type; /* %WMI_VDEV_RESP_ */
  5460. __le32 status;
  5461. };
  5462. struct wmi_peer_kick_ev_arg {
  5463. const u8 *mac_addr;
  5464. };
  5465. struct wmi_swba_ev_arg {
  5466. __le32 vdev_map;
  5467. struct wmi_tim_info_arg tim_info[WMI_MAX_AP_VDEV];
  5468. const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV];
  5469. };
  5470. struct wmi_phyerr_ev_arg {
  5471. u32 tsf_timestamp;
  5472. u16 freq1;
  5473. u16 freq2;
  5474. u8 rssi_combined;
  5475. u8 chan_width_mhz;
  5476. u8 phy_err_code;
  5477. u16 nf_chains[4];
  5478. u32 buf_len;
  5479. const u8 *buf;
  5480. u8 hdr_len;
  5481. };
  5482. struct wmi_phyerr_hdr_arg {
  5483. u32 num_phyerrs;
  5484. u32 tsf_l32;
  5485. u32 tsf_u32;
  5486. u32 buf_len;
  5487. const void *phyerrs;
  5488. };
  5489. struct wmi_svc_rdy_ev_arg {
  5490. __le32 min_tx_power;
  5491. __le32 max_tx_power;
  5492. __le32 ht_cap;
  5493. __le32 vht_cap;
  5494. __le32 sw_ver0;
  5495. __le32 sw_ver1;
  5496. __le32 fw_build;
  5497. __le32 phy_capab;
  5498. __le32 num_rf_chains;
  5499. __le32 eeprom_rd;
  5500. __le32 num_mem_reqs;
  5501. const __le32 *service_map;
  5502. size_t service_map_len;
  5503. const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
  5504. };
  5505. struct wmi_rdy_ev_arg {
  5506. __le32 sw_version;
  5507. __le32 abi_version;
  5508. __le32 status;
  5509. const u8 *mac_addr;
  5510. };
  5511. struct wmi_roam_ev_arg {
  5512. __le32 vdev_id;
  5513. __le32 reason;
  5514. __le32 rssi;
  5515. };
  5516. struct wmi_pdev_temperature_event {
  5517. /* temperature value in Celcius degree */
  5518. __le32 temperature;
  5519. } __packed;
  5520. /* WOW structures */
  5521. enum wmi_wow_wakeup_event {
  5522. WOW_BMISS_EVENT = 0,
  5523. WOW_BETTER_AP_EVENT,
  5524. WOW_DEAUTH_RECVD_EVENT,
  5525. WOW_MAGIC_PKT_RECVD_EVENT,
  5526. WOW_GTK_ERR_EVENT,
  5527. WOW_FOURWAY_HSHAKE_EVENT,
  5528. WOW_EAPOL_RECVD_EVENT,
  5529. WOW_NLO_DETECTED_EVENT,
  5530. WOW_DISASSOC_RECVD_EVENT,
  5531. WOW_PATTERN_MATCH_EVENT,
  5532. WOW_CSA_IE_EVENT,
  5533. WOW_PROBE_REQ_WPS_IE_EVENT,
  5534. WOW_AUTH_REQ_EVENT,
  5535. WOW_ASSOC_REQ_EVENT,
  5536. WOW_HTT_EVENT,
  5537. WOW_RA_MATCH_EVENT,
  5538. WOW_HOST_AUTO_SHUTDOWN_EVENT,
  5539. WOW_IOAC_MAGIC_EVENT,
  5540. WOW_IOAC_SHORT_EVENT,
  5541. WOW_IOAC_EXTEND_EVENT,
  5542. WOW_IOAC_TIMER_EVENT,
  5543. WOW_DFS_PHYERR_RADAR_EVENT,
  5544. WOW_BEACON_EVENT,
  5545. WOW_CLIENT_KICKOUT_EVENT,
  5546. WOW_EVENT_MAX,
  5547. };
  5548. #define C2S(x) case x: return #x
  5549. static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
  5550. {
  5551. switch (ev) {
  5552. C2S(WOW_BMISS_EVENT);
  5553. C2S(WOW_BETTER_AP_EVENT);
  5554. C2S(WOW_DEAUTH_RECVD_EVENT);
  5555. C2S(WOW_MAGIC_PKT_RECVD_EVENT);
  5556. C2S(WOW_GTK_ERR_EVENT);
  5557. C2S(WOW_FOURWAY_HSHAKE_EVENT);
  5558. C2S(WOW_EAPOL_RECVD_EVENT);
  5559. C2S(WOW_NLO_DETECTED_EVENT);
  5560. C2S(WOW_DISASSOC_RECVD_EVENT);
  5561. C2S(WOW_PATTERN_MATCH_EVENT);
  5562. C2S(WOW_CSA_IE_EVENT);
  5563. C2S(WOW_PROBE_REQ_WPS_IE_EVENT);
  5564. C2S(WOW_AUTH_REQ_EVENT);
  5565. C2S(WOW_ASSOC_REQ_EVENT);
  5566. C2S(WOW_HTT_EVENT);
  5567. C2S(WOW_RA_MATCH_EVENT);
  5568. C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT);
  5569. C2S(WOW_IOAC_MAGIC_EVENT);
  5570. C2S(WOW_IOAC_SHORT_EVENT);
  5571. C2S(WOW_IOAC_EXTEND_EVENT);
  5572. C2S(WOW_IOAC_TIMER_EVENT);
  5573. C2S(WOW_DFS_PHYERR_RADAR_EVENT);
  5574. C2S(WOW_BEACON_EVENT);
  5575. C2S(WOW_CLIENT_KICKOUT_EVENT);
  5576. C2S(WOW_EVENT_MAX);
  5577. default:
  5578. return NULL;
  5579. }
  5580. }
  5581. enum wmi_wow_wake_reason {
  5582. WOW_REASON_UNSPECIFIED = -1,
  5583. WOW_REASON_NLOD = 0,
  5584. WOW_REASON_AP_ASSOC_LOST,
  5585. WOW_REASON_LOW_RSSI,
  5586. WOW_REASON_DEAUTH_RECVD,
  5587. WOW_REASON_DISASSOC_RECVD,
  5588. WOW_REASON_GTK_HS_ERR,
  5589. WOW_REASON_EAP_REQ,
  5590. WOW_REASON_FOURWAY_HS_RECV,
  5591. WOW_REASON_TIMER_INTR_RECV,
  5592. WOW_REASON_PATTERN_MATCH_FOUND,
  5593. WOW_REASON_RECV_MAGIC_PATTERN,
  5594. WOW_REASON_P2P_DISC,
  5595. WOW_REASON_WLAN_HB,
  5596. WOW_REASON_CSA_EVENT,
  5597. WOW_REASON_PROBE_REQ_WPS_IE_RECV,
  5598. WOW_REASON_AUTH_REQ_RECV,
  5599. WOW_REASON_ASSOC_REQ_RECV,
  5600. WOW_REASON_HTT_EVENT,
  5601. WOW_REASON_RA_MATCH,
  5602. WOW_REASON_HOST_AUTO_SHUTDOWN,
  5603. WOW_REASON_IOAC_MAGIC_EVENT,
  5604. WOW_REASON_IOAC_SHORT_EVENT,
  5605. WOW_REASON_IOAC_EXTEND_EVENT,
  5606. WOW_REASON_IOAC_TIMER_EVENT,
  5607. WOW_REASON_ROAM_HO,
  5608. WOW_REASON_DFS_PHYERR_RADADR_EVENT,
  5609. WOW_REASON_BEACON_RECV,
  5610. WOW_REASON_CLIENT_KICKOUT_EVENT,
  5611. WOW_REASON_DEBUG_TEST = 0xFF,
  5612. };
  5613. static inline const char *wow_reason(enum wmi_wow_wake_reason reason)
  5614. {
  5615. switch (reason) {
  5616. C2S(WOW_REASON_UNSPECIFIED);
  5617. C2S(WOW_REASON_NLOD);
  5618. C2S(WOW_REASON_AP_ASSOC_LOST);
  5619. C2S(WOW_REASON_LOW_RSSI);
  5620. C2S(WOW_REASON_DEAUTH_RECVD);
  5621. C2S(WOW_REASON_DISASSOC_RECVD);
  5622. C2S(WOW_REASON_GTK_HS_ERR);
  5623. C2S(WOW_REASON_EAP_REQ);
  5624. C2S(WOW_REASON_FOURWAY_HS_RECV);
  5625. C2S(WOW_REASON_TIMER_INTR_RECV);
  5626. C2S(WOW_REASON_PATTERN_MATCH_FOUND);
  5627. C2S(WOW_REASON_RECV_MAGIC_PATTERN);
  5628. C2S(WOW_REASON_P2P_DISC);
  5629. C2S(WOW_REASON_WLAN_HB);
  5630. C2S(WOW_REASON_CSA_EVENT);
  5631. C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV);
  5632. C2S(WOW_REASON_AUTH_REQ_RECV);
  5633. C2S(WOW_REASON_ASSOC_REQ_RECV);
  5634. C2S(WOW_REASON_HTT_EVENT);
  5635. C2S(WOW_REASON_RA_MATCH);
  5636. C2S(WOW_REASON_HOST_AUTO_SHUTDOWN);
  5637. C2S(WOW_REASON_IOAC_MAGIC_EVENT);
  5638. C2S(WOW_REASON_IOAC_SHORT_EVENT);
  5639. C2S(WOW_REASON_IOAC_EXTEND_EVENT);
  5640. C2S(WOW_REASON_IOAC_TIMER_EVENT);
  5641. C2S(WOW_REASON_ROAM_HO);
  5642. C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT);
  5643. C2S(WOW_REASON_BEACON_RECV);
  5644. C2S(WOW_REASON_CLIENT_KICKOUT_EVENT);
  5645. C2S(WOW_REASON_DEBUG_TEST);
  5646. default:
  5647. return NULL;
  5648. }
  5649. }
  5650. #undef C2S
  5651. struct wmi_wow_ev_arg {
  5652. u32 vdev_id;
  5653. u32 flag;
  5654. enum wmi_wow_wake_reason wake_reason;
  5655. u32 data_len;
  5656. };
  5657. #define WOW_MIN_PATTERN_SIZE 1
  5658. #define WOW_MAX_PATTERN_SIZE 148
  5659. #define WOW_MAX_PKT_OFFSET 128
  5660. enum wmi_tdls_state {
  5661. WMI_TDLS_DISABLE,
  5662. WMI_TDLS_ENABLE_PASSIVE,
  5663. WMI_TDLS_ENABLE_ACTIVE,
  5664. };
  5665. enum wmi_tdls_peer_state {
  5666. WMI_TDLS_PEER_STATE_PEERING,
  5667. WMI_TDLS_PEER_STATE_CONNECTED,
  5668. WMI_TDLS_PEER_STATE_TEARDOWN,
  5669. };
  5670. struct wmi_tdls_peer_update_cmd_arg {
  5671. u32 vdev_id;
  5672. enum wmi_tdls_peer_state peer_state;
  5673. u8 addr[ETH_ALEN];
  5674. };
  5675. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  5676. struct wmi_tdls_peer_capab_arg {
  5677. u8 peer_uapsd_queues;
  5678. u8 peer_max_sp;
  5679. u32 buff_sta_support;
  5680. u32 off_chan_support;
  5681. u32 peer_curr_operclass;
  5682. u32 self_curr_operclass;
  5683. u32 peer_chan_len;
  5684. u32 peer_operclass_len;
  5685. u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  5686. u32 is_peer_responder;
  5687. u32 pref_offchan_num;
  5688. u32 pref_offchan_bw;
  5689. };
  5690. enum wmi_txbf_conf {
  5691. WMI_TXBF_CONF_UNSUPPORTED,
  5692. WMI_TXBF_CONF_BEFORE_ASSOC,
  5693. WMI_TXBF_CONF_AFTER_ASSOC,
  5694. };
  5695. #define WMI_CCA_DETECT_LEVEL_AUTO 0
  5696. #define WMI_CCA_DETECT_MARGIN_AUTO 0
  5697. struct wmi_pdev_set_adaptive_cca_params {
  5698. __le32 enable;
  5699. __le32 cca_detect_level;
  5700. __le32 cca_detect_margin;
  5701. } __packed;
  5702. struct ath10k;
  5703. struct ath10k_vif;
  5704. struct ath10k_fw_stats_pdev;
  5705. struct ath10k_fw_stats_peer;
  5706. struct ath10k_fw_stats;
  5707. int ath10k_wmi_attach(struct ath10k *ar);
  5708. void ath10k_wmi_detach(struct ath10k *ar);
  5709. void ath10k_wmi_free_host_mem(struct ath10k *ar);
  5710. int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
  5711. int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
  5712. struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
  5713. int ath10k_wmi_connect(struct ath10k *ar);
  5714. struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
  5715. int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
  5716. int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
  5717. u32 cmd_id);
  5718. void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
  5719. void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
  5720. struct ath10k_fw_stats_pdev *dst);
  5721. void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
  5722. struct ath10k_fw_stats_pdev *dst);
  5723. void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
  5724. struct ath10k_fw_stats_pdev *dst);
  5725. void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
  5726. struct ath10k_fw_stats_pdev *dst);
  5727. void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
  5728. struct ath10k_fw_stats_peer *dst);
  5729. void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
  5730. struct wmi_host_mem_chunks *chunks);
  5731. void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
  5732. const struct wmi_start_scan_arg *arg);
  5733. void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
  5734. const struct wmi_wmm_params_arg *arg);
  5735. void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
  5736. const struct wmi_channel_arg *arg);
  5737. int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
  5738. int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
  5739. int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
  5740. void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
  5741. void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
  5742. int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
  5743. void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
  5744. void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
  5745. void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
  5746. void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
  5747. void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
  5748. void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
  5749. void ath10k_wmi_event_dfs(struct ath10k *ar,
  5750. struct wmi_phyerr_ev_arg *phyerr, u64 tsf);
  5751. void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
  5752. struct wmi_phyerr_ev_arg *phyerr,
  5753. u64 tsf);
  5754. void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
  5755. void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
  5756. void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
  5757. void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
  5758. void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
  5759. void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
  5760. void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
  5761. struct sk_buff *skb);
  5762. void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
  5763. struct sk_buff *skb);
  5764. void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
  5765. void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
  5766. void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
  5767. void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
  5768. void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
  5769. void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
  5770. struct sk_buff *skb);
  5771. void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
  5772. void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
  5773. void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
  5774. void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
  5775. struct sk_buff *skb);
  5776. void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
  5777. void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
  5778. void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
  5779. void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
  5780. int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
  5781. int ath10k_wmi_op_pull_phyerr_ev(struct ath10k *ar, const void *phyerr_buf,
  5782. int left_len, struct wmi_phyerr_ev_arg *arg);
  5783. void ath10k_wmi_main_op_fw_stats_fill(struct ath10k *ar,
  5784. struct ath10k_fw_stats *fw_stats,
  5785. char *buf);
  5786. void ath10k_wmi_10x_op_fw_stats_fill(struct ath10k *ar,
  5787. struct ath10k_fw_stats *fw_stats,
  5788. char *buf);
  5789. size_t ath10k_wmi_fw_stats_num_peers(struct list_head *head);
  5790. size_t ath10k_wmi_fw_stats_num_vdevs(struct list_head *head);
  5791. void ath10k_wmi_10_4_op_fw_stats_fill(struct ath10k *ar,
  5792. struct ath10k_fw_stats *fw_stats,
  5793. char *buf);
  5794. int ath10k_wmi_op_get_vdev_subtype(struct ath10k *ar,
  5795. enum wmi_vdev_subtype subtype);
  5796. #endif /* _WMI_H_ */