wmi_unified_param.h 181 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519
  1. /*
  2. * Copyright (c) 2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * This file contains the API definitions for the Unified Wireless Module
  28. * Interface (WMI).
  29. */
  30. #ifndef _WMI_UNIFIED_PARAM_H_
  31. #define _WMI_UNIFIED_PARAM_H_
  32. #define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
  33. #define WMI_MAC_MAX_SSID_LENGTH 32
  34. #define WMI_SCAN_MAX_NUM_SSID 0x0A
  35. #define mgmt_tx_dl_frm_len 64
  36. #define WMI_SMPS_MASK_LOWER_16BITS 0xFF
  37. #define WMI_SMPS_MASK_UPPER_3BITS 0x7
  38. #define WMI_SMPS_PARAM_VALUE_S 29
  39. #define WMI_MAX_NUM_ARGS 8
  40. /* The size of the utc time in bytes. */
  41. #define WMI_SIZE_UTC_TIME (10)
  42. /* The size of the utc time error in bytes. */
  43. #define WMI_SIZE_UTC_TIME_ERROR (5)
  44. #define WMI_MCC_MIN_CHANNEL_QUOTA 20
  45. #define WMI_MCC_MAX_CHANNEL_QUOTA 80
  46. #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
  47. #define WMI_BEACON_TX_BUFFER_SIZE (512)
  48. #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
  49. #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  50. #define WMI_RSSI_THOLD_DEFAULT -300
  51. #define WMI_NLO_FREQ_THRESH 1000
  52. #define WMI_SEC_TO_MSEC(sec) (sec * 1000)
  53. #define WMI_MSEC_TO_USEC(msec) (msec * 1000)
  54. #define WMI_ETH_LEN 64
  55. #define WMI_QOS_NUM_TSPEC_MAX 2
  56. #define WMI_QOS_NUM_AC_MAX 4
  57. #define WMI_IPV4_ADDR_LEN 4
  58. #define WMI_KEEP_ALIVE_NULL_PKT 1
  59. #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
  60. #define WMI_MAC_MAX_KEY_LENGTH 32
  61. #define WMI_KRK_KEY_LEN 16
  62. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  63. #define WMI_BTK_KEY_LEN 32
  64. #define WMI_ROAM_R0KH_ID_MAX_LEN 48
  65. #define WMI_ROAM_SCAN_PSK_SIZE 32
  66. #endif
  67. #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96)
  68. #define WMI_MAC_IPV6_ADDR_LEN 16
  69. #define WMI_OFFLOAD_DISABLE 0
  70. #define WMI_OFFLOAD_ENABLE 1
  71. #ifdef WLAN_NS_OFFLOAD
  72. /* support only one IPv6 offload */
  73. #define WMI_MAC_NS_OFFLOAD_SIZE 1
  74. /* Number of target IP V6 addresses for NS offload */
  75. #define WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16
  76. #define WMI_IPV6_ADDR_VALID 1
  77. #endif /* WLAN_NS_OFFLOAD */
  78. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  79. #define WMI_ROAM_MAX_CHANNELS 80
  80. #ifdef FEATURE_WLAN_EXTSCAN
  81. #define WMI_MAX_EXTSCAN_MSG_SIZE 1536
  82. #define WMI_EXTSCAN_REST_TIME 100
  83. #define WMI_EXTSCAN_MAX_SCAN_TIME 50000
  84. #define WMI_EXTSCAN_BURST_DURATION 150
  85. #endif
  86. #define WMI_SCAN_NPROBES_DEFAULT (2)
  87. #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
  88. #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
  89. #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
  90. #define MAX_UTF_EVENT_LENGTH 2048
  91. #define MAX_WMI_UTF_LEN 252
  92. #define MAX_WMI_QVIT_LEN 252
  93. #define THERMAL_LEVELS 4
  94. #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256
  95. #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \
  96. (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
  97. #define LTEU_MAX_BINS 10
  98. #define ATF_ACTIVED_MAX_CLIENTS 50
  99. #define ATF_ACTIVED_MAX_ATFGROUPS 8
  100. #define CTL_5G_SIZE 1536
  101. #define CTL_2G_SIZE 684
  102. #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)
  103. #define IEEE80211_MICBUF_SIZE (8+8)
  104. #define IEEE80211_TID_SIZE 17
  105. #define WME_NUM_AC 4
  106. #define SMART_ANT_MODE_SERIAL 0
  107. #define SMART_ANT_MODE_PARALLEL 1
  108. #define IEEE80211_WEP_NKID 4 /* number of key ids */
  109. #define WPI_IV_LEN 16
  110. #define WMI_SCAN_MAX_NUM_BSSID 10
  111. #define MAX_CHANS 1023
  112. #define TARGET_OEM_CONFIGURE_LCI 0x0A
  113. #define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF
  114. #define TARGET_OEM_CONFIGURE_LCR 0x09
  115. #define RTT_TIMEOUT_MS 180
  116. #define MAX_SUPPORTED_RATES 128
  117. #define WMI_HOST_MAX_BUFFER_SIZE 1712
  118. #define WMI_HAL_MAX_SANTENNA 4
  119. #define WMI_HOST_F_MS(_v, _f) \
  120. (((_v) & (_f)) >> (_f##_S))
  121. #define WMI_HOST_F_RMW(_var, _v, _f) \
  122. do { \
  123. (_var) &= ~(_f); \
  124. (_var) |= (((_v) << (_f##_S)) & (_f)); \
  125. } while (0)
  126. /* TXBF capabilities masks */
  127. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0
  128. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1
  129. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \
  130. (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S)
  131. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \
  132. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
  133. #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \
  134. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
  135. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1
  136. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1
  137. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \
  138. (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S)
  139. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \
  140. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
  141. #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \
  142. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
  143. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2
  144. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1
  145. #define WMI_HOST_TXBF_CONF_SU_TX_BFER \
  146. (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S)
  147. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \
  148. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER)
  149. #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \
  150. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER)
  151. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3
  152. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1
  153. #define WMI_HOST_TXBF_CONF_MU_TX_BFER \
  154. (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S)
  155. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \
  156. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER)
  157. #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \
  158. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER)
  159. #define WMI_HOST_TXBF_CONF_STS_CAP_S 4
  160. #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7
  161. #define WMI_HOST_TXBF_CONF_STS_CAP \
  162. (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S)
  163. #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \
  164. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP);
  165. #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \
  166. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP)
  167. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7
  168. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1
  169. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \
  170. (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S)
  171. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \
  172. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
  173. #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \
  174. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
  175. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8
  176. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7
  177. #define WMI_HOST_TXBF_CONF_BF_SND_DIM \
  178. (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S)
  179. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \
  180. WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM)
  181. #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \
  182. WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM)
  183. #define WMI_HOST_TPC_RATE_MAX 160
  184. #define WMI_HOST_TPC_TX_NUM_CHAIN 4
  185. #define WMI_HOST_RXG_CAL_CHAN_MAX 4
  186. #define WMI_HOST_MAX_NUM_CHAINS 4
  187. #define WMI_MAX_NUM_OF_RATE_THRESH 4
  188. #include "qdf_atomic.h"
  189. #ifdef BIG_ENDIAN_HOST
  190. /* This API is used in copying in elements to WMI message,
  191. since WMI message uses multilpes of 4 bytes, This API
  192. converts length into multiples of 4 bytes, and performs copy
  193. */
  194. #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \
  195. int j; \
  196. u_int32_t *src, *dest; \
  197. src = (u_int32_t *)srcp; \
  198. dest = (u_int32_t *)destp; \
  199. for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \
  200. *(dest+j) = qdf_le32_to_cpu(*(src+j)); \
  201. } \
  202. } while (0)
  203. #else
  204. #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\
  205. srcp, len)
  206. #endif
  207. /** macro to convert MAC address from WMI word format to char array */
  208. #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
  209. (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
  210. (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
  211. (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
  212. (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
  213. (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
  214. (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
  215. } while (0)
  216. #define TARGET_INIT_STATUS_SUCCESS 0x0
  217. #define TARGET_INIT_STATUS_GEN_FAILED 0x1
  218. #define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
  219. #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
  220. typedef uint32_t TARGET_INIT_STATUS;
  221. typedef enum {
  222. WMI_HOST_MODE_11A = 0, /* 11a Mode */
  223. WMI_HOST_MODE_11G = 1, /* 11b/g Mode */
  224. WMI_HOST_MODE_11B = 2, /* 11b Mode */
  225. WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */
  226. WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */
  227. WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */
  228. WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */
  229. WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */
  230. WMI_HOST_MODE_11AC_VHT20 = 8,
  231. WMI_HOST_MODE_11AC_VHT40 = 9,
  232. WMI_HOST_MODE_11AC_VHT80 = 10,
  233. WMI_HOST_MODE_11AC_VHT20_2G = 11,
  234. WMI_HOST_MODE_11AC_VHT40_2G = 12,
  235. WMI_HOST_MODE_11AC_VHT80_2G = 13,
  236. WMI_HOST_MODE_11AC_VHT80_80 = 14,
  237. WMI_HOST_MODE_11AC_VHT160 = 15,
  238. WMI_HOST_MODE_UNKNOWN = 16,
  239. WMI_HOST_MODE_MAX = 16
  240. } WMI_HOST_WLAN_PHY_MODE;
  241. /**
  242. * enum wmi_dwelltime_adaptive_mode: dwelltime_mode
  243. * @WMI_DWELL_MODE_DEFAULT: Use firmware default mode
  244. * @WMI_DWELL_MODE_CONSERVATIVE: Conservative adaptive mode
  245. * @WMI_DWELL_MODE_MODERATE: Moderate adaptive mode
  246. * @WMI_DWELL_MODE_AGGRESSIVE: Aggressive adaptive mode
  247. * @WMI_DWELL_MODE_STATIC: static adaptive mode
  248. */
  249. enum wmi_dwelltime_adaptive_mode {
  250. WMI_DWELL_MODE_DEFAULT = 0,
  251. WMI_DWELL_MODE_CONSERVATIVE = 1,
  252. WMI_DWELL_MODE_MODERATE = 2,
  253. WMI_DWELL_MODE_AGGRESSIVE = 3,
  254. WMI_DWELL_MODE_STATIC = 4
  255. };
  256. #define MAX_NUM_CHAN 128
  257. /* WME stream classes */
  258. #define WMI_HOST_AC_BE 0 /* best effort */
  259. #define WMI_HOST_AC_BK 1 /* background */
  260. #define WMI_HOST_AC_VI 2 /* video */
  261. #define WMI_HOST_AC_VO 3 /* voice */
  262. #define WMI_TID_TO_AC(_tid) (\
  263. (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
  264. (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
  265. (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
  266. WMI_HOST_AC_VO)
  267. /**
  268. * struct vdev_create_params - vdev create cmd parameter
  269. * @if_id: interface id
  270. * @type: interface type
  271. * @subtype: interface subtype
  272. */
  273. struct vdev_create_params {
  274. uint8_t if_id;
  275. uint32_t type;
  276. uint32_t subtype;
  277. uint8_t nss_2g;
  278. uint8_t nss_5g;
  279. };
  280. /**
  281. * struct vdev_delete_params - vdev delete cmd parameter
  282. * @if_id: interface id
  283. */
  284. struct vdev_delete_params {
  285. uint8_t if_id;
  286. };
  287. /**
  288. * struct channel_param - Channel paramters with all
  289. * info required by target.
  290. * @chan_id: channel id
  291. * @pwr: channel power
  292. * @mhz: channel frequency
  293. * @half_rate: is half rate
  294. * @quarter_rate: is quarter rate
  295. * @dfs_set: is dfs channel
  296. * @dfs_set_cfreq2: is secondary freq dfs channel
  297. * @is_chan_passive: is this passive channel
  298. * @allow_ht: HT allowed in chan
  299. * @allow_vht: VHT allowed on chan
  300. * @phy_mode: phymode (vht80 or ht40 or ...)
  301. * @cfreq1: centre frequency on primary
  302. * @cfreq2: centre frequency on secondary
  303. * @maxpower: max power for channel
  304. * @minpower: min power for channel
  305. * @maxreqpower: Max regulatory power
  306. * @antennamac: Max antenna
  307. * @reg_class_id: Regulatory class id.
  308. */
  309. struct channel_param {
  310. uint8_t chan_id;
  311. uint8_t pwr;
  312. uint32_t mhz;
  313. uint32_t half_rate:1,
  314. quarter_rate:1,
  315. dfs_set:1,
  316. dfs_set_cfreq2:1,
  317. is_chan_passive:1,
  318. allow_ht:1,
  319. allow_vht:1;
  320. uint32_t phy_mode;
  321. uint32_t cfreq1;
  322. uint32_t cfreq2;
  323. int8_t maxpower;
  324. int8_t minpower;
  325. int8_t maxregpower;
  326. uint8_t antennamax;
  327. uint8_t reg_class_id;
  328. };
  329. /**
  330. * struct vdev_stop_params - vdev stop cmd parameter
  331. * @vdev_id: vdev id
  332. */
  333. struct vdev_stop_params {
  334. uint8_t vdev_id;
  335. };
  336. /**
  337. * struct vdev_up_params - vdev up cmd parameter
  338. * @vdev_id: vdev id
  339. * @assoc_id: association id
  340. */
  341. struct vdev_up_params {
  342. uint8_t vdev_id;
  343. uint16_t assoc_id;
  344. };
  345. /**
  346. * struct vdev_down_params - vdev down cmd parameter
  347. * @vdev_id: vdev id
  348. */
  349. struct vdev_down_params {
  350. uint8_t vdev_id;
  351. };
  352. /**
  353. * struct mac_ssid - mac ssid structure
  354. * @length:
  355. * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
  356. */
  357. struct mac_ssid {
  358. uint8_t length;
  359. uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
  360. } qdf_packed;
  361. /**
  362. * struct vdev_start_params - vdev start cmd parameter
  363. * @vdev_id: vdev id
  364. * @chan_freq: channel frequency
  365. * @chan_mode: channel mode
  366. * @band_center_freq1: center freq 1
  367. * @band_center_freq2: center freq 2
  368. * @flags: flags to set like pmf_enabled etc.
  369. * @is_dfs: flag to check if dfs enabled
  370. * @beacon_intval: beacon interval
  371. * @dtim_period: dtim period
  372. * @max_txpow: max tx power
  373. * @is_restart: flag to check if it is vdev
  374. * @ssid: ssid and ssid length info
  375. * @preferred_tx_streams: preferred tx streams
  376. * @preferred_rx_streams: preferred rx streams
  377. * @intr_update: flag to check if need to update
  378. * required wma interface params
  379. * @intr_ssid: pointer to wma interface ssid
  380. * @intr_flags: poiter to wma interface flags
  381. * @requestor_id: to update requestor id
  382. * @disable_hw_ack: to update disable hw ack flag
  383. * @info: to update channel info
  384. * @reg_info_1: to update min power, max power,
  385. * reg power and reg class id
  386. * @reg_info_2: to update antennamax
  387. * @oper_mode: Operating mode
  388. * @dfs_pri_multiplier: DFS primary multiplier
  389. * allow pulse if they are within multiple of PRI for the radar type
  390. * @dot11_mode: Phy mode (VHT20/VHT80...)
  391. * @disable_hw_ack: Disable hw ack if chan is dfs channel for cac
  392. * @channel_param: Channel params required by target.
  393. */
  394. struct vdev_start_params {
  395. uint8_t vdev_id;
  396. uint32_t chan_freq;
  397. uint32_t chan_mode;
  398. uint32_t band_center_freq1;
  399. uint32_t band_center_freq2;
  400. uint32_t flags;
  401. bool is_dfs;
  402. uint32_t beacon_intval;
  403. uint32_t dtim_period;
  404. int32_t max_txpow;
  405. bool is_restart;
  406. bool is_half_rate;
  407. bool is_quarter_rate;
  408. uint32_t dis_hw_ack;
  409. uint32_t flag_dfs;
  410. uint8_t hidden_ssid;
  411. uint8_t pmf_enabled;
  412. struct mac_ssid ssid;
  413. uint32_t num_noa_descriptors;
  414. uint32_t preferred_rx_streams;
  415. uint32_t preferred_tx_streams;
  416. #ifdef WMI_NON_TLV_SUPPORT
  417. uint8_t oper_mode;
  418. int32_t dfs_pri_multiplier;
  419. uint8_t dot11_mode;
  420. uint8_t disable_hw_ack;
  421. struct channel_param channel;
  422. #endif
  423. };
  424. /**
  425. * struct hidden_ssid_vdev_restart_params -
  426. * vdev restart cmd parameter
  427. * @session_id: session id
  428. * @ssid_len: ssid length
  429. * @ssid: ssid
  430. * @flags: flags
  431. * @requestor_id: requestor id
  432. * @disable_hw_ack: flag to disable hw ack feature
  433. * @mhz: channel frequency
  434. * @band_center_freq1: center freq 1
  435. * @band_center_freq2: center freq 2
  436. * @info: channel info
  437. * @reg_info_1: contains min power, max power,
  438. * reg power and reg class id
  439. * @reg_info_2: contains antennamax
  440. * @hidden_ssid_restart_in_progress:
  441. * flag to check if restart is in progress
  442. */
  443. struct hidden_ssid_vdev_restart_params {
  444. uint8_t session_id;
  445. uint32_t ssid_len;
  446. uint32_t ssid[8];
  447. uint32_t flags;
  448. uint32_t requestor_id;
  449. uint32_t disable_hw_ack;
  450. uint32_t mhz;
  451. uint32_t band_center_freq1;
  452. uint32_t band_center_freq2;
  453. uint32_t info;
  454. uint32_t reg_info_1;
  455. uint32_t reg_info_2;
  456. qdf_atomic_t hidden_ssid_restart_in_progress;
  457. };
  458. /**
  459. * struct vdev_set_params - vdev set cmd parameter
  460. * @if_id: vdev id
  461. * @param_id: parameter id
  462. * @param_value: parameter value
  463. */
  464. struct vdev_set_params {
  465. uint32_t if_id;
  466. uint32_t param_id;
  467. uint32_t param_value;
  468. };
  469. /**
  470. * struct vdev_install_key_params - vdev key set cmd parameter
  471. * @wk_keylen: key length
  472. * @wk_flags: key flags
  473. * @ic_cipher: cipher
  474. * @if_id: vdev id
  475. * @is_group_key: Group key
  476. * @wk_keyix: key index
  477. * @def_keyid: default key index
  478. * @wk_keytsc: Key TSC
  479. * @wk_keyrsc: key RSC
  480. * @key_data: pounter to key data
  481. * @force_none: force
  482. * @is_host_based_crypt: Host based encrypt
  483. * @is_xmit_or_recv_key: xmit or recieve key
  484. * @wk_recviv: WAPI recv IV
  485. * @wk_txiv: WAPI TX IV
  486. */
  487. struct vdev_install_key_params {
  488. uint8_t wk_keylen;
  489. uint16_t wk_flags;
  490. uint8_t ic_cipher;
  491. uint8_t if_id;
  492. bool is_group_key;
  493. uint16_t wk_keyix;
  494. uint8_t def_keyid;
  495. uint64_t wk_keytsc;
  496. uint64_t *wk_keyrsc;
  497. uint8_t *key_data;
  498. uint8_t force_none;
  499. bool is_host_based_crypt;
  500. bool is_xmit_or_recv_key;
  501. #if ATH_SUPPORT_WAPI
  502. uint8_t *wk_recviv;
  503. uint32_t *wk_txiv;
  504. #endif
  505. };
  506. /**
  507. * struct peer_delete_params - peer delete cmd parameter
  508. * @vdev_id: vdev id
  509. */
  510. struct peer_delete_params {
  511. uint8_t vdev_id;
  512. };
  513. /**
  514. * struct peer_flush_params - peer flush cmd parameter
  515. * @peer_tid_bitmap: peer tid bitmap
  516. * @vdev_id: vdev id
  517. */
  518. struct peer_flush_params {
  519. uint32_t peer_tid_bitmap;
  520. uint8_t vdev_id;
  521. };
  522. /**
  523. * struct peer_set_params - peer set cmd parameter
  524. * @param_id: parameter id
  525. * @param_value: parameter value
  526. * @vdev_id: vdev id
  527. */
  528. struct peer_set_params {
  529. uint32_t param_id;
  530. uint32_t param_value;
  531. uint32_t vdev_id;
  532. };
  533. /**
  534. * struct peer_create_params - peer create cmd parameter
  535. * @peer_addr: peer mac addr
  536. * @peer_type: peer type
  537. * @vdev_id: vdev id
  538. */
  539. struct peer_create_params {
  540. const uint8_t *peer_addr;
  541. uint32_t peer_type;
  542. uint32_t vdev_id;
  543. };
  544. /**
  545. * struct peer_remove_params - peer remove cmd parameter
  546. * @bssid: bss id
  547. * @vdev_id: vdev id
  548. * @roam_synch_in_progress: flag to indicate if roaming is in progress
  549. */
  550. struct peer_remove_params {
  551. uint8_t *bssid;
  552. uint8_t vdev_id;
  553. bool roam_synch_in_progress;
  554. };
  555. /**
  556. * Stats ID enums defined in host
  557. */
  558. typedef enum {
  559. WMI_HOST_REQUEST_PEER_STAT = 0x01,
  560. WMI_HOST_REQUEST_AP_STAT = 0x02,
  561. WMI_HOST_REQUEST_PDEV_STAT = 0x04,
  562. WMI_HOST_REQUEST_VDEV_STAT = 0x08,
  563. WMI_HOST_REQUEST_BCNFLT_STAT = 0x10,
  564. WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20,
  565. WMI_HOST_REQUEST_INST_STAT = 0x40,
  566. WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80,
  567. WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100,
  568. } wmi_host_stats_id;
  569. typedef struct {
  570. uint16_t cfg_retry_count;
  571. uint16_t retry_count;
  572. } wmi_host_inst_rssi_args;
  573. /**
  574. * struct stats_request_params - stats_request cmd parameter
  575. * @stats_id: statistics id
  576. * @vdev_id: vdev id
  577. * @wmi_host_inst_rssi_args: Instantaneous rssi stats args
  578. */
  579. struct stats_request_params {
  580. uint32_t stats_id;
  581. uint32_t vdev_id;
  582. #ifdef WMI_NON_TLV_SUPPORT
  583. wmi_host_inst_rssi_args rssi_args;
  584. #endif
  585. };
  586. /**
  587. * struct bss_chan_info_request_params - BSS chan info params
  588. * @param: parameter value
  589. */
  590. struct bss_chan_info_request_params {
  591. uint32_t param;
  592. };
  593. /**
  594. * struct green_ap_ps_params - green ap ps cmd parameter
  595. * @value: parameter value
  596. */
  597. struct green_ap_ps_params {
  598. uint32_t value;
  599. };
  600. /**
  601. * struct wow_cmd_params - wow cmd parameter
  602. * @enable: wow enable or disable flag
  603. * @can_suspend_link: flag to indicate if link can be suspended
  604. * @pause_iface_config: interface config
  605. */
  606. struct wow_cmd_params {
  607. bool enable;
  608. bool can_suspend_link;
  609. uint8_t pause_iface_config;
  610. };
  611. /**
  612. * struct wow_add_wakeup_params - wow wakeup parameter
  613. * @type: param type
  614. */
  615. struct wow_add_wakeup_params {
  616. uint32_t type;
  617. };
  618. /**
  619. * struct wow_add_wakeup_pattern_params - Add WoW pattern params
  620. * @pattern_bytes: pointer to pattern bytes
  621. * @mask_bytes: pointer to mask bytes
  622. * @pattern_len: pattern length
  623. * @pattern_id: pattern id
  624. */
  625. struct wow_add_wakeup_pattern_params {
  626. uint8_t *pattern_bytes;
  627. uint8_t *mask_bytes;
  628. uint32_t pattern_len;
  629. uint32_t pattern_id;
  630. };
  631. /**
  632. * struct wow_remove_wakeup_pattern params - WoW remove pattern param
  633. * @pattern_bytes: pointer to pattern bytes
  634. * @mask_bytes: Mask bytes
  635. * @pattern_id: pattern identifier
  636. */
  637. struct wow_remove_wakeup_pattern_params {
  638. uint32_t *pattern_bytes;
  639. uint32_t *mask_bytes;
  640. uint32_t pattern_id;
  641. };
  642. /**
  643. * struct packet_enable_params - packet enable cmd parameter
  644. * @vdev_id: vdev id
  645. * @enable: flag to indicate if parameter can be enabled or disabled
  646. */
  647. struct packet_enable_params {
  648. uint8_t vdev_id;
  649. bool enable;
  650. };
  651. /**
  652. * struct suspend_params - suspend cmd parameter
  653. * @disable_target_intr: disable target interrupt
  654. */
  655. struct suspend_params {
  656. uint8_t disable_target_intr;
  657. };
  658. /**
  659. * struct pdev_params - pdev set cmd parameter
  660. * @param_id: parameter id
  661. * @param_value: parameter value
  662. */
  663. struct pdev_params {
  664. uint32_t param_id;
  665. uint32_t param_value;
  666. };
  667. /**
  668. * struct beacon_tmpl_params - beacon template cmd parameter
  669. * @vdev_id: vdev id
  670. * @tim_ie_offset: tim ie offset
  671. * @tmpl_len: beacon template length
  672. * @tmpl_len_aligned: beacon template alignment
  673. * @frm: beacon template parameter
  674. */
  675. struct beacon_tmpl_params {
  676. uint8_t vdev_id;
  677. uint32_t tim_ie_offset;
  678. uint32_t tmpl_len;
  679. uint32_t tmpl_len_aligned;
  680. uint8_t *frm;
  681. };
  682. #ifdef CONFIG_MCL
  683. /**
  684. * struct beacon_params - beacon cmd parameter
  685. * @vdev_id: vdev id
  686. * @tim_ie_offset: tim ie offset
  687. * @tmpl_len: beacon template length
  688. * @tmpl_len_aligned: beacon template alignment
  689. * @frm: beacon template parameter
  690. */
  691. struct beacon_params {
  692. uint8_t vdev_id;
  693. uint32_t tim_ie_offset;
  694. uint32_t tmpl_len;
  695. uint32_t tmpl_len_aligned;
  696. uint8_t *frm;
  697. };
  698. #else
  699. /**
  700. * struct beacon_params - beacon cmd parameter
  701. * @vdev_id: vdev id
  702. * @beaconInterval: Beacon interval
  703. * @wbuf: beacon buffer
  704. * @frame_ctrl: frame control field
  705. * @bcn_txant: beacon antenna
  706. * @is_dtim_count_zero: is it dtim beacon
  707. * @is_bitctl_reqd: is Bit control required
  708. * @is_high_latency: Is this high latency target
  709. */
  710. struct beacon_params {
  711. uint8_t vdev_id;
  712. uint16_t beaconInterval;
  713. qdf_nbuf_t wbuf;
  714. uint16_t frame_ctrl;
  715. uint32_t bcn_txant;
  716. bool is_dtim_count_zero;
  717. bool is_bitctl_reqd;
  718. bool is_high_latency;
  719. };
  720. #endif
  721. /**
  722. * struct bcn_prb_template_params - beacon probe template parameter
  723. * @vdev_id: vdev id
  724. * @buf_len: Template length
  725. * @caps: capabilities field
  726. * @erp: ERP field
  727. */
  728. struct bcn_prb_template_params {
  729. uint8_t vdev_id;
  730. int buf_len;
  731. uint16_t caps;
  732. uint8_t erp;
  733. };
  734. #define WMI_MAX_SUPPORTED_RATES 128
  735. /**
  736. * struct target_rate_set - Rate set bitmap
  737. * @num_rate: number of rates in rates bitmap
  738. * @rates: rates (each 8bit value) packed into a 32 bit word.
  739. * the rates are filled from least significant byte to most
  740. * significant byte.
  741. */
  742. typedef struct {
  743. uint32_t num_rates;
  744. uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
  745. } target_rate_set;
  746. /**
  747. * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
  748. * @mac_addr31to0: upper 4 bytes of MAC address
  749. * @mac_addr47to32: lower 2 bytes of MAC address
  750. */
  751. typedef struct {
  752. uint32_t mac_addr31to0;
  753. uint32_t mac_addr47to32;
  754. } wmi_host_mac_addr;
  755. /**
  756. * struct peer_assoc_params - peer assoc cmd parameter
  757. * @peer_macaddr: peer mac address
  758. * @vdev_id: vdev id
  759. * @peer_new_assoc: peer association type
  760. * @peer_associd: peer association id
  761. * @peer_flags: peer flags
  762. * @peer_caps: peer capabalities
  763. * @peer_listen_intval: peer listen interval
  764. * @peer_ht_caps: HT capabalities
  765. * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
  766. * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
  767. * @peer_rate_caps: peer rate capabalities
  768. * @peer_nss: peer nss
  769. * @peer_phymode: peer phymode
  770. * @peer_ht_info: peer HT info
  771. * @peer_legacy_rates: peer legacy rates
  772. * @peer_ht_rates: peer ht rates
  773. * @rx_max_rate: max rx rates
  774. * @rx_mcs_set: rx mcs
  775. * @tx_max_rate: max tx rates
  776. * @tx_mcs_set: tx mcs
  777. * @vht_capable: VHT capabalities
  778. * @tx_max_mcs_nss: max tx MCS and NSS
  779. * @peer_bw_rxnss_override: Peer BW RX NSS overriden or not.
  780. * @is_pmf_enabled: PMF enabled
  781. * @is_wme_set: WME enabled
  782. * @qos_flag: QoS Flags
  783. * @apsd_flag: APSD flags
  784. * @ht_flag: HT flags
  785. * @bw_40: 40 capabale
  786. * @bw_80: 80 capabale
  787. * @bw_160: 160 capabale
  788. * @stbc_flag: STBC flag
  789. * @ldpc_flag: LDPC flag
  790. * @static_mimops_flag: statis MIMO PS flags
  791. * @dynamic_mimops_flag: Dynamic MIMO PS flags
  792. * @spatial_mux_flag: spatial MUX flags
  793. * @vht_flag: VHT flags
  794. * @vht_ng_flag: VHT on 11N/G flags
  795. * @need_ptk_4_way: Needs 4 way handshake
  796. * @need_gtk_2_way: Needs 2 way GTK
  797. * @auth_flag: Is peer authenticated
  798. * @safe_mode_enabled: Safe enabled for this peer
  799. * @amsdu_disable: AMSDU disble
  800. * @peer_mac: Peer mac address
  801. */
  802. struct peer_assoc_params {
  803. wmi_host_mac_addr peer_macaddr;
  804. uint32_t vdev_id;
  805. uint32_t peer_new_assoc;
  806. uint32_t peer_associd;
  807. uint32_t peer_flags;
  808. uint32_t peer_caps;
  809. uint32_t peer_listen_intval;
  810. uint32_t peer_ht_caps;
  811. uint32_t peer_max_mpdu;
  812. uint32_t peer_mpdu_density;
  813. uint32_t peer_rate_caps;
  814. uint32_t peer_nss;
  815. uint32_t peer_vht_caps;
  816. uint32_t peer_phymode;
  817. uint32_t peer_ht_info[2];
  818. target_rate_set peer_legacy_rates;
  819. target_rate_set peer_ht_rates;
  820. uint32_t rx_max_rate;
  821. uint32_t rx_mcs_set;
  822. uint32_t tx_max_rate;
  823. uint32_t tx_mcs_set;
  824. uint8_t vht_capable;
  825. #ifdef WMI_NON_TLV_SUPPORT
  826. uint32_t tx_max_mcs_nss;
  827. uint32_t peer_bw_rxnss_override;
  828. bool is_pmf_enabled;
  829. bool is_wme_set;
  830. bool qos_flag;
  831. bool apsd_flag;
  832. bool ht_flag;
  833. bool bw_40;
  834. bool bw_80;
  835. bool bw_160;
  836. bool stbc_flag;
  837. bool ldpc_flag;
  838. bool static_mimops_flag;
  839. bool dynamic_mimops_flag;
  840. bool spatial_mux_flag;
  841. bool vht_flag;
  842. bool vht_ng_flag;
  843. bool need_ptk_4_way;
  844. bool need_gtk_2_way;
  845. bool auth_flag;
  846. bool safe_mode_enabled;
  847. bool amsdu_disable;
  848. /* Use common structure */
  849. uint8_t peer_mac[IEEE80211_ADDR_LEN];
  850. #endif
  851. };
  852. /**
  853. * struct sta_ps_params - sta ps cmd parameter
  854. * @vdev_id: vdev id
  855. * @param: sta ps paramter
  856. * @value: sta ps parameter value
  857. */
  858. struct sta_ps_params {
  859. uint32_t vdev_id;
  860. uint32_t param;
  861. uint32_t value;
  862. };
  863. /**
  864. * struct ap_ps_params - ap ps cmd parameter
  865. * @vdev_id: vdev id
  866. * @param: ap ps paramter
  867. * @value: ap ps paramter value
  868. */
  869. struct ap_ps_params {
  870. uint32_t vdev_id;
  871. uint32_t param;
  872. uint32_t value;
  873. };
  874. #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0
  875. #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff
  876. #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16
  877. #define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff
  878. /**
  879. * struct scan_start_params - start scan cmd parameter
  880. * @scan_id: scan id
  881. * @scan_req_id: requeted scan id
  882. * @vdev_id: vdev id
  883. * @scan_priority: scan priority
  884. * @notify_scan_events: flag to indicate if scan to be notified
  885. * @dwell_time_active: active dwell time
  886. * @dwell_time_passive: passive dwell time
  887. * @min_rest_time: min rest time
  888. * @max_rest_time: max rest time
  889. * @repeat_probe_time: repeat probe time
  890. * @probe_spacing_time: probe spacing time
  891. * @idle_time: idle time
  892. * @max_scan_time: max scan time
  893. * @probe_delay: probe delay
  894. * @scan_ctrl_flags: scan control flag
  895. * @burst_duration: burst duration
  896. * @num_chan: no of channel
  897. * @num_bssid: no of bssid
  898. * @num_ssids: no of ssid
  899. * @ie_len: ie length
  900. * @n_probes: no of probe
  901. * @chan_list: channel list
  902. * @ie_len_with_pad: ie length with padding
  903. * @num_ssid: no of ssid
  904. * @sid: pointer to mac_ssid structure
  905. * @uie_fieldOffset: ie field offset
  906. * @mac_add_bytes: mac address bytes
  907. * @is_strict_pscan_en: Is this a strict passive scan
  908. * @is_promiscous_mode: Is promiscous mode
  909. * @is_phy_error: is Phy error
  910. * @add_cck_rates: Add cck rates
  911. * @chan_stat_enable: channel stats enabled
  912. * @offchan_tx_mgmt: Offchan tx scan
  913. * @offchan_tx_data: offchan tx data
  914. * @add_bcast_probe_reqd: Add bcast probe request
  915. * @bssid_list: Lisst of bssid to scan
  916. * @ie_data: IE data buffer pointer
  917. * @passive_flag: Is this passive scan
  918. */
  919. struct scan_start_params {
  920. uint32_t scan_id;
  921. uint32_t scan_req_id;
  922. uint32_t vdev_id;
  923. uint32_t scan_priority;
  924. uint32_t notify_scan_events;
  925. uint32_t dwell_time_active;
  926. uint32_t dwell_time_passive;
  927. uint32_t min_rest_time;
  928. uint32_t max_rest_time;
  929. uint32_t repeat_probe_time;
  930. uint32_t probe_spacing_time;
  931. uint32_t idle_time;
  932. uint32_t max_scan_time;
  933. uint32_t probe_delay;
  934. uint32_t scan_ctrl_flags;
  935. uint32_t burst_duration;
  936. uint32_t num_chan;
  937. uint32_t num_bssid;
  938. uint32_t num_ssids;
  939. uint32_t ie_len;
  940. uint32_t n_probes;
  941. uint32_t *chan_list;
  942. uint32_t ie_len_with_pad;
  943. struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID];
  944. uint8_t *ie_base;
  945. uint16_t uie_fieldOffset;
  946. uint8_t mac_add_bytes[IEEE80211_ADDR_LEN];
  947. #ifdef WMI_NON_TLV_SUPPORT
  948. bool is_strict_pscan_en;
  949. bool is_promiscous_mode;
  950. bool is_phy_error;
  951. bool add_cck_rates;
  952. bool chan_stat_enable;
  953. bool offchan_tx_mgmt;
  954. bool offchan_tx_data;
  955. bool add_bcast_probe_reqd;
  956. uint8_t bssid_list[WMI_SCAN_MAX_NUM_BSSID][IEEE80211_ADDR_LEN];
  957. uint8_t *ie_data;
  958. int passive_flag;
  959. #endif
  960. };
  961. /**
  962. * struct scan_stop_params - stop scan cmd parameter
  963. * @requestor: scan requestor
  964. * @scan_id: scan id
  965. * @req_type: scan request type
  966. * @vdev_id: vdev id
  967. * @all_scans: Stop all scans
  968. * @vap_scans: stop vap scans
  969. * @specific_scan: specific scan
  970. * @flags: scan flags
  971. * @ss_scan_id: ss scan id
  972. */
  973. struct scan_stop_params {
  974. uint32_t requestor;
  975. uint32_t scan_id;
  976. uint32_t req_type;
  977. uint32_t vdev_id;
  978. #ifdef WMI_NON_TLV_SUPPORT
  979. bool all_scans;
  980. bool vap_scans;
  981. bool specific_scan;
  982. uint32_t flags;
  983. uint32_t ss_scan_id;
  984. #endif
  985. };
  986. /**
  987. * struct scan_chan_list_params - scan channel list cmd parameter
  988. * @num_scan_chans: no of scan channels
  989. * @chan_info: pointer to wmi channel info
  990. */
  991. #ifdef CONFIG_MCL
  992. /* TODO: This needs clean-up based on how its processed. */
  993. typedef struct {
  994. /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
  995. uint32_t tlv_header;
  996. /** primary 20 MHz channel frequency in mhz */
  997. uint32_t mhz;
  998. /** Center frequency 1 in MHz*/
  999. uint32_t band_center_freq1;
  1000. /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
  1001. uint32_t band_center_freq2;
  1002. /** channel info described below */
  1003. uint32_t info;
  1004. /** contains min power, max power, reg power and reg class id. */
  1005. uint32_t reg_info_1;
  1006. /** contains antennamax */
  1007. uint32_t reg_info_2;
  1008. } wmi_channel_param;
  1009. struct scan_chan_list_params {
  1010. uint8_t num_scan_chans;
  1011. wmi_channel_param *chan_info;
  1012. };
  1013. #else
  1014. /**
  1015. * struct scan_chan_list_params - scan channel list cmd parameter
  1016. * @num_chan: no of scan channels
  1017. * @nallchans: nall chans
  1018. * @ch_param: pointer to channel_paramw
  1019. */
  1020. struct scan_chan_list_params {
  1021. uint8_t num_chan;
  1022. uint16_t nallchans;
  1023. struct channel_param ch_param[1];
  1024. };
  1025. #endif
  1026. /**
  1027. * struct fw_hang_params - fw hang command parameters
  1028. * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
  1029. * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
  1030. */
  1031. struct fw_hang_params {
  1032. uint32_t type;
  1033. uint32_t delay_time_ms;
  1034. };
  1035. /**
  1036. * struct pdev_utf_params - pdev utf command parameters
  1037. * @utf_payload:
  1038. * @len:
  1039. * @is_ar900b: is it 900b target
  1040. */
  1041. struct pdev_utf_params {
  1042. uint8_t *utf_payload;
  1043. uint32_t len;
  1044. #ifdef WMI_NON_TLV_SUPPORT
  1045. bool is_ar900b;
  1046. #endif
  1047. };
  1048. /*Adding this due to dependency on wmi_unified.h
  1049. */
  1050. typedef struct {
  1051. uint32_t len;
  1052. uint32_t msgref;
  1053. uint32_t segmentInfo;
  1054. } QVIT_SEG_HDR_INFO_STRUCT;
  1055. struct pdev_qvit_params {
  1056. uint8_t *utf_payload;
  1057. uint32_t len;
  1058. };
  1059. /**
  1060. * struct crash_inject - crash inject command parameters
  1061. * @type: crash inject type
  1062. * @delay_time_ms: time in milliseconds for FW to delay the crash
  1063. */
  1064. struct crash_inject {
  1065. uint32_t type;
  1066. uint32_t delay_time_ms;
  1067. };
  1068. /**
  1069. * struct dbglog_params - fw deboglog command parameters
  1070. * @param: command parameter
  1071. * @val: parameter value
  1072. * @module_id_bitmap: fixed length module id bitmap
  1073. * @bitmap_len: module id bitmap length
  1074. * @cfgvalid: cfgvalid
  1075. */
  1076. struct dbglog_params {
  1077. uint32_t param;
  1078. uint32_t val;
  1079. uint32_t *module_id_bitmap;
  1080. uint32_t bitmap_len;
  1081. #ifdef WMI_NON_TLV_SUPPORT
  1082. uint32_t cfgvalid[2];
  1083. #endif
  1084. };
  1085. /**
  1086. * struct seg_hdr_info - header info
  1087. * @len: length
  1088. * @msgref: message refrence
  1089. * @segmentInfo: segment info
  1090. * @pad: padding
  1091. */
  1092. struct seg_hdr_info {
  1093. uint32_t len;
  1094. uint32_t msgref;
  1095. uint32_t segmentInfo;
  1096. uint32_t pad;
  1097. };
  1098. /**
  1099. * struct wmi_mgmt_params - wmi mgmt cmd paramters
  1100. * @tx_frame: management tx frame
  1101. * @frm_len: frame length
  1102. * @vdev_id: vdev id
  1103. * @tx_complete_cb: tx download callback handler
  1104. * @tx_ota_post_proc_cb: OTA complition handler
  1105. * @chanfreq: channel frequency
  1106. * @pdata: frame data
  1107. * @wmi_desc: command descriptor
  1108. * @desc_id: descriptor id relyaed back by target
  1109. * @macaddr - macaddr of peer
  1110. */
  1111. struct wmi_mgmt_params {
  1112. void *tx_frame;
  1113. uint16_t frm_len;
  1114. uint8_t vdev_id;
  1115. uint16_t chanfreq;
  1116. void *pdata;
  1117. uint16_t desc_id;
  1118. uint8_t *macaddr;
  1119. void *qdf_ctx;
  1120. };
  1121. /**
  1122. * struct p2p_ps_params - P2P powersave related params
  1123. * @opp_ps: opportunistic power save
  1124. * @ctwindow: CT window
  1125. * @count: count
  1126. * @duration: duration
  1127. * @interval: interval
  1128. * @single_noa_duration: single shot noa duration
  1129. * @ps_selection: power save selection
  1130. * @session_id: session id
  1131. */
  1132. struct p2p_ps_params {
  1133. uint8_t opp_ps;
  1134. uint32_t ctwindow;
  1135. uint8_t count;
  1136. uint32_t duration;
  1137. uint32_t interval;
  1138. uint32_t single_noa_duration;
  1139. uint8_t ps_selection;
  1140. uint8_t session_id;
  1141. };
  1142. /**
  1143. * struct ta_uapsd_trig_params - uapsd trigger parameter
  1144. * @vdevid: vdev id
  1145. * @peer_addr: peer address
  1146. * @auto_triggerparam: trigger parameters
  1147. * @num_ac: no of access category
  1148. */
  1149. struct sta_uapsd_trig_params {
  1150. uint32_t vdevid;
  1151. uint8_t peer_addr[IEEE80211_ADDR_LEN];
  1152. uint8_t *auto_triggerparam;
  1153. uint32_t num_ac;
  1154. };
  1155. /**
  1156. * struct ocb_utc_param
  1157. * @vdev_id: session id
  1158. * @utc_time: number of nanoseconds from Jan 1st 1958
  1159. * @time_error: the error in the UTC time. All 1's for unknown
  1160. */
  1161. struct ocb_utc_param {
  1162. uint32_t vdev_id;
  1163. uint8_t utc_time[WMI_SIZE_UTC_TIME];
  1164. uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR];
  1165. };
  1166. /**
  1167. * struct ocb_timing_advert_param
  1168. * @vdev_id: session id
  1169. * @chan_freq: frequency on which to advertise
  1170. * @repeat_rate: the number of times it will send TA in 5 seconds
  1171. * @timestamp_offset: offset of the timestamp field in the TA frame
  1172. * @time_value_offset: offset of the time_value field in the TA frame
  1173. * @template_length: size in bytes of the TA frame
  1174. * @template_value: the TA frame
  1175. */
  1176. struct ocb_timing_advert_param {
  1177. uint32_t vdev_id;
  1178. uint32_t chan_freq;
  1179. uint32_t repeat_rate;
  1180. uint32_t timestamp_offset;
  1181. uint32_t time_value_offset;
  1182. uint32_t template_length;
  1183. uint8_t *template_value;
  1184. };
  1185. /**
  1186. * struct dcc_get_stats_param
  1187. * @vdev_id: session id
  1188. * @channel_count: number of dcc channels
  1189. * @request_array_len: size in bytes of the request array
  1190. * @request_array: the request array
  1191. */
  1192. struct dcc_get_stats_param {
  1193. uint32_t vdev_id;
  1194. uint32_t channel_count;
  1195. uint32_t request_array_len;
  1196. void *request_array;
  1197. };
  1198. /**
  1199. * struct dcc_update_ndl_param
  1200. * @vdev_id: session id
  1201. * @channel_count: number of channels to be updated
  1202. * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
  1203. * @dcc_ndl_chan_list: the ndl_chan array
  1204. * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
  1205. * @dcc_ndl_active_state_list: the active state array
  1206. */
  1207. struct dcc_update_ndl_param {
  1208. uint32_t vdev_id;
  1209. uint32_t channel_count;
  1210. uint32_t dcc_ndl_chan_list_len;
  1211. void *dcc_ndl_chan_list;
  1212. uint32_t dcc_ndl_active_state_list_len;
  1213. void *dcc_ndl_active_state_list;
  1214. };
  1215. /**
  1216. * struct ocb_config_sched
  1217. * @chan_freq: frequency of the channel
  1218. * @total_duration: duration of the schedule
  1219. * @guard_interval: guard interval on the start of the schedule
  1220. */
  1221. struct ocb_config_sched {
  1222. uint32_t chan_freq;
  1223. uint32_t total_duration;
  1224. uint32_t guard_interval;
  1225. };
  1226. /**
  1227. * OCB structures
  1228. */
  1229. #define WMI_NUM_AC (4)
  1230. #define WMI_OCB_CHANNEL_MAX (5)
  1231. #define WMI_MAX_NUM_AC 4
  1232. struct wmi_ocb_qos_params {
  1233. uint8_t aifsn;
  1234. uint8_t cwmin;
  1235. uint8_t cwmax;
  1236. };
  1237. /**
  1238. * struct ocb_config_channel
  1239. * @chan_freq: frequency of the channel
  1240. * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
  1241. * @mac_address: MAC address assigned to this channel
  1242. * @qos_params: QoS parameters
  1243. * @max_pwr: maximum transmit power of the channel (dBm)
  1244. * @min_pwr: minimum transmit power of the channel (dBm)
  1245. * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
  1246. * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
  1247. */
  1248. struct ocb_config_channel {
  1249. uint32_t chan_freq;
  1250. uint32_t bandwidth;
  1251. struct qdf_mac_addr mac_address;
  1252. struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC];
  1253. uint32_t max_pwr;
  1254. uint32_t min_pwr;
  1255. uint8_t reg_pwr;
  1256. uint8_t antenna_max;
  1257. uint16_t flags;
  1258. };
  1259. /**
  1260. * struct ocb_config_param
  1261. * @session_id: session id
  1262. * @channel_count: number of channels
  1263. * @schedule_size: size of the channel schedule
  1264. * @flags: reserved
  1265. * @channels: array of OCB channels
  1266. * @schedule: array of OCB schedule elements
  1267. * @dcc_ndl_chan_list_len: size of the ndl_chan array
  1268. * @dcc_ndl_chan_list: array of dcc channel info
  1269. * @dcc_ndl_active_state_list_len: size of the active state array
  1270. * @dcc_ndl_active_state_list: array of active states
  1271. * @adapter: the OCB adapter
  1272. * @dcc_stats_callback: callback for the response event
  1273. */
  1274. struct ocb_config_param {
  1275. uint8_t session_id;
  1276. uint32_t channel_count;
  1277. uint32_t schedule_size;
  1278. uint32_t flags;
  1279. struct ocb_config_channel *channels;
  1280. struct ocb_config_sched *schedule;
  1281. uint32_t dcc_ndl_chan_list_len;
  1282. void *dcc_ndl_chan_list;
  1283. uint32_t dcc_ndl_active_state_list_len;
  1284. void *dcc_ndl_active_state_list;
  1285. };
  1286. enum wmi_peer_rate_report_cond_phy_type {
  1287. WMI_PEER_RATE_REPORT_COND_11B = 0,
  1288. WMI_PEER_RATE_REPORT_COND_11A_G,
  1289. WMI_PEER_RATE_REPORT_COND_11N,
  1290. WMI_PEER_RATE_REPORT_COND_11AC,
  1291. WMI_PEER_RATE_REPORT_COND_MAX_NUM
  1292. };
  1293. /**
  1294. * struct report_rate_delta - peer specific parameters
  1295. * @percent: percentage
  1296. * @delta_min: rate min delta
  1297. */
  1298. struct report_rate_delta {
  1299. uint32_t percent; /* in unit of 12.5% */
  1300. uint32_t delta_min; /* in unit of Mbps */
  1301. };
  1302. /**
  1303. * struct report_rate_per_phy - per phy report parameters
  1304. * @cond_flags: condition flag val
  1305. * @delta: rate delta
  1306. * @report_rate_threshold: rate threshold
  1307. */
  1308. struct report_rate_per_phy {
  1309. /*
  1310. * PEER_RATE_REPORT_COND_FLAG_DELTA,
  1311. * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
  1312. * Any of these two conditions or both of
  1313. * them can be set.
  1314. */
  1315. uint32_t cond_flags;
  1316. struct report_rate_delta delta;
  1317. /*
  1318. * In unit of Mbps. There are at most 4 thresholds
  1319. * If the threshold count is less than 4, set zero to
  1320. * the one following the last threshold
  1321. */
  1322. uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
  1323. };
  1324. /**
  1325. * struct peer_rate_report_params - peer rate report parameters
  1326. * @rate_report_enable: enable rate report param
  1327. * @backoff_time: backoff time
  1328. * @timer_period: timer
  1329. * @report_per_phy: report per phy type
  1330. */
  1331. struct wmi_peer_rate_report_params {
  1332. uint32_t rate_report_enable;
  1333. uint32_t backoff_time; /* in unit of msecond */
  1334. uint32_t timer_period; /* in unit of msecond */
  1335. /*
  1336. *In the following field, the array index means the phy type,
  1337. * please see enum wmi_peer_rate_report_cond_phy_type for detail
  1338. */
  1339. struct report_rate_per_phy report_per_phy[
  1340. WMI_PEER_RATE_REPORT_COND_MAX_NUM];
  1341. };
  1342. /**
  1343. * struct t_thermal_cmd_params - thermal command parameters
  1344. * @min_temp: minimum temprature
  1345. * @max_temp: maximum temprature
  1346. * @thermal_enable: thermal enable
  1347. */
  1348. struct thermal_cmd_params {
  1349. uint16_t min_temp;
  1350. uint16_t max_temp;
  1351. uint8_t thermal_enable;
  1352. };
  1353. #define WMI_LRO_IPV4_SEED_ARR_SZ 5
  1354. #define WMI_LRO_IPV6_SEED_ARR_SZ 11
  1355. /**
  1356. * struct wmi_lro_config_cmd_t - set LRO init parameters
  1357. * @lro_enable: indicates whether lro is enabled
  1358. * @tcp_flag: If the TCP flags from the packet do not match
  1359. * the values in this field after masking with TCP flags mask
  1360. * below, packet is not LRO eligible
  1361. * @tcp_flag_mask: field for comparing the TCP values provided
  1362. * above with the TCP flags field in the received packet
  1363. * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
  1364. * 5-tuple toeplitz hash for ipv4 packets
  1365. * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
  1366. * 5-tuple toeplitz hash for ipv6 packets
  1367. */
  1368. struct wmi_lro_config_cmd_t {
  1369. uint32_t lro_enable;
  1370. uint32_t tcp_flag:9,
  1371. tcp_flag_mask:9;
  1372. uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
  1373. uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
  1374. };
  1375. /**
  1376. * struct gtx_config_t - GTX config
  1377. * @gtx_rt_mask: for HT and VHT rate masks
  1378. * @gtx_usrcfg: host request for GTX mask
  1379. * @gtx_threshold: PER Threshold (default: 10%)
  1380. * @gtx_margin: PER margin (default: 2%)
  1381. * @gtx_tcpstep: TCP step (default: 1)
  1382. * @gtx_tpcMin: TCP min (default: 5)
  1383. * @gtx_bwmask: BW mask (20/40/80/160 Mhz)
  1384. */
  1385. struct wmi_gtx_config {
  1386. uint32_t gtx_rt_mask[2];
  1387. uint32_t gtx_usrcfg;
  1388. uint32_t gtx_threshold;
  1389. uint32_t gtx_margin;
  1390. uint32_t gtx_tpcstep;
  1391. uint32_t gtx_tpcmin;
  1392. uint32_t gtx_bwmask;
  1393. };
  1394. /**
  1395. * struct wmi_probe_resp_params - send probe response parameters
  1396. * @bssId: BSSID
  1397. * @pProbeRespTemplate: probe response template
  1398. * @probeRespTemplateLen: probe response template length
  1399. * @ucProxyProbeReqValidIEBmap: valid IE bitmap
  1400. */
  1401. struct wmi_probe_resp_params {
  1402. uint8_t bssId[IEEE80211_ADDR_LEN];
  1403. uint8_t *pProbeRespTemplate;
  1404. uint32_t probeRespTemplateLen;
  1405. uint32_t ucProxyProbeReqValidIEBmap[8];
  1406. };
  1407. /* struct set_key_params: structure containing
  1408. * installation key parameters
  1409. * @vdev_id: vdev id
  1410. * @key_len: key length
  1411. * @key_idx: key index
  1412. * @peer_mac: peer mac address
  1413. * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
  1414. * @key_cipher: key cipher based on security mode
  1415. * @key_txmic_len: tx mic length
  1416. * @key_rxmic_len: rx mic length
  1417. * @rx_iv: receive IV, applicable only in case of WAPI
  1418. * @tx_iv: transmit IV, applicable only in case of WAPI
  1419. * @key_data: key data
  1420. */
  1421. struct set_key_params {
  1422. uint8_t vdev_id;
  1423. uint16_t key_len;
  1424. uint32_t key_idx;
  1425. uint8_t peer_mac[IEEE80211_ADDR_LEN];
  1426. uint32_t key_flags;
  1427. uint32_t key_cipher;
  1428. uint32_t key_txmic_len;
  1429. uint32_t key_rxmic_len;
  1430. #ifdef FEATURE_WLAN_WAPI
  1431. uint8_t rx_iv[16];
  1432. uint8_t tx_iv[16];
  1433. #endif
  1434. uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
  1435. };
  1436. /**
  1437. * struct sta_params - sta keep alive parameters
  1438. * @vdev_id: vdev id
  1439. * @method: keep alive method
  1440. * @timeperiod: time to keep alive
  1441. * @hostv4addr: host ipv4 address
  1442. * @destv4addr: destination ipv4 address
  1443. * @destmac: destination mac address
  1444. */
  1445. struct sta_params {
  1446. uint8_t vdev_id;
  1447. uint32_t method;
  1448. uint32_t timeperiod;
  1449. uint8_t *hostv4addr;
  1450. uint8_t *destv4addr;
  1451. uint8_t *destmac;
  1452. };
  1453. /**
  1454. * struct gateway_update_req_param - gateway parameter update request
  1455. * @request_id: request id
  1456. * @session_id: session id
  1457. * @max_retries: Max ARP/NS retry attempts
  1458. * @timeout: Retry interval
  1459. * @ipv4_addr_type: on ipv4 network
  1460. * @ipv6_addr_type: on ipv6 network
  1461. * @gw_mac_addr: gateway mac addr
  1462. * @ipv4_addr: ipv4 addr
  1463. * @ipv6_addr: ipv6 addr
  1464. */
  1465. struct gateway_update_req_param {
  1466. uint32_t request_id;
  1467. uint32_t session_id;
  1468. uint32_t max_retries;
  1469. uint32_t timeout;
  1470. uint32_t ipv4_addr_type;
  1471. uint32_t ipv6_addr_type;
  1472. struct qdf_mac_addr gw_mac_addr;
  1473. uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
  1474. uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
  1475. };
  1476. /**
  1477. * struct rssi_monitor_param - rssi monitoring
  1478. * @request_id: request id
  1479. * @session_id: session id
  1480. * @min_rssi: minimum rssi
  1481. * @max_rssi: maximum rssi
  1482. * @control: flag to indicate start or stop
  1483. */
  1484. struct rssi_monitor_param {
  1485. uint32_t request_id;
  1486. uint32_t session_id;
  1487. int8_t min_rssi;
  1488. int8_t max_rssi;
  1489. bool control;
  1490. };
  1491. /**
  1492. * struct scan_mac_oui - oui paramters
  1493. * @oui: oui parameters
  1494. */
  1495. struct scan_mac_oui {
  1496. uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
  1497. };
  1498. #define WMI_PASSPOINT_REALM_LEN 256
  1499. #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  1500. #define WMI_PASSPOINT_PLMN_LEN 3
  1501. /**
  1502. * struct wifi_passpoint_network_param - passpoint network block
  1503. * @id: identifier of this network block
  1504. * @realm: null terminated UTF8 encoded realm, 0 if unspecified
  1505. * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
  1506. * @plmn: mcc/mnc combination as per rules, 0s if unspecified
  1507. */
  1508. struct wifi_passpoint_network_param {
  1509. uint32_t id;
  1510. uint8_t realm[WMI_PASSPOINT_REALM_LEN];
  1511. int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
  1512. uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
  1513. };
  1514. /**
  1515. * struct wifi_passpoint_req_param - passpoint request
  1516. * @request_id: request identifier
  1517. * @num_networks: number of networks
  1518. * @networks: passpoint networks
  1519. */
  1520. struct wifi_passpoint_req_param {
  1521. uint32_t request_id;
  1522. uint32_t session_id;
  1523. uint32_t num_networks;
  1524. struct wifi_passpoint_network_param networks[];
  1525. };
  1526. /* struct mobility_domain_info - structure containing
  1527. * mobility domain info
  1528. * @mdie_present: mobility domain present or not
  1529. * @mobility_domain: mobility domain
  1530. */
  1531. struct mobility_domain_info {
  1532. uint8_t mdie_present;
  1533. uint16_t mobility_domain;
  1534. };
  1535. #define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
  1536. /* This TLV will be filled only in case roam offload
  1537. * for wpa2-psk/okc/ese/11r is enabled */
  1538. typedef struct {
  1539. /*
  1540. * TLV tag and len; tag equals
  1541. * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
  1542. */
  1543. uint32_t tlv_header;
  1544. uint32_t rssi_cat_gap; /* gap for every category bucket */
  1545. uint32_t prefer_5g; /* prefer select 5G candidate */
  1546. uint32_t select_5g_margin;
  1547. uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
  1548. uint32_t capability;
  1549. uint32_t ht_caps_info;
  1550. uint32_t ampdu_param;
  1551. uint32_t ht_ext_cap;
  1552. uint32_t ht_txbf;
  1553. uint32_t asel_cap;
  1554. uint32_t qos_enabled;
  1555. uint32_t qos_caps;
  1556. uint32_t wmm_caps;
  1557. /* since this is 4 byte aligned, we don't declare it as tlv array */
  1558. uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
  1559. } roam_offload_param;
  1560. /* struct roam_offload_scan_params - structure
  1561. * containing roaming offload scan parameters
  1562. * @is_roam_req_valid: flag to tell whether roam req
  1563. * is valid or NULL
  1564. * @mode: stores flags for scan
  1565. * @vdev_id: vdev id
  1566. * @roam_offload_enabled: flag for offload enable
  1567. * @psk_pmk: pre shared key/pairwise master key
  1568. * @pmk_len: length of PMK
  1569. * @prefer_5ghz: prefer select 5G candidate
  1570. * @roam_rssi_cat_gap: gap for every category bucket
  1571. * @select_5ghz_margin: select 5 Ghz margin
  1572. * @krk: KRK
  1573. * @btk: BTK
  1574. * @reassoc_failure_timeout: reassoc failure timeout
  1575. * @rokh_id_length: r0kh id length
  1576. * @rokh_id: r0kh id
  1577. * @roam_key_mgmt_offload_enabled: roam offload flag
  1578. * @auth_mode: authentication mode
  1579. * @is_ese_assoc: flag to determine ese assoc
  1580. * @mdid: mobility domain info
  1581. * @roam_offload_params: roam offload tlv params
  1582. */
  1583. struct roam_offload_scan_params {
  1584. uint8_t is_roam_req_valid;
  1585. uint32_t mode;
  1586. uint32_t vdev_id;
  1587. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1588. uint8_t roam_offload_enabled;
  1589. uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
  1590. uint32_t pmk_len;
  1591. uint8_t prefer_5ghz;
  1592. uint8_t roam_rssi_cat_gap;
  1593. uint8_t select_5ghz_margin;
  1594. uint8_t krk[WMI_KRK_KEY_LEN];
  1595. uint8_t btk[WMI_BTK_KEY_LEN];
  1596. uint32_t reassoc_failure_timeout;
  1597. uint32_t rokh_id_length;
  1598. uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
  1599. uint8_t roam_key_mgmt_offload_enabled;
  1600. int auth_mode;
  1601. #endif
  1602. bool is_ese_assoc;
  1603. struct mobility_domain_info mdid;
  1604. #ifndef WMI_NON_TLV_SUPPORT
  1605. /* THis is not available in non tlv target.
  1606. * please remove this and replace with a host based
  1607. * structure */
  1608. roam_offload_param roam_offload_params;
  1609. #endif
  1610. };
  1611. /* struct roam_offload_scan_rssi_params - structure containing
  1612. * parameters for roam offload scan based on RSSI
  1613. * @rssi_thresh: rssi threshold
  1614. * @rssi_thresh_diff: difference in rssi threshold
  1615. * @hi_rssi_scan_max_count: 5G scan max count
  1616. * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value
  1617. * @hi_rssi_scan_rssi_ub: 5G scan upper bound
  1618. * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds
  1619. * @session_id: vdev id
  1620. * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized
  1621. * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored
  1622. * @raise_factor_5g: factor by which 5GHz RSSI is boosted
  1623. * @drop_factor_5g: factor by which 5GHz RSSI is penalized
  1624. * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI
  1625. * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI
  1626. * @good_rssi_threshold: RSSI below which roam is kicked in by background
  1627. * scan although rssi is still good
  1628. * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop,
  1629. * unit is dB above NF
  1630. * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop,
  1631. * unit is dB above NF
  1632. * @dense_rssi_thresh_offset: dense roam RSSI threshold difference
  1633. * @dense_min_aps_cnt: dense roam minimum APs
  1634. * @initial_dense_status: dense status detected by host
  1635. * @traffic_threshold: dense roam RSSI threshold
  1636. */
  1637. struct roam_offload_scan_rssi_params {
  1638. int8_t rssi_thresh;
  1639. uint8_t rssi_thresh_diff;
  1640. uint32_t hi_rssi_scan_max_count;
  1641. uint32_t hi_rssi_scan_rssi_delta;
  1642. int32_t hi_rssi_scan_rssi_ub;
  1643. int raise_rssi_thresh_5g;
  1644. uint8_t session_id;
  1645. uint32_t penalty_threshold_5g;
  1646. uint32_t boost_threshold_5g;
  1647. uint8_t raise_factor_5g;
  1648. uint8_t drop_factor_5g;
  1649. int max_raise_rssi_5g;
  1650. int max_drop_rssi_5g;
  1651. uint32_t good_rssi_threshold;
  1652. uint32_t roam_earlystop_thres_min;
  1653. uint32_t roam_earlystop_thres_max;
  1654. int dense_rssi_thresh_offset;
  1655. int dense_min_aps_cnt;
  1656. int initial_dense_status;
  1657. int traffic_threshold;
  1658. };
  1659. /**
  1660. * struct wifi_epno_network - enhanced pno network block
  1661. * @ssid: ssid
  1662. * @rssi_threshold: threshold for considering this SSID as found, required
  1663. * granularity for this threshold is 4dBm to 8dBm
  1664. * @flags: WIFI_PNO_FLAG_XXX
  1665. * @auth_bit_field: auth bit field for matching WPA IE
  1666. */
  1667. struct wifi_epno_network_params {
  1668. struct mac_ssid ssid;
  1669. int8_t rssi_threshold;
  1670. uint8_t flags;
  1671. uint8_t auth_bit_field;
  1672. };
  1673. /**
  1674. * struct wifi_enhanched_pno_params - enhanced pno network params
  1675. * @num_networks: number of ssids
  1676. * @networks: PNO networks
  1677. */
  1678. struct wifi_enhanched_pno_params {
  1679. uint32_t request_id;
  1680. uint32_t session_id;
  1681. uint32_t num_networks;
  1682. struct wifi_epno_network_params networks[];
  1683. };
  1684. enum {
  1685. WMI_AP_RX_DATA_OFFLOAD = 0x00,
  1686. WMI_STA_RX_DATA_OFFLOAD = 0x01,
  1687. };
  1688. /**
  1689. * enum extscan_configuration_flags - extscan config flags
  1690. * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
  1691. */
  1692. enum wmi_extscan_configuration_flags {
  1693. WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
  1694. };
  1695. /**
  1696. * enum extscan_report_events_type - extscan report events type
  1697. * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
  1698. * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
  1699. * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
  1700. * (beacons/probe responses + IEs)
  1701. * in real time to HAL, in addition to completion events.
  1702. * Note: To keep backward compatibility,
  1703. * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
  1704. * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
  1705. * 0 => batching, 1 => no batching
  1706. */
  1707. enum wmi_extscan_report_events_type {
  1708. WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
  1709. WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
  1710. WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
  1711. WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
  1712. };
  1713. /**
  1714. * struct ipa_offload_control_params - ipa offload parameters
  1715. * @offload_type: ipa offload type
  1716. * @vdev_id: vdev id
  1717. * @enable: ipa offload enable/disable
  1718. */
  1719. struct ipa_offload_control_params {
  1720. uint32_t offload_type;
  1721. uint32_t vdev_id;
  1722. uint32_t enable;
  1723. };
  1724. /**
  1725. * struct extscan_capabilities_params - ext scan capablities
  1726. * @request_id: request_id
  1727. * @session_id: session_id
  1728. */
  1729. struct extscan_capabilities_params {
  1730. uint32_t request_id;
  1731. uint8_t session_id;
  1732. };
  1733. /**
  1734. * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
  1735. * @request_id: request_id
  1736. * @session_id: session_id
  1737. */
  1738. struct extscan_capabilities_reset_params {
  1739. uint32_t request_id;
  1740. uint8_t session_id;
  1741. };
  1742. /**
  1743. * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
  1744. * @request_id: request_id
  1745. * @session_id: session_id
  1746. */
  1747. struct extscan_bssid_hotlist_reset_params {
  1748. uint32_t request_id;
  1749. uint8_t session_id;
  1750. };
  1751. /**
  1752. * struct extscan_stop_req_params - ext scan stop parameter
  1753. * @request_id: request_id
  1754. * @session_id: session_id
  1755. */
  1756. struct extscan_stop_req_params {
  1757. uint32_t request_id;
  1758. uint8_t session_id;
  1759. };
  1760. /**
  1761. * struct ap_threshold_params - ap threshold parameter
  1762. * @bssid: mac address
  1763. * @low: low threshold
  1764. * @high: high threshold
  1765. */
  1766. struct ap_threshold_params {
  1767. struct qdf_mac_addr bssid;
  1768. int32_t low;
  1769. int32_t high;
  1770. };
  1771. /**
  1772. * struct extscan_set_sig_changereq_params - ext scan channel parameter
  1773. * @request_id: mac address
  1774. * @session_id: low threshold
  1775. * @rssi_sample_size: Number of samples for averaging RSSI
  1776. * @lostap_sample_size: Number of missed samples to confirm AP loss
  1777. * @min_breaching: Number of APs breaching threshold required for firmware
  1778. * @num_ap: no of scanned ap
  1779. * @ap: ap threshold parameter
  1780. */
  1781. struct extscan_set_sig_changereq_params {
  1782. uint32_t request_id;
  1783. uint8_t session_id;
  1784. uint32_t rssi_sample_size;
  1785. uint32_t lostap_sample_size;
  1786. uint32_t min_breaching;
  1787. uint32_t num_ap;
  1788. struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
  1789. };
  1790. /**
  1791. * struct extscan_cached_result_params - ext scan cached parameter
  1792. * @request_id: mac address
  1793. * @session_id: low threshold
  1794. * @flush: cached results flush
  1795. */
  1796. struct extscan_cached_result_params {
  1797. uint32_t request_id;
  1798. uint8_t session_id;
  1799. bool flush;
  1800. };
  1801. /* Set PNO */
  1802. #define WMI_PNO_MAX_NETW_CHANNELS 26
  1803. #define WMI_PNO_MAX_NETW_CHANNELS_EX 60
  1804. #define WMI_PNO_MAX_SUPP_NETWORKS 16
  1805. /*
  1806. * size based of dot11 declaration without extra IEs as we will not carry those
  1807. * for PNO
  1808. */
  1809. #define WMI_PNO_MAX_PB_REQ_SIZE 450
  1810. #define WMI_PNO_24G_DEFAULT_CH 1
  1811. #define WMI_PNO_5G_DEFAULT_CH 36
  1812. /**
  1813. * enum pno_mode - pno mode types
  1814. * @WMI_PNO_MODE_IMMEDIATE: immidiate mode
  1815. * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode
  1816. * @WMI_PNO_MODE_ON_RESUME: resume on mode
  1817. * @WMI_PNO_MODE_MAX: max range
  1818. */
  1819. enum pno_mode {
  1820. WMI_PNO_MODE_IMMEDIATE,
  1821. WMI_PNO_MODE_ON_SUSPEND,
  1822. WMI_PNO_MODE_ON_RESUME,
  1823. WMI_PNO_MODE_MAX
  1824. };
  1825. /**
  1826. * struct pno_nw_type - pno nw type
  1827. * @ssid: mac ssid
  1828. * @authentication: authentication type
  1829. * @encryption: encryption type
  1830. * @bcastNetwType: broadcast nw type
  1831. * @ucChannelCount: uc channel count
  1832. * @aChannels: pno channel
  1833. * @rssiThreshold: rssi threshold
  1834. */
  1835. struct pno_nw_type {
  1836. struct mac_ssid ssid;
  1837. uint32_t authentication;
  1838. uint32_t encryption;
  1839. uint32_t bcastNetwType;
  1840. uint8_t ucChannelCount;
  1841. uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX];
  1842. int32_t rssiThreshold;
  1843. };
  1844. /**
  1845. * struct pno_scan_req_params - PNO Scan request structure
  1846. * @enable: flag to enable or disable
  1847. * @modePNO: PNO Mode
  1848. * @ucNetworksCount: Number of networks
  1849. * @aNetworks: Preferred network list
  1850. * @sessionId: Session identifier
  1851. * @fast_scan_period: Fast Scan period
  1852. * @slow_scan_period: Slow scan period
  1853. * @fast_scan_max_cycles: Fast scan max cycles
  1854. * @us24GProbeTemplateLen: 2.4G probe template length
  1855. * @p24GProbeTemplate: 2.4G probe template
  1856. * @us5GProbeTemplateLen: 5G probe template length
  1857. * @p5GProbeTemplate: 5G probe template
  1858. * @pno_channel_prediction: PNO channel prediction feature status
  1859. * @top_k_num_of_channels: top K number of channels are used for tanimoto
  1860. * distance calculation.
  1861. * @stationary_thresh: threshold value to determine that the STA is stationary.
  1862. * @pnoscan_adaptive_dwell_mode: adaptive dwelltime mode for pno scan
  1863. * @channel_prediction_full_scan: periodic timer upon which a full scan needs
  1864. * to be triggered.
  1865. */
  1866. struct pno_scan_req_params {
  1867. uint8_t enable;
  1868. enum pno_mode modePNO;
  1869. uint8_t ucNetworksCount;
  1870. struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS];
  1871. uint8_t sessionId;
  1872. uint32_t fast_scan_period;
  1873. uint32_t slow_scan_period;
  1874. uint8_t fast_scan_max_cycles;
  1875. uint32_t active_min_time;
  1876. uint32_t active_max_time;
  1877. uint32_t passive_min_time;
  1878. uint32_t passive_max_time;
  1879. uint16_t us24GProbeTemplateLen;
  1880. uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
  1881. uint16_t us5GProbeTemplateLen;
  1882. uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
  1883. #ifdef FEATURE_WLAN_SCAN_PNO
  1884. bool pno_channel_prediction;
  1885. uint8_t top_k_num_of_channels;
  1886. uint8_t stationary_thresh;
  1887. enum wmi_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode;
  1888. uint32_t channel_prediction_full_scan;
  1889. #endif
  1890. };
  1891. #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
  1892. #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
  1893. #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
  1894. #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  1895. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  1896. /**
  1897. * struct wifi_scan_channelspec_params - wifi scan channel parameter
  1898. * @channel: Frequency in MHz
  1899. * @dwellTimeMs: dwell time
  1900. * @flush: cached results flush
  1901. * @passive: passive scan
  1902. * @chnlClass: channel class
  1903. */
  1904. struct wifi_scan_channelspec_params {
  1905. uint32_t channel;
  1906. uint32_t dwellTimeMs;
  1907. bool passive;
  1908. uint8_t chnlClass;
  1909. };
  1910. /**
  1911. * enum wmi_wifi_band - wifi band
  1912. * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
  1913. * @WMI_WIFI_BAND_BG: 2.4 GHz
  1914. * @WMI_WIFI_BAND_A: 5 GHz without DFS
  1915. * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
  1916. * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
  1917. * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
  1918. * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
  1919. * @WMI_WIFI_BAND_MAX: max range
  1920. */
  1921. enum wmi_wifi_band {
  1922. WMI_WIFI_BAND_UNSPECIFIED,
  1923. WMI_WIFI_BAND_BG = 1,
  1924. WMI_WIFI_BAND_A = 2,
  1925. WMI_WIFI_BAND_ABG = 3,
  1926. WMI_WIFI_BAND_A_DFS_ONLY = 4,
  1927. /* 5 is reserved */
  1928. WMI_WIFI_BAND_A_WITH_DFS = 6,
  1929. WMI_WIFI_BAND_ABG_WITH_DFS = 7,
  1930. /* Keep it last */
  1931. WMI_WIFI_BAND_MAX
  1932. };
  1933. /**
  1934. * struct wifi_scan_bucket_params - wifi scan bucket spec
  1935. * @bucket: bucket identifier
  1936. * @band: wifi band
  1937. * @period: Desired period, in millisecond; if this is too
  1938. * low, the firmware should choose to generate results as fast as
  1939. * it can instead of failing the command byte
  1940. * for exponential backoff bucket this is the min_period
  1941. * @reportEvents: 0 => normal reporting (reporting rssi history
  1942. * only, when rssi history buffer is % full)
  1943. * 1 => same as 0 + report a scan completion event after scanning
  1944. * this bucket
  1945. * 2 => same as 1 + forward scan results
  1946. * (beacons/probe responses + IEs) in real time to HAL
  1947. * @max_period: if max_period is non zero or different than period,
  1948. * then this bucket is an exponential backoff bucket and
  1949. * the scan period will grow exponentially as per formula:
  1950. * actual_period(N) = period ^ (N/(step_count+1)) to a
  1951. * maximum period of max_period
  1952. * @exponent: for exponential back off bucket: multiplier:
  1953. * new_period = old_period * exponent
  1954. * @step_count: for exponential back off bucket, number of scans performed
  1955. * at a given period and until the exponent is applied
  1956. * @numChannels: channels to scan; these may include DFS channels
  1957. * Note that a given channel may appear in multiple buckets
  1958. * @min_dwell_time_active: per bucket minimum active dwell time
  1959. * @max_dwell_time_active: per bucket maximum active dwell time
  1960. * @min_dwell_time_passive: per bucket minimum passive dwell time
  1961. * @max_dwell_time_passive: per bucket maximum passive dwell time
  1962. * @channels: Channel list
  1963. */
  1964. struct wifi_scan_bucket_params {
  1965. uint8_t bucket;
  1966. enum wmi_wifi_band band;
  1967. uint32_t period;
  1968. uint32_t reportEvents;
  1969. uint32_t max_period;
  1970. uint32_t exponent;
  1971. uint32_t step_count;
  1972. uint32_t numChannels;
  1973. uint32_t min_dwell_time_active;
  1974. uint32_t max_dwell_time_active;
  1975. uint32_t min_dwell_time_passive;
  1976. uint32_t max_dwell_time_passive;
  1977. struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
  1978. };
  1979. /**
  1980. * struct wifi_scan_cmd_req_params - wifi scan command request params
  1981. * @basePeriod: base timer period
  1982. * @maxAPperScan: max ap per scan
  1983. * @report_threshold_percent: report threshold
  1984. * in %, when buffer is this much full, wake up host
  1985. * @report_threshold_num_scans: report threshold number of scans
  1986. * in number of scans, wake up host after these many scans
  1987. * @requestId: request id
  1988. * @sessionId: session id
  1989. * @numBuckets: number of buckets
  1990. * @min_dwell_time_active: per bucket minimum active dwell time
  1991. * @max_dwell_time_active: per bucket maximum active dwell time
  1992. * @min_dwell_time_passive: per bucket minimum passive dwell time
  1993. * @max_dwell_time_passive: per bucket maximum passive dwell time
  1994. * @configuration_flags: configuration flags
  1995. * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
  1996. * @buckets: buckets array
  1997. */
  1998. struct wifi_scan_cmd_req_params {
  1999. uint32_t basePeriod;
  2000. uint32_t maxAPperScan;
  2001. uint32_t report_threshold_percent;
  2002. uint32_t report_threshold_num_scans;
  2003. uint32_t requestId;
  2004. uint8_t sessionId;
  2005. uint32_t numBuckets;
  2006. uint32_t min_dwell_time_active;
  2007. uint32_t max_dwell_time_active;
  2008. uint32_t min_dwell_time_passive;
  2009. uint32_t max_dwell_time_passive;
  2010. uint32_t configuration_flags;
  2011. enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
  2012. struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
  2013. };
  2014. #define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
  2015. /* Occupied channel list remains static */
  2016. #define WMI_CHANNEL_LIST_STATIC 1
  2017. /* Occupied channel list can be learnt after init */
  2018. #define WMI_CHANNEL_LIST_DYNAMIC_INIT 2
  2019. /* Occupied channel list can be learnt after flush */
  2020. #define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3
  2021. /* Occupied channel list can be learnt after update */
  2022. #define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4
  2023. /**
  2024. * struct plm_req_params - plm req parameter
  2025. * @diag_token: Dialog token
  2026. * @meas_token: measurement token
  2027. * @num_bursts: total number of bursts
  2028. * @burst_int: burst interval in seconds
  2029. * @meas_duration:in TU's,STA goes off-ch
  2030. * @burst_len: no of times the STA should cycle through PLM ch list
  2031. * @desired_tx_pwr: desired tx power
  2032. * @mac_addr: MC dest addr
  2033. * @plm_num_ch: channel numbers
  2034. * @plm_ch_list: channel list
  2035. * @session_id: session id
  2036. * @enable: enable/disable
  2037. */
  2038. struct plm_req_params {
  2039. uint16_t diag_token;
  2040. uint16_t meas_token;
  2041. uint16_t num_bursts;
  2042. uint16_t burst_int;
  2043. uint16_t meas_duration;
  2044. /* no of times the STA should cycle through PLM ch list */
  2045. uint8_t burst_len;
  2046. int8_t desired_tx_pwr;
  2047. struct qdf_mac_addr mac_addr;
  2048. /* no of channels */
  2049. uint8_t plm_num_ch;
  2050. /* channel numbers */
  2051. uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
  2052. uint8_t session_id;
  2053. bool enable;
  2054. };
  2055. #define MAX_SSID_ALLOWED_LIST 4
  2056. #define MAX_BSSID_AVOID_LIST 16
  2057. #define MAX_BSSID_FAVORED 16
  2058. /**
  2059. * struct mac_ts_info_tfc - mac ts info parameters
  2060. * @burstSizeDefn: burst size
  2061. * @reserved: reserved
  2062. * @ackPolicy: ack policy
  2063. * @psb: psb
  2064. * @aggregation: aggregation
  2065. * @accessPolicy: access policy
  2066. * @direction: direction
  2067. * @tsid: direction
  2068. * @trafficType: traffic type
  2069. */
  2070. struct mac_ts_info_tfc {
  2071. #ifndef ANI_LITTLE_BIT_ENDIAN
  2072. uint8_t burstSizeDefn:1;
  2073. uint8_t reserved:7;
  2074. #else
  2075. uint8_t reserved:7;
  2076. uint8_t burstSizeDefn:1;
  2077. #endif
  2078. #ifndef ANI_LITTLE_BIT_ENDIAN
  2079. uint16_t ackPolicy:2;
  2080. uint16_t userPrio:3;
  2081. uint16_t psb:1;
  2082. uint16_t aggregation:1;
  2083. uint16_t accessPolicy:2;
  2084. uint16_t direction:2;
  2085. uint16_t tsid:4;
  2086. uint16_t trafficType:1;
  2087. #else
  2088. uint16_t trafficType:1;
  2089. uint16_t tsid:4;
  2090. uint16_t direction:2;
  2091. uint16_t accessPolicy:2;
  2092. uint16_t aggregation:1;
  2093. uint16_t psb:1;
  2094. uint16_t userPrio:3;
  2095. uint16_t ackPolicy:2;
  2096. #endif
  2097. } qdf_packed;
  2098. /**
  2099. * struct mac_ts_info_sch - mac ts info schedule parameters
  2100. * @rsvd: reserved
  2101. * @schedule: schedule bit
  2102. */
  2103. struct mac_ts_info_sch {
  2104. #ifndef ANI_LITTLE_BIT_ENDIAN
  2105. uint8_t rsvd:7;
  2106. uint8_t schedule:1;
  2107. #else
  2108. uint8_t schedule:1;
  2109. uint8_t rsvd:7;
  2110. #endif
  2111. } qdf_packed;
  2112. /**
  2113. * struct mac_ts_info_sch - mac ts info schedule parameters
  2114. * @traffic: mac tfc parameter
  2115. * @schedule: mac schedule parameters
  2116. */
  2117. struct mac_ts_info {
  2118. struct mac_ts_info_tfc traffic;
  2119. struct mac_ts_info_sch schedule;
  2120. } qdf_packed;
  2121. /**
  2122. * struct mac_tspec_ie - mac ts spec
  2123. * @type: type
  2124. * @length: length
  2125. * @tsinfo: tsinfo
  2126. * @nomMsduSz: nomMsduSz
  2127. * @maxMsduSz: maxMsduSz
  2128. * @minSvcInterval: minSvcInterval
  2129. * @maxSvcInterval: maxSvcInterval
  2130. * @inactInterval: inactInterval
  2131. * @suspendInterval: suspendInterval
  2132. * @svcStartTime: svcStartTime
  2133. * @minDataRate: minDataRate
  2134. * @meanDataRate: meanDataRate
  2135. * @peakDataRate: peakDataRate
  2136. * @maxBurstSz: maxBurstSz
  2137. * @delayBound: delayBound
  2138. * @minPhyRate: minPhyRate
  2139. * @surplusBw: surplusBw
  2140. * @mediumTime: mediumTime
  2141. */
  2142. struct mac_tspec_ie {
  2143. uint8_t type;
  2144. uint8_t length;
  2145. struct mac_ts_info tsinfo;
  2146. uint16_t nomMsduSz;
  2147. uint16_t maxMsduSz;
  2148. uint32_t minSvcInterval;
  2149. uint32_t maxSvcInterval;
  2150. uint32_t inactInterval;
  2151. uint32_t suspendInterval;
  2152. uint32_t svcStartTime;
  2153. uint32_t minDataRate;
  2154. uint32_t meanDataRate;
  2155. uint32_t peakDataRate;
  2156. uint32_t maxBurstSz;
  2157. uint32_t delayBound;
  2158. uint32_t minPhyRate;
  2159. uint16_t surplusBw;
  2160. uint16_t mediumTime;
  2161. } qdf_packed;
  2162. /**
  2163. * struct add_ts_param - ADDTS related parameters
  2164. * @staIdx: station index
  2165. * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
  2166. * @tspec: tspec value
  2167. * @status: CDF status
  2168. * @sessionId: session id
  2169. * @tsm_interval: TSM interval period passed from UMAC to WMI
  2170. * @setRICparams: RIC parameters
  2171. * @sme_session_id: sme session id
  2172. */
  2173. struct add_ts_param {
  2174. uint16_t staIdx;
  2175. uint16_t tspecIdx;
  2176. struct mac_tspec_ie tspec;
  2177. QDF_STATUS status;
  2178. uint8_t sessionId;
  2179. #ifdef FEATURE_WLAN_ESE
  2180. uint16_t tsm_interval;
  2181. #endif /* FEATURE_WLAN_ESE */
  2182. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  2183. uint8_t setRICparams;
  2184. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  2185. uint8_t sme_session_id;
  2186. };
  2187. /**
  2188. * struct delts_req_info - DELTS request parameter
  2189. * @tsinfo: ts info
  2190. * @tspec: ts spec
  2191. * @wmeTspecPresent: wme ts spec flag
  2192. * @wsmTspecPresent: wsm ts spec flag
  2193. * @lleTspecPresent: lle ts spec flag
  2194. */
  2195. struct delts_req_info {
  2196. struct mac_ts_info tsinfo;
  2197. struct mac_tspec_ie tspec;
  2198. uint8_t wmeTspecPresent:1;
  2199. uint8_t wsmTspecPresent:1;
  2200. uint8_t lleTspecPresent:1;
  2201. };
  2202. /**
  2203. * struct del_ts_params - DELTS related parameters
  2204. * @staIdx: station index
  2205. * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
  2206. * @bssId: BSSID
  2207. * @sessionId: session id
  2208. * @userPrio: user priority
  2209. * @delTsInfo: DELTS info
  2210. * @setRICparams: RIC parameters
  2211. */
  2212. struct del_ts_params {
  2213. uint16_t staIdx;
  2214. uint16_t tspecIdx;
  2215. uint8_t bssId[IEEE80211_ADDR_LEN];
  2216. uint8_t sessionId;
  2217. uint8_t userPrio;
  2218. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  2219. struct delts_req_info delTsInfo;
  2220. uint8_t setRICparams;
  2221. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  2222. };
  2223. /**
  2224. * struct ll_stats_clear_params - ll stats clear parameter
  2225. * @req_id: request id
  2226. * @sta_id: sta id
  2227. * @stats_clear_mask: stats clear mask
  2228. * @stop_req: stop request
  2229. */
  2230. struct ll_stats_clear_params {
  2231. uint32_t req_id;
  2232. uint8_t sta_id;
  2233. uint32_t stats_clear_mask;
  2234. uint8_t stop_req;
  2235. };
  2236. /**
  2237. * struct ll_stats_set_params - ll stats get parameter
  2238. * @req_id: request id
  2239. * @sta_id: sta id
  2240. * @mpdu_size_threshold: mpdu sixe threshold
  2241. * @aggressive_statistics_gathering: aggressive_statistics_gathering
  2242. */
  2243. struct ll_stats_set_params {
  2244. uint32_t req_id;
  2245. uint8_t sta_id;
  2246. uint32_t mpdu_size_threshold;
  2247. uint32_t aggressive_statistics_gathering;
  2248. };
  2249. /**
  2250. * struct ll_stats_get_params - ll stats parameter
  2251. * @req_id: request id
  2252. * @sta_id: sta id
  2253. * @param_id_mask: param is mask
  2254. */
  2255. struct ll_stats_get_params {
  2256. uint32_t req_id;
  2257. uint8_t sta_id;
  2258. uint32_t param_id_mask;
  2259. };
  2260. /**
  2261. * struct pe_stats_req - pe stats parameter
  2262. * @msg_type: message type is same as the request type
  2263. * @msg_len: length of the entire request
  2264. * @sta_id: Per STA stats request must contain valid
  2265. * @stats_mask: categories of stats requested
  2266. * @session_id: wsm ts spec flag
  2267. */
  2268. struct pe_stats_req {
  2269. /* Common for all types are requests */
  2270. uint16_t msg_type;
  2271. uint16_t msg_len;
  2272. uint32_t sta_id;
  2273. /* categories of stats requested. look at ePEStatsMask */
  2274. uint32_t stats_mask;
  2275. uint8_t session_id;
  2276. };
  2277. /**
  2278. * struct link_status_params - link stats parameter
  2279. * @msg_type: message type is same as the request type
  2280. * @msg_len: length of the entire request
  2281. * @link_status: wme ts spec flag
  2282. * @session_id: wsm ts spec flag
  2283. */
  2284. struct link_status_params {
  2285. uint16_t msg_type;
  2286. uint16_t msg_len;
  2287. uint8_t link_status;
  2288. uint8_t session_id;
  2289. };
  2290. /**
  2291. * struct dhcp_stop_ind_params - DHCP Stop indication message
  2292. * @msgtype: message type is same as the request type
  2293. * @msglen: length of the entire request
  2294. * @device_mode: Mode of the device(ex:STA, AP)
  2295. * @adapter_macaddr: MAC address of the adapter
  2296. * @peer_macaddr: MAC address of the connected peer
  2297. */
  2298. struct dhcp_stop_ind_params {
  2299. uint16_t msgtype;
  2300. uint16_t msglen;
  2301. uint8_t device_mode;
  2302. struct qdf_mac_addr adapter_macaddr;
  2303. struct qdf_mac_addr peer_macaddr;
  2304. };
  2305. /**
  2306. * struct aggr_add_ts_param - ADDTS parameters
  2307. * @staIdx: station index
  2308. * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
  2309. * @tspec: tspec value
  2310. * @status: CDF status
  2311. * @sessionId: session id
  2312. */
  2313. struct aggr_add_ts_param {
  2314. uint16_t staIdx;
  2315. uint16_t tspecIdx;
  2316. struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
  2317. QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
  2318. uint8_t sessionId;
  2319. };
  2320. #define WMI_MAX_FILTER_TEST_DATA_LEN 8
  2321. #define WMI_MAX_NUM_MULTICAST_ADDRESS 240
  2322. #define WMI_MAX_NUM_FILTERS 20
  2323. #define WMI_MAX_NUM_TESTS_PER_FILTER 10
  2324. /**
  2325. * enum packet_filter_type - packet filter type
  2326. * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
  2327. * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
  2328. * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
  2329. * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
  2330. */
  2331. enum packet_filter_type {
  2332. WMI_RCV_FILTER_TYPE_INVALID,
  2333. WMI_RCV_FILTER_TYPE_FILTER_PKT,
  2334. WMI_RCV_FILTER_TYPE_BUFFER_PKT,
  2335. WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
  2336. };
  2337. /**
  2338. * enum packet_protocol_type - packet protocol type
  2339. * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
  2340. * @WMI_FILTER_HDR_TYPE_MAC: mac type
  2341. * @WMI_FILTER_HDR_TYPE_ARP: trp type
  2342. * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
  2343. * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
  2344. * @WMI_FILTER_HDR_TYPE_UDP: udp type
  2345. * @WMI_FILTER_HDR_TYPE_MAX: max type
  2346. */
  2347. enum packet_protocol_type {
  2348. WMI_FILTER_HDR_TYPE_INVALID,
  2349. WMI_FILTER_HDR_TYPE_MAC,
  2350. WMI_FILTER_HDR_TYPE_ARP,
  2351. WMI_FILTER_HDR_TYPE_IPV4,
  2352. WMI_FILTER_HDR_TYPE_IPV6,
  2353. WMI_FILTER_HDR_TYPE_UDP,
  2354. WMI_FILTER_HDR_TYPE_MAX
  2355. };
  2356. /**
  2357. * enum packet_filter_comp_type - packet filter comparison type
  2358. * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
  2359. * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
  2360. * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
  2361. * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
  2362. * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
  2363. * @WMI_FILTER_CMP_TYPE_MAX: max type
  2364. */
  2365. enum packet_filter_comp_type {
  2366. WMI_FILTER_CMP_TYPE_INVALID,
  2367. WMI_FILTER_CMP_TYPE_EQUAL,
  2368. WMI_FILTER_CMP_TYPE_MASK_EQUAL,
  2369. WMI_FILTER_CMP_TYPE_NOT_EQUAL,
  2370. WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  2371. WMI_FILTER_CMP_TYPE_MAX
  2372. };
  2373. /**
  2374. * struct rcv_pkt_filter_params - recieve packet filter parameters
  2375. * @protocolLayer - protocol layer
  2376. * @cmpFlag - comparison flag
  2377. * @dataLength - data length
  2378. * @dataOffset - data offset
  2379. * @reserved - resserved
  2380. * @compareData - compare data
  2381. * @dataMask - data mask
  2382. */
  2383. struct rcv_pkt_filter_params {
  2384. enum packet_protocol_type protocolLayer;
  2385. enum packet_filter_comp_type cmpFlag;
  2386. uint16_t dataLength;
  2387. uint8_t dataOffset;
  2388. uint8_t reserved;
  2389. uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
  2390. uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
  2391. };
  2392. /**
  2393. * struct rcv_pkt_filter_config - recieve packet filter info
  2394. * @filterId - filter id
  2395. * @filterType - filter type
  2396. * @numFieldParams - no of fields
  2397. * @coalesceTime - reserved parameter
  2398. * @self_macaddr - self mac address
  2399. * @bssid - Bssid of the connected AP
  2400. * @paramsData - data parameter
  2401. */
  2402. struct rcv_pkt_filter_config {
  2403. uint8_t filterId;
  2404. enum packet_filter_type filterType;
  2405. uint32_t numFieldParams;
  2406. uint32_t coalesceTime;
  2407. struct qdf_mac_addr self_macaddr;
  2408. struct qdf_mac_addr bssid;
  2409. struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
  2410. };
  2411. /**
  2412. * struct vdev_ie_info_param - IE info
  2413. * @vdev_id - vdev for which the IE is being sent
  2414. * @ie_id - ID of the IE
  2415. * @length - length of the IE data
  2416. * @data - IE data
  2417. *
  2418. * This structure is used to store the IE information.
  2419. */
  2420. struct vdev_ie_info_param {
  2421. uint32_t vdev_id;
  2422. uint32_t ie_id;
  2423. uint32_t length;
  2424. uint8_t *data;
  2425. };
  2426. #define WMI_MAX_NUM_FW_SEGMENTS 4
  2427. /**
  2428. * struct fw_dump_seg_req_param - individual segment details
  2429. * @seg_id - segment id.
  2430. * @seg_start_addr_lo - lower address of the segment.
  2431. * @seg_start_addr_hi - higher address of the segment.
  2432. * @seg_length - length of the segment.
  2433. * @dst_addr_lo - lower address of the destination buffer.
  2434. * @dst_addr_hi - higher address of the destination buffer.
  2435. *
  2436. * This structure carries the information to firmware about the
  2437. * individual segments. This structure is part of firmware memory
  2438. * dump request.
  2439. */
  2440. struct fw_dump_seg_req_param {
  2441. uint8_t seg_id;
  2442. uint32_t seg_start_addr_lo;
  2443. uint32_t seg_start_addr_hi;
  2444. uint32_t seg_length;
  2445. uint32_t dst_addr_lo;
  2446. uint32_t dst_addr_hi;
  2447. };
  2448. /**
  2449. * struct fw_dump_req_param - firmware memory dump request details.
  2450. * @request_id - request id.
  2451. * @num_seg - requested number of segments.
  2452. * @fw_dump_seg_req - individual segment information.
  2453. *
  2454. * This structure carries information about the firmware
  2455. * memory dump request.
  2456. */
  2457. struct fw_dump_req_param {
  2458. uint32_t request_id;
  2459. uint32_t num_seg;
  2460. struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
  2461. };
  2462. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  2463. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  2464. #define WMI_2_4_GHZ_MAX_FREQ 3000
  2465. /**
  2466. * struct tdls_update_ch_params - channel parameters
  2467. * @chanId: ID of the channel
  2468. * @pwr: power level
  2469. * @dfsSet: is dfs supported or not
  2470. * @half_rate: is the channel operating at 10MHz
  2471. * @quarter_rate: is the channel operating at 5MHz
  2472. */
  2473. struct tdls_update_ch_params {
  2474. uint8_t chanId;
  2475. uint8_t pwr;
  2476. bool dfsSet;
  2477. bool half_rate;
  2478. bool quarter_rate;
  2479. };
  2480. /**
  2481. * struct tdls_peer_cap_params - TDLS peer capablities parameters
  2482. * @isPeerResponder: is peer responder or not
  2483. * @peerUapsdQueue: peer uapsd queue
  2484. * @peerMaxSp: peer max SP value
  2485. * @peerBuffStaSupport: peer buffer sta supported or not
  2486. * @peerOffChanSupport: peer offchannel support
  2487. * @peerCurrOperClass: peer current operating class
  2488. * @selfCurrOperClass: self current operating class
  2489. * @peerChanLen: peer channel length
  2490. * @peerChan: peer channel list
  2491. * @peerOperClassLen: peer operating class length
  2492. * @peerOperClass: peer operating class
  2493. * @prefOffChanNum: peer offchannel number
  2494. * @prefOffChanBandwidth: peer offchannel bandwidth
  2495. * @opClassForPrefOffChan: operating class for offchannel
  2496. */
  2497. struct tdls_peer_cap_params {
  2498. uint8_t isPeerResponder;
  2499. uint8_t peerUapsdQueue;
  2500. uint8_t peerMaxSp;
  2501. uint8_t peerBuffStaSupport;
  2502. uint8_t peerOffChanSupport;
  2503. uint8_t peerCurrOperClass;
  2504. uint8_t selfCurrOperClass;
  2505. uint8_t peerChanLen;
  2506. struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
  2507. uint8_t peerOperClassLen;
  2508. uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  2509. uint8_t prefOffChanNum;
  2510. uint8_t prefOffChanBandwidth;
  2511. uint8_t opClassForPrefOffChan;
  2512. };
  2513. /**
  2514. * struct tdls_peer_state_params - TDLS peer state parameters
  2515. * @vdevId: vdev id
  2516. * @peerMacAddr: peer mac address
  2517. * @peerCap: peer capabality
  2518. */
  2519. struct tdls_peer_state_params {
  2520. uint32_t vdevId;
  2521. uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
  2522. uint32_t peerState;
  2523. struct tdls_peer_cap_params peerCap;
  2524. };
  2525. /**
  2526. * struct wmi_tdls_params - TDLS parameters
  2527. * @vdev_id: vdev id
  2528. * @tdls_state: TDLS state
  2529. * @notification_interval_ms: notification inerval
  2530. * @tx_discovery_threshold: tx discovery threshold
  2531. * @tx_teardown_threshold: tx teardown threashold
  2532. * @rssi_teardown_threshold: RSSI teardown threshold
  2533. * @rssi_delta: RSSI delta
  2534. * @tdls_options: TDLS options
  2535. * @peer_traffic_ind_window: raffic indication window
  2536. * @peer_traffic_response_timeout: traffic response timeout
  2537. * @puapsd_mask: uapsd mask
  2538. * @puapsd_inactivity_time: uapsd inactivity time
  2539. * @puapsd_rx_frame_threshold: uapsd rx frame threshold
  2540. * @teardown_notification_ms: tdls teardown notification interval
  2541. * @tdls_peer_kickout_threshold: tdls packet threshold for
  2542. * peer kickout operation
  2543. */
  2544. struct wmi_tdls_params {
  2545. uint32_t vdev_id;
  2546. uint32_t tdls_state;
  2547. uint32_t notification_interval_ms;
  2548. uint32_t tx_discovery_threshold;
  2549. uint32_t tx_teardown_threshold;
  2550. int32_t rssi_teardown_threshold;
  2551. int32_t rssi_delta;
  2552. uint32_t tdls_options;
  2553. uint32_t peer_traffic_ind_window;
  2554. uint32_t peer_traffic_response_timeout;
  2555. uint32_t puapsd_mask;
  2556. uint32_t puapsd_inactivity_time;
  2557. uint32_t puapsd_rx_frame_threshold;
  2558. uint32_t teardown_notification_ms;
  2559. uint32_t tdls_peer_kickout_threshold;
  2560. };
  2561. /**
  2562. * struct tdls_chan_switch_params - channel switch parameter structure
  2563. * @vdev_id: vdev ID
  2564. * @peer_mac_addr: Peer mac address
  2565. * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
  2566. * @tdls_off_ch: Target Off Channel
  2567. * @oper_class: Operating class for target channel
  2568. * @is_responder: Responder or initiator
  2569. */
  2570. struct tdls_channel_switch_params {
  2571. uint32_t vdev_id;
  2572. uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
  2573. uint16_t tdls_off_ch_bw_offset;
  2574. uint8_t tdls_off_ch;
  2575. uint8_t tdls_sw_mode;
  2576. uint8_t oper_class;
  2577. uint8_t is_responder;
  2578. };
  2579. /**
  2580. * struct dhcp_offload_info_params - dhcp offload parameters
  2581. * @vdev_id: request data length
  2582. * @dhcpSrvOffloadEnabled: dhcp offload enabled
  2583. * @dhcpClientNum: dhcp client no
  2584. * @dhcpSrvIP: dhcp server ip
  2585. */
  2586. struct dhcp_offload_info_params {
  2587. uint32_t vdev_id;
  2588. uint32_t dhcpSrvOffloadEnabled;
  2589. uint32_t dhcpClientNum;
  2590. uint32_t dhcpSrvIP;
  2591. };
  2592. /**
  2593. * struct nan_req_params - NAN request params
  2594. * @request_data_len: request data length
  2595. * @request_data: request data
  2596. */
  2597. struct nan_req_params {
  2598. uint16_t request_data_len;
  2599. uint8_t request_data[];
  2600. };
  2601. /**
  2602. * struct app_type2_params - app type2parameter
  2603. * @vdev_id: vdev id
  2604. * @rc4_key: rc4 key
  2605. * @rc4_key_len: rc4 key length
  2606. * @ip_id: NC id
  2607. * @ip_device_ip: NC IP addres
  2608. * @ip_server_ip: Push server IP address
  2609. * @tcp_src_port: NC TCP port
  2610. * @tcp_dst_port: Push server TCP port
  2611. * @tcp_seq: tcp sequence
  2612. * @tcp_ack_seq: tcp ack sequence
  2613. * @keepalive_init: Initial ping interval
  2614. * @keepalive_min: Minimum ping interval
  2615. * @keepalive_max: Maximum ping interval
  2616. * @keepalive_inc: Increment of ping interval
  2617. * @gateway_mac: gateway mac address
  2618. * @tcp_tx_timeout_val: tcp tx timeout value
  2619. * @tcp_rx_timeout_val: tcp rx timeout value
  2620. */
  2621. struct app_type2_params {
  2622. uint8_t vdev_id;
  2623. uint8_t rc4_key[16];
  2624. uint32_t rc4_key_len;
  2625. /** ip header parameter */
  2626. uint32_t ip_id;
  2627. uint32_t ip_device_ip;
  2628. uint32_t ip_server_ip;
  2629. /** tcp header parameter */
  2630. uint16_t tcp_src_port;
  2631. uint16_t tcp_dst_port;
  2632. uint32_t tcp_seq;
  2633. uint32_t tcp_ack_seq;
  2634. uint32_t keepalive_init;
  2635. uint32_t keepalive_min;
  2636. uint32_t keepalive_max;
  2637. uint32_t keepalive_inc;
  2638. struct qdf_mac_addr gateway_mac;
  2639. uint32_t tcp_tx_timeout_val;
  2640. uint32_t tcp_rx_timeout_val;
  2641. };
  2642. /**
  2643. * struct app_type1_params - app type1 parameter
  2644. * @vdev_id: vdev id
  2645. * @wakee_mac_addr: mac address
  2646. * @identification_id: identification id
  2647. * @password: password
  2648. * @id_length: id length
  2649. * @pass_length: password length
  2650. */
  2651. struct app_type1_params {
  2652. uint8_t vdev_id;
  2653. struct qdf_mac_addr wakee_mac_addr;
  2654. uint8_t identification_id[8];
  2655. uint8_t password[16];
  2656. uint32_t id_length;
  2657. uint32_t pass_length;
  2658. };
  2659. /**
  2660. * enum wmi_ext_wow_type - wow type
  2661. * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
  2662. * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
  2663. * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
  2664. */
  2665. enum wmi_ext_wow_type {
  2666. WMI_EXT_WOW_TYPE_APP_TYPE1,
  2667. WMI_EXT_WOW_TYPE_APP_TYPE2,
  2668. WMI_EXT_WOW_TYPE_APP_TYPE1_2,
  2669. };
  2670. /**
  2671. * struct ext_wow_params - ext wow parameters
  2672. * @vdev_id: vdev id
  2673. * @type: wow type
  2674. * @wakeup_pin_num: wake up gpio no
  2675. */
  2676. struct ext_wow_params {
  2677. uint8_t vdev_id;
  2678. enum wmi_ext_wow_type type;
  2679. uint32_t wakeup_pin_num;
  2680. };
  2681. /**
  2682. * struct stats_ext_params - ext stats request
  2683. * @vdev_id: vdev id
  2684. * @request_data_len: request data length
  2685. * @request_data: request data
  2686. */
  2687. struct stats_ext_params {
  2688. uint32_t vdev_id;
  2689. uint32_t request_data_len;
  2690. uint8_t request_data[];
  2691. };
  2692. #define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
  2693. /**
  2694. * struct periodic_tx_pattern - periodic tx pattern
  2695. * @mac_address: MAC Address for the adapter
  2696. * @ucPtrnId: Pattern ID
  2697. * @ucPtrnSize: Pattern size
  2698. * @usPtrnIntervalMs: in ms
  2699. * @ucPattern: Pattern buffer
  2700. */
  2701. struct periodic_tx_pattern {
  2702. struct qdf_mac_addr mac_address;
  2703. uint8_t ucPtrnId;
  2704. uint16_t ucPtrnSize;
  2705. uint32_t usPtrnIntervalMs;
  2706. uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
  2707. };
  2708. #define WMI_GTK_OFFLOAD_KEK_BYTES 16
  2709. #define WMI_GTK_OFFLOAD_KCK_BYTES 16
  2710. #define WMI_GTK_OFFLOAD_ENABLE 0
  2711. #define WMI_GTK_OFFLOAD_DISABLE 1
  2712. /**
  2713. * struct gtk_offload_params - gtk offload parameters
  2714. * @ulFlags: optional flags
  2715. * @aKCK: Key confirmation key
  2716. * @aKEK: key encryption key
  2717. * @ullKeyReplayCounter: replay counter
  2718. * @bssid: bss id
  2719. */
  2720. struct gtk_offload_params {
  2721. uint32_t ulFlags;
  2722. uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES];
  2723. uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES];
  2724. uint64_t ullKeyReplayCounter;
  2725. struct qdf_mac_addr bssid;
  2726. };
  2727. /**
  2728. * struct flashing_req_params - led flashing parameter
  2729. * @reqId: request id
  2730. * @pattern_id: pattern identifier. 0: disconnected 1: connected
  2731. * @led_x0: led flashing parameter0
  2732. * @led_x1: led flashing parameter1
  2733. */
  2734. struct flashing_req_params {
  2735. uint32_t req_id;
  2736. uint32_t pattern_id;
  2737. uint32_t led_x0;
  2738. uint32_t led_x1;
  2739. };
  2740. #define MAX_MEM_CHUNKS 32
  2741. /**
  2742. * struct wmi_host_mem_chunk - host memory chunk structure
  2743. * @vaddr: Pointer to virtual address
  2744. * @paddr: Physical address
  2745. * @memctx: qdf memory context for mapped address.
  2746. * @len: length of chunk
  2747. * @req_id: request id from target
  2748. */
  2749. struct wmi_host_mem_chunk {
  2750. uint32_t *vaddr;
  2751. uint32_t paddr;
  2752. qdf_dma_mem_context(memctx);
  2753. uint32_t len;
  2754. uint32_t req_id;
  2755. };
  2756. /**
  2757. * struct target_resource_config - Resource config given to target
  2758. * This structure is union of wmi_resource_config defined
  2759. * by both TLV and non-TLV target.
  2760. */
  2761. struct target_resource_config {
  2762. uint32_t num_vdevs;
  2763. uint32_t num_peers;
  2764. uint32_t num_active_peers;
  2765. uint32_t num_offload_peers;
  2766. uint32_t num_offload_reorder_buffs;
  2767. uint32_t num_peer_keys;
  2768. uint32_t num_tids;
  2769. uint32_t ast_skid_limit;
  2770. uint32_t tx_chain_mask;
  2771. uint32_t rx_chain_mask;
  2772. uint32_t rx_timeout_pri[4];
  2773. uint32_t rx_decap_mode;
  2774. uint32_t scan_max_pending_req;
  2775. uint32_t bmiss_offload_max_vdev;
  2776. uint32_t roam_offload_max_vdev;
  2777. uint32_t roam_offload_max_ap_profiles;
  2778. uint32_t num_mcast_groups;
  2779. uint32_t num_mcast_table_elems;
  2780. uint32_t mcast2ucast_mode;
  2781. uint32_t tx_dbg_log_size;
  2782. uint32_t num_wds_entries;
  2783. uint32_t dma_burst_size;
  2784. uint32_t mac_aggr_delim;
  2785. uint32_t rx_skip_defrag_timeout_dup_detection_check;
  2786. uint32_t vow_config;
  2787. uint32_t gtk_offload_max_vdev;
  2788. uint32_t num_msdu_desc; /* Number of msdu desc */
  2789. uint32_t max_frag_entries;
  2790. /* End common */
  2791. /* Added in MCL */
  2792. uint32_t num_tdls_vdevs;
  2793. uint32_t num_tdls_conn_table_entries;
  2794. uint32_t beacon_tx_offload_max_vdev;
  2795. uint32_t num_multicast_filter_entries;
  2796. uint32_t num_wow_filters;
  2797. uint32_t num_keep_alive_pattern;
  2798. uint32_t keep_alive_pattern_size;
  2799. uint32_t max_tdls_concurrent_sleep_sta;
  2800. uint32_t max_tdls_concurrent_buffer_sta;
  2801. uint32_t wmi_send_separate;
  2802. uint32_t num_ocb_vdevs;
  2803. uint32_t num_ocb_channels;
  2804. uint32_t num_ocb_schedules;
  2805. };
  2806. /**
  2807. * struct wmi_wifi_start_log - Structure to store the params sent to start/
  2808. * stop logging
  2809. * @name: Attribute which indicates the type of logging like per packet
  2810. * statistics, connectivity etc.
  2811. * @verbose_level: Verbose level which can be 0,1,2,3
  2812. * @flag: Flag field for future use
  2813. */
  2814. struct wmi_wifi_start_log {
  2815. uint32_t ring_id;
  2816. uint32_t verbose_level;
  2817. uint32_t flag;
  2818. };
  2819. /**
  2820. * struct wmi_pcl_list - Format of PCL
  2821. * @pcl_list: List of preferred channels
  2822. * @weight_list: Weights of the PCL
  2823. * @pcl_len: Number of channels in the PCL
  2824. */
  2825. struct wmi_pcl_list {
  2826. uint8_t pcl_list[128];
  2827. uint8_t weight_list[128];
  2828. uint32_t pcl_len;
  2829. };
  2830. /**
  2831. * struct wmi_pcl_chan_weights - Params to get the valid weighed list
  2832. * @pcl_list: Preferred channel list already sorted in the order of preference
  2833. * @pcl_len: Length of the PCL
  2834. * @saved_chan_list: Valid channel list updated as part of
  2835. * WMA_UPDATE_CHAN_LIST_REQ
  2836. * @saved_num_chan: Length of the valid channel list
  2837. * @weighed_valid_list: Weights of the valid channel list. This will have one
  2838. * to one mapping with valid_chan_list. FW expects channel order and size to be
  2839. * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID.
  2840. * @weight_list: Weights assigned by policy manager
  2841. */
  2842. struct wmi_pcl_chan_weights {
  2843. uint8_t pcl_list[MAX_NUM_CHAN];
  2844. uint32_t pcl_len;
  2845. uint8_t saved_chan_list[MAX_NUM_CHAN];
  2846. uint32_t saved_num_chan;
  2847. uint8_t weighed_valid_list[MAX_NUM_CHAN];
  2848. uint8_t weight_list[MAX_NUM_CHAN];
  2849. };
  2850. /**
  2851. * struct wmi_hw_mode_params - HW mode params
  2852. * @mac0_tx_ss: MAC0 Tx spatial stream
  2853. * @mac0_rx_ss: MAC0 Rx spatial stream
  2854. * @mac1_tx_ss: MAC1 Tx spatial stream
  2855. * @mac1_rx_ss: MAC1 Rx spatial stream
  2856. * @mac0_bw: MAC0 bandwidth
  2857. * @mac1_bw: MAC1 bandwidth
  2858. * @dbs_cap: DBS capabality
  2859. * @agile_dfs_cap: Agile DFS capabality
  2860. */
  2861. struct wmi_hw_mode_params {
  2862. uint8_t mac0_tx_ss;
  2863. uint8_t mac0_rx_ss;
  2864. uint8_t mac1_tx_ss;
  2865. uint8_t mac1_rx_ss;
  2866. uint8_t mac0_bw;
  2867. uint8_t mac1_bw;
  2868. uint8_t dbs_cap;
  2869. uint8_t agile_dfs_cap;
  2870. };
  2871. /**
  2872. * struct wmi_dual_mac_config - Dual MAC configuration
  2873. * @scan_config: Scan configuration
  2874. * @fw_mode_config: FW mode configuration
  2875. * @set_dual_mac_cb: Callback function to be executed on response to the command
  2876. */
  2877. struct wmi_dual_mac_config {
  2878. uint32_t scan_config;
  2879. uint32_t fw_mode_config;
  2880. void *set_dual_mac_cb;
  2881. };
  2882. #ifdef WLAN_NS_OFFLOAD
  2883. /**
  2884. * struct ns_offload_req_params - ns offload request paramter
  2885. * @srcIPv6Addr: src ipv6 address
  2886. * @selfIPv6Addr: self ipv6 address
  2887. * @targetIPv6Addr: target ipv6 address
  2888. * @self_macaddr: self mac address
  2889. * @srcIPv6AddrValid: src ipv6 address valid flag
  2890. * @targetIPv6AddrValid: target ipv6 address valid flag
  2891. * @slotIdx: slot index
  2892. */
  2893. struct ns_offload_req_params {
  2894. uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN];
  2895. uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
  2896. uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
  2897. struct qdf_mac_addr self_macaddr;
  2898. uint8_t srcIPv6AddrValid;
  2899. uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
  2900. uint8_t slotIdx;
  2901. };
  2902. #endif /* WLAN_NS_OFFLOAD */
  2903. /**
  2904. * struct host_offload_req_param - arp offload parameter
  2905. * @offloadType: offload type
  2906. * @enableOrDisable: enable or disable
  2907. * @num_ns_offload_count: offload count
  2908. */
  2909. struct host_offload_req_param {
  2910. uint8_t offloadType;
  2911. uint8_t enableOrDisable;
  2912. uint32_t num_ns_offload_count;
  2913. union {
  2914. uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN];
  2915. uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN];
  2916. } params;
  2917. #ifdef WLAN_NS_OFFLOAD
  2918. struct ns_offload_req_params nsOffloadInfo;
  2919. #endif /* WLAN_NS_OFFLOAD */
  2920. struct qdf_mac_addr bssid;
  2921. };
  2922. /**
  2923. * struct ssid_hotlist_param - param for SSID Hotlist
  2924. * @ssid: SSID which is being hotlisted
  2925. * @band: Band in which the given SSID should be scanned
  2926. * @rssi_low: Low bound on RSSI
  2927. * @rssi_high: High bound on RSSI
  2928. */
  2929. struct ssid_hotlist_param {
  2930. struct mac_ssid ssid;
  2931. uint8_t band;
  2932. int32_t rssi_low;
  2933. int32_t rssi_high;
  2934. };
  2935. /**
  2936. * struct roam_scan_filter_params - Structure holding roaming scan
  2937. * parameters
  2938. * @len: length
  2939. * @op_bitmap: bitmap to determine reason of roaming
  2940. * @session_id: vdev id
  2941. * @num_bssid_black_list: The number of BSSID's that we should
  2942. * avoid connecting to. It is like a
  2943. * blacklist of BSSID's.
  2944. * @num_ssid_white_list: The number of SSID profiles that are
  2945. * in the Whitelist. When roaming, we
  2946. * consider the BSSID's with this SSID
  2947. * also for roaming apart from the connected one's
  2948. * @num_bssid_preferred_list: Number of BSSID's which have a preference over
  2949. * others
  2950. * @bssid_avoid_list: Blacklist SSID's
  2951. * @ssid_allowed_list: Whitelist SSID's
  2952. * @bssid_favored: Favorable BSSID's
  2953. * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
  2954. *
  2955. * This structure holds all the key parameters related to
  2956. * initial connection and roaming connections.
  2957. */
  2958. struct roam_scan_filter_params {
  2959. uint32_t len;
  2960. uint32_t op_bitmap;
  2961. uint8_t session_id;
  2962. uint32_t num_bssid_black_list;
  2963. uint32_t num_ssid_white_list;
  2964. uint32_t num_bssid_preferred_list;
  2965. struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
  2966. struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
  2967. struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
  2968. uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
  2969. };
  2970. /**
  2971. * struct ssid_hotlist_request_params - set SSID hotlist request struct
  2972. * @request_id: ID of the request
  2973. * @session_id: ID of the session
  2974. * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
  2975. * must not be seen in order to consider the SSID "lost"
  2976. * @ssid_count: Number of valid entries in the @ssids array
  2977. * @ssids: Array that defines the SSIDs that are in the hotlist
  2978. */
  2979. struct ssid_hotlist_request_params {
  2980. uint32_t request_id;
  2981. uint8_t session_id;
  2982. uint32_t lost_ssid_sample_size;
  2983. uint32_t ssid_count;
  2984. struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
  2985. };
  2986. /**
  2987. * struct wmi_unit_test_cmd - unit test command parameters
  2988. * @vdev_id: vdev id
  2989. * @module_id: module id
  2990. * @num_args: number of arguments
  2991. * @args: arguments
  2992. */
  2993. struct wmi_unit_test_cmd {
  2994. uint32_t vdev_id;
  2995. uint32_t module_id;
  2996. uint32_t num_args;
  2997. uint32_t args[WMI_MAX_NUM_ARGS];
  2998. };
  2999. /**
  3000. * struct wmi_roam_invoke_cmd - roam invoke command
  3001. * @vdev_id: vdev id
  3002. * @bssid: mac address
  3003. * @channel: channel
  3004. */
  3005. struct wmi_roam_invoke_cmd {
  3006. uint32_t vdev_id;
  3007. uint8_t bssid[IEEE80211_ADDR_LEN];
  3008. uint32_t channel;
  3009. };
  3010. /**
  3011. * struct ext_scan_setbssi_hotlist_params - set hotlist request
  3012. * @requestId: request identifier
  3013. * @sessionId: session identifier
  3014. * @lost_ap_sample_size: number of samples to confirm AP loss
  3015. * @numAp: Number of hotlist APs
  3016. * @ap: hotlist APs
  3017. */
  3018. struct ext_scan_setbssi_hotlist_params {
  3019. uint32_t requestId;
  3020. uint8_t sessionId;
  3021. uint32_t lost_ap_sample_size;
  3022. uint32_t numAp;
  3023. struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
  3024. };
  3025. /**
  3026. * struct TARGET_HAL_REG_CAPABILITIES - This is replication of REG table
  3027. * structure defined by target. This is added here to remove dependency
  3028. * on FW headers so that host can be agnostic to different defintions in
  3029. * both the targets.
  3030. */
  3031. typedef struct {
  3032. uint32_t eeprom_rd; /* regdomain value specified in EEPROM */
  3033. uint32_t eeprom_rd_ext; /* regdomain */
  3034. uint32_t regcap1; /* CAP1 capabilities bit map */
  3035. uint32_t regcap2; /* REGDMN EEPROM CAP */
  3036. uint32_t wireless_modes; /* REGDMN MODE */
  3037. uint32_t low_2ghz_chan;
  3038. uint32_t high_2ghz_chan;
  3039. uint32_t low_5ghz_chan;
  3040. uint32_t high_5ghz_chan;
  3041. } TARGET_HAL_REG_CAPABILITIES;
  3042. /**
  3043. * struct host_mem_req - Host memory request paramseters request by target
  3044. * @req_id: Request id to identify the request.
  3045. * @unit_size: Size of single unit requested.
  3046. * @num_unit_info: Memory chunk info
  3047. * @num_units: number of units requested.
  3048. */
  3049. typedef struct {
  3050. uint32_t req_id;
  3051. uint32_t unit_size;
  3052. uint32_t num_unit_info;
  3053. uint32_t num_units;
  3054. } host_mem_req;
  3055. #define WMI_HOST_DSCP_MAP_MAX (64)
  3056. /**
  3057. * struct wmi_host_ext_resource_config - Extended resource config
  3058. * @host_platform_config: Host plaform configuration.
  3059. * @fw_featuew_bitmap: FW feature requested bitmap.
  3060. */
  3061. typedef struct {
  3062. uint32_t host_platform_config;
  3063. #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001
  3064. #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002
  3065. #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004
  3066. #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008
  3067. #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010
  3068. #define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020
  3069. #define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040
  3070. /**
  3071. * @brief fw_feature_bitmask - Enable/Disable features in FW
  3072. * @details
  3073. * The bits in fw_feature_bitmask are used as shown by the masks below:
  3074. * 0x0001 - LTEU Config enable/disable
  3075. * 0x0002 - COEX GPIO Config enable/disable
  3076. * 0x0004 - Aux Radio enhancement for spectral scan enable/disable
  3077. * 0x0008 - Aux Radio enhancement for chan load scan enable/disable
  3078. * 0x0010 - BSS channel info stats enable/disable
  3079. * The features in question are enabled by setting
  3080. * the feature's bit to 1,
  3081. * or disabled by setting the feature's bit to 0.
  3082. */
  3083. uint32_t fw_feature_bitmap;
  3084. /* add new members here */
  3085. } wmi_host_ext_resource_config;
  3086. /**
  3087. * struct set_neighbour_rx_params - Neighbour RX params
  3088. * @vdev_id: vdev id
  3089. * @idx: index of param
  3090. * @action: action
  3091. * @type: Type of param
  3092. */
  3093. struct set_neighbour_rx_params {
  3094. uint8_t vdev_id;
  3095. uint32_t idx;
  3096. uint32_t action;
  3097. uint32_t type;
  3098. };
  3099. /**
  3100. * struct set_fwtest_params - FW test params
  3101. * @arg: FW param id
  3102. * @value: value
  3103. */
  3104. struct set_fwtest_params {
  3105. uint32_t arg;
  3106. uint32_t value;
  3107. };
  3108. /**
  3109. * struct config_ratemask_params - ratemask config parameters
  3110. * @vdev_id: vdev id
  3111. * @type: Type
  3112. * @lower32: Lower 32 bits
  3113. * @higher32: Hogher 32 bits
  3114. */
  3115. struct config_ratemask_params {
  3116. uint8_t vdev_id;
  3117. uint8_t type;
  3118. uint32_t lower32;
  3119. uint32_t higher32;
  3120. };
  3121. /**
  3122. * struct peer_add_wds_entry_params - WDS peer entry add params
  3123. * @dest_addr: Pointer to destination macaddr
  3124. * @peer_addr: Pointer to peer mac addr
  3125. * @flags: flags
  3126. */
  3127. struct peer_add_wds_entry_params {
  3128. const uint8_t *dest_addr;
  3129. uint8_t *peer_addr;
  3130. uint32_t flags;
  3131. };
  3132. /**
  3133. * struct peer_del_wds_entry_params - WDS peer entry del params
  3134. * @dest_addr: Pointer to destination macaddr
  3135. */
  3136. struct peer_del_wds_entry_params {
  3137. uint8_t *dest_addr;
  3138. };
  3139. /**
  3140. * struct peer_updatewds_entry_params - WDS peer entry update params
  3141. * @wds_macaddr: Pointer to destination macaddr
  3142. * @peer_add: Pointer to peer mac addr
  3143. * @flags: flags
  3144. */
  3145. struct peer_update_wds_entry_params {
  3146. uint8_t *wds_macaddr;
  3147. uint8_t *peer_macaddr;
  3148. uint32_t flags;
  3149. };
  3150. /**
  3151. * struct set_ps_mode_params - PS mode params
  3152. * @vdev_id: vdev id
  3153. * @psmode: PS mode
  3154. */
  3155. struct set_ps_mode_params {
  3156. uint8_t vdev_id;
  3157. uint8_t psmode;
  3158. };
  3159. /**
  3160. * @struct tt_level_config - Set Thermal throttlling config
  3161. * @tmplwm: Temperature low water mark
  3162. * @tmphwm: Temperature high water mark
  3163. * @dcoffpercent: dc off percentage
  3164. * @priority: priority
  3165. */
  3166. typedef struct {
  3167. uint32_t tmplwm;
  3168. uint32_t tmphwm;
  3169. uint32_t dcoffpercent;
  3170. uint32_t priority;
  3171. } tt_level_config;
  3172. /**
  3173. * struct thermal_mitigation_params - Thermal mitigation params
  3174. * @enable: Enable/Disable Thermal mitigation
  3175. * @dc: DC
  3176. * @dc_per_event: DC per event
  3177. * @tt_level_config: TT level config params
  3178. */
  3179. struct thermal_mitigation_params {
  3180. uint32_t enable;
  3181. uint32_t dc;
  3182. uint32_t dc_per_event;
  3183. tt_level_config levelconf[THERMAL_LEVELS];
  3184. };
  3185. /**
  3186. * struct smart_ant_enable_params - Smart antenna params
  3187. * @enable: Enable/Disable
  3188. * @mode: SA mode
  3189. * @rx_antenna: RX antenna config
  3190. * @gpio_pin : GPIO pin config
  3191. * @gpio_func : GPIO function config
  3192. */
  3193. struct smart_ant_enable_params {
  3194. uint32_t enable;
  3195. uint32_t mode;
  3196. uint32_t rx_antenna;
  3197. uint32_t gpio_pin[WMI_HAL_MAX_SANTENNA];
  3198. uint32_t gpio_func[WMI_HAL_MAX_SANTENNA];
  3199. };
  3200. /**
  3201. * struct smart_ant_rx_ant_params - RX antenna params
  3202. * @antenna: RX antenna
  3203. */
  3204. struct smart_ant_rx_ant_params {
  3205. uint32_t antenna;
  3206. };
  3207. /**
  3208. * struct smart_ant_tx_ant_params - TX antenna param
  3209. * @antenna_array: Antenna arry
  3210. * @vdev_id: VDEV id
  3211. */
  3212. struct smart_ant_tx_ant_params {
  3213. uint32_t *antenna_array;
  3214. uint8_t vdev_id;
  3215. };
  3216. /**
  3217. * struct smart_ant_training_info_params - SA training params
  3218. * @vdev_id: VDEV id
  3219. * @rate_array: Rates array
  3220. * @antenna_array: Antenna array
  3221. * @numpkts: num packets for training
  3222. */
  3223. struct smart_ant_training_info_params {
  3224. uint8_t vdev_id;
  3225. uint32_t *rate_array;
  3226. uint32_t *antenna_array;
  3227. uint32_t numpkts;
  3228. };
  3229. /**
  3230. * struct smart_ant_node_config_params - SA node config params
  3231. * @vdev_id: VDEV id
  3232. * @cmd_id: Command id
  3233. * @args_count: Arguments count
  3234. */
  3235. struct smart_ant_node_config_params {
  3236. uint8_t vdev_id;
  3237. uint32_t cmd_id;
  3238. uint16_t args_count;
  3239. uint32_t *args_arr;
  3240. };
  3241. /**
  3242. * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
  3243. * @enable: Enable TX feedback for SA
  3244. */
  3245. struct smart_ant_enable_tx_feedback_params {
  3246. int enable;
  3247. };
  3248. /**
  3249. * struct vdev_spectral_configure_params - SPectral config params
  3250. * @vdev_id: VDEV id
  3251. * @count: count
  3252. * @period: period
  3253. * @spectral_pri: Spectral priority
  3254. * @fft_size: FFT size
  3255. * @gc_enable: GC enable
  3256. * @restart_enable: restart enabled
  3257. * @noise_floor_ref: Noise floor reference
  3258. * @init_delay: Init delays
  3259. * @nb_tone_thr: NB tone threshold
  3260. * @str_bin_thr: STR BIN threshold
  3261. * @wb_rpt_mode: WB BIN threshold
  3262. * @rssi_rpt_mode: RSSI report mode
  3263. * @rssi_thr: RSSI threshold
  3264. * @pwr_format: Power format
  3265. * @rpt_mode: Report mdoe
  3266. * @bin_scale: BIN scale
  3267. * @dBm_adj: DBM adjust
  3268. * @chn_mask: chain mask
  3269. */
  3270. struct vdev_spectral_configure_params {
  3271. uint8_t vdev_id;
  3272. uint16_t count;
  3273. uint16_t period;
  3274. uint16_t spectral_pri;
  3275. uint16_t fft_size;
  3276. uint16_t gc_enable;
  3277. uint16_t restart_enable;
  3278. uint16_t noise_floor_ref;
  3279. uint16_t init_delay;
  3280. uint16_t nb_tone_thr;
  3281. uint16_t str_bin_thr;
  3282. uint16_t wb_rpt_mode;
  3283. uint16_t rssi_rpt_mode;
  3284. uint16_t rssi_thr;
  3285. uint16_t pwr_format;
  3286. uint16_t rpt_mode;
  3287. uint16_t bin_scale;
  3288. uint16_t dBm_adj;
  3289. uint16_t chn_mask;
  3290. };
  3291. /**
  3292. * struct vdev_spectral_enable_params - Spectral enabled params
  3293. * @vdev_id: VDEV id
  3294. * @active_valid: Active valid
  3295. * @active: active
  3296. * @enabled_valid: Enabled valid
  3297. * @enabled: enabled
  3298. */
  3299. struct vdev_spectral_enable_params {
  3300. uint8_t vdev_id;
  3301. uint8_t active_valid;
  3302. uint8_t active;
  3303. uint8_t enabled_valid;
  3304. uint8_t enabled;
  3305. };
  3306. /**
  3307. * struct pdev_set_regdomain_params - PDEV set reg domain params
  3308. * @currentRDinuse: Current Reg domain
  3309. * @currentRD2G: Current Reg domain 2G
  3310. * @currentRD5G: Current Reg domain 5G
  3311. * @ctl_2G: CTL 2G
  3312. * @ctl_5G: CTL 5G
  3313. * @dfsDomain: DFS domain
  3314. */
  3315. struct pdev_set_regdomain_params {
  3316. uint16_t currentRDinuse;
  3317. uint16_t currentRD2G;
  3318. uint16_t currentRD5G;
  3319. uint32_t ctl_2G;
  3320. uint32_t ctl_5G;
  3321. uint8_t dfsDomain;
  3322. };
  3323. /**
  3324. * struct set_quiet_mode_params - Set quiet mode params
  3325. * @enabled: Enabled
  3326. * @period: Quite period
  3327. * @intval: Quite interval
  3328. * @duration: Quite duration
  3329. * @offset: offset
  3330. */
  3331. struct set_quiet_mode_params {
  3332. uint8_t enabled;
  3333. uint8_t period;
  3334. uint16_t intval;
  3335. uint16_t duration;
  3336. uint16_t offset;
  3337. };
  3338. /**
  3339. * struct set_beacon_filter_params - Set beacon filter params
  3340. * @vdev_id: VDEV id
  3341. * @ie: Pointer to IE fields
  3342. */
  3343. struct set_beacon_filter_params {
  3344. uint8_t vdev_id;
  3345. uint32_t *ie;
  3346. };
  3347. /**
  3348. * struct remove_beacon_filter_params - Remove beacon filter params
  3349. * @vdev_id: VDEV id
  3350. */
  3351. struct remove_beacon_filter_params {
  3352. uint8_t vdev_id;
  3353. };
  3354. /**
  3355. * struct mgmt_params - Mgmt params
  3356. * @vdev_id: vdev id
  3357. * @buf_len: lenght of frame buffer
  3358. * @wbuf: frame buffer
  3359. */
  3360. struct mgmt_params {
  3361. int vdev_id;
  3362. uint32_t buf_len;
  3363. qdf_nbuf_t wbuf;
  3364. };
  3365. /**
  3366. * struct addba_clearresponse_params - Addba clear response params
  3367. * @vdev_id: VDEV id
  3368. */
  3369. struct addba_clearresponse_params {
  3370. uint8_t vdev_id;
  3371. };
  3372. /**
  3373. * struct addba_send_params - ADDBA send params
  3374. * @vdev_id: vdev id
  3375. * @tidno: TID
  3376. * @buffersize: buffer size
  3377. */
  3378. struct addba_send_params {
  3379. uint8_t vdev_id;
  3380. uint8_t tidno;
  3381. uint16_t buffersize;
  3382. };
  3383. /**
  3384. * struct delba_send_params - DELBA send params
  3385. * @vdev_id: vdev id
  3386. * @tidno: TID
  3387. * @initiator: initiator
  3388. * @reasoncode: reason code
  3389. */
  3390. struct delba_send_params {
  3391. uint8_t vdev_id;
  3392. uint8_t tidno;
  3393. uint8_t initiator;
  3394. uint16_t reasoncode;
  3395. };
  3396. /**
  3397. * struct addba_setresponse_arams - Set ADDBA response params
  3398. * @vdev_id: vdev id
  3399. * @tidno: TID
  3400. * @statuscode: status code in response
  3401. */
  3402. struct addba_setresponse_params {
  3403. uint8_t vdev_id;
  3404. uint8_t tidno;
  3405. uint16_t statuscode;
  3406. };
  3407. /**
  3408. * struct singleamsdu_params - Single AMSDU params
  3409. * @vdev_id: vdev is
  3410. * @tidno: TID
  3411. */
  3412. struct singleamsdu_params {
  3413. uint8_t vdev_id;
  3414. uint8_t tidno;
  3415. };
  3416. /**
  3417. * struct set_qbosst_params - Set QBOOST params
  3418. * @vdev_id: vdev id
  3419. * @value: value
  3420. */
  3421. struct set_qboost_params {
  3422. uint8_t vdev_id;
  3423. uint32_t value;
  3424. };
  3425. /**
  3426. * struct mu_scan_params - MU scan params
  3427. * @id: id
  3428. * @type: type
  3429. * @duration: Duration
  3430. * @lteu_tx_power: LTEU tx power
  3431. */
  3432. struct mu_scan_params {
  3433. uint8_t id;
  3434. uint8_t type;
  3435. uint32_t duration;
  3436. uint32_t lteu_tx_power;
  3437. };
  3438. /**
  3439. * struct lteu_config_params - LTEU config params
  3440. * @lteu_gpio_start: start MU/AP scan after GPIO toggle
  3441. * @lteu_num_bins: no. of elements in the following arrays
  3442. * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
  3443. * @lteu_weight: weights for MU algo
  3444. * @lteu_thresh: thresholds for MU algo
  3445. * @lteu_gamma: gamma's for MU algo
  3446. * @lteu_scan_timeout: timeout in ms to gpio toggle
  3447. * @alpha_num_ssid: alpha for num active bssid calculation
  3448. * @wifi_tx_power: Wifi Tx power
  3449. */
  3450. struct lteu_config_params {
  3451. uint8_t lteu_gpio_start;
  3452. uint8_t lteu_num_bins;
  3453. uint8_t use_actual_nf;
  3454. uint32_t lteu_weight[LTEU_MAX_BINS];
  3455. uint32_t lteu_thresh[LTEU_MAX_BINS];
  3456. uint32_t lteu_gamma[LTEU_MAX_BINS];
  3457. uint32_t lteu_scan_timeout;
  3458. uint32_t alpha_num_bssid;
  3459. uint32_t wifi_tx_power;
  3460. };
  3461. struct wmi_macaddr_t {
  3462. /** upper 4 bytes of MAC address */
  3463. uint32_t mac_addr31to0;
  3464. /** lower 2 bytes of MAC address */
  3465. uint32_t mac_addr47to32;
  3466. };
  3467. /**
  3468. * struct atf_peer_info - ATF peer info params
  3469. * @peer_macaddr: peer mac addr
  3470. * @percentage_peer: percentage of air time for this peer
  3471. */
  3472. typedef struct {
  3473. struct wmi_macaddr_t peer_macaddr;
  3474. uint32_t percentage_peer;
  3475. } atf_peer_info;
  3476. /**
  3477. * struct set_atf_params - ATF params
  3478. * @num_peers: number of peers
  3479. * @atf_peer_info: ATF peer info
  3480. */
  3481. struct set_atf_params {
  3482. uint32_t num_peers;
  3483. atf_peer_info peer_info[ATF_ACTIVED_MAX_CLIENTS];
  3484. };
  3485. /**
  3486. * struct atf_peer_ext_info - ATF peer ext info params
  3487. * @peer_macaddr: peer mac address
  3488. * @group_index: group index
  3489. * @atf_index_reserved: ATF index rsvd
  3490. */
  3491. typedef struct {
  3492. struct wmi_macaddr_t peer_macaddr;
  3493. uint32_t group_index;
  3494. uint32_t atf_index_reserved;
  3495. } atf_peer_ext_info;
  3496. /**
  3497. * struct atf_peer_request_params - ATF peer req params
  3498. * @num_peers: number of peers
  3499. * @atf_peer_ext_info: ATF peer ext info
  3500. */
  3501. struct atf_peer_request_params {
  3502. uint32_t num_peers;
  3503. atf_peer_ext_info peer_ext_info[ATF_ACTIVED_MAX_CLIENTS];
  3504. };
  3505. /**
  3506. * struct atf_group_info - ATF group info params
  3507. * @percentage_group: Percentage AT for group
  3508. * @atf_group_units_reserved: ATF group information
  3509. */
  3510. typedef struct {
  3511. uint32_t percentage_group;
  3512. uint32_t atf_group_units_reserved;
  3513. } atf_group_info;
  3514. /**
  3515. * struct atf_grouping_params - ATF grouping params
  3516. * @num_groups: number of groups
  3517. * @group_inf: Group informaition
  3518. */
  3519. struct atf_grouping_params {
  3520. uint32_t num_groups;
  3521. atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS];
  3522. };
  3523. /**
  3524. * struct wlan_profile_params - WLAN profile params
  3525. * @param_id: param id
  3526. * @profile_id: profile id
  3527. * @enable: enable
  3528. */
  3529. struct wlan_profile_params {
  3530. uint32_t param_id;
  3531. uint32_t profile_id;
  3532. uint32_t enable;
  3533. };
  3534. /* struct ht_ie_params - HT IE params
  3535. * @ie_len: IE length
  3536. * @ie_data: pointer to IE data
  3537. */
  3538. struct ht_ie_params {
  3539. uint32_t ie_len;
  3540. uint8_t *ie_data;
  3541. };
  3542. /* struct vht_ie_params - VHT IE params
  3543. * @ie_len: IE length
  3544. * @ie_data: pointer to IE data
  3545. */
  3546. struct vht_ie_params {
  3547. uint32_t ie_len;
  3548. uint8_t *ie_data;
  3549. };
  3550. /**
  3551. * struct wmi_host_wmeParams - WME params
  3552. * @wmep_acm: ACM paramete
  3553. * @wmep_aifsn: AIFSN parameters
  3554. * @wmep_logcwmin: cwmin in exponential form
  3555. * @wmep_logcwmax: cwmax in exponential form
  3556. * @wmep_txopLimit: txopLimit
  3557. * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
  3558. */
  3559. struct wmi_host_wmeParams {
  3560. u_int8_t wmep_acm;
  3561. u_int8_t wmep_aifsn;
  3562. u_int8_t wmep_logcwmin;
  3563. u_int8_t wmep_logcwmax;
  3564. u_int16_t wmep_txopLimit;
  3565. u_int8_t wmep_noackPolicy;
  3566. };
  3567. /**
  3568. * struct wmm_update_params - WMM update params
  3569. * @wmep_array: WME params for each AC
  3570. */
  3571. struct wmm_update_params {
  3572. struct wmi_host_wmeParams *wmep_array;
  3573. };
  3574. /**
  3575. * struct ant_switch_tbl_params - Antenna switch table params
  3576. * @ant_ctrl_common1: ANtenna control common param 1
  3577. * @ant_ctrl_common2: Antenna control commn param 2
  3578. */
  3579. struct ant_switch_tbl_params {
  3580. uint32_t ant_ctrl_common1;
  3581. uint32_t ant_ctrl_common2;
  3582. };
  3583. /**
  3584. * struct ratepwr_table_params - Rate power table params
  3585. * @ratepwr_tbl: pointer to rate power table
  3586. * @ratepwr_len: rate power table len
  3587. */
  3588. struct ratepwr_table_params {
  3589. uint8_t *ratepwr_tbl;
  3590. uint16_t ratepwr_len;
  3591. };
  3592. /**
  3593. * struct ctl_table_params - Ctl table params
  3594. * @ctl_array: pointer to ctl array
  3595. * @ctl_len: ctl length
  3596. * @is_acfg_ctl: is acfg_ctl table
  3597. */
  3598. struct ctl_table_params {
  3599. uint8_t *ctl_array;
  3600. uint16_t ctl_len;
  3601. bool is_acfg_ctl;
  3602. };
  3603. /**
  3604. * struct mimogain_table_params - MIMO gain table params
  3605. * @array_gain: pointer to array gain table
  3606. * @tbl_len: table length
  3607. * @multichain_gain_bypass: bypass multichain gain
  3608. */
  3609. struct mimogain_table_params {
  3610. uint8_t *array_gain;
  3611. uint16_t tbl_len;
  3612. bool multichain_gain_bypass;
  3613. };
  3614. /**
  3615. * struct ratepwr_chainmask_params - Rate power chainmask params
  3616. * @ratepwr_chain_tbl: pointer to ratepwr chain table
  3617. * @num_rate: number of rate in table
  3618. * @pream_type: preamble type
  3619. * @ops: ops
  3620. */
  3621. struct ratepwr_chainmsk_params {
  3622. uint32_t *ratepwr_chain_tbl;
  3623. uint16_t num_rate;
  3624. uint8_t pream_type;
  3625. uint8_t ops;
  3626. };
  3627. struct macaddr_params {
  3628. uint8_t *macaddr;
  3629. };
  3630. /**
  3631. * struct acparams_params - acparams config structure
  3632. * @ac: AC to configure
  3633. * @use_rts: Use rts for this AC
  3634. * @aggrsize_scaling: Aggregrate size scaling for the AC
  3635. * @min_kbps: min kbps req
  3636. */
  3637. struct acparams_params {
  3638. uint8_t ac;
  3639. uint8_t use_rts;
  3640. uint8_t aggrsize_scaling;
  3641. uint32_t min_kbps;
  3642. };
  3643. /**
  3644. * struct vap_dscp_tid_map_params - DSCP tid map params
  3645. * @vdev_id: vdev id
  3646. * @dscp_to_tid_map: pointer to arry of tid to dscp map table
  3647. */
  3648. struct vap_dscp_tid_map_params {
  3649. uint8_t vdev_id;
  3650. uint32_t *dscp_to_tid_map;
  3651. };
  3652. /**
  3653. * struct proxy_ast_reserve_params - Proxy AST reserve params
  3654. * @macaddr: macaddr for proxy ast entry
  3655. */
  3656. struct proxy_ast_reserve_params {
  3657. uint8_t *macaddr;
  3658. };
  3659. /**
  3660. * struct fips_params - FIPS params config
  3661. * @key: pointer to key
  3662. * @key_len: length of key
  3663. * @data: pointer data buf
  3664. * @data_len: lenght of sata buf
  3665. * @mode: mode
  3666. * @op: operation
  3667. */
  3668. struct fips_params {
  3669. uint8_t *key;
  3670. uint32_t key_len;
  3671. uint8_t *data;
  3672. uint32_t data_len;
  3673. uint32_t mode;
  3674. uint32_t op;
  3675. };
  3676. /**
  3677. * struct mcast_group_update_param - Mcast group table update to target
  3678. * @action: Addition/deletion
  3679. * @wildcard: iwldcard table entry?
  3680. * @mcast_ip_addr: mcast ip address to be updated
  3681. * @mcast_ip_addr_bytes: mcast ip addr bytes
  3682. * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
  3683. * @filter_mode: filter mode
  3684. * @nsrcs: number of entries in source list
  3685. * @srcs: source mac accpted
  3686. * @mask: mask
  3687. * @vap_id: vdev id
  3688. * @is_action_delete: is delete
  3689. * @is_filter_mode_snoop:
  3690. * @is_mcast_addr_len:
  3691. */
  3692. struct mcast_group_update_params {
  3693. int action;
  3694. int wildcard;
  3695. uint8_t *mcast_ip_addr;
  3696. int mcast_ip_addr_bytes;
  3697. uint8_t *ucast_mac_addr;
  3698. uint8_t filter_mode;
  3699. uint8_t nsrcs;
  3700. uint8_t *srcs;
  3701. uint8_t *mask;
  3702. uint8_t vap_id;
  3703. bool is_action_delete;
  3704. bool is_filter_mode_snoop;
  3705. bool is_mcast_addr_len;
  3706. };
  3707. /**
  3708. * struct periodic_chan_stats_param - periodic channel stats req param
  3709. * @stats_period: stats period update
  3710. * @enable: enable/disable
  3711. */
  3712. struct periodic_chan_stats_params {
  3713. uint32_t stats_period;
  3714. bool enable;
  3715. };
  3716. /**
  3717. * struct packet_power_info_params - packet power info params
  3718. * @rate_flags: rate flags
  3719. * @nss: number of spatial streams
  3720. * @preamble: preamble
  3721. * @hw_rate:
  3722. */
  3723. struct packet_power_info_params {
  3724. uint16_t rate_flags;
  3725. uint16_t nss;
  3726. uint16_t preamble;
  3727. uint16_t hw_rate;
  3728. };
  3729. /**
  3730. * WMI_GPIO_CONFIG_CMDID
  3731. */
  3732. enum {
  3733. WMI_HOST_GPIO_PULL_NONE,
  3734. WMI_HOST_GPIO_PULL_UP,
  3735. WMI_HOST_GPIO_PULL_DOWN,
  3736. };
  3737. /**
  3738. * WMI_GPIO_INTTYPE
  3739. */
  3740. enum {
  3741. WMI_HOST_GPIO_INTTYPE_DISABLE,
  3742. WMI_HOST_GPIO_INTTYPE_RISING_EDGE,
  3743. WMI_HOST_GPIO_INTTYPE_FALLING_EDGE,
  3744. WMI_HOST_GPIO_INTTYPE_BOTH_EDGE,
  3745. WMI_HOST_GPIO_INTTYPE_LEVEL_LOW,
  3746. WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH
  3747. };
  3748. /**
  3749. * struct wmi_host_gpio_input_event - GPIO input event structure
  3750. * @gpio_num: GPIO number which changed state
  3751. */
  3752. typedef struct {
  3753. uint32_t gpio_num; /* GPIO number which changed state */
  3754. } wmi_host_gpio_input_event;
  3755. /**
  3756. * struct gpio_config_params - GPIO config params
  3757. * @gpio_num: GPIO number to config
  3758. * @input: input/output
  3759. * @pull_type: pull type
  3760. * @intr_mode: int mode
  3761. */
  3762. struct gpio_config_params {
  3763. uint32_t gpio_num;
  3764. uint32_t input;
  3765. uint32_t pull_type;
  3766. uint32_t intr_mode;
  3767. };
  3768. /**
  3769. * struct gpio_output_params - GPIO output params
  3770. * @gpio_num: GPIO number to configure
  3771. * @set: set/reset
  3772. */
  3773. struct gpio_output_params {
  3774. uint32_t gpio_num;
  3775. uint32_t set;
  3776. };
  3777. #define WMI_HOST_RTT_REPORT_CFR 0
  3778. #define WMI_HOST_RTT_NO_REPORT_CFR 1
  3779. #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2
  3780. /**
  3781. * struct rtt_meas_req_test_params
  3782. * @peer: peer mac address
  3783. * @req_frame_type: RTT request frame type
  3784. * @req_bw: requested bandwidth
  3785. * @req_preamble: Preamble
  3786. * @req_num_req: num of requests
  3787. * @req_report_type: report type
  3788. * @num_measurements: number of measurements
  3789. * @asap_mode: priority
  3790. * @lci_requested: LCI requested
  3791. * @loc_civ_requested:
  3792. * @channel_param: channel param
  3793. * @req_id: requested id
  3794. */
  3795. struct rtt_meas_req_test_params {
  3796. uint8_t peer[IEEE80211_ADDR_LEN];
  3797. int req_frame_type;
  3798. int req_bw;
  3799. int req_preamble;
  3800. int req_num_req;
  3801. int req_report_type;
  3802. uint32_t num_measurements;
  3803. uint32_t asap_mode;
  3804. uint32_t lci_requested;
  3805. uint32_t loc_civ_requested;
  3806. struct channel_param channel;
  3807. uint8_t req_id;
  3808. };
  3809. /**
  3810. * struct rtt_meas_req_params - RTT measurement request params
  3811. * @req_id: Request id
  3812. * @vdev_id: vdev id
  3813. * @sta_mac_addr: pointer to station mac address
  3814. * @spoof_mac_addr: pointer to spoof mac address
  3815. * @is_mode_na: 11NA
  3816. * @is_mode_ac: AC
  3817. * @is_bw_20: 20
  3818. * @is_bw_40: 40
  3819. * @is_bw_80: 80
  3820. * @num_probe_rqst: number of probe request
  3821. * @channel_param: channel param
  3822. */
  3823. struct rtt_meas_req_params {
  3824. uint8_t req_id;
  3825. uint8_t vdev_id;
  3826. uint8_t *sta_mac_addr;
  3827. uint8_t *spoof_mac_addr;
  3828. bool is_mode_na;
  3829. bool is_mode_ac;
  3830. bool is_bw_20;
  3831. bool is_bw_40;
  3832. bool is_bw_80;
  3833. uint32_t num_probe_rqst;
  3834. struct channel_param channel;
  3835. };
  3836. /**
  3837. * struct lci_set_params - LCI params
  3838. * @lci_data: pointer to LCI data
  3839. * @latitude_unc: latitude
  3840. * @latitude_0_12: bits 0 to 1 of latitude
  3841. * @latitude_2_33: bits 2 to 33 of latitude
  3842. * @longitude_unc: longitude
  3843. * @longitude_0_1: bits 0 to 1 of longitude
  3844. * @longitude_2_33: bits 2 to 33 of longitude
  3845. * @altitude_type: altitude type
  3846. * @altitude_unc_0_3: altitude bits 0 - 3
  3847. * @altitude_unc_4_5: altitude bits 4 - 5
  3848. * @altitude: altitude
  3849. * @datum: dataum
  3850. * @reg_loc_agmt:
  3851. * @reg_loc_dse:
  3852. * @dep_sta:
  3853. * @version: version
  3854. */
  3855. struct lci_set_params {
  3856. void *lci_data;
  3857. uint8_t latitude_unc:6,
  3858. latitude_0_1:2;
  3859. uint32_t latitude_2_33;
  3860. uint8_t longitude_unc:6,
  3861. longitude_0_1:2;
  3862. uint32_t longitude_2_33;
  3863. uint8_t altitude_type:4,
  3864. altitude_unc_0_3:4;
  3865. uint32_t altitude_unc_4_5:2,
  3866. altitude:30;
  3867. uint8_t datum:3,
  3868. reg_loc_agmt:1,
  3869. reg_loc_dse:1,
  3870. dep_sta:1,
  3871. version:2;
  3872. };
  3873. /**
  3874. * struct lcr_set_params - LCR params
  3875. * @lcr_data: pointer to lcr data
  3876. */
  3877. struct lcr_set_params {
  3878. void *lcr_data;
  3879. };
  3880. /**
  3881. * struct rtt_keepalive_req_params - RTT keepalive params
  3882. * @macaddr: pointer to macaddress
  3883. * @req_id: Request id
  3884. * @vdev_id: vdev id
  3885. * @stop: start/stop
  3886. */
  3887. struct rtt_keepalive_req_params {
  3888. uint8_t *macaddr;
  3889. uint8_t req_id;
  3890. uint8_t vdev_id;
  3891. bool stop;
  3892. };
  3893. /**
  3894. * struct wmi_host_stats_event - Stats event params
  3895. * @stats_id: stats id of type wmi_host_stats_event
  3896. * @num_pdev_stats: number of pdev stats event structures 0 or 1
  3897. * @num_pdev_ext_stats: number of pdev ext stats event structures
  3898. * @num_vdev_stats: number of vdev stats
  3899. * @num_peer_stats: number of peer stats event structures 0 or max peers
  3900. * @num_bcnflt_stats: number of beacon filter stats
  3901. * @num_chan_stats: number of channel stats
  3902. */
  3903. typedef struct {
  3904. wmi_host_stats_id stats_id;
  3905. uint32_t num_pdev_stats;
  3906. uint32_t num_pdev_ext_stats;
  3907. uint32_t num_vdev_stats;
  3908. uint32_t num_peer_stats;
  3909. uint32_t num_bcnflt_stats;
  3910. uint32_t num_chan_stats;
  3911. } wmi_host_stats_event;
  3912. /**
  3913. * struct wmi_host_peer_extd_stats - peer extd stats event structure
  3914. * @peer_macaddr: Peer mac address
  3915. * @inactive_time: inactive time in secs
  3916. * @peer_chain_rssi: peer rssi
  3917. * @rx_duration: RX duration
  3918. * @peer_tx_bytes: TX bytes
  3919. * @peer_rx_bytes: RX bytes
  3920. * @last_tx_rate_code: Tx rate code of last frame
  3921. * @last_tx_power: Tx power latest
  3922. * @atf_tokens_allocated: atf tokens allocated
  3923. * @atf_tokens_utilized: atf tokens utilized
  3924. * @reserved: for future use
  3925. */
  3926. typedef struct {
  3927. wmi_host_mac_addr peer_macaddr;
  3928. uint32_t inactive_time;
  3929. uint32_t peer_chain_rssi;
  3930. uint32_t rx_duration;
  3931. uint32_t peer_tx_bytes;
  3932. uint32_t peer_rx_bytes;
  3933. uint32_t last_tx_rate_code;
  3934. uint32_t last_tx_power;
  3935. uint32_t atf_tokens_allocated;
  3936. uint32_t atf_tokens_utilized;
  3937. uint32_t reserved[4];
  3938. } wmi_host_peer_extd_stats;
  3939. /**
  3940. * struct wmi_host_pdev_ext_stats - peer ext stats structure
  3941. * @rx_rssi_comb: RX rssi
  3942. * @rx_rssi_chain0: RX rssi chain 0
  3943. * @rx_rssi_chain1: RX rssi chain 1
  3944. * @rx_rssi_chain2: RX rssi chain 2
  3945. * @rx_rssi_chain3: RX rssi chain 3
  3946. * @rx_mcs: RX MCS array
  3947. * @tx_mcs: TX MCS array
  3948. * @ack_rssi: Ack rssi
  3949. */
  3950. typedef struct {
  3951. uint32_t rx_rssi_comb;
  3952. uint32_t rx_rssi_chain0;
  3953. uint32_t rx_rssi_chain1;
  3954. uint32_t rx_rssi_chain2;
  3955. uint32_t rx_rssi_chain3;
  3956. uint32_t rx_mcs[10];
  3957. uint32_t tx_mcs[10];
  3958. uint32_t ack_rssi;
  3959. } wmi_host_pdev_ext_stats;
  3960. /**
  3961. * struct wmi_host_dbg_tx_stats - Debug stats
  3962. * @comp_queued: Num HTT cookies queued to dispatch list
  3963. * @comp_delivered: Num HTT cookies dispatched
  3964. * @msdu_enqued: Num MSDU queued to WAL
  3965. * @mpdu_enqued: Num MPDU queue to WAL
  3966. * @wmm_drop: Num MSDUs dropped by WMM limit
  3967. * @local_enqued: Num Local frames queued
  3968. * @local_freed: Num Local frames done
  3969. * @hw_queued: Num queued to HW
  3970. * @hw_reaped: Num PPDU reaped from HW
  3971. * @underrun: Num underruns
  3972. * @hw_paused: HW Paused.
  3973. * @tx_abort: Num PPDUs cleaned up in TX abort
  3974. * @mpdus_requed: Num MPDUs requed by SW
  3975. * @tx_ko: excessive retries
  3976. * @tx_xretry:
  3977. * @data_rc: data hw rate code
  3978. * @self_triggers: Scheduler self triggers
  3979. * @sw_retry_failure: frames dropped due to excessive sw retries
  3980. * @illgl_rate_phy_err: illegal rate phy errors
  3981. * @pdev_cont_xretry: wal pdev continous xretry
  3982. * @pdev_tx_timeout: wal pdev continous xretry
  3983. * @pdev_resets: wal pdev resets
  3984. * @stateless_tid_alloc_failure: frames dropped due to non-availability of
  3985. * stateless TIDs
  3986. * @phy_underrun: PhY/BB underrun
  3987. * @txop_ovf: MPDU is more than txop limit
  3988. * @seq_posted: Number of Sequences posted
  3989. * @seq_failed_queueing: Number of Sequences failed queueing
  3990. * @seq_completed: Number of Sequences completed
  3991. * @seq_restarted: Number of Sequences restarted
  3992. * @mu_seq_posted: Number of MU Sequences posted
  3993. * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
  3994. * (Reset,channel change)
  3995. * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
  3996. * (TTL expired)
  3997. * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
  3998. * PPDU_duration based on rate, dyn_bw)
  3999. * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
  4000. * @mpdus_expired: Num MPDUs that was dropped du to expiry.
  4001. * @mc_dropr: Num mc drops
  4002. */
  4003. typedef struct {
  4004. int32_t comp_queued;
  4005. int32_t comp_delivered;
  4006. int32_t msdu_enqued;
  4007. int32_t mpdu_enqued;
  4008. int32_t wmm_drop;
  4009. int32_t local_enqued;
  4010. int32_t local_freed;
  4011. int32_t hw_queued;
  4012. int32_t hw_reaped;
  4013. int32_t underrun;
  4014. uint32_t hw_paused;
  4015. int32_t tx_abort;
  4016. int32_t mpdus_requed;
  4017. uint32_t tx_ko;
  4018. uint32_t tx_xretry;
  4019. uint32_t data_rc;
  4020. uint32_t self_triggers;
  4021. uint32_t sw_retry_failure;
  4022. uint32_t illgl_rate_phy_err;
  4023. uint32_t pdev_cont_xretry;
  4024. uint32_t pdev_tx_timeout;
  4025. uint32_t pdev_resets;
  4026. uint32_t stateless_tid_alloc_failure;
  4027. uint32_t phy_underrun;
  4028. uint32_t txop_ovf;
  4029. uint32_t seq_posted;
  4030. uint32_t seq_failed_queueing;
  4031. uint32_t seq_completed;
  4032. uint32_t seq_restarted;
  4033. uint32_t mu_seq_posted;
  4034. int32_t mpdus_sw_flush;
  4035. int32_t mpdus_hw_filter;
  4036. int32_t mpdus_truncated;
  4037. int32_t mpdus_ack_failed;
  4038. int32_t mpdus_expired;
  4039. uint32_t mc_drop;
  4040. } wmi_host_dbg_tx_stats;
  4041. /**
  4042. * struct wmi_host_dbg_rx_stats - RX Debug stats
  4043. * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
  4044. * @status_rcvd: Total number of statuses processed
  4045. * @r0_frags: Extra frags on rings 0
  4046. * @r1_frags: Extra frags on rings 1
  4047. * @r2_frags: Extra frags on rings 2
  4048. * @r3_frags: Extra frags on rings 3
  4049. * @htt_msdus: MSDUs delivered to HTT
  4050. * @htt_mpdus: MPDUs delivered to HTT
  4051. * @loc_msdus: MSDUs delivered to local stack
  4052. * @loc_mpdus: MPDUS delivered to local stack
  4053. * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
  4054. * @phy_errs: Number of PHY errors
  4055. * @phy_err_drop: Number of PHY errors drops
  4056. * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
  4057. * @pdev_rx_timeout: Number of rx inactivity timeouts
  4058. * @rx_ovfl_errs: Number of rx overflow errors.
  4059. */
  4060. typedef struct {
  4061. int32_t mid_ppdu_route_change;
  4062. int32_t status_rcvd;
  4063. int32_t r0_frags;
  4064. int32_t r1_frags;
  4065. int32_t r2_frags;
  4066. int32_t r3_frags;
  4067. int32_t htt_msdus;
  4068. int32_t htt_mpdus;
  4069. int32_t loc_msdus;
  4070. int32_t loc_mpdus;
  4071. int32_t oversize_amsdu;
  4072. int32_t phy_errs;
  4073. int32_t phy_err_drop;
  4074. int32_t mpdu_errs;
  4075. uint32_t pdev_rx_timeout;
  4076. int32_t rx_ovfl_errs;
  4077. } wmi_host_dbg_rx_stats;
  4078. /** struct wmi_host_dbg_mem_stats - memory stats
  4079. * @iram_free_size: IRAM free size on target
  4080. * @dram_free_size: DRAM free size on target
  4081. * @sram_free_size: SRAM free size on target
  4082. */
  4083. typedef struct {
  4084. uint32_t iram_free_size;
  4085. uint32_t dram_free_size;
  4086. /* Only Non-TLV */
  4087. uint32_t sram_free_size;
  4088. } wmi_host_dbg_mem_stats;
  4089. typedef struct {
  4090. /* Only TLV */
  4091. int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
  4092. } wmi_host_dbg_peer_stats;
  4093. /**
  4094. * struct wmi_host_dbg_stats - host debug stats
  4095. * @tx: TX stats of type wmi_host_dbg_tx_stats
  4096. * @rx: RX stats of type wmi_host_dbg_rx_stats
  4097. * @mem: Memory stats of type wmi_host_dbg_mem_stats
  4098. * @peer: peer stats of type wmi_host_dbg_peer_stats
  4099. */
  4100. typedef struct {
  4101. wmi_host_dbg_tx_stats tx;
  4102. wmi_host_dbg_rx_stats rx;
  4103. wmi_host_dbg_mem_stats mem;
  4104. wmi_host_dbg_peer_stats peer;
  4105. } wmi_host_dbg_stats;
  4106. /**
  4107. * struct wmi_host_pdev_stats - PDEV stats
  4108. * @chan_nf: Channel noise floor
  4109. * @tx_frame_count: TX frame count
  4110. * @rx_frame_count: RX frame count
  4111. * @rx_clear_count: rx clear count
  4112. * @cycle_count: cycle count
  4113. * @phy_err_count: Phy error count
  4114. * @chan_tx_pwr: Channel Tx Power
  4115. * @pdev_stats: WAL dbg stats
  4116. * @ackRcvBad:
  4117. * @rtsBad:
  4118. * @rtsGood:
  4119. * @fcsBad:
  4120. * @noBeacons:
  4121. * @mib_int_count:
  4122. */
  4123. typedef struct {
  4124. int32_t chan_nf;
  4125. uint32_t tx_frame_count;
  4126. uint32_t rx_frame_count;
  4127. uint32_t rx_clear_count;
  4128. uint32_t cycle_count;
  4129. uint32_t phy_err_count;
  4130. uint32_t chan_tx_pwr;
  4131. wmi_host_dbg_stats pdev_stats;
  4132. uint32_t ackRcvBad;
  4133. uint32_t rtsBad;
  4134. uint32_t rtsGood;
  4135. uint32_t fcsBad;
  4136. uint32_t noBeacons;
  4137. uint32_t mib_int_count;
  4138. } wmi_host_pdev_stats;
  4139. /**
  4140. * struct wmi_host_snr_info - WMI host Signal to noise ration info
  4141. * @bcn_snr: beacon SNR
  4142. * @dat_snr: Data frames SNR
  4143. */
  4144. typedef struct {
  4145. int32_t bcn_snr;
  4146. int32_t dat_snr;
  4147. } wmi_host_snr_info;
  4148. #define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
  4149. #define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */
  4150. /* The WLAN_MAX_AC macro cannot be changed without breaking
  4151. * * WMI compatibility.
  4152. * * The maximum value of access category
  4153. * */
  4154. #define WMI_HOST_WLAN_MAX_AC 4
  4155. /**
  4156. * struct wmi_host_vdev_stats - vdev stats structure
  4157. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4158. * Rest all Only TLV
  4159. * @vdev_snr: wmi_host_snr_info
  4160. * @tx_frm_cnt: Total number of packets(per AC) that were successfully
  4161. * transmitted (with and without retries,
  4162. * including multi-cast, broadcast)
  4163. * @rx_frm_cnt: Total number of packets that were successfully received
  4164. * (after appropriate filter rules including multi-cast, broadcast)
  4165. * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
  4166. * that the 802.11 station successfully transmitted after
  4167. * more than one retransmission attempt
  4168. * @fail_cnt: Total number packets(per AC) failed to transmit
  4169. * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
  4170. * of a packet
  4171. * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
  4172. * of a packet
  4173. * @rx_err_cnt: The receive error count. HAL will provide the
  4174. * RxP FCS error global
  4175. * @rx_discard_cnt: The sum of the receive error count and
  4176. * dropped-receive-buffer error count (FCS error)
  4177. * @ack_fail_cnt: Total number packets failed transmit because of no
  4178. * ACK from the remote entity
  4179. * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
  4180. * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
  4181. */
  4182. typedef struct {
  4183. uint32_t vdev_id;
  4184. /* Rest all Only TLV */
  4185. wmi_host_snr_info vdev_snr;
  4186. uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
  4187. uint32_t rx_frm_cnt;
  4188. uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
  4189. uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
  4190. uint32_t rts_fail_cnt;
  4191. uint32_t rts_succ_cnt;
  4192. uint32_t rx_err_cnt;
  4193. uint32_t rx_discard_cnt;
  4194. uint32_t ack_fail_cnt;
  4195. uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
  4196. uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
  4197. } wmi_host_vdev_stats;
  4198. /**
  4199. * struct wmi_host_vdev_extd_stats - VDEV extended stats
  4200. * @vdev_id: unique id identifying the VDEV, generated by the caller
  4201. * @ppdu_aggr_cnt: No of Aggrs Queued to HW
  4202. * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
  4203. * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
  4204. * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
  4205. * in Legacy NonAggregates
  4206. * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
  4207. * both Aggr and NonAggr
  4208. * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
  4209. * after Single/mul HW retry
  4210. * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
  4211. * after Multiple HW retry
  4212. * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
  4213. * after Multiple HW retry
  4214. * @reserved[13]: for future extensions set to 0x0
  4215. */
  4216. typedef struct {
  4217. uint32_t vdev_id;
  4218. uint32_t ppdu_aggr_cnt;
  4219. uint32_t ppdu_noack;
  4220. uint32_t mpdu_queued;
  4221. uint32_t ppdu_nonaggr_cnt;
  4222. uint32_t mpdu_sw_requed;
  4223. uint32_t mpdu_suc_retry;
  4224. uint32_t mpdu_suc_multitry;
  4225. uint32_t mpdu_fail_retry;
  4226. uint32_t reserved[13];
  4227. } wmi_host_vdev_extd_stats;
  4228. /**
  4229. * struct wmi_host_peer_stats - peer stats
  4230. * @peer_macaddr: peer MAC address
  4231. * @peer_rssi: rssi
  4232. * @peer_rssi_seq_num: rssi sequence number
  4233. * @peer_tx_rate: last tx data rate used for peer
  4234. * @peer_rx_rate: last rx data rate used for peer
  4235. * @currentper: Current PER
  4236. * @retries: Retries happend during transmission
  4237. * @txratecount: Maximum Aggregation Size
  4238. * @max4msframelen: Max4msframelen of tx rates used
  4239. * @totalsubframes: Total no of subframes
  4240. * @txbytes: No of bytes transmitted to the client
  4241. * @nobuffs[4]: Packet Loss due to buffer overflows
  4242. * @excretries[4]: Packet Loss due to excessive retries
  4243. * @peer_rssi_changed: how many times peer's RSSI changed by a
  4244. * non-negligible amount
  4245. */
  4246. typedef struct {
  4247. wmi_host_mac_addr peer_macaddr;
  4248. uint32_t peer_rssi;
  4249. uint32_t peer_rssi_seq_num;
  4250. uint32_t peer_tx_rate;
  4251. uint32_t peer_rx_rate;
  4252. uint32_t currentper;
  4253. uint32_t retries;
  4254. uint32_t txratecount;
  4255. uint32_t max4msframelen;
  4256. uint32_t totalsubframes;
  4257. uint32_t txbytes;
  4258. uint32_t nobuffs[4];
  4259. uint32_t excretries[4];
  4260. uint32_t peer_rssi_changed;
  4261. } wmi_host_peer_stats;
  4262. typedef struct {
  4263. uint32_t dummy;
  4264. } wmi_host_bcnflt_stats;
  4265. /**
  4266. * struct wmi_host_chan_stats - WMI chan stats
  4267. * @chan_mhz: Primary channel freq of the channel for which stats are sent
  4268. * @sampling_period_us: Time spent on the channel
  4269. * @rx_clear_count: Aggregate duration over a sampling period for
  4270. * which channel activity was observed
  4271. * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
  4272. * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
  4273. */
  4274. typedef struct {
  4275. uint32_t chan_mhz;
  4276. uint32_t sampling_period_us;
  4277. uint32_t rx_clear_count;
  4278. uint32_t tx_duration_us;
  4279. uint32_t rx_duration_us;
  4280. } wmi_host_chan_stats;
  4281. #define WMI_EVENT_ID_INVALID 0
  4282. /**
  4283. * Host based ENUM IDs for events to abstract target enums for event_id
  4284. */
  4285. typedef enum {
  4286. wmi_service_ready_event_id = 0,
  4287. wmi_ready_event_id,
  4288. wmi_dbg_msg_event_id,
  4289. wmi_scan_event_id,
  4290. wmi_echo_event_id,
  4291. wmi_update_stats_event_id,
  4292. wmi_inst_rssi_stats_event_id,
  4293. wmi_vdev_start_resp_event_id,
  4294. wmi_vdev_standby_req_event_id,
  4295. wmi_vdev_resume_req_event_id,
  4296. wmi_vdev_stopped_event_id,
  4297. wmi_peer_sta_kickout_event_id,
  4298. wmi_host_swba_event_id,
  4299. wmi_tbttoffset_update_event_id,
  4300. wmi_mgmt_rx_event_id,
  4301. wmi_chan_info_event_id,
  4302. wmi_phyerr_event_id,
  4303. wmi_roam_event_id,
  4304. wmi_profile_match,
  4305. wmi_debug_print_event_id,
  4306. wmi_pdev_qvit_event_id,
  4307. wmi_wlan_profile_data_event_id,
  4308. wmi_rtt_meas_report_event_id,
  4309. wmi_tsf_meas_report_event_id,
  4310. wmi_rtt_error_report_event_id,
  4311. wmi_rtt_keepalive_event_id,
  4312. wmi_oem_cap_event_id,
  4313. wmi_oem_meas_report_event_id,
  4314. wmi_oem_report_event_id,
  4315. wmi_nan_event_id,
  4316. wmi_wow_wakeup_host_event_id,
  4317. wmi_gtk_offload_status_event_id,
  4318. wmi_gtk_rekey_fail_event_id,
  4319. wmi_dcs_interference_event_id,
  4320. wmi_pdev_tpc_config_event_id,
  4321. wmi_csa_handling_event_id,
  4322. wmi_gpio_input_event_id,
  4323. wmi_peer_ratecode_list_event_id,
  4324. wmi_generic_buffer_event_id,
  4325. wmi_mcast_buf_release_event_id,
  4326. wmi_mcast_list_ageout_event_id,
  4327. wmi_vdev_get_keepalive_event_id,
  4328. wmi_wds_peer_event_id,
  4329. wmi_peer_sta_ps_statechg_event_id,
  4330. wmi_pdev_fips_event_id,
  4331. wmi_tt_stats_event_id,
  4332. wmi_pdev_channel_hopping_event_id,
  4333. wmi_pdev_ani_cck_level_event_id,
  4334. wmi_pdev_ani_ofdm_level_event_id,
  4335. wmi_pdev_reserve_ast_entry_event_id,
  4336. wmi_pdev_nfcal_power_event_id,
  4337. wmi_pdev_tpc_event_id,
  4338. wmi_pdev_get_ast_info_event_id,
  4339. wmi_pdev_temperature_event_id,
  4340. wmi_pdev_nfcal_power_all_channels_event_id,
  4341. wmi_pdev_bss_chan_info_event_id,
  4342. wmi_mu_report_event_id,
  4343. wmi_pdev_utf_event_id,
  4344. wmi_pdev_dump_event_id,
  4345. wmi_tx_pause_event_id,
  4346. wmi_dfs_radar_event_id,
  4347. wmi_pdev_l1ss_track_event_id,
  4348. wmi_service_ready_ext_event_id,
  4349. wmi_vdev_install_key_complete_event_id,
  4350. wmi_vdev_mcc_bcn_intvl_change_req_event_id,
  4351. wmi_vdev_tsf_report_event_id,
  4352. wmi_peer_info_event_id,
  4353. wmi_peer_tx_fail_cnt_thr_event_id,
  4354. wmi_peer_estimated_linkspeed_event_id,
  4355. wmi_peer_state_event_id,
  4356. wmi_offload_bcn_tx_status_event_id,
  4357. wmi_offload_prob_resp_tx_status_event_id,
  4358. wmi_mgmt_tx_completion_event_id,
  4359. wmi_tx_delba_complete_event_id,
  4360. wmi_tx_addba_complete_event_id,
  4361. wmi_ba_rsp_ssn_event_id,
  4362. wmi_aggr_state_trig_event_id,
  4363. wmi_roam_synch_event_id,
  4364. wmi_p2p_disc_event_id,
  4365. wmi_p2p_noa_event_id,
  4366. wmi_pdev_resume_event_id,
  4367. wmi_do_wow_disable_ack_event_id,
  4368. wmi_wow_initial_wakeup_event_id,
  4369. wmi_stats_ext_event_id,
  4370. wmi_iface_link_stats_event_id,
  4371. wmi_peer_link_stats_event_id,
  4372. wmi_radio_link_stats_link,
  4373. wmi_update_fw_mem_dump_event_id,
  4374. wmi_diag_event_id_log_supported_event_id,
  4375. wmi_nlo_match_event_id,
  4376. wmi_nlo_scan_complete_event_id,
  4377. wmi_apfind_event_id,
  4378. wmi_passpoint_match_event_id,
  4379. wmi_chatter_pc_query_event_id,
  4380. wmi_pdev_ftm_intg_event_id,
  4381. wmi_wlan_freq_avoid_event_id,
  4382. wmi_thermal_mgmt_event_id,
  4383. wmi_diag_container_event_id,
  4384. wmi_host_auto_shutdown_event_id,
  4385. wmi_update_whal_mib_stats_event_id,
  4386. wmi_update_vdev_rate_stats_event_id,
  4387. wmi_diag_event_id,
  4388. wmi_ocb_set_sched_event_id,
  4389. wmi_dbg_mesg_flush_complete_event_id,
  4390. wmi_rssi_breach_event_id,
  4391. wmi_uploadh_event_id,
  4392. wmi_captureh_event_id,
  4393. wmi_rfkill_state_change_event_id,
  4394. wmi_tdls_peer_event_id,
  4395. wmi_batch_scan_enabled_event_id,
  4396. wmi_batch_scan_result_event_id,
  4397. wmi_lpi_result_event_id,
  4398. wmi_lpi_status_event_id,
  4399. wmi_lpi_handoff_event_id,
  4400. wmi_extscan_start_stop_event_id,
  4401. wmi_extscan_operation_event_id,
  4402. wmi_extscan_table_usage_event_id,
  4403. wmi_extscan_cached_results_event_id,
  4404. wmi_extscan_wlan_change_results_event_id,
  4405. wmi_extscan_hotlist_match_event_id,
  4406. wmi_extscan_capabilities_event_id,
  4407. wmi_extscan_hotlist_ssid_match_event_id,
  4408. wmi_mdns_stats_event_id,
  4409. wmi_sap_ofl_add_sta_event_id,
  4410. wmi_sap_ofl_del_sta_event_id,
  4411. wmi_ocb_set_config_resp_event_id,
  4412. wmi_ocb_get_tsf_timer_resp_event_id,
  4413. wmi_dcc_get_stats_resp_event_id,
  4414. wmi_dcc_update_ndl_resp_event_id,
  4415. wmi_dcc_stats_event_id,
  4416. wmi_soc_set_hw_mode_resp_event_id,
  4417. wmi_soc_hw_mode_transition_event_id,
  4418. wmi_soc_set_dual_mac_config_resp_event_id,
  4419. wmi_tx_data_traffic_ctrl_event_id,
  4420. wmi_events_max,
  4421. } wmi_conv_event_id;
  4422. #define WMI_UNAVAILABLE_PARAM 0
  4423. /**
  4424. * Host based ENUM IDs for PDEV params to abstract target enums
  4425. */
  4426. typedef enum {
  4427. wmi_pdev_param_tx_chain_mask = 0,
  4428. wmi_pdev_param_rx_chain_mask,
  4429. wmi_pdev_param_txpower_limit2g,
  4430. wmi_pdev_param_txpower_limit5g,
  4431. wmi_pdev_param_txpower_scale,
  4432. wmi_pdev_param_beacon_gen_mode,
  4433. wmi_pdev_param_beacon_tx_mode,
  4434. wmi_pdev_param_resmgr_offchan_mode,
  4435. wmi_pdev_param_protection_mode,
  4436. wmi_pdev_param_dynamic_bw,
  4437. wmi_pdev_param_non_agg_sw_retry_th,
  4438. wmi_pdev_param_agg_sw_retry_th,
  4439. wmi_pdev_param_sta_kickout_th,
  4440. wmi_pdev_param_ac_aggrsize_scaling,
  4441. wmi_pdev_param_ltr_enable,
  4442. wmi_pdev_param_ltr_ac_latency_be,
  4443. wmi_pdev_param_ltr_ac_latency_bk,
  4444. wmi_pdev_param_ltr_ac_latency_vi,
  4445. wmi_pdev_param_ltr_ac_latency_vo,
  4446. wmi_pdev_param_ltr_ac_latency_timeout,
  4447. wmi_pdev_param_ltr_sleep_override,
  4448. wmi_pdev_param_ltr_rx_override,
  4449. wmi_pdev_param_ltr_tx_activity_timeout,
  4450. wmi_pdev_param_l1ss_enable,
  4451. wmi_pdev_param_dsleep_enable,
  4452. wmi_pdev_param_pcielp_txbuf_flush,
  4453. wmi_pdev_param_pcielp_txbuf_watermark,
  4454. wmi_pdev_param_pcielp_txbuf_tmo_en,
  4455. wmi_pdev_param_pcielp_txbuf_tmo_value,
  4456. wmi_pdev_param_pdev_stats_update_period,
  4457. wmi_pdev_param_vdev_stats_update_period,
  4458. wmi_pdev_param_peer_stats_update_period,
  4459. wmi_pdev_param_bcnflt_stats_update_period,
  4460. wmi_pdev_param_pmf_qos,
  4461. wmi_pdev_param_arp_ac_override,
  4462. wmi_pdev_param_dcs,
  4463. wmi_pdev_param_ani_enable,
  4464. wmi_pdev_param_ani_poll_period,
  4465. wmi_pdev_param_ani_listen_period,
  4466. wmi_pdev_param_ani_ofdm_level,
  4467. wmi_pdev_param_ani_cck_level,
  4468. wmi_pdev_param_dyntxchain,
  4469. wmi_pdev_param_proxy_sta,
  4470. wmi_pdev_param_idle_ps_config,
  4471. wmi_pdev_param_power_gating_sleep,
  4472. wmi_pdev_param_aggr_burst,
  4473. wmi_pdev_param_rx_decap_mode,
  4474. wmi_pdev_param_fast_channel_reset,
  4475. wmi_pdev_param_burst_dur,
  4476. wmi_pdev_param_burst_enable,
  4477. wmi_pdev_param_smart_antenna_default_antenna,
  4478. wmi_pdev_param_igmpmld_override,
  4479. wmi_pdev_param_igmpmld_tid,
  4480. wmi_pdev_param_antenna_gain,
  4481. wmi_pdev_param_rx_filter,
  4482. wmi_pdev_set_mcast_to_ucast_tid,
  4483. wmi_pdev_param_proxy_sta_mode,
  4484. wmi_pdev_param_set_mcast2ucast_mode,
  4485. wmi_pdev_param_set_mcast2ucast_buffer,
  4486. wmi_pdev_param_remove_mcast2ucast_buffer,
  4487. wmi_pdev_peer_sta_ps_statechg_enable,
  4488. wmi_pdev_param_igmpmld_ac_override,
  4489. wmi_pdev_param_block_interbss,
  4490. wmi_pdev_param_set_disable_reset_cmdid,
  4491. wmi_pdev_param_set_msdu_ttl_cmdid,
  4492. wmi_pdev_param_set_ppdu_duration_cmdid,
  4493. wmi_pdev_param_txbf_sound_period_cmdid,
  4494. wmi_pdev_param_set_promisc_mode_cmdid,
  4495. wmi_pdev_param_set_burst_mode_cmdid,
  4496. wmi_pdev_param_en_stats,
  4497. wmi_pdev_param_mu_group_policy,
  4498. wmi_pdev_param_noise_detection,
  4499. wmi_pdev_param_noise_threshold,
  4500. wmi_pdev_param_dpd_enable,
  4501. wmi_pdev_param_set_mcast_bcast_echo,
  4502. wmi_pdev_param_atf_strict_sch,
  4503. wmi_pdev_param_atf_sched_duration,
  4504. wmi_pdev_param_ant_plzn,
  4505. wmi_pdev_param_mgmt_retry_limit,
  4506. wmi_pdev_param_sensitivity_level,
  4507. wmi_pdev_param_signed_txpower_2g,
  4508. wmi_pdev_param_signed_txpower_5g,
  4509. wmi_pdev_param_enable_per_tid_amsdu,
  4510. wmi_pdev_param_enable_per_tid_ampdu,
  4511. wmi_pdev_param_cca_threshold,
  4512. wmi_pdev_param_rts_fixed_rate,
  4513. wmi_pdev_param_cal_period,
  4514. wmi_pdev_param_pdev_reset,
  4515. wmi_pdev_param_wapi_mbssid_offset,
  4516. wmi_pdev_param_arp_srcaddr,
  4517. wmi_pdev_param_arp_dstaddr,
  4518. wmi_pdev_param_txpower_decr_db,
  4519. wmi_pdev_param_rx_batchmode,
  4520. wmi_pdev_param_packet_aggr_delay,
  4521. wmi_pdev_param_atf_obss_noise_sch,
  4522. wmi_pdev_param_atf_obss_noise_scaling_factor,
  4523. wmi_pdev_param_cust_txpower_scale,
  4524. wmi_pdev_param_atf_dynamic_enable,
  4525. wmi_pdev_param_atf_ssid_group_policy,
  4526. wmi_pdev_param_rfkill_enable,
  4527. wmi_pdev_param_hw_rfkill_config,
  4528. wmi_pdev_param_low_power_rf_enable,
  4529. wmi_pdev_param_l1ss_track,
  4530. wmi_pdev_param_hyst_en,
  4531. wmi_pdev_param_power_collapse_enable,
  4532. wmi_pdev_param_led_sys_state,
  4533. wmi_pdev_param_led_enable,
  4534. wmi_pdev_param_audio_over_wlan_latency,
  4535. wmi_pdev_param_audio_over_wlan_enable,
  4536. wmi_pdev_param_whal_mib_stats_update_enable,
  4537. wmi_pdev_param_vdev_rate_stats_update_period,
  4538. wmi_pdev_param_cts_cbw,
  4539. wmi_pdev_param_wnts_config,
  4540. wmi_pdev_param_adaptive_early_rx_enable,
  4541. wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
  4542. wmi_pdev_param_adaptive_early_rx_inc_dec_step,
  4543. wmi_pdev_param_early_rx_fix_sleep_slop,
  4544. wmi_pdev_param_bmiss_based_adaptive_bto_enable,
  4545. wmi_pdev_param_bmiss_bto_min_bcn_timeout,
  4546. wmi_pdev_param_bmiss_bto_inc_dec_step,
  4547. wmi_pdev_param_bto_fix_bcn_timeout,
  4548. wmi_pdev_param_ce_based_adaptive_bto_enable,
  4549. wmi_pdev_param_ce_bto_combo_ce_value,
  4550. wmi_pdev_param_tx_chain_mask_2g,
  4551. wmi_pdev_param_rx_chain_mask_2g,
  4552. wmi_pdev_param_tx_chain_mask_5g,
  4553. wmi_pdev_param_rx_chain_mask_5g,
  4554. wmi_pdev_param_tx_chain_mask_cck,
  4555. wmi_pdev_param_tx_chain_mask_1ss,
  4556. wmi_pdev_param_max,
  4557. } wmi_conv_pdev_params_id;
  4558. /**
  4559. * Host based ENUM IDs for VDEV params to abstract target enums
  4560. */
  4561. typedef enum {
  4562. wmi_vdev_param_rts_threshold = 0,
  4563. wmi_vdev_param_fragmentation_threshold,
  4564. wmi_vdev_param_beacon_interval,
  4565. wmi_vdev_param_listen_interval,
  4566. wmi_vdev_param_multicast_rate,
  4567. wmi_vdev_param_mgmt_tx_rate,
  4568. wmi_vdev_param_slot_time,
  4569. wmi_vdev_param_preamble,
  4570. wmi_vdev_param_swba_time,
  4571. wmi_vdev_stats_update_period,
  4572. wmi_vdev_pwrsave_ageout_time,
  4573. wmi_vdev_host_swba_interval,
  4574. wmi_vdev_param_dtim_period,
  4575. wmi_vdev_oc_scheduler_air_time_limit,
  4576. wmi_vdev_param_wds,
  4577. wmi_vdev_param_atim_window,
  4578. wmi_vdev_param_bmiss_count_max,
  4579. wmi_vdev_param_bmiss_first_bcnt,
  4580. wmi_vdev_param_bmiss_final_bcnt,
  4581. wmi_vdev_param_feature_wmm,
  4582. wmi_vdev_param_chwidth,
  4583. wmi_vdev_param_chextoffset,
  4584. wmi_vdev_param_disable_htprotection,
  4585. wmi_vdev_param_sta_quickkickout,
  4586. wmi_vdev_param_mgmt_rate,
  4587. wmi_vdev_param_protection_mode,
  4588. wmi_vdev_param_fixed_rate,
  4589. wmi_vdev_param_sgi,
  4590. wmi_vdev_param_ldpc,
  4591. wmi_vdev_param_tx_stbc,
  4592. wmi_vdev_param_rx_stbc,
  4593. wmi_vdev_param_intra_bss_fwd,
  4594. wmi_vdev_param_def_keyid,
  4595. wmi_vdev_param_nss,
  4596. wmi_vdev_param_bcast_data_rate,
  4597. wmi_vdev_param_mcast_data_rate,
  4598. wmi_vdev_param_mcast_indicate,
  4599. wmi_vdev_param_dhcp_indicate,
  4600. wmi_vdev_param_unknown_dest_indicate,
  4601. wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
  4602. wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
  4603. wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
  4604. wmi_vdev_param_ap_enable_nawds,
  4605. wmi_vdev_param_mcast2ucast_set,
  4606. wmi_vdev_param_enable_rtscts,
  4607. wmi_vdev_param_rc_num_retries,
  4608. wmi_vdev_param_txbf,
  4609. wmi_vdev_param_packet_powersave,
  4610. wmi_vdev_param_drop_unencry,
  4611. wmi_vdev_param_tx_encap_type,
  4612. wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
  4613. wmi_vdev_param_cabq_maxdur,
  4614. wmi_vdev_param_mfptest_set,
  4615. wmi_vdev_param_rts_fixed_rate,
  4616. wmi_vdev_param_vht_sgimask,
  4617. wmi_vdev_param_vht80_ratemask,
  4618. wmi_vdev_param_early_rx_adjust_enable,
  4619. wmi_vdev_param_early_rx_tgt_bmiss_num,
  4620. wmi_vdev_param_early_rx_bmiss_sample_cycle,
  4621. wmi_vdev_param_early_rx_slop_step,
  4622. wmi_vdev_param_early_rx_init_slop,
  4623. wmi_vdev_param_early_rx_adjust_pause,
  4624. wmi_vdev_param_proxy_sta,
  4625. wmi_vdev_param_meru_vc,
  4626. wmi_vdev_param_rx_decap_type,
  4627. wmi_vdev_param_bw_nss_ratemask,
  4628. wmi_vdev_param_sensor_ap,
  4629. wmi_vdev_param_beacon_rate,
  4630. wmi_vdev_param_dtim_enable_cts,
  4631. wmi_vdev_param_sta_kickout,
  4632. wmi_vdev_param_tx_pwrlimit,
  4633. wmi_vdev_param_snr_num_for_cal,
  4634. wmi_vdev_param_roam_fw_offload,
  4635. wmi_vdev_param_enable_rmc,
  4636. wmi_vdev_param_ibss_max_bcn_lost_ms,
  4637. wmi_vdev_param_max_rate,
  4638. wmi_vdev_param_early_rx_drift_sample,
  4639. wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
  4640. wmi_vdev_param_ebt_resync_timeout,
  4641. wmi_vdev_param_aggr_trig_event_enable,
  4642. wmi_vdev_param_is_ibss_power_save_allowed,
  4643. wmi_vdev_param_is_power_collapse_allowed,
  4644. wmi_vdev_param_is_awake_on_txrx_enabled,
  4645. wmi_vdev_param_inactivity_cnt,
  4646. wmi_vdev_param_txsp_end_inactivity_time_ms,
  4647. wmi_vdev_param_dtim_policy,
  4648. wmi_vdev_param_ibss_ps_warmup_time_secs,
  4649. wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
  4650. wmi_vdev_param_rx_leak_window,
  4651. wmi_vdev_param_stats_avg_factor,
  4652. wmi_vdev_param_disconnect_th,
  4653. wmi_vdev_param_rtscts_rate,
  4654. wmi_vdev_param_mcc_rtscts_protection_enable,
  4655. wmi_vdev_param_mcc_broadcast_probe_enable,
  4656. wmi_vdev_param_capabilities,
  4657. wmi_vdev_param_max,
  4658. } wmi_conv_vdev_param_id;
  4659. /**
  4660. * Host based ENUM IDs for service bits to abstract target enums
  4661. */
  4662. typedef enum {
  4663. wmi_service_beacon_offload = 0,
  4664. wmi_service_scan_offload,
  4665. wmi_service_roam_offload,
  4666. wmi_service_bcn_miss_offload,
  4667. wmi_service_sta_pwrsave,
  4668. wmi_service_sta_advanced_pwrsave,
  4669. wmi_service_ap_uapsd,
  4670. wmi_service_ap_dfs,
  4671. wmi_service_11ac,
  4672. wmi_service_blockack,
  4673. wmi_service_phyerr,
  4674. wmi_service_bcn_filter,
  4675. wmi_service_rtt,
  4676. wmi_service_ratectrl,
  4677. wmi_service_wow,
  4678. wmi_service_ratectrl_cache,
  4679. wmi_service_iram_tids,
  4680. wmi_service_burst,
  4681. wmi_service_smart_antenna_sw_support,
  4682. wmi_service_gtk_offload,
  4683. wmi_service_scan_sch,
  4684. wmi_service_csa_offload,
  4685. wmi_service_chatter,
  4686. wmi_service_coex_freqavoid,
  4687. wmi_service_packet_power_save,
  4688. wmi_service_force_fw_hang,
  4689. wmi_service_smart_antenna_hw_support,
  4690. wmi_service_gpio,
  4691. wmi_sta_uapsd_basic_auto_trig,
  4692. wmi_sta_uapsd_var_auto_trig,
  4693. wmi_service_sta_keep_alive,
  4694. wmi_service_tx_encap,
  4695. wmi_service_ap_ps_detect_out_of_sync,
  4696. wmi_service_early_rx,
  4697. wmi_service_enhanced_proxy_sta,
  4698. wmi_service_tt,
  4699. wmi_service_atf,
  4700. wmi_service_peer_caching,
  4701. wmi_service_coex_gpio,
  4702. wmi_service_aux_spectral_intf,
  4703. wmi_service_aux_chan_load_intf,
  4704. wmi_service_bss_channel_info_64,
  4705. wmi_service_ext_res_cfg_support,
  4706. wmi_service_mesh,
  4707. wmi_service_restrt_chnl_support,
  4708. wmi_service_roam_scan_offload,
  4709. wmi_service_arpns_offload,
  4710. wmi_service_nlo,
  4711. wmi_service_sta_dtim_ps_modulated_dtim,
  4712. wmi_service_sta_smps,
  4713. wmi_service_fwtest,
  4714. wmi_service_sta_wmmac,
  4715. wmi_service_tdls,
  4716. wmi_service_mcc_bcn_interval_change,
  4717. wmi_service_adaptive_ocs,
  4718. wmi_service_ba_ssn_support,
  4719. wmi_service_filter_ipsec_natkeepalive,
  4720. wmi_service_wlan_hb,
  4721. wmi_service_lte_ant_share_support,
  4722. wmi_service_batch_scan,
  4723. wmi_service_qpower,
  4724. wmi_service_plmreq,
  4725. wmi_service_thermal_mgmt,
  4726. wmi_service_rmc,
  4727. wmi_service_mhf_offload,
  4728. wmi_service_coex_sar,
  4729. wmi_service_bcn_txrate_override,
  4730. wmi_service_nan,
  4731. wmi_service_l1ss_stat,
  4732. wmi_service_estimate_linkspeed,
  4733. wmi_service_obss_scan,
  4734. wmi_service_tdls_offchan,
  4735. wmi_service_tdls_uapsd_buffer_sta,
  4736. wmi_service_tdls_uapsd_sleep_sta,
  4737. wmi_service_ibss_pwrsave,
  4738. wmi_service_lpass,
  4739. wmi_service_extscan,
  4740. wmi_service_d0wow,
  4741. wmi_service_hsoffload,
  4742. wmi_service_roam_ho_offload,
  4743. wmi_service_rx_full_reorder,
  4744. wmi_service_dhcp_offload,
  4745. wmi_service_sta_rx_ipa_offload_support,
  4746. wmi_service_mdns_offload,
  4747. wmi_service_sap_auth_offload,
  4748. wmi_service_dual_band_simultaneous_support,
  4749. wmi_service_ocb,
  4750. wmi_service_ap_arpns_offload,
  4751. wmi_service_per_band_chainmask_support,
  4752. wmi_service_packet_filter_offload,
  4753. wmi_service_mgmt_tx_htt,
  4754. wmi_service_mgmt_tx_wmi,
  4755. wmi_service_ext_msg,
  4756. wmi_service_mawc,
  4757. wmi_service_peer_stats,
  4758. wmi_service_mesh_11s,
  4759. wmi_service_periodic_chan_stat_support,
  4760. wmi_service_tx_mode_push_only,
  4761. wmi_service_tx_mode_push_pull,
  4762. wmi_service_tx_mode_dynamic,
  4763. wmi_services_max,
  4764. } wmi_conv_service_ids;
  4765. #define WMI_SERVICE_UNAVAILABLE 0xFFFF
  4766. /**
  4767. * struct target_capability_info - Target capabilities in service ready
  4768. * @phy_capability: PHY capabilities
  4769. * @max_frag_entry: Maximum frag entries
  4770. * @num_rf_chains: Number of RF chains supported
  4771. * @ht_cap_info: HT cap info
  4772. * @vht_cap_info: VHT cap info
  4773. * @vht_supp_mcs: VHT Supported MCS
  4774. * @hw_min_tx_power: HW minimum tx power
  4775. * @hw_max_tx_power: HW maximum tx power
  4776. * @sys_cap_info: sys capability info
  4777. * @min_pkt_size_enable: Enterprise mode short pkt enable
  4778. * @max_bcn_ie_size: Max beacon and probe rsp IE offload size
  4779. * @max_num_scan_channels: Max scan channels
  4780. * @max_supported_macs: max supported MCS
  4781. * @wmi_fw_sub_feat_caps: FW sub feature capabilities
  4782. * @txrx_chainmask: TXRX chain mask
  4783. * @default_dbs_hw_mode_index: DBS hw mode index
  4784. * @num_msdu_desc: number of msdu desc
  4785. */
  4786. typedef struct {
  4787. uint32_t phy_capability;
  4788. uint32_t max_frag_entry;
  4789. uint32_t num_rf_chains;
  4790. uint32_t ht_cap_info;
  4791. uint32_t vht_cap_info;
  4792. uint32_t vht_supp_mcs;
  4793. uint32_t hw_min_tx_power;
  4794. uint32_t hw_max_tx_power;
  4795. uint32_t sys_cap_info;
  4796. uint32_t min_pkt_size_enable;
  4797. uint32_t max_bcn_ie_size;
  4798. uint32_t max_num_scan_channels;
  4799. uint32_t max_supported_macs;
  4800. uint32_t wmi_fw_sub_feat_caps;
  4801. uint32_t txrx_chainmask;
  4802. uint32_t default_dbs_hw_mode_index;
  4803. uint32_t num_msdu_desc;
  4804. } target_capability_info;
  4805. /**
  4806. * struct wmi_host_fw_ver - FW version in non-tlv target
  4807. * @sw_version: Versin info
  4808. * @sw_version_1: Second dword of version
  4809. */
  4810. struct wmi_host_fw_ver {
  4811. uint32_t sw_version;
  4812. uint32_t sw_version_1;
  4813. };
  4814. /**
  4815. * struct wmi_host_fw_abi_ver - FW version in non-tlv target
  4816. * @sw_version: Versin info
  4817. * @abi_version: ABI version
  4818. */
  4819. struct wmi_host_fw_abi_ver {
  4820. uint32_t sw_version;
  4821. uint32_t abi_version;
  4822. };
  4823. /**
  4824. * struct target_resource_config - Resource config sent from host to target
  4825. * abstracted out to include union of both configs
  4826. * @num_vdevs: Number vdevs configured
  4827. * @num_peers: Number of peers
  4828. * @num_active_peers: Number of active peers for peer cache
  4829. * @num_offload_peers: Number of offload peers
  4830. * @num_offload_reorder_buffs: number of offload reorder buffs
  4831. * @num_peer_keys: number of peer keys
  4832. * @num_tids: number of tids
  4833. * @ast_skid_limit: AST skid limit
  4834. * @tx_chain_mask: TX chain mask
  4835. * @rx_chain_mask: RX chain mask
  4836. * @rx_timeout_pri: RX reorder timeout per AC
  4837. * @rx_decap_mode: RX decap mode
  4838. * @scan_max_pending_req: Scan mac pending req
  4839. * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
  4840. * @roam_offload_max_vdev: Roam offload max vdevs
  4841. * @roam_offload_max_ap_profiles: roam offload max ap profiles
  4842. * @num_mcast_groups: num mcast groups
  4843. * @num_mcast_table_elems: number of macst table elems
  4844. * @mcast2ucast_mode: mcast enhance mode
  4845. * @tx_dbg_log_size: DBG log buf size
  4846. * @num_wds_entries: number of WDS entries
  4847. * @dma_burst_size: DMA burst size.
  4848. * @mac_aggr_delim: Mac aggr delim
  4849. * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
  4850. * @vow_config: vow configuration
  4851. * @gtk_offload_max_vdev: Max vdevs for GTK offload
  4852. * @num_msdu_desc: Number of msdu desc
  4853. * @max_frag_entries: Max frag entries
  4854. * End common
  4855. * @max_peer_ext_stats: Max peer EXT stats
  4856. * @smart_ant_cap: Smart antenna capabilities
  4857. * @BK_Minfree: BIN configuration for BK traffic
  4858. * @BE_Minfree: BIN configuration for BE traffic
  4859. * @VI_Minfree: BIN configuration for VI traffic
  4860. * @VO_Minfree: BIN configuration for VO traffic
  4861. * @rx_batchmode: RX batch mode
  4862. * @tt_support: Thermal throttling support
  4863. * @atf_config: ATF config
  4864. * @iphdr_pad_config: ipheader pad config
  4865. * @qwrap_config: Qwrap configuration
  4866. * @alloc_frag_desc_for_data_pkt: Frag desc for data
  4867. * Added in MCL
  4868. * @num_tdls_vdevs:
  4869. * @num_tdls_conn_table_entries:
  4870. * @beacon_tx_offload_max_vdev:
  4871. * @num_multicast_filter_entries:
  4872. * @num_wow_filters:
  4873. * @num_keep_alive_pattern:
  4874. * @keep_alive_pattern_size:
  4875. * @max_tdls_concurrent_sleep_sta:
  4876. * @max_tdls_concurrent_buffer_sta:
  4877. * @wmi_send_separate:
  4878. * @num_ocb_vdevs:
  4879. * @num_ocb_channels:
  4880. * @num_ocb_schedules:
  4881. */
  4882. typedef struct {
  4883. uint32_t num_vdevs;
  4884. uint32_t num_peers;
  4885. uint32_t num_active_peers;
  4886. uint32_t num_offload_peers;
  4887. uint32_t num_offload_reorder_buffs;
  4888. uint32_t num_peer_keys;
  4889. uint32_t num_tids;
  4890. uint32_t ast_skid_limit;
  4891. uint32_t tx_chain_mask;
  4892. uint32_t rx_chain_mask;
  4893. uint32_t rx_timeout_pri[4];
  4894. uint32_t rx_decap_mode;
  4895. uint32_t scan_max_pending_req;
  4896. uint32_t bmiss_offload_max_vdev;
  4897. uint32_t roam_offload_max_vdev;
  4898. uint32_t roam_offload_max_ap_profiles;
  4899. uint32_t num_mcast_groups;
  4900. uint32_t num_mcast_table_elems;
  4901. uint32_t mcast2ucast_mode;
  4902. uint32_t tx_dbg_log_size;
  4903. uint32_t num_wds_entries;
  4904. uint32_t dma_burst_size;
  4905. uint32_t mac_aggr_delim;
  4906. uint32_t rx_skip_defrag_timeout_dup_detection_check;
  4907. uint32_t vow_config;
  4908. uint32_t gtk_offload_max_vdev;
  4909. uint32_t num_msdu_desc; /* Number of msdu desc */
  4910. uint32_t max_frag_entries;
  4911. /* End common */
  4912. /* Added for Beeliner */
  4913. uint32_t max_peer_ext_stats;
  4914. uint32_t smart_ant_cap;
  4915. uint32_t BK_Minfree;
  4916. uint32_t BE_Minfree;
  4917. uint32_t VI_Minfree;
  4918. uint32_t VO_Minfree;
  4919. uint32_t rx_batchmode;
  4920. uint32_t tt_support;
  4921. uint32_t atf_config;
  4922. uint32_t iphdr_pad_config;
  4923. uint32_t
  4924. qwrap_config:16,
  4925. alloc_frag_desc_for_data_pkt:16;
  4926. /* Added in MCL */
  4927. uint32_t num_tdls_vdevs;
  4928. uint32_t num_tdls_conn_table_entries;
  4929. uint32_t beacon_tx_offload_max_vdev;
  4930. uint32_t num_multicast_filter_entries;
  4931. uint32_t num_wow_filters;
  4932. uint32_t num_keep_alive_pattern;
  4933. uint32_t keep_alive_pattern_size;
  4934. uint32_t max_tdls_concurrent_sleep_sta;
  4935. uint32_t max_tdls_concurrent_buffer_sta;
  4936. uint32_t wmi_send_separate;
  4937. uint32_t num_ocb_vdevs;
  4938. uint32_t num_ocb_channels;
  4939. uint32_t num_ocb_schedules;
  4940. } target_resource_config;
  4941. /**
  4942. * struct wds_addr_event - WDS addr event structure
  4943. * @event_type: event type add/delete
  4944. * @peer_mac: peer mac
  4945. * @dest_mac: destination mac address
  4946. */
  4947. typedef struct {
  4948. uint32_t event_type[4];
  4949. u_int8_t peer_mac[IEEE80211_ADDR_LEN];
  4950. u_int8_t dest_mac[IEEE80211_ADDR_LEN];
  4951. } wds_addr_event_t;
  4952. /**
  4953. * Enum replicated for host abstraction with FW
  4954. */
  4955. typedef enum {
  4956. /* Event respose of START CMD */
  4957. WMI_HOST_VDEV_START_RESP_EVENT = 0,
  4958. /* Event respose of RESTART CMD */
  4959. WMI_HOST_VDEV_RESTART_RESP_EVENT,
  4960. } WMI_HOST_START_EVENT_PARAM;
  4961. /**
  4962. * struct wmi_host_vdev_start_resp - VDEV start response
  4963. * @vdev_id: vdev id
  4964. * @requestor_id: requestor id that requested the VDEV start request
  4965. * @resp_type: Respose of Event type START/RESTART
  4966. * @status: status of the response
  4967. * @chain_mask: Vdev chain mask
  4968. * @smps_mode: Vdev mimo power save mode
  4969. * @mac_id: mac_id field contains the MAC identifier that the
  4970. * VDEV is bound to. The valid range is 0 to (num_macs-1).
  4971. * @cfgd_tx_streams: Configured Transmit Streams
  4972. * @cfgd_rx_streams: Configured Receive Streams
  4973. */
  4974. typedef struct {
  4975. uint32_t vdev_id;
  4976. uint32_t requestor_id;
  4977. WMI_HOST_START_EVENT_PARAM resp_type;
  4978. uint32_t status;
  4979. uint32_t chain_mask;
  4980. uint32_t smps_mode;
  4981. uint32_t mac_id;
  4982. uint32_t cfgd_tx_streams;
  4983. uint32_t cfgd_rx_streams;
  4984. } wmi_host_vdev_start_resp;
  4985. #define WMI_HOST_ATH_MAX_ANTENNA 4
  4986. /**
  4987. * struct wmi_host_mgmt_rx_hdr - host mgmt header params
  4988. * @channel: channel on which this frame is received
  4989. * @snr: snr information used to cal rssi
  4990. * @rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain.
  4991. * @rate: Rate kbps
  4992. * @phy_mode: rx phy mode WLAN_PHY_MODE
  4993. * @buf_len: length of the frame
  4994. * @status: rx status
  4995. * @flags: information about the management frame e.g. can give a
  4996. * scan source for a scan result mgmt frame
  4997. * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units)
  4998. * @tsf_delta:
  4999. */
  5000. typedef struct {
  5001. uint32_t channel;
  5002. uint32_t snr;
  5003. uint8_t rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA];
  5004. uint32_t rate;
  5005. uint32_t phy_mode;
  5006. uint32_t buf_len;
  5007. uint32_t status;
  5008. uint32_t flags;
  5009. int32_t rssi;
  5010. uint32_t tsf_delta;
  5011. } wmi_host_mgmt_rx_hdr;
  5012. /**
  5013. * struct wmi_host_roam_event - host roam event param
  5014. * @vdev_id: vdev id
  5015. * @reason: roam reason
  5016. * @rssi: RSSI
  5017. */
  5018. typedef struct {
  5019. uint32_t vdev_id;
  5020. uint32_t reason;
  5021. uint32_t rssi;
  5022. } wmi_host_roam_event;
  5023. /**
  5024. * ENUM wmi_host_scan_event_type - Scan event type
  5025. */
  5026. enum wmi_host_scan_event_type {
  5027. WMI_HOST_SCAN_EVENT_STARTED = 0x1,
  5028. WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
  5029. WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
  5030. WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
  5031. WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
  5032. WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
  5033. WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
  5034. WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
  5035. WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
  5036. WMI_HOST_SCAN_EVENT_INVALID = 0x200,
  5037. WMI_HOST_SCAN_EVENT_MAX = 0x8000
  5038. };
  5039. /**
  5040. * ENUM wmi_host_scan_completion_reason - Scan completion event type
  5041. */
  5042. enum wmi_host_scan_completion_reason {
  5043. /** scan related events */
  5044. WMI_HOST_SCAN_REASON_NONE = 0xFF,
  5045. WMI_HOST_SCAN_REASON_COMPLETED = 0,
  5046. WMI_HOST_SCAN_REASON_CANCELLED = 1,
  5047. WMI_HOST_SCAN_REASON_PREEMPTED = 2,
  5048. WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
  5049. WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
  5050. WMI_HOST_SCAN_REASON_MAX,
  5051. };
  5052. /**
  5053. * struct wmi_host_scan_event - Scan event response from target
  5054. * @event: event type
  5055. * @reason: Reason for event
  5056. * @channel_freq: channel frequency
  5057. * @requestor: requestor id
  5058. * @scan_id: scan id
  5059. * @vdev_id: vdev id
  5060. */
  5061. typedef struct {
  5062. uint32_t event;
  5063. uint32_t reason;
  5064. uint32_t channel_freq;
  5065. uint32_t requestor;
  5066. uint32_t scan_id;
  5067. uint32_t vdev_id;
  5068. } wmi_host_scan_event;
  5069. /**
  5070. * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
  5071. * @result: result
  5072. */
  5073. typedef struct {
  5074. uint32_t result;
  5075. } wmi_host_pdev_reserve_ast_entry_event;
  5076. /**
  5077. * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
  5078. * @grp_addr: IPv4/6 mcast group addr
  5079. * @vdev_id: vdev id
  5080. */
  5081. typedef struct {
  5082. uint8_t grp_addr[16];
  5083. uint32_t vdev_id;
  5084. } wmi_host_mcast_ageout_entry;
  5085. /**
  5086. * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
  5087. * @num_entry: Number of mcast entries timed-out
  5088. * @entry: List of wmi_host_mcast_ageout_entry
  5089. */
  5090. typedef struct {
  5091. uint32_t num_entry;
  5092. wmi_host_mcast_ageout_entry entry[1];
  5093. } wmi_host_mcast_list_ageout_event;
  5094. /**
  5095. * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
  5096. * @nfdBr:
  5097. * chan0: {NFCalPower_chain0, NFCalPower_chain1,
  5098. * NFCalPower_chain2, NFCalPower_chain3},
  5099. * chan1: {NFCalPower_chain0, NFCalPower_chain1,
  5100. * NFCalPower_chain2, NFCalPower_chain3},
  5101. * chan2: {NFCalPower_chain0, NFCalPower_chain1,
  5102. * NFCalPower_chain2, NFCalPower_chain3},
  5103. * chan3: {NFCalPower_chain0, NFCalPower_chain1,
  5104. * NFCalPower_chain2, NFCalPower_chain3},
  5105. * @nfdBr:
  5106. * chan0: {NFCalPower_chain0, NFCalPower_chain1,
  5107. * NFCalPower_chain2, NFCalPower_chain3},
  5108. * chan1: {NFCalPower_chain0, NFCalPower_chain1,
  5109. * NFCalPower_chain2, NFCalPower_chain3},
  5110. * chan2: {NFCalPower_chain0, NFCalPower_chain1,
  5111. * NFCalPower_chain2, NFCalPower_chain3},
  5112. * chan3: {NFCalPower_chain0, NFCalPower_chain1,
  5113. * NFCalPower_chain2, NFCalPower_chain3},
  5114. * @freqNum: frequency number
  5115. */
  5116. typedef struct {
  5117. int8_t nfdBr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  5118. int8_t nfdBm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
  5119. uint32_t freqNum[WMI_HOST_RXG_CAL_CHAN_MAX];
  5120. } wmi_host_pdev_nfcal_power_all_channels_event;
  5121. /**
  5122. * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
  5123. * @tpc:
  5124. */
  5125. typedef struct {
  5126. uint32_t tpc[1];
  5127. } wmi_host_pdev_tpc_event;
  5128. /**
  5129. * struct wmi_host_pdev_generic_buffer_event
  5130. * @buf_type: Buffer type
  5131. * @frag_id: Frag id
  5132. * @more_frag: more frags pending
  5133. * @buf_len: buffer length
  5134. * @buf_info: variable length buffer
  5135. */
  5136. typedef struct {
  5137. uint32_t buf_type;
  5138. uint32_t frag_id;
  5139. uint32_t more_frag;
  5140. uint32_t buf_len;
  5141. uint32_t buf_info[1];
  5142. } wmi_host_pdev_generic_buffer_event;
  5143. /**
  5144. * Enum for host buffer event
  5145. */
  5146. enum {
  5147. WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
  5148. WMI_HOST_BUFFER_TYPE_CTL_TABLE,
  5149. };
  5150. /**
  5151. * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
  5152. * @regDomain:
  5153. * @chanFreq:
  5154. * @phyMode:
  5155. * @twiceAntennaReduction:
  5156. * @twiceMaxRDPower:
  5157. * @twiceAntennaGain:
  5158. * @powerLimit:
  5159. * @rateMax:
  5160. * @numTxChain:
  5161. * @ctl:
  5162. * @flags:
  5163. * @maxRegAllowedPower:
  5164. * @maxRegAllowedPowerAGCDD:
  5165. * @maxRegAllowedPowerAGSTBC:
  5166. * @maxRegAllowedPowerAGTXBF:
  5167. * @ratesArray:
  5168. */
  5169. typedef struct {
  5170. uint32_t regDomain;
  5171. uint32_t chanFreq;
  5172. uint32_t phyMode;
  5173. uint32_t twiceAntennaReduction;
  5174. uint32_t twiceMaxRDPower;
  5175. int32_t twiceAntennaGain;
  5176. uint32_t powerLimit;
  5177. uint32_t rateMax;
  5178. uint32_t numTxChain;
  5179. uint32_t ctl;
  5180. uint32_t flags;
  5181. int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
  5182. int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5183. int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5184. int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
  5185. uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
  5186. } wmi_host_pdev_tpc_config_event;
  5187. /**
  5188. * Enums for TPC event
  5189. */
  5190. typedef enum {
  5191. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
  5192. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
  5193. WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
  5194. } WMI_HOST_TPC_CONFIG_EVENT_FLAG;
  5195. /**
  5196. * Medium Utilization evaluation algorithms
  5197. * These algorithms can be complementary rather than exclusive.
  5198. */
  5199. typedef enum {
  5200. WMI_HOST_MU_BASIC_ALGO = 0x1,
  5201. WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
  5202. WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
  5203. } WMI_HOST_MU_ALGO_TYPE;
  5204. /* max MU alg combinations supported by target */
  5205. #define WMI_HOST_MU_MAX_ALGO_TYPE 3
  5206. /**
  5207. * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
  5208. * @mu_request_id: request id
  5209. * @status_reason: MU_STATUS_REASON
  5210. * @total_mu: MU_ALG_TYPE combinations
  5211. * @num_active_bssid: number of active bssid
  5212. */
  5213. typedef struct {
  5214. uint32_t mu_request_id;
  5215. uint32_t status_reason;
  5216. uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
  5217. uint32_t num_active_bssid;
  5218. } wmi_host_mu_report_event;
  5219. /**
  5220. * struct wmi_host_mgmt_tx_compl_event - TX completion event
  5221. * @desc_id: from tx_send_cmd
  5222. * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
  5223. */
  5224. typedef struct {
  5225. uint32_t desc_id;
  5226. uint32_t status;
  5227. } wmi_host_mgmt_tx_compl_event;
  5228. #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
  5229. /**
  5230. * struct wmi_host_tim_info - TIM info in SWBA event
  5231. * @tim_len: TIM length
  5232. * @tim_mcast:
  5233. * @tim_bitmap: TIM bitmap
  5234. * @tim_changed: TIM changed
  5235. * @tim_num_ps_pending: TIM num PS sta pending
  5236. */
  5237. typedef struct {
  5238. uint32_t tim_len;
  5239. uint32_t tim_mcast;
  5240. uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
  5241. uint32_t tim_changed;
  5242. uint32_t tim_num_ps_pending;
  5243. } wmi_host_tim_info;
  5244. /**
  5245. * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
  5246. * @type_count: Absence count
  5247. * @duration: NoA duration
  5248. * @interval: NoA interval
  5249. * @start_time: start time
  5250. */
  5251. typedef struct {
  5252. uint32_t type_count;
  5253. uint32_t duration;
  5254. uint32_t interval;
  5255. uint32_t start_time;
  5256. } wmi_host_p2p_noa_descriptor;
  5257. /* Maximum number of NOA Descriptors supported */
  5258. #define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
  5259. /**
  5260. * struct wmi_host_p2p_noa_info - p2p noa information
  5261. * @modified: NoA modified
  5262. * @index: Index
  5263. * @oppPS: Oppurtunstic ps
  5264. * @ctwindow: CT window
  5265. * @num_descriptors: number of descriptors
  5266. * @noa_descriptors: noa descriptors
  5267. */
  5268. typedef struct {
  5269. uint8_t modified;
  5270. uint8_t index;
  5271. uint8_t oppPS;
  5272. uint8_t ctwindow;
  5273. uint8_t num_descriptors;
  5274. wmi_host_p2p_noa_descriptor
  5275. noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
  5276. } wmi_host_p2p_noa_info;
  5277. /**
  5278. * struct wmi_host_peer_sta_kickout_event
  5279. * @peer_macaddr: peer mac address
  5280. * @reason: kickout reason
  5281. * @rssi: rssi
  5282. */
  5283. typedef struct {
  5284. uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
  5285. uint32_t reason;
  5286. uint32_t rssi;
  5287. } wmi_host_peer_sta_kickout_event;
  5288. /**
  5289. * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
  5290. * @peer_macaddr: peer mac address
  5291. * @peer_ps_stats: peer PS state
  5292. */
  5293. typedef struct {
  5294. uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
  5295. uint32_t peer_ps_state;
  5296. } wmi_host_peer_sta_ps_statechange_event;
  5297. /* Maximum CCK, OFDM rates supported */
  5298. #define WMI_SA_MAX_CCK_OFDM_RATES 12
  5299. /* Maximum MCS rates supported; 4 rates in each dword */
  5300. #define WMI_SA_MAX_MCS_RATES 40
  5301. #define WMI_SA_MAX_RATE_COUNTERS 4
  5302. /* Maximum rate series used for transmission */
  5303. #define SA_MAX_RATE_SERIES 2
  5304. #define SA_MAX_LEGACY_RATE_DWORDS 3
  5305. #define SA_MAX_HT_RATE_DWORDS 10
  5306. #define SA_BYTES_IN_DWORD 4
  5307. #define SA_MASK_BYTE 0xff
  5308. /* TODO: ratecode_160 needs to add for future chips */
  5309. /**
  5310. * struct wmi_sa_rate_cap - smart antenna rat capabilities
  5311. * @ratecode_legacy: Rate code array for CCK OFDM
  5312. * @ratecode_20: Rate code array for 20MHz BW
  5313. * @ratecode_40: Rate code array for 40MHz BW
  5314. * @ratecode_80: Rate code array for 80MHz BW
  5315. * @ratecount: Max Rate count for each mode
  5316. */
  5317. typedef struct {
  5318. uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
  5319. uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES];
  5320. uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES];
  5321. uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES];
  5322. uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
  5323. } wmi_sa_rate_cap;
  5324. /** Preamble types to be used with VDEV fixed rate configuration */
  5325. typedef enum {
  5326. WMI_HOST_RATE_PREAMBLE_OFDM,
  5327. WMI_HOST_RATE_PREAMBLE_CCK,
  5328. WMI_HOST_RATE_PREAMBLE_HT,
  5329. WMI_HOST_RATE_PREAMBLE_VHT,
  5330. } WMI_HOST_RATE_PREAMBLE;
  5331. #define WMI_HOST_FIXED_RATE_NONE (0xff)
  5332. /** slot time long */
  5333. #define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1
  5334. /** slot time short */
  5335. #define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2
  5336. /** preablbe long */
  5337. #define WMI_HOST_VDEV_PREAMBLE_LONG 0x1
  5338. /** preablbe short */
  5339. #define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2
  5340. /** found a better AP */
  5341. #define WMI_HOST_ROAM_REASON_BETTER_AP 0x1
  5342. /** beacon miss detected */
  5343. #define WMI_HOST_ROAM_REASON_BMISS 0x2
  5344. /** deauth/disassoc received */
  5345. #define WMI_HOST_ROAM_REASON_DEAUTH 0x2
  5346. /** connected AP's low rssi condition detected */
  5347. #define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3
  5348. /** found another AP that matches SSID and Security profile in
  5349. * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
  5350. */
  5351. #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
  5352. /** LFR3.0 roaming failed, indicate the disconnection to host */
  5353. #define WMI_HOST_ROAM_REASON_HO_FAILED 0x5
  5354. /** values for vdev_type */
  5355. #define WMI_HOST_VDEV_TYPE_AP 0x1
  5356. #define WMI_HOST_VDEV_TYPE_STA 0x2
  5357. #define WMI_HOST_VDEV_TYPE_IBSS 0x3
  5358. #define WMI_HOST_VDEV_TYPE_MONITOR 0x4
  5359. /** values for vdev_subtype */
  5360. #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
  5361. #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
  5362. #define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3
  5363. #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4
  5364. #define WMI_HOST_VDEV_SUBTYPE_MESH 0x5
  5365. #define WMI_HOST_MGMT_TID 17
  5366. /* Disable aging & learning */
  5367. #define WMI_HOST_WDS_FLAG_STATIC 0x1
  5368. /**
  5369. * Peer param enum abstracted from target
  5370. */
  5371. typedef enum {
  5372. /** mimo powersave state */
  5373. WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
  5374. /** enable/disable AMPDU . initial value (enabled) */
  5375. WMI_HOST_PEER_AMPDU = 0x2,
  5376. /** authorize/unauthorize peer. initial value is unauthorized (0) */
  5377. WMI_HOST_PEER_AUTHORIZE = 0x3,
  5378. /** peer channel bandwidth */
  5379. WMI_HOST_PEER_CHWIDTH = 0x4,
  5380. /** peer NSS */
  5381. WMI_HOST_PEER_NSS = 0x5,
  5382. /** USE 4 ADDR */
  5383. WMI_HOST_PEER_USE_4ADDR = 0x6,
  5384. /** Enable extended peer stats */
  5385. WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7,
  5386. /*Use FIXED Pwr */
  5387. WMI_HOST_PEER_USE_FIXED_PWR = 0x8,
  5388. /* Set peer fixed rate */
  5389. WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9,
  5390. /* Whitelist peer TIDs */
  5391. WMI_HOST_PEER_SET_MU_WHITELIST = 0xa,
  5392. /* set group membership status */
  5393. WMI_HOST_PEER_MEMBERSHIP = 0xb,
  5394. WMI_HOST_PEER_USERPOS = 0xc,
  5395. } PEER_PARAM_ENUM;
  5396. #define WMI_HOST_PEER_MIMO_PS_NONE 0x0
  5397. #define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
  5398. #define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
  5399. typedef enum {
  5400. HOST_PLATFORM_HIGH_PERF,
  5401. HOST_PLATFORM_LOW_PERF,
  5402. } HOST_PLATFORM_TYPE;
  5403. enum wmi_host_sta_ps_mode {
  5404. /** enable power save for the given STA VDEV */
  5405. WMI_HOST_STA_PS_MODE_DISABLED = 0,
  5406. /** disable power save for a given STA VDEV */
  5407. WMI_HOST_STA_PS_MODE_ENABLED = 1,
  5408. };
  5409. enum wmi_host_sta_powersave_param {
  5410. /**
  5411. * Controls how frames are retrievd from AP while STA is sleeping
  5412. *
  5413. * (see enum wmi_sta_ps_param_rx_wake_policy)
  5414. */
  5415. WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
  5416. /**
  5417. * The STA will go active after this many TX
  5418. *
  5419. * (see enum wmi_sta_ps_param_tx_wake_threshold)
  5420. */
  5421. WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
  5422. /**
  5423. * Number of PS-Poll to send before STA wakes up
  5424. *
  5425. * (see enum wmi_sta_ps_param_pspoll_count)
  5426. *
  5427. */
  5428. WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
  5429. /**
  5430. * TX/RX inactivity time in msec before going to sleep.
  5431. *
  5432. * The power save SM will monitor tx/rx activity on the VDEV, if no
  5433. * activity for the specified msec of the parameter
  5434. * the Power save SM will go to sleep.
  5435. */
  5436. WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
  5437. /**
  5438. * Set uapsd configuration.
  5439. *
  5440. * (see enum wmi_sta_ps_param_uapsd)
  5441. */
  5442. WMI_HOST_STA_PS_PARAM_UAPSD = 4,
  5443. };
  5444. /* prefix used by scan requestor ids on the host
  5445. * replicated here form wmi_unified.h*/
  5446. #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
  5447. /* prefix used by scan request ids generated on the host */
  5448. /* host cycles through the lower 12 bits to generate ids */
  5449. #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
  5450. #define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
  5451. #define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
  5452. #define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
  5453. #define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
  5454. #define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
  5455. #define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
  5456. #define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
  5457. #define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
  5458. #define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
  5459. #define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
  5460. #define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
  5461. /** HT Capabilities*/
  5462. #define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
  5463. /* Short Guard Interval with HT20 */
  5464. #define WMI_HOST_HT_CAP_HT20_SGI 0x0002
  5465. #define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
  5466. #define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
  5467. #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
  5468. #define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
  5469. #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
  5470. #define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
  5471. #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
  5472. #define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
  5473. #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
  5474. #define WMI_HOST_HT_CAP_HT40_SGI 0x0800
  5475. #define WMI_HOST_HT_CAP_IBF_BFER 0x1000
  5476. /* These macros should be used when we wish to advertise STBC support for
  5477. * only 1SS or 2SS or 3SS. */
  5478. #define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
  5479. #define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
  5480. #define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
  5481. #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
  5482. WMI_HOST_HT_CAP_HT20_SGI | \
  5483. WMI_HOST_HT_CAP_HT40_SGI | \
  5484. WMI_HOST_HT_CAP_TX_STBC | \
  5485. WMI_HOST_HT_CAP_RX_STBC | \
  5486. WMI_HOST_HT_CAP_LDPC)
  5487. /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
  5488. field. The fields not defined here are not supported, or reserved.
  5489. Do not change these masks and if you have to add new one follow the
  5490. bitmask as specified by 802.11ac draft.
  5491. */
  5492. #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
  5493. #define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
  5494. #define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
  5495. #define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
  5496. #define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
  5497. #define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
  5498. #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
  5499. #define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
  5500. #define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
  5501. #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
  5502. #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
  5503. #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
  5504. #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
  5505. #define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
  5506. #define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
  5507. #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
  5508. #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
  5509. #define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
  5510. #define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
  5511. #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
  5512. /* These macros should be used when we wish to advertise STBC support for
  5513. * only 1SS or 2SS or 3SS. */
  5514. #define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
  5515. #define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
  5516. #define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
  5517. #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
  5518. WMI_HOST_VHT_CAP_SGI_80MHZ | \
  5519. WMI_HOST_VHT_CAP_TX_STBC | \
  5520. WMI_HOST_VHT_CAP_RX_STBC_MASK | \
  5521. WMI_HOST_VHT_CAP_RX_LDPC | \
  5522. WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
  5523. WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
  5524. WMI_HOST_VHT_CAP_TX_FIXED_ANT)
  5525. /* Interested readers refer to Rx/Tx MCS Map definition as defined in
  5526. 802.11ac
  5527. */
  5528. #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
  5529. #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
  5530. #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
  5531. /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
  5532. enum wmi_host_ap_ps_param_uapsd {
  5533. WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5534. WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5535. WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5536. WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5537. WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5538. WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5539. WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5540. WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5541. };
  5542. /** U-APSD maximum service period of peer station */
  5543. enum wmi_host_ap_ps_peer_param_max_sp {
  5544. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
  5545. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
  5546. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
  5547. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
  5548. /* keep last! */
  5549. MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
  5550. };
  5551. #define WMI_HOST_UAPSD_AC_TYPE_DELI 0
  5552. #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
  5553. #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
  5554. ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
  5555. (1<<((ac<<1)+1)))
  5556. enum wmi_host_ap_ps_peer_param_wnm_sleep {
  5557. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
  5558. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
  5559. };
  5560. enum wmi_host_ap_ps_peer_param {
  5561. /** Set uapsd configuration for a given peer.
  5562. *
  5563. * This will include the delivery and trigger enabled state for every AC.
  5564. * The host MLME needs to set this based on AP capability and stations
  5565. * request Set in the association request received from the station.
  5566. *
  5567. * Lower 8 bits of the value specify the UAPSD configuration.
  5568. *
  5569. * (see enum wmi_ap_ps_param_uapsd)
  5570. * The default value is 0.
  5571. */
  5572. WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
  5573. /**
  5574. * Set the service period for a UAPSD capable station
  5575. *
  5576. * The service period from wme ie in the (re)assoc request frame.
  5577. *
  5578. * (see enum wmi_ap_ps_peer_param_max_sp)
  5579. */
  5580. WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
  5581. /** Time in seconds for aging out buffered frames
  5582. * for STA in power save */
  5583. WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
  5584. /** Specify frame types that are considered SIFS
  5585. * RESP trigger frame */
  5586. WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
  5587. /** Specifies the trigger state of TID.
  5588. * Valid only for UAPSD frame type */
  5589. WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
  5590. /** Specifies the WNM sleep state of a STA */
  5591. WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
  5592. };
  5593. #define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
  5594. #define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
  5595. #define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
  5596. #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
  5597. enum wmi_host_sta_ps_param_uapsd {
  5598. WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
  5599. WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
  5600. WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
  5601. WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
  5602. WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
  5603. WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
  5604. WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
  5605. WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
  5606. };
  5607. enum wmi_host_sta_ps_param_rx_wake_policy {
  5608. /* Wake up when ever there is an RX activity on the VDEV. In this mode
  5609. * the Power save SM(state machine) will come out of sleep by either
  5610. * sending null frame (or) a data frame (with PS==0) in response to TIM
  5611. * bit set in the received beacon frame from AP.
  5612. */
  5613. WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
  5614. /* Here the power save state machine will not wakeup in response to TIM
  5615. * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
  5616. * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
  5617. * access categories are delivery-enabled, the station will send a UAPSD
  5618. * trigger frame, otherwise it will send a PS-Poll.
  5619. */
  5620. WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
  5621. };
  5622. enum wmi_host_sta_ps_param_pspoll_count {
  5623. WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
  5624. /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
  5625. * will send before waking up.
  5626. */
  5627. };
  5628. /** Number of tx frames/beacon that cause the power save SM to wake up.
  5629. *
  5630. * Value 1 causes the SM to wake up for every TX. Value 0 has a special
  5631. * meaning, It will cause the SM to never wake up. This is useful if you want
  5632. * to keep the system to sleep all the time for some kind of test mode . host
  5633. * can change this parameter any time. It will affect at the next tx frame.
  5634. */
  5635. enum wmi_host_sta_ps_param_tx_wake_threshold {
  5636. WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
  5637. WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
  5638. /* Values greater than one indicate that many TX attempts per beacon
  5639. * interval before the STA will wake up
  5640. */
  5641. };
  5642. /*
  5643. * Transmit power scale factor.
  5644. *
  5645. */
  5646. typedef enum {
  5647. WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
  5648. WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
  5649. WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
  5650. WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
  5651. WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
  5652. WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
  5653. } WMI_HOST_TP_SCALE;
  5654. enum {
  5655. WMI_HOST_RATEPWR_TABLE_OPS_SET,
  5656. WMI_HOST_RATEPWR_TABLE_OPS_GET,
  5657. };
  5658. /* reserved up through 0xF */
  5659. /**
  5660. * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
  5661. * Below statistics are sent from target to host periodically.
  5662. * These are collected at target as long as target is running
  5663. * and target chip is not in sleep.
  5664. * @listen_time:
  5665. * @reg_tx_frame_cnt:
  5666. * @reg_rx_frame_cnt:
  5667. * @reg_rxclr_cnt:
  5668. * @reg_cycle_cnt: delta cycle count
  5669. * @reg_rxclr_ext_cnt:
  5670. * @reg_ofdm_phyerr_cnt:
  5671. * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
  5672. */
  5673. typedef struct _hp_dcs_mib_stats {
  5674. int32_t listen_time;
  5675. uint32_t reg_tx_frame_cnt;
  5676. uint32_t reg_rx_frame_cnt;
  5677. uint32_t reg_rxclr_cnt;
  5678. uint32_t reg_cycle_cnt;
  5679. uint32_t reg_rxclr_ext_cnt;
  5680. uint32_t reg_ofdm_phyerr_cnt;
  5681. uint32_t reg_cck_phyerr_cnt;
  5682. } wmi_host_dcs_mib_stats_t;
  5683. /**
  5684. * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
  5685. * @reg_tsf32: current running TSF from the TSF-1
  5686. * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
  5687. * and at different ranges, this would not gaurantee that
  5688. * this is the least rssi.
  5689. * @tx_waste_time: Sum of all the failed durations in the last
  5690. * one second interval.
  5691. * @rx_time: count how many times the hal_rxerr_phy is marked, in this
  5692. * time period
  5693. * @phyerr_cnt:
  5694. * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
  5695. * in mib structure
  5696. */
  5697. typedef struct _wmi_host_dcs_im_tgt_stats {
  5698. uint32_t reg_tsf32;
  5699. uint32_t last_ack_rssi;
  5700. uint32_t tx_waste_time;
  5701. uint32_t rx_time;
  5702. uint32_t phyerr_cnt;
  5703. wmi_host_dcs_mib_stats_t mib_stats;
  5704. } wmi_host_dcs_im_tgt_stats_t;
  5705. /**
  5706. * Enum for pktlog req
  5707. */
  5708. typedef enum {
  5709. WMI_HOST_PKTLOG_EVENT_RX = 0x1,
  5710. WMI_HOST_PKTLOG_EVENT_TX = 0x2,
  5711. WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
  5712. WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
  5713. WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
  5714. /* To support Smart Antenna */
  5715. WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
  5716. WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
  5717. WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
  5718. } WMI_HOST_PKTLOG_EVENT;
  5719. /**
  5720. * wmi_host_phyerr
  5721. *
  5722. */
  5723. #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
  5724. #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
  5725. #define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
  5726. #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
  5727. /**
  5728. * struct wmi_host_perchain_rssi_info - per chain RSSI info
  5729. * @rssi_pri20: RSSI on primary 20
  5730. * @rssi_sec20: RSSI on secomdary 20
  5731. * @rssi_sec40: RSSI secondary 40
  5732. * @rssi_sec80: RSSI secondary 80
  5733. */
  5734. typedef struct wmi_host_perchain_rssi_info {
  5735. int8_t rssi_pri20;
  5736. int8_t rssi_sec20;
  5737. int8_t rssi_sec40;
  5738. int8_t rssi_sec80;
  5739. } wmi_host_perchain_rssi_info_t;
  5740. /**
  5741. * struct _wmi_host_rf_info - RF measurement information
  5742. * @rssi_comb: RSSI Information
  5743. * @pc_rssi_info[4]: For now, we know we are getting information
  5744. * for only 4 chains at max. For future extensions
  5745. * use a define
  5746. * @noise_floor: Noise floor information
  5747. */
  5748. typedef struct _wmi_host_rf_info {
  5749. int8_t rssi_comb;
  5750. wmi_host_perchain_rssi_info_t pc_rssi_info[4];
  5751. int16_t noise_floor[4];
  5752. } wmi_host_rf_info_t;
  5753. /**
  5754. * struct _wmi_host_chan_info
  5755. * @center_freq1: center frequency 1 in MHz
  5756. * @center_freq2: center frequency 2 in MHz -valid only for
  5757. * 11ACVHT 80PLUS80 mode
  5758. * @chan_width: channel width in MHz
  5759. */
  5760. typedef struct _wmi_host_chan_info {
  5761. u_int16_t center_freq1;
  5762. u_int16_t center_freq2;
  5763. u_int8_t chan_width;
  5764. } wmi_host_chan_info_t;
  5765. /**
  5766. * struct wmi_host_phyerr
  5767. * @rf_info:
  5768. * @chan_info:
  5769. * @tsf64:
  5770. * @phy_err_code:
  5771. * @tsf_timestamp:
  5772. * @bufp:
  5773. * @buf_len:
  5774. * @phy_err_mask0:
  5775. * @phy_err_mask1:
  5776. */
  5777. typedef struct _wmi_host_phyerr {
  5778. wmi_host_rf_info_t rf_info;
  5779. wmi_host_chan_info_t chan_info;
  5780. uint64_t tsf64;
  5781. int32_t phy_err_code;
  5782. uint32_t tsf_timestamp;
  5783. uint8_t *bufp;
  5784. uint32_t buf_len;
  5785. uint32_t phy_err_mask0;
  5786. uint32_t phy_err_mask1;
  5787. } wmi_host_phyerr_t;
  5788. /**
  5789. * struct wmi_host_rtt_event_hdr
  5790. * @req_id: request id
  5791. * @status: status
  5792. * @meas_done: measurement done flag
  5793. * @meas_type: measurement type
  5794. * @report_type: report type
  5795. * @v3_status: v2 status
  5796. * @v3_finish:
  5797. * @v3_tm_start:
  5798. * @num_ap: number of AP
  5799. * @result: resuult
  5800. * @dest_mac: destination mac
  5801. */
  5802. typedef struct {
  5803. uint16_t req_id;
  5804. uint16_t status:1,
  5805. meas_done:1,
  5806. meas_type:3,
  5807. report_type:3,
  5808. v3_status:2,
  5809. v3_finish:1,
  5810. v3_tm_start:1,
  5811. num_ap:4;
  5812. uint16_t result;
  5813. uint8_t dest_mac[IEEE80211_ADDR_LEN];
  5814. } wmi_host_rtt_event_hdr;
  5815. /**
  5816. * struct wmi_host_rtt_meas_event - RTT measurement event
  5817. * @chain_mask:
  5818. * @bw:
  5819. * @rsvd:
  5820. * @txrxchain_mask: Bit:0-3:chain mask
  5821. * Bit 4-5: band width info
  5822. * 00 --Legacy 20, 01 --HT/VHT20
  5823. * 10 --HT/VHT40, 11 -- VHT80
  5824. * @tod: resolution of 0.1ns
  5825. * @toa: resolution of 0.1ns
  5826. * @t3:
  5827. * @t4:
  5828. * @rssi0:
  5829. * @rssi1:
  5830. * @rssi2:
  5831. * @rssi3:
  5832. */
  5833. typedef struct {
  5834. uint32_t chain_mask:3,
  5835. bw:2,
  5836. rsvd:27;
  5837. uint32_t txrxchain_mask;
  5838. uint64_t tod;
  5839. uint64_t toa;
  5840. uint64_t t3;
  5841. uint64_t t4;
  5842. uint32_t rssi0;
  5843. uint32_t rssi1;
  5844. uint32_t rssi2;
  5845. uint32_t rssi3;
  5846. } wmi_host_rtt_meas_event;
  5847. /*----RTT Report event definition ----*/
  5848. typedef enum {
  5849. /* rtt cmd header parsing error --terminate */
  5850. WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
  5851. /* rtt body parsing error -- skip current STA REQ */
  5852. WMI_HOST_RTT_COMMAND_ERROR,
  5853. /* rtt no resource -- terminate */
  5854. WMI_HOST_RTT_MODULE_BUSY,
  5855. /* STA exceed the support limit -- only server the first n STA */
  5856. WMI_HOST_RTT_TOO_MANY_STA,
  5857. /* any allocate failure */
  5858. WMI_HOST_RTT_NO_RESOURCE,
  5859. /* can not find vdev with vdev ID - skip current STA REQ */
  5860. WMI_HOST_RTT_VDEV_ERROR,
  5861. /* Tx failure -- continiue and measure number */
  5862. WMI_HOST_RTT_TRANSIMISSION_ERROR,
  5863. /* wait for first TM timer expire-terminate current STA measurement */
  5864. WMI_HOST_RTT_TM_TIMER_EXPIRE,
  5865. /* we do not support RTT measurement with this type of frame */
  5866. WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
  5867. /* whole RTT measurement timer expire-terminate
  5868. ** current STA measurement */
  5869. WMI_HOST_RTT_TIMER_EXPIRE,
  5870. /* channel swicth failed */
  5871. WMI_HOST_RTT_CHAN_SWITCH_ERROR,
  5872. /* TMR trans error, this dest peer will be skipped */
  5873. WMI_HOST_RTT_TMR_TRANS_ERROR,
  5874. /* V3 only. If both CFR and Token mismatch, do not report */
  5875. WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
  5876. /* For First TM, if CFR is bad, then do not report */
  5877. WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
  5878. /* do not allow report type2 mix with type 0, 1 */
  5879. WMI_HOST_RTT_REPORT_TYPE2_MIX,
  5880. /* LCI Configuration OK. - Responder only */
  5881. WMI_HOST_RTT_LCI_CFG_OK,
  5882. /* LCR configuration OK. - Responder only */
  5883. WMI_HOST_RTT_LCR_CFG_OK,
  5884. /* Bad configuration LCI (or) LCR request - Responder only */
  5885. WMI_HOST_RTT_CFG_ERROR,
  5886. WMI_HOST_WMI_RTT_REJECT_MAX,
  5887. } WMI_HOST_RTT_ERROR_INDICATOR;
  5888. typedef struct {
  5889. wmi_host_rtt_event_hdr hdr;
  5890. WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
  5891. } wmi_host_rtt_error_report_event;
  5892. #if defined(AR9888)
  5893. typedef enum {
  5894. WMI_HOST_PROF_CPU_IDLE,
  5895. WMI_HOST_PROF_PPDU_PROC,
  5896. WMI_HOST_PROF_PPDU_POST,
  5897. WMI_HOST_PROF_HTT_TX_INPUT,
  5898. WMI_HOST_PROF_MSDU_ENQ,
  5899. WMI_HOST_PROF_PPDU_POST_HAL,
  5900. WMI_HOST_PROF_COMPUTE_TX_TIME,
  5901. /* Add new ID's above this. */
  5902. WMI_HOST_PROF_MAX_ID,
  5903. } wmi_host_profile_id_t;
  5904. #endif
  5905. #define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
  5906. #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
  5907. #if defined(AR9888)
  5908. #define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
  5909. #else
  5910. #define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
  5911. #endif
  5912. /**
  5913. * struct wmi_host_wlan_profile - Host profile param
  5914. * @id: profile id
  5915. * @cnt: Count
  5916. * @tot:
  5917. * @min: minimum
  5918. * @max: Mac
  5919. * @hist_intvl: history interval
  5920. * @hist: profile data history
  5921. */
  5922. typedef struct {
  5923. uint32_t id;
  5924. uint32_t cnt;
  5925. uint32_t tot;
  5926. uint32_t min;
  5927. uint32_t max;
  5928. uint32_t hist_intvl;
  5929. uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
  5930. } wmi_host_wlan_profile_t;
  5931. /**
  5932. * struct wmi_host_wlan_profile_ctx_t - profile context
  5933. * @tot: time in us
  5934. * @tx_msdu_cnt: MSDU TX count
  5935. * @tx_mpdu_cnt: MPDU tx count
  5936. * @tx_ppdu_cnt: PPDU tx count
  5937. * @rx_msdu_cnt: MSDU RX count
  5938. * @rx_mpdu_cnt: MPDU RXcount
  5939. * @bin_count: Bin count
  5940. */
  5941. typedef struct {
  5942. uint32_t tot;
  5943. uint32_t tx_msdu_cnt;
  5944. uint32_t tx_mpdu_cnt;
  5945. uint32_t tx_ppdu_cnt;
  5946. uint32_t rx_msdu_cnt;
  5947. uint32_t rx_mpdu_cnt;
  5948. uint32_t bin_count;
  5949. } wmi_host_wlan_profile_ctx_t;
  5950. /**
  5951. * struct wmi_host_chan_info_event - Channel info WMI event
  5952. * @err_code: Error code
  5953. * @freq: Channel freq
  5954. * @cmd_flags: Read flags
  5955. * @noise_floor: Noise Floor value
  5956. * @rx_clear_count: rx clear count
  5957. * @cycle_count: cycle count
  5958. * @chan_tx_pwr_range: channel tx power per range
  5959. * @chan_tx_pwr_tp: channel tx power per throughput
  5960. * @rx_frame_count: rx frame count
  5961. * @rx_11b_mode_data_duration: 11b mode data duration
  5962. */
  5963. typedef struct {
  5964. uint32_t err_code;
  5965. uint32_t freq;
  5966. uint32_t cmd_flags;
  5967. uint32_t noise_floor;
  5968. uint32_t rx_clear_count;
  5969. uint32_t cycle_count;
  5970. uint32_t chan_tx_pwr_range;
  5971. uint32_t chan_tx_pwr_tp;
  5972. uint32_t rx_frame_count;
  5973. uint32_t rx_11b_mode_data_duration;
  5974. } wmi_host_chan_info_event;
  5975. /**
  5976. * struct wmi_host_pdev_channel_hopping_event
  5977. * @noise_floor_report_iter: Noise threshold iterations with high values
  5978. * @noise_floor_total_iter: Total noise threshold iterations
  5979. */
  5980. typedef struct {
  5981. uint32_t noise_floor_report_iter;
  5982. uint32_t noise_floor_total_iter;
  5983. } wmi_host_pdev_channel_hopping_event;
  5984. /**
  5985. * struct wmi_host_pdev_bss_chan_info_event
  5986. * @freq: Units in MHz
  5987. * @noise_floor: units are dBm
  5988. * @rx_clear_count_low:
  5989. * @rx_clear_count_high:
  5990. * @cycle_count_low:
  5991. * @cycle_count_high:
  5992. * @tx_cycle_count_low:
  5993. * @tx_cycle_count_high:
  5994. * @rx_cycle_count_low:
  5995. * @rx_cycle_count_high:
  5996. * @rx_bss_cycle_count_low:
  5997. * @rx_bss_cycle_count_high:
  5998. * @reserved:
  5999. */
  6000. typedef struct {
  6001. uint32_t freq;
  6002. uint32_t noise_floor;
  6003. uint32_t rx_clear_count_low;
  6004. uint32_t rx_clear_count_high;
  6005. uint32_t cycle_count_low;
  6006. uint32_t cycle_count_high;
  6007. uint32_t tx_cycle_count_low;
  6008. uint32_t tx_cycle_count_high;
  6009. uint32_t rx_cycle_count_low;
  6010. uint32_t rx_cycle_count_high;
  6011. uint32_t rx_bss_cycle_count_low;
  6012. uint32_t rx_bss_cycle_count_high;
  6013. uint32_t reserved;
  6014. } wmi_host_pdev_bss_chan_info_event;
  6015. #define WMI_HOST_INST_STATS_INVALID_RSSI 0
  6016. /**
  6017. * struct wmi_host_inst_stats_resp
  6018. * @iRSSI: Instantaneous RSSI
  6019. * @peer_macaddr: peer mac address
  6020. */
  6021. typedef struct {
  6022. uint32_t iRSSI;
  6023. wmi_host_mac_addr peer_macaddr;
  6024. } wmi_host_inst_stats_resp;
  6025. /* Event definition and new structure addition to send event
  6026. * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
  6027. */
  6028. #define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
  6029. #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
  6030. #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
  6031. /**
  6032. * struct wmi_host_tx_data_traffic_ctrl_event
  6033. * @peer_ast_idx: For vdev based control, peer_ast_idx will be
  6034. * WMI_INVALID_PEER_AST_INDEX
  6035. * @vdev_id: only applies if peer_ast_idx == INVALID
  6036. * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
  6037. * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
  6038. */
  6039. typedef struct {
  6040. uint32_t peer_ast_idx;
  6041. uint32_t vdev_id;
  6042. uint32_t ctrl_cmd;
  6043. } wmi_host_tx_data_traffic_ctrl_event;
  6044. /**
  6045. * struct wmi_host_ath_dcs_cw_int
  6046. * @channel: either number or freq in mhz
  6047. */
  6048. typedef struct {
  6049. uint32_t channel;
  6050. } wmi_host_ath_dcs_cw_int;
  6051. #define WMI_MAX_POWER_DBG_ARGS 8
  6052. /**
  6053. * struct wmi_power_dbg_params - power debug command parameter
  6054. * @pdev_id: subsystem identifier
  6055. * @module_id: parameter id
  6056. * @num_arg: no of arguments
  6057. * @args: arguments
  6058. */
  6059. struct wmi_power_dbg_params {
  6060. uint32_t pdev_id;
  6061. uint32_t module_id;
  6062. uint32_t num_args;
  6063. uint32_t args[WMI_MAX_POWER_DBG_ARGS];
  6064. };
  6065. /**
  6066. * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params
  6067. * @vdev_id: vdev id
  6068. * @is_enabled: Adaptive dwell time is enabled/disabled
  6069. * @dwelltime_mode: global default adaptive dwell mode
  6070. * @lpf_weight: weight to calculate the average low pass
  6071. * filter for channel congestion
  6072. * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec
  6073. * @wifi_act_threshold: % of wifi activity used in passive scan 0-100
  6074. *
  6075. */
  6076. struct wmi_adaptive_dwelltime_params {
  6077. uint32_t vdev_id;
  6078. bool is_enabled;
  6079. enum wmi_dwelltime_adaptive_mode dwelltime_mode;
  6080. uint8_t lpf_weight;
  6081. uint8_t passive_mon_intval;
  6082. uint8_t wifi_act_threshold;
  6083. };
  6084. /**
  6085. * struct wmi_fw_dump_seg_req - individual segment details
  6086. * @seg_id - segment id.
  6087. * @seg_start_addr_lo - lower address of the segment.
  6088. * @seg_start_addr_hi - higher address of the segment.
  6089. * @seg_length - length of the segment.
  6090. * @dst_addr_lo - lower address of the destination buffer.
  6091. * @dst_addr_hi - higher address of the destination buffer.
  6092. *
  6093. * This structure carries the information to firmware about the
  6094. * individual segments. This structure is part of firmware memory
  6095. * dump request.
  6096. */
  6097. struct wmi_fw_dump_seg_req {
  6098. uint8_t seg_id;
  6099. uint32_t seg_start_addr_lo;
  6100. uint32_t seg_start_addr_hi;
  6101. uint32_t seg_length;
  6102. uint32_t dst_addr_lo;
  6103. uint32_t dst_addr_hi;
  6104. };
  6105. /**
  6106. * enum wmi_userspace_log_level - Log level at userspace
  6107. * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
  6108. * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
  6109. * level with minimal user impact. This is the default value.
  6110. * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
  6111. * trying to reproduce a problem, wifi performances and power can be impacted
  6112. * but device should not otherwise be significantly impacted
  6113. * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
  6114. * actively debug a problem
  6115. *
  6116. * Various log levels defined in the userspace for logging applications
  6117. */
  6118. enum wmi_userspace_log_level {
  6119. WMI_LOG_LEVEL_NO_COLLECTION,
  6120. WMI_LOG_LEVEL_NORMAL_COLLECT,
  6121. WMI_LOG_LEVEL_ISSUE_REPRO,
  6122. WMI_LOG_LEVEL_ACTIVE,
  6123. };
  6124. #endif /* _WMI_UNIFIED_PARAM_H_ */