wmi.h 183 KB

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